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

    All required parameters must be populated in order to send to Azure.

    :param user_code: Required.  <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 65 characters</span>
    :type user_code: str
    :param full_name: Required.  <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 32 characters</span>
    :type full_name: str
    :param password: Required.  <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 128 characters</span>
    :type password: str
    :param email: Required.  <span class='property-internal'>Required</span>
     <span class='property-internal'>Must be between 0 and 128
     characters</span>
    :type email: str
    :param cost_center_id: NOTE: This property will be deprecated
     Use TopmostCostCenterIds with a single valued list to create a user with a
     single topmost cost center
     Create User with a single topmost cost center id
     The CostCenterId must be in the creating user's topmost
     If this value is not null then TopmostCostCenterIds must be null <span
     class='property-internal'>Topmost (CostCenter)</span>
    :type cost_center_id: int
    :param topmost_cost_center_ids: Create User with one or multiple topmost
     cost center ids
     The CostCenterIds must be in the creating user's topmost
     If this is not null then CostCenterId must be null <span
     class='property-internal'>Cannot be Empty</span> <span
     class='property-internal'>NULL Valid</span>
    :type topmost_cost_center_ids: list[int]
    :param place_id: NOTE: This property will be deprecated
     Use TopmostPlaceIds with a single valued list to create a user with a
     single topmost place
     Create User with a single topmost place id
     The PlaceId must be in the creating user's topmost
     If this value is not null then TopmostPlaceIds must be null <span
     class='property-internal'>Topmost (Place)</span>
    :type place_id: int
    :param topmost_place_ids: Create User with one or multiple topmost place
     ids
     The PlaceIds must be in the creating user's topmost
     If this is not null then PlaceId must be null <span
     class='property-internal'>Cannot be Empty</span> <span
     class='property-internal'>NULL Valid</span>
    :type topmost_place_ids: list[int]
    :param active_directory:
    :type active_directory: bool
    :param active:
    :type active: bool
    :param password_expiration_interval: Required.  <span
     class='property-internal'>Required</span>
    :type password_expiration_interval: int
    :param strong_password: Required.  <span
     class='property-internal'>Required</span>
    :type strong_password: bool
    :param force_password_change: Required.  <span
     class='property-internal'>Required</span>
    :type force_password_change: bool
    :param user_role_id: Required.  <span
     class='property-internal'>Required</span>
    :type user_role_id: int
    :param max_approval_amount:
    :type max_approval_amount: int
    :param report_group_id:
    :type report_group_id: int
    :param user_groups: List of user group ids
     If null, empty, or not passed the user will not be assigned to any groups
    :type user_groups: list[int]
    """

    _validation = {
        'user_code': {'required': True, 'max_length': 65, 'min_length': 0},
        'full_name': {'required': True, 'max_length': 32, 'min_length': 0},
        'password': {'required': True, 'max_length': 128, 'min_length': 0},
        'email': {'required': True, 'max_length': 128, 'min_length': 0},
        'password_expiration_interval': {'required': True},
        'strong_password': {'required': True},
        'force_password_change': {'required': True},
        'user_role_id': {'required': True},
    }

    _attribute_map = {
        'user_code': {'key': 'userCode', 'type': 'str'},
        'full_name': {'key': 'fullName', 'type': 'str'},
        'password': {'key': 'password', 'type': 'str'},
        'email': {'key': 'email', 'type': 'str'},
        'cost_center_id': {'key': 'costCenterId', 'type': 'int'},
        'topmost_cost_center_ids': {'key': 'topmostCostCenterIds', 'type': '[int]'},
        'place_id': {'key': 'placeId', 'type': 'int'},
        'topmost_place_ids': {'key': 'topmostPlaceIds', 'type': '[int]'},
        'active_directory': {'key': 'activeDirectory', 'type': 'bool'},
        'active': {'key': 'active', 'type': 'bool'},
        'password_expiration_interval': {'key': 'passwordExpirationInterval', 'type': 'int'},
        'strong_password': {'key': 'strongPassword', 'type': 'bool'},
        'force_password_change': {'key': 'forcePasswordChange', 'type': 'bool'},
        'user_role_id': {'key': 'userRoleId', 'type': 'int'},
        'max_approval_amount': {'key': 'maxApprovalAmount', 'type': 'int'},
        'report_group_id': {'key': 'reportGroupId', 'type': 'int'},
        'user_groups': {'key': 'userGroups', 'type': '[int]'},
    }

    def __init__(self, **kwargs):
        super(UserCreateRequest, self).__init__(**kwargs)
        self.user_code = kwargs.get('user_code', None)
        self.full_name = kwargs.get('full_name', None)
        self.password = kwargs.get('password', None)
        self.email = kwargs.get('email', None)
        self.cost_center_id = kwargs.get('cost_center_id', None)
        self.topmost_cost_center_ids = kwargs.get('topmost_cost_center_ids', None)
        self.place_id = kwargs.get('place_id', None)
        self.topmost_place_ids = kwargs.get('topmost_place_ids', None)
        self.active_directory = kwargs.get('active_directory', None)
        self.active = kwargs.get('active', 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.user_role_id = kwargs.get('user_role_id', None)
        self.max_approval_amount = kwargs.get('max_approval_amount', None)
        self.report_group_id = kwargs.get('report_group_id', None)
        self.user_groups = kwargs.get('user_groups', None)
