# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from openapi_server.models.base_model_ import Model
import re
from openapi_server import util

import re  # noqa: E501

class LocalAuthRequest(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, login=None, password=None):  # noqa: E501
        """LocalAuthRequest - a model defined in OpenAPI

        :param login: The login of this LocalAuthRequest.  # noqa: E501
        :type login: str
        :param password: The password of this LocalAuthRequest.  # noqa: E501
        :type password: str
        """
        self.openapi_types = {
            'login': str,
            'password': str
        }

        self.attribute_map = {
            'login': 'login',
            'password': 'password'
        }

        self._login = login
        self._password = password

    @classmethod
    def from_dict(cls, dikt) -> 'LocalAuthRequest':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The LocalAuthRequest of this LocalAuthRequest.  # noqa: E501
        :rtype: LocalAuthRequest
        """
        return util.deserialize_model(dikt, cls)

    @property
    def login(self):
        """Gets the login of this LocalAuthRequest.

        The user or organization account name  # noqa: E501

        :return: The login of this LocalAuthRequest.
        :rtype: str
        """
        return self._login

    @login.setter
    def login(self, login):
        """Sets the login of this LocalAuthRequest.

        The user or organization account name  # noqa: E501

        :param login: The login of this LocalAuthRequest.
        :type login: str
        """
        if login is None:
            raise ValueError("Invalid value for `login`, must not be `None`")  # noqa: E501
        if login is not None and len(login) > 25:
            raise ValueError("Invalid value for `login`, length must be less than or equal to `25`")  # noqa: E501
        if login is not None and len(login) < 3:
            raise ValueError("Invalid value for `login`, length must be greater than or equal to `3`")  # noqa: E501
        if login is not None and not re.search(r'^[a-z0-9]+(?:-[a-z0-9]+)*$', login):  # noqa: E501
            raise ValueError("Invalid value for `login`, must be a follow pattern or equal to `/^[a-z0-9]+(?:-[a-z0-9]+)*$/`")  # noqa: E501

        self._login = login

    @property
    def password(self):
        """Gets the password of this LocalAuthRequest.


        :return: The password of this LocalAuthRequest.
        :rtype: str
        """
        return self._password

    @password.setter
    def password(self, password):
        """Sets the password of this LocalAuthRequest.


        :param password: The password of this LocalAuthRequest.
        :type password: str
        """
        if password is None:
            raise ValueError("Invalid value for `password`, must not be `None`")  # noqa: E501

        self._password = password

# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from openapi_server.models.base_model_ import Model
import re
from openapi_server import util

import re  # noqa: E501

class LocalAuthRequest(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, login=None, password=None):  # noqa: E501
        """LocalAuthRequest - a model defined in OpenAPI

        :param login: The login of this LocalAuthRequest.  # noqa: E501
        :type login: str
        :param password: The password of this LocalAuthRequest.  # noqa: E501
        :type password: str
        """
        self.openapi_types = {
            'login': str,
            'password': str
        }

        self.attribute_map = {
            'login': 'login',
            'password': 'password'
        }

        self._login = login
        self._password = password

    @classmethod
    def from_dict(cls, dikt) -> 'LocalAuthRequest':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The LocalAuthRequest of this LocalAuthRequest.  # noqa: E501
        :rtype: LocalAuthRequest
        """
        return util.deserialize_model(dikt, cls)

    @property
    def login(self):
        """Gets the login of this LocalAuthRequest.

        The user or organization account name  # noqa: E501

        :return: The login of this LocalAuthRequest.
        :rtype: str
        """
        return self._login

    @login.setter
    def login(self, login):
        """Sets the login of this LocalAuthRequest.

        The user or organization account name  # noqa: E501

        :param login: The login of this LocalAuthRequest.
        :type login: str
        """
        if login is None:
            raise ValueError("Invalid value for `login`, must not be `None`")  # noqa: E501
        if login is not None and len(login) > 25:
            raise ValueError("Invalid value for `login`, length must be less than or equal to `25`")  # noqa: E501
        if login is not None and len(login) < 3:
            raise ValueError("Invalid value for `login`, length must be greater than or equal to `3`")  # noqa: E501
        if login is not None and not re.search(r'^[a-z0-9]+(?:-[a-z0-9]+)*$', login):  # noqa: E501
            raise ValueError("Invalid value for `login`, must be a follow pattern or equal to `/^[a-z0-9]+(?:-[a-z0-9]+)*$/`")  # noqa: E501

        self._login = login

    @property
    def password(self):
        """Gets the password of this LocalAuthRequest.


        :return: The password of this LocalAuthRequest.
        :rtype: str
        """
        return self._password

    @password.setter
    def password(self, password):
        """Sets the password of this LocalAuthRequest.


        :param password: The password of this LocalAuthRequest.
        :type password: str
        """
        if password is None:
            raise ValueError("Invalid value for `password`, must not be `None`")  # noqa: E501

        self._password = password

# coding: utf-8 # noqa: F401 # noqa: F401 # noqa: E501 NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).      Do not edit the class manually. # noqa: E501 LocalAuthRequest - a model defined in OpenAPI          :param login: The login of this LocalAuthRequest.  # noqa: E501         :type login: str         :param password: The password of this LocalAuthRequest.  # noqa: E501         :type password: str Returns the dict as a model          :param dikt: A dict.         :type: dict         :return: The LocalAuthRequest of this LocalAuthRequest.  # noqa: E501         :rtype: LocalAuthRequest Gets the login of this LocalAuthRequest.          The user or organization account name  # noqa: E501          :return: The login of this LocalAuthRequest.         :rtype: str Sets the login of this LocalAuthRequest.          The user or organization account name  # noqa: E501          :param login: The login of this LocalAuthRequest.         :type login: str # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 Gets the password of this LocalAuthRequest.           :return: The password of this LocalAuthRequest.         :rtype: str Sets the password of this LocalAuthRequest.           :param password: The password of this LocalAuthRequest.         :type password: str # noqa: E501