# coding: utf-8

"""
    Onshape REST API

    The Onshape REST API consumed by all clients.  # noqa: E501

    OpenAPI spec version: 1.96
    Contact: api-support@onshape.zendesk.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class BTDiscountInfo(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 = {
        'owner_id': 'str',
        'percent_off': 'int',
        'amount_off': 'int',
        'coupon_type': 'int',
        'coupon_valid_months': 'int',
        'expires_at': 'datetime',
        'created_at': 'datetime',
        'plan_id': 'str',
        'created_by': 'BTUserSummaryInfo',
        'used_at': 'datetime',
        'trial_end_date': 'str',
        'account_balance': 'int',
        'name': 'str',
        'id': 'str',
        'href': 'str',
        'view_ref': 'str'
    }

    attribute_map = {
        'owner_id': 'ownerId',
        'percent_off': 'percentOff',
        'amount_off': 'amountOff',
        'coupon_type': 'couponType',
        'coupon_valid_months': 'couponValidMonths',
        'expires_at': 'expiresAt',
        'created_at': 'createdAt',
        'plan_id': 'planId',
        'created_by': 'createdBy',
        'used_at': 'usedAt',
        'trial_end_date': 'trialEndDate',
        'account_balance': 'accountBalance',
        'name': 'name',
        'id': 'id',
        'href': 'href',
        'view_ref': 'viewRef'
    }

    def __init__(self, owner_id=None, percent_off=None, amount_off=None, coupon_type=None, coupon_valid_months=None, expires_at=None, created_at=None, plan_id=None, created_by=None, used_at=None, trial_end_date=None, account_balance=None, name=None, id=None, href=None, view_ref=None):  # noqa: E501
        """BTDiscountInfo - a model defined in OpenAPI"""  # noqa: E501

        self._owner_id = None
        self._percent_off = None
        self._amount_off = None
        self._coupon_type = None
        self._coupon_valid_months = None
        self._expires_at = None
        self._created_at = None
        self._plan_id = None
        self._created_by = None
        self._used_at = None
        self._trial_end_date = None
        self._account_balance = None
        self._name = None
        self._id = None
        self._href = None
        self._view_ref = None
        self.discriminator = None

        if owner_id is not None:
            self.owner_id = owner_id
        if percent_off is not None:
            self.percent_off = percent_off
        if amount_off is not None:
            self.amount_off = amount_off
        if coupon_type is not None:
            self.coupon_type = coupon_type
        if coupon_valid_months is not None:
            self.coupon_valid_months = coupon_valid_months
        if expires_at is not None:
            self.expires_at = expires_at
        if created_at is not None:
            self.created_at = created_at
        if plan_id is not None:
            self.plan_id = plan_id
        if created_by is not None:
            self.created_by = created_by
        if used_at is not None:
            self.used_at = used_at
        if trial_end_date is not None:
            self.trial_end_date = trial_end_date
        if account_balance is not None:
            self.account_balance = account_balance
        if name is not None:
            self.name = name
        if id is not None:
            self.id = id
        if href is not None:
            self.href = href
        if view_ref is not None:
            self.view_ref = view_ref

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


        :return: The owner_id of this BTDiscountInfo.  # noqa: E501
        :rtype: str
        """
        return self._owner_id

    @owner_id.setter
    def owner_id(self, owner_id):
        """Sets the owner_id of this BTDiscountInfo.


        :param owner_id: The owner_id of this BTDiscountInfo.  # noqa: E501
        :type: str
        """

        self._owner_id = owner_id

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


        :return: The percent_off of this BTDiscountInfo.  # noqa: E501
        :rtype: int
        """
        return self._percent_off

    @percent_off.setter
    def percent_off(self, percent_off):
        """Sets the percent_off of this BTDiscountInfo.


        :param percent_off: The percent_off of this BTDiscountInfo.  # noqa: E501
        :type: int
        """

        self._percent_off = percent_off

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


        :return: The amount_off of this BTDiscountInfo.  # noqa: E501
        :rtype: int
        """
        return self._amount_off

    @amount_off.setter
    def amount_off(self, amount_off):
        """Sets the amount_off of this BTDiscountInfo.


        :param amount_off: The amount_off of this BTDiscountInfo.  # noqa: E501
        :type: int
        """

        self._amount_off = amount_off

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


        :return: The coupon_type of this BTDiscountInfo.  # noqa: E501
        :rtype: int
        """
        return self._coupon_type

    @coupon_type.setter
    def coupon_type(self, coupon_type):
        """Sets the coupon_type of this BTDiscountInfo.


        :param coupon_type: The coupon_type of this BTDiscountInfo.  # noqa: E501
        :type: int
        """

        self._coupon_type = coupon_type

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


        :return: The coupon_valid_months of this BTDiscountInfo.  # noqa: E501
        :rtype: int
        """
        return self._coupon_valid_months

    @coupon_valid_months.setter
    def coupon_valid_months(self, coupon_valid_months):
        """Sets the coupon_valid_months of this BTDiscountInfo.


        :param coupon_valid_months: The coupon_valid_months of this BTDiscountInfo.  # noqa: E501
        :type: int
        """

        self._coupon_valid_months = coupon_valid_months

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


        :return: The expires_at of this BTDiscountInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._expires_at

    @expires_at.setter
    def expires_at(self, expires_at):
        """Sets the expires_at of this BTDiscountInfo.


        :param expires_at: The expires_at of this BTDiscountInfo.  # noqa: E501
        :type: datetime
        """

        self._expires_at = expires_at

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


        :return: The created_at of this BTDiscountInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this BTDiscountInfo.


        :param created_at: The created_at of this BTDiscountInfo.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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


        :return: The plan_id of this BTDiscountInfo.  # noqa: E501
        :rtype: str
        """
        return self._plan_id

    @plan_id.setter
    def plan_id(self, plan_id):
        """Sets the plan_id of this BTDiscountInfo.


        :param plan_id: The plan_id of this BTDiscountInfo.  # noqa: E501
        :type: str
        """

        self._plan_id = plan_id

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


        :return: The created_by of this BTDiscountInfo.  # noqa: E501
        :rtype: BTUserSummaryInfo
        """
        return self._created_by

    @created_by.setter
    def created_by(self, created_by):
        """Sets the created_by of this BTDiscountInfo.


        :param created_by: The created_by of this BTDiscountInfo.  # noqa: E501
        :type: BTUserSummaryInfo
        """

        self._created_by = created_by

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


        :return: The used_at of this BTDiscountInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._used_at

    @used_at.setter
    def used_at(self, used_at):
        """Sets the used_at of this BTDiscountInfo.


        :param used_at: The used_at of this BTDiscountInfo.  # noqa: E501
        :type: datetime
        """

        self._used_at = used_at

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


        :return: The trial_end_date of this BTDiscountInfo.  # noqa: E501
        :rtype: str
        """
        return self._trial_end_date

    @trial_end_date.setter
    def trial_end_date(self, trial_end_date):
        """Sets the trial_end_date of this BTDiscountInfo.


        :param trial_end_date: The trial_end_date of this BTDiscountInfo.  # noqa: E501
        :type: str
        """

        self._trial_end_date = trial_end_date

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


        :return: The account_balance of this BTDiscountInfo.  # noqa: E501
        :rtype: int
        """
        return self._account_balance

    @account_balance.setter
    def account_balance(self, account_balance):
        """Sets the account_balance of this BTDiscountInfo.


        :param account_balance: The account_balance of this BTDiscountInfo.  # noqa: E501
        :type: int
        """

        self._account_balance = account_balance

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


        :return: The name of this BTDiscountInfo.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this BTDiscountInfo.


        :param name: The name of this BTDiscountInfo.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The id of this BTDiscountInfo.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this BTDiscountInfo.


        :param id: The id of this BTDiscountInfo.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The href of this BTDiscountInfo.  # noqa: E501
        :rtype: str
        """
        return self._href

    @href.setter
    def href(self, href):
        """Sets the href of this BTDiscountInfo.


        :param href: The href of this BTDiscountInfo.  # noqa: E501
        :type: str
        """

        self._href = href

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


        :return: The view_ref of this BTDiscountInfo.  # noqa: E501
        :rtype: str
        """
        return self._view_ref

    @view_ref.setter
    def view_ref(self, view_ref):
        """Sets the view_ref of this BTDiscountInfo.


        :param view_ref: The view_ref of this BTDiscountInfo.  # noqa: E501
        :type: str
        """

        self._view_ref = view_ref

    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, BTDiscountInfo):
            return False

        return self.__dict__ == other.__dict__

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