# coding: utf-8

"""
    Onshape REST API

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

    The version of the OpenAPI document: 1.106
    Contact: api-support@onshape.zendesk.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class BTSplineDescriptionAllOf(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 = {
        'degree': 'int',
        'is_periodic': 'bool',
        'knots': 'list[float]',
        'is_rational': 'bool',
        'control_points': 'list[float]'
    }

    attribute_map = {
        'degree': 'degree',
        'is_periodic': 'isPeriodic',
        'knots': 'knots',
        'is_rational': 'isRational',
        'control_points': 'controlPoints'
    }

    def __init__(self, degree=None, is_periodic=None, knots=None, is_rational=None, control_points=None):  # noqa: E501
        """BTSplineDescriptionAllOf - a model defined in OpenAPI"""  # noqa: E501

        self._degree = None
        self._is_periodic = None
        self._knots = None
        self._is_rational = None
        self._control_points = None
        self.discriminator = None

        if degree is not None:
            self.degree = degree
        if is_periodic is not None:
            self.is_periodic = is_periodic
        if knots is not None:
            self.knots = knots
        if is_rational is not None:
            self.is_rational = is_rational
        if control_points is not None:
            self.control_points = control_points

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


        :return: The degree of this BTSplineDescriptionAllOf.  # noqa: E501
        :rtype: int
        """
        return self._degree

    @degree.setter
    def degree(self, degree):
        """Sets the degree of this BTSplineDescriptionAllOf.


        :param degree: The degree of this BTSplineDescriptionAllOf.  # noqa: E501
        :type: int
        """

        self._degree = degree

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


        :return: The is_periodic of this BTSplineDescriptionAllOf.  # noqa: E501
        :rtype: bool
        """
        return self._is_periodic

    @is_periodic.setter
    def is_periodic(self, is_periodic):
        """Sets the is_periodic of this BTSplineDescriptionAllOf.


        :param is_periodic: The is_periodic of this BTSplineDescriptionAllOf.  # noqa: E501
        :type: bool
        """

        self._is_periodic = is_periodic

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


        :return: The knots of this BTSplineDescriptionAllOf.  # noqa: E501
        :rtype: list[float]
        """
        return self._knots

    @knots.setter
    def knots(self, knots):
        """Sets the knots of this BTSplineDescriptionAllOf.


        :param knots: The knots of this BTSplineDescriptionAllOf.  # noqa: E501
        :type: list[float]
        """

        self._knots = knots

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


        :return: The is_rational of this BTSplineDescriptionAllOf.  # noqa: E501
        :rtype: bool
        """
        return self._is_rational

    @is_rational.setter
    def is_rational(self, is_rational):
        """Sets the is_rational of this BTSplineDescriptionAllOf.


        :param is_rational: The is_rational of this BTSplineDescriptionAllOf.  # noqa: E501
        :type: bool
        """

        self._is_rational = is_rational

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


        :return: The control_points of this BTSplineDescriptionAllOf.  # noqa: E501
        :rtype: list[float]
        """
        return self._control_points

    @control_points.setter
    def control_points(self, control_points):
        """Sets the control_points of this BTSplineDescriptionAllOf.


        :param control_points: The control_points of this BTSplineDescriptionAllOf.  # noqa: E501
        :type: list[float]
        """

        self._control_points = control_points

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

        return self.__dict__ == other.__dict__

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