# coding: utf-8

"""
    Zarban Wallet API

    API for Zarban wallet services.  # noqa: E501

    The version of the OpenAPI document: 2.0.0
    Contact: info@zarban.io
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from zarban.wallet.openapi_client.configuration import Configuration


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

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'intent': 'str',
        'plan_name': 'str',
        'collateral': 'str',
        'debt': 'str',
        'symbol': 'str',
        'loan_to_value_option': 'LoanToValueOptions'
    }

    attribute_map = {
        'intent': 'intent',
        'plan_name': 'planName',
        'collateral': 'collateral',
        'debt': 'debt',
        'symbol': 'symbol',
        'loan_to_value_option': 'loanToValueOption'
    }

    def __init__(self, intent=None, plan_name=None, collateral=None, debt=None, symbol=None, loan_to_value_option=None, local_vars_configuration=None):  # noqa: E501
        """LoanCreateRequest - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._intent = None
        self._plan_name = None
        self._collateral = None
        self._debt = None
        self._symbol = None
        self._loan_to_value_option = None
        self.discriminator = None

        self.intent = intent
        self.plan_name = plan_name
        if collateral is not None:
            self.collateral = collateral
        if debt is not None:
            self.debt = debt
        self.symbol = symbol
        self.loan_to_value_option = loan_to_value_option

    @property
    def intent(self):
        """Gets the intent of this LoanCreateRequest.  # noqa: E501

        Intent to create a vault  # noqa: E501

        :return: The intent of this LoanCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._intent

    @intent.setter
    def intent(self, intent):
        """Sets the intent of this LoanCreateRequest.

        Intent to create a vault  # noqa: E501

        :param intent: The intent of this LoanCreateRequest.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and intent is None:  # noqa: E501
            raise ValueError("Invalid value for `intent`, must not be `None`")  # noqa: E501
        allowed_values = ["Create", "Preview"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and intent not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `intent` ({0}), must be one of {1}"  # noqa: E501
                .format(intent, allowed_values)
            )

        self._intent = intent

    @property
    def plan_name(self):
        """Gets the plan_name of this LoanCreateRequest.  # noqa: E501

        The name of the loan plan  # noqa: E501

        :return: The plan_name of this LoanCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._plan_name

    @plan_name.setter
    def plan_name(self, plan_name):
        """Sets the plan_name of this LoanCreateRequest.

        The name of the loan plan  # noqa: E501

        :param plan_name: The plan_name of this LoanCreateRequest.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and plan_name is None:  # noqa: E501
            raise ValueError("Invalid value for `plan_name`, must not be `None`")  # noqa: E501

        self._plan_name = plan_name

    @property
    def collateral(self):
        """Gets the collateral of this LoanCreateRequest.  # noqa: E501

        Collateral amount  # noqa: E501

        :return: The collateral of this LoanCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._collateral

    @collateral.setter
    def collateral(self, collateral):
        """Sets the collateral of this LoanCreateRequest.

        Collateral amount  # noqa: E501

        :param collateral: The collateral of this LoanCreateRequest.  # noqa: E501
        :type: str
        """

        self._collateral = collateral

    @property
    def debt(self):
        """Gets the debt of this LoanCreateRequest.  # noqa: E501

        Debt amount  # noqa: E501

        :return: The debt of this LoanCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._debt

    @debt.setter
    def debt(self, debt):
        """Sets the debt of this LoanCreateRequest.

        Debt amount  # noqa: E501

        :param debt: The debt of this LoanCreateRequest.  # noqa: E501
        :type: str
        """

        self._debt = debt

    @property
    def symbol(self):
        """Gets the symbol of this LoanCreateRequest.  # noqa: E501

        Coin symbol  # noqa: E501

        :return: The symbol of this LoanCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._symbol

    @symbol.setter
    def symbol(self, symbol):
        """Sets the symbol of this LoanCreateRequest.

        Coin symbol  # noqa: E501

        :param symbol: The symbol of this LoanCreateRequest.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and symbol is None:  # noqa: E501
            raise ValueError("Invalid value for `symbol`, must not be `None`")  # noqa: E501

        self._symbol = symbol

    @property
    def loan_to_value_option(self):
        """Gets the loan_to_value_option of this LoanCreateRequest.  # noqa: E501


        :return: The loan_to_value_option of this LoanCreateRequest.  # noqa: E501
        :rtype: LoanToValueOptions
        """
        return self._loan_to_value_option

    @loan_to_value_option.setter
    def loan_to_value_option(self, loan_to_value_option):
        """Sets the loan_to_value_option of this LoanCreateRequest.


        :param loan_to_value_option: The loan_to_value_option of this LoanCreateRequest.  # noqa: E501
        :type: LoanToValueOptions
        """
        if self.local_vars_configuration.client_side_validation and loan_to_value_option is None:  # noqa: E501
            raise ValueError("Invalid value for `loan_to_value_option`, must not be `None`")  # noqa: E501

        self._loan_to_value_option = loan_to_value_option

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, LoanCreateRequest):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, LoanCreateRequest):
            return True

        return self.to_dict() != other.to_dict()
