# coding: utf-8

"""
    Strava API v3

    Strava API  # noqa: E501

    OpenAPI spec version: 3.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from swagger_client.models.lat_lng import LatLng  # noqa: F401,E501


class ExplorerSegment(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'id': 'int',
        'name': 'str',
        'climb_category': 'int',
        'climb_category_desc': 'str',
        'avg_grade': 'float',
        'start_latlng': 'LatLng',
        'end_latlng': 'LatLng',
        'elev_difference': 'float',
        'distance': 'float',
        'points': 'str'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'climb_category': 'climb_category',
        'climb_category_desc': 'climb_category_desc',
        'avg_grade': 'avg_grade',
        'start_latlng': 'start_latlng',
        'end_latlng': 'end_latlng',
        'elev_difference': 'elev_difference',
        'distance': 'distance',
        'points': 'points'
    }

    def __init__(self, id=None, name=None, climb_category=None, climb_category_desc=None, avg_grade=None, start_latlng=None, end_latlng=None, elev_difference=None, distance=None, points=None):  # noqa: E501
        """ExplorerSegment - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._name = None
        self._climb_category = None
        self._climb_category_desc = None
        self._avg_grade = None
        self._start_latlng = None
        self._end_latlng = None
        self._elev_difference = None
        self._distance = None
        self._points = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if climb_category is not None:
            self.climb_category = climb_category
        if climb_category_desc is not None:
            self.climb_category_desc = climb_category_desc
        if avg_grade is not None:
            self.avg_grade = avg_grade
        if start_latlng is not None:
            self.start_latlng = start_latlng
        if end_latlng is not None:
            self.end_latlng = end_latlng
        if elev_difference is not None:
            self.elev_difference = elev_difference
        if distance is not None:
            self.distance = distance
        if points is not None:
            self.points = points

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

        The unique identifier of this segment  # noqa: E501

        :return: The id of this ExplorerSegment.  # noqa: E501
        :rtype: int
        """
        return self._id

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

        The unique identifier of this segment  # noqa: E501

        :param id: The id of this ExplorerSegment.  # noqa: E501
        :type: int
        """

        self._id = id

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

        The name of this segment  # noqa: E501

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

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

        The name of this segment  # noqa: E501

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

        self._name = name

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

        The category of the climb  # noqa: E501

        :return: The climb_category of this ExplorerSegment.  # noqa: E501
        :rtype: int
        """
        return self._climb_category

    @climb_category.setter
    def climb_category(self, climb_category):
        """Sets the climb_category of this ExplorerSegment.

        The category of the climb  # noqa: E501

        :param climb_category: The climb_category of this ExplorerSegment.  # noqa: E501
        :type: int
        """
        if climb_category is not None and climb_category > 5:  # noqa: E501
            raise ValueError("Invalid value for `climb_category`, must be a value less than or equal to `5`")  # noqa: E501
        if climb_category is not None and climb_category < 0:  # noqa: E501
            raise ValueError("Invalid value for `climb_category`, must be a value greater than or equal to `0`")  # noqa: E501

        self._climb_category = climb_category

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

        The description for the category of the climb  # noqa: E501

        :return: The climb_category_desc of this ExplorerSegment.  # noqa: E501
        :rtype: str
        """
        return self._climb_category_desc

    @climb_category_desc.setter
    def climb_category_desc(self, climb_category_desc):
        """Sets the climb_category_desc of this ExplorerSegment.

        The description for the category of the climb  # noqa: E501

        :param climb_category_desc: The climb_category_desc of this ExplorerSegment.  # noqa: E501
        :type: str
        """
        allowed_values = ["NC", "4", "3", "2", "1", "HC"]  # noqa: E501
        if climb_category_desc not in allowed_values:
            raise ValueError(
                "Invalid value for `climb_category_desc` ({0}), must be one of {1}"  # noqa: E501
                .format(climb_category_desc, allowed_values)
            )

        self._climb_category_desc = climb_category_desc

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

        The segment's average grade, in percents  # noqa: E501

        :return: The avg_grade of this ExplorerSegment.  # noqa: E501
        :rtype: float
        """
        return self._avg_grade

    @avg_grade.setter
    def avg_grade(self, avg_grade):
        """Sets the avg_grade of this ExplorerSegment.

        The segment's average grade, in percents  # noqa: E501

        :param avg_grade: The avg_grade of this ExplorerSegment.  # noqa: E501
        :type: float
        """

        self._avg_grade = avg_grade

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


        :return: The start_latlng of this ExplorerSegment.  # noqa: E501
        :rtype: LatLng
        """
        return self._start_latlng

    @start_latlng.setter
    def start_latlng(self, start_latlng):
        """Sets the start_latlng of this ExplorerSegment.


        :param start_latlng: The start_latlng of this ExplorerSegment.  # noqa: E501
        :type: LatLng
        """

        self._start_latlng = start_latlng

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


        :return: The end_latlng of this ExplorerSegment.  # noqa: E501
        :rtype: LatLng
        """
        return self._end_latlng

    @end_latlng.setter
    def end_latlng(self, end_latlng):
        """Sets the end_latlng of this ExplorerSegment.


        :param end_latlng: The end_latlng of this ExplorerSegment.  # noqa: E501
        :type: LatLng
        """

        self._end_latlng = end_latlng

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

        The segments's evelation difference, in meters  # noqa: E501

        :return: The elev_difference of this ExplorerSegment.  # noqa: E501
        :rtype: float
        """
        return self._elev_difference

    @elev_difference.setter
    def elev_difference(self, elev_difference):
        """Sets the elev_difference of this ExplorerSegment.

        The segments's evelation difference, in meters  # noqa: E501

        :param elev_difference: The elev_difference of this ExplorerSegment.  # noqa: E501
        :type: float
        """

        self._elev_difference = elev_difference

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

        The segment's distance, in meters  # noqa: E501

        :return: The distance of this ExplorerSegment.  # noqa: E501
        :rtype: float
        """
        return self._distance

    @distance.setter
    def distance(self, distance):
        """Sets the distance of this ExplorerSegment.

        The segment's distance, in meters  # noqa: E501

        :param distance: The distance of this ExplorerSegment.  # noqa: E501
        :type: float
        """

        self._distance = distance

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

        The polyline of the segment  # noqa: E501

        :return: The points of this ExplorerSegment.  # noqa: E501
        :rtype: str
        """
        return self._points

    @points.setter
    def points(self, points):
        """Sets the points of this ExplorerSegment.

        The polyline of the segment  # noqa: E501

        :param points: The points of this ExplorerSegment.  # noqa: E501
        :type: str
        """

        self._points = points

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(ExplorerSegment, dict):
            for key, value in self.items():
                result[key] = 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, ExplorerSegment):
            return False

        return self.__dict__ == other.__dict__

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