# 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 UserResponse(Model):
    """UserResponse.

    :param user_id: User Identifier
    :type user_id: int
    :param user_code: User Code
    :type user_code: str
    :param full_name: Full name of the user
    :type full_name: str
    :param user_role:
    :type user_role: ~energycap.sdk.models.SystemUserRoleChild
    :param cost_center:
    :type cost_center: ~energycap.sdk.models.TopmostCostCenter
    :param place:
    :type place: ~energycap.sdk.models.TopmostPlace
    :param active_directory: Is this a active directory user?
    :type active_directory: bool
    :param active: User is active or inactive
    :type active: bool
    :param email: Email ID of the user
    :type email: str
    :param password_expiration_interval: Days until password expires
    :type password_expiration_interval: int
    :param strong_password: Does user need a strong password - at least 8
     character long, one upper case, one number, one special char
    :type strong_password: bool
    :param force_password_change: Should the user be forced to change password
     on next login
    :type force_password_change: bool
    :param max_approval_amount: Max Total cost of bill this user is allowed to
     approve
    :type max_approval_amount: int
    :param last_login: last time the user logged in
    :type last_login: datetime
    :param report_group:
    :type report_group: ~energycap.sdk.models.ReportGroupChildResponse
    :param external_user_id: The external identifier for the user. This is
     only used for federated login.
    :type external_user_id: str
    :param user_groups: List of groups a user is a part of
    :type user_groups: list[~energycap.sdk.models.UserGroupChild]
    """

    _attribute_map = {
        'user_id': {'key': 'userId', 'type': 'int'},
        'user_code': {'key': 'userCode', 'type': 'str'},
        'full_name': {'key': 'fullName', 'type': 'str'},
        'user_role': {'key': 'userRole', 'type': 'SystemUserRoleChild'},
        'cost_center': {'key': 'costCenter', 'type': 'TopmostCostCenter'},
        'place': {'key': 'place', 'type': 'TopmostPlace'},
        'active_directory': {'key': 'activeDirectory', 'type': 'bool'},
        'active': {'key': 'active', 'type': 'bool'},
        'email': {'key': 'email', 'type': 'str'},
        'password_expiration_interval': {'key': 'passwordExpirationInterval', 'type': 'int'},
        'strong_password': {'key': 'strongPassword', 'type': 'bool'},
        'force_password_change': {'key': 'forcePasswordChange', 'type': 'bool'},
        'max_approval_amount': {'key': 'maxApprovalAmount', 'type': 'int'},
        'last_login': {'key': 'lastLogin', 'type': 'iso-8601'},
        'report_group': {'key': 'reportGroup', 'type': 'ReportGroupChildResponse'},
        'external_user_id': {'key': 'externalUserId', 'type': 'str'},
        'user_groups': {'key': 'userGroups', 'type': '[UserGroupChild]'},
    }

    def __init__(self, **kwargs):
        super(UserResponse, self).__init__(**kwargs)
        self.user_id = kwargs.get('user_id', None)
        self.user_code = kwargs.get('user_code', None)
        self.full_name = kwargs.get('full_name', None)
        self.user_role = kwargs.get('user_role', None)
        self.cost_center = kwargs.get('cost_center', None)
        self.place = kwargs.get('place', None)
        self.active_directory = kwargs.get('active_directory', None)
        self.active = kwargs.get('active', None)
        self.email = kwargs.get('email', None)
        self.password_expiration_interval = kwargs.get('password_expiration_interval', None)
        self.strong_password = kwargs.get('strong_password', None)
        self.force_password_change = kwargs.get('force_password_change', None)
        self.max_approval_amount = kwargs.get('max_approval_amount', None)
        self.last_login = kwargs.get('last_login', None)
        self.report_group = kwargs.get('report_group', None)
        self.external_user_id = kwargs.get('external_user_id', None)
        self.user_groups = kwargs.get('user_groups', None)
