# coding: utf-8

"""
    VRChat API Documentation


    The version of the OpenAPI document: 1.11.0
    Contact: me@ariesclark.com
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from vrchatapi.configuration import Configuration


class TransactionAgreement(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 = {
        'agreement_id': 'str',
        'item_id': 'float',
        'status': 'str',
        'period': 'str',
        'frequency': 'float',
        'billing_type': 'str',
        'start_date': 'str',
        'end_date': 'str',
        'recurring_amt': 'float',
        'currency': 'str',
        'time_created': 'str',
        'next_payment': 'str',
        'last_payment': 'str',
        'last_amount': 'float',
        'last_amount_vat': 'float',
        'outstanding': 'float',
        'failed_attempts': 'float'
    }

    attribute_map = {
        'agreement_id': 'agreementId',
        'item_id': 'itemId',
        'status': 'status',
        'period': 'period',
        'frequency': 'frequency',
        'billing_type': 'billingType',
        'start_date': 'startDate',
        'end_date': 'endDate',
        'recurring_amt': 'recurringAmt',
        'currency': 'currency',
        'time_created': 'timeCreated',
        'next_payment': 'nextPayment',
        'last_payment': 'lastPayment',
        'last_amount': 'lastAmount',
        'last_amount_vat': 'lastAmountVat',
        'outstanding': 'outstanding',
        'failed_attempts': 'failedAttempts'
    }

    def __init__(self, agreement_id=None, item_id=None, status=None, period=None, frequency=None, billing_type=None, start_date=None, end_date=None, recurring_amt=None, currency=None, time_created=None, next_payment=None, last_payment=None, last_amount=None, last_amount_vat=None, outstanding=None, failed_attempts=None, local_vars_configuration=None):  # noqa: E501
        """TransactionAgreement - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._agreement_id = None
        self._item_id = None
        self._status = None
        self._period = None
        self._frequency = None
        self._billing_type = None
        self._start_date = None
        self._end_date = None
        self._recurring_amt = None
        self._currency = None
        self._time_created = None
        self._next_payment = None
        self._last_payment = None
        self._last_amount = None
        self._last_amount_vat = None
        self._outstanding = None
        self._failed_attempts = None
        self.discriminator = None

        self.agreement_id = agreement_id
        self.item_id = item_id
        self.status = status
        self.period = period
        self.frequency = frequency
        self.billing_type = billing_type
        self.start_date = start_date
        self.end_date = end_date
        self.recurring_amt = recurring_amt
        self.currency = currency
        self.time_created = time_created
        self.next_payment = next_payment
        self.last_payment = last_payment
        self.last_amount = last_amount
        self.last_amount_vat = last_amount_vat
        self.outstanding = outstanding
        self.failed_attempts = failed_attempts

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


        :return: The agreement_id of this TransactionAgreement.  # noqa: E501
        :rtype: str
        """
        return self._agreement_id

    @agreement_id.setter
    def agreement_id(self, agreement_id):
        """Sets the agreement_id of this TransactionAgreement.


        :param agreement_id: The agreement_id of this TransactionAgreement.  # noqa: E501
        :type agreement_id: str
        """
        if self.local_vars_configuration.client_side_validation and agreement_id is None:  # noqa: E501
            raise ValueError("Invalid value for `agreement_id`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                agreement_id is not None and len(agreement_id) < 1):
            raise ValueError("Invalid value for `agreement_id`, length must be greater than or equal to `1`")  # noqa: E501

        self._agreement_id = agreement_id

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


        :return: The item_id of this TransactionAgreement.  # noqa: E501
        :rtype: float
        """
        return self._item_id

    @item_id.setter
    def item_id(self, item_id):
        """Sets the item_id of this TransactionAgreement.


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

        self._item_id = item_id

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

        This is NOT TransactionStatus, but whatever Steam return.  # noqa: E501

        :return: The status of this TransactionAgreement.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this TransactionAgreement.

        This is NOT TransactionStatus, but whatever Steam return.  # noqa: E501

        :param status: The status of this TransactionAgreement.  # noqa: E501
        :type status: str
        """
        if self.local_vars_configuration.client_side_validation and status is None:  # noqa: E501
            raise ValueError("Invalid value for `status`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                status is not None and len(status) < 1):
            raise ValueError("Invalid value for `status`, length must be greater than or equal to `1`")  # noqa: E501

        self._status = status

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


        :return: The period of this TransactionAgreement.  # noqa: E501
        :rtype: str
        """
        return self._period

    @period.setter
    def period(self, period):
        """Sets the period of this TransactionAgreement.


        :param period: The period of this TransactionAgreement.  # noqa: E501
        :type period: str
        """
        if self.local_vars_configuration.client_side_validation and period is None:  # noqa: E501
            raise ValueError("Invalid value for `period`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                period is not None and len(period) < 1):
            raise ValueError("Invalid value for `period`, length must be greater than or equal to `1`")  # noqa: E501

        self._period = period

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


        :return: The frequency of this TransactionAgreement.  # noqa: E501
        :rtype: float
        """
        return self._frequency

    @frequency.setter
    def frequency(self, frequency):
        """Sets the frequency of this TransactionAgreement.


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

        self._frequency = frequency

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


        :return: The billing_type of this TransactionAgreement.  # noqa: E501
        :rtype: str
        """
        return self._billing_type

    @billing_type.setter
    def billing_type(self, billing_type):
        """Sets the billing_type of this TransactionAgreement.


        :param billing_type: The billing_type of this TransactionAgreement.  # noqa: E501
        :type billing_type: str
        """
        if self.local_vars_configuration.client_side_validation and billing_type is None:  # noqa: E501
            raise ValueError("Invalid value for `billing_type`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                billing_type is not None and len(billing_type) < 1):
            raise ValueError("Invalid value for `billing_type`, length must be greater than or equal to `1`")  # noqa: E501

        self._billing_type = billing_type

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


        :return: The start_date of this TransactionAgreement.  # noqa: E501
        :rtype: str
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """Sets the start_date of this TransactionAgreement.


        :param start_date: The start_date of this TransactionAgreement.  # noqa: E501
        :type start_date: str
        """
        if self.local_vars_configuration.client_side_validation and start_date is None:  # noqa: E501
            raise ValueError("Invalid value for `start_date`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                start_date is not None and len(start_date) < 1):
            raise ValueError("Invalid value for `start_date`, length must be greater than or equal to `1`")  # noqa: E501

        self._start_date = start_date

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


        :return: The end_date of this TransactionAgreement.  # noqa: E501
        :rtype: str
        """
        return self._end_date

    @end_date.setter
    def end_date(self, end_date):
        """Sets the end_date of this TransactionAgreement.


        :param end_date: The end_date of this TransactionAgreement.  # noqa: E501
        :type end_date: str
        """
        if self.local_vars_configuration.client_side_validation and end_date is None:  # noqa: E501
            raise ValueError("Invalid value for `end_date`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                end_date is not None and len(end_date) < 1):
            raise ValueError("Invalid value for `end_date`, length must be greater than or equal to `1`")  # noqa: E501

        self._end_date = end_date

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


        :return: The recurring_amt of this TransactionAgreement.  # noqa: E501
        :rtype: float
        """
        return self._recurring_amt

    @recurring_amt.setter
    def recurring_amt(self, recurring_amt):
        """Sets the recurring_amt of this TransactionAgreement.


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

        self._recurring_amt = recurring_amt

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


        :return: The currency of this TransactionAgreement.  # noqa: E501
        :rtype: str
        """
        return self._currency

    @currency.setter
    def currency(self, currency):
        """Sets the currency of this TransactionAgreement.


        :param currency: The currency of this TransactionAgreement.  # noqa: E501
        :type currency: str
        """
        if self.local_vars_configuration.client_side_validation and currency is None:  # noqa: E501
            raise ValueError("Invalid value for `currency`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                currency is not None and len(currency) < 1):
            raise ValueError("Invalid value for `currency`, length must be greater than or equal to `1`")  # noqa: E501

        self._currency = currency

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


        :return: The time_created of this TransactionAgreement.  # noqa: E501
        :rtype: str
        """
        return self._time_created

    @time_created.setter
    def time_created(self, time_created):
        """Sets the time_created of this TransactionAgreement.


        :param time_created: The time_created of this TransactionAgreement.  # noqa: E501
        :type time_created: str
        """
        if self.local_vars_configuration.client_side_validation and time_created is None:  # noqa: E501
            raise ValueError("Invalid value for `time_created`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                time_created is not None and len(time_created) < 1):
            raise ValueError("Invalid value for `time_created`, length must be greater than or equal to `1`")  # noqa: E501

        self._time_created = time_created

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


        :return: The next_payment of this TransactionAgreement.  # noqa: E501
        :rtype: str
        """
        return self._next_payment

    @next_payment.setter
    def next_payment(self, next_payment):
        """Sets the next_payment of this TransactionAgreement.


        :param next_payment: The next_payment of this TransactionAgreement.  # noqa: E501
        :type next_payment: str
        """
        if self.local_vars_configuration.client_side_validation and next_payment is None:  # noqa: E501
            raise ValueError("Invalid value for `next_payment`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                next_payment is not None and len(next_payment) < 1):
            raise ValueError("Invalid value for `next_payment`, length must be greater than or equal to `1`")  # noqa: E501

        self._next_payment = next_payment

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


        :return: The last_payment of this TransactionAgreement.  # noqa: E501
        :rtype: str
        """
        return self._last_payment

    @last_payment.setter
    def last_payment(self, last_payment):
        """Sets the last_payment of this TransactionAgreement.


        :param last_payment: The last_payment of this TransactionAgreement.  # noqa: E501
        :type last_payment: str
        """
        if self.local_vars_configuration.client_side_validation and last_payment is None:  # noqa: E501
            raise ValueError("Invalid value for `last_payment`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                last_payment is not None and len(last_payment) < 1):
            raise ValueError("Invalid value for `last_payment`, length must be greater than or equal to `1`")  # noqa: E501

        self._last_payment = last_payment

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


        :return: The last_amount of this TransactionAgreement.  # noqa: E501
        :rtype: float
        """
        return self._last_amount

    @last_amount.setter
    def last_amount(self, last_amount):
        """Sets the last_amount of this TransactionAgreement.


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

        self._last_amount = last_amount

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


        :return: The last_amount_vat of this TransactionAgreement.  # noqa: E501
        :rtype: float
        """
        return self._last_amount_vat

    @last_amount_vat.setter
    def last_amount_vat(self, last_amount_vat):
        """Sets the last_amount_vat of this TransactionAgreement.


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

        self._last_amount_vat = last_amount_vat

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


        :return: The outstanding of this TransactionAgreement.  # noqa: E501
        :rtype: float
        """
        return self._outstanding

    @outstanding.setter
    def outstanding(self, outstanding):
        """Sets the outstanding of this TransactionAgreement.


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

        self._outstanding = outstanding

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


        :return: The failed_attempts of this TransactionAgreement.  # noqa: E501
        :rtype: float
        """
        return self._failed_attempts

    @failed_attempts.setter
    def failed_attempts(self, failed_attempts):
        """Sets the failed_attempts of this TransactionAgreement.


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

        self._failed_attempts = failed_attempts

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, TransactionAgreement):
            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, TransactionAgreement):
            return True

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