# 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.timed_zone_distribution import TimedZoneDistribution  # noqa: F401,E501


class ActivityZone(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 = {
        'score': 'int',
        'distribution_buckets': 'TimedZoneDistribution',
        'type': 'str',
        'sensor_based': 'bool',
        'points': 'int',
        'custom_zones': 'bool',
        'max': 'int'
    }

    attribute_map = {
        'score': 'score',
        'distribution_buckets': 'distribution_buckets',
        'type': 'type',
        'sensor_based': 'sensor_based',
        'points': 'points',
        'custom_zones': 'custom_zones',
        'max': 'max'
    }

    def __init__(self, score=None, distribution_buckets=None, type=None, sensor_based=None, points=None, custom_zones=None, max=None):  # noqa: E501
        """ActivityZone - a model defined in Swagger"""  # noqa: E501

        self._score = None
        self._distribution_buckets = None
        self._type = None
        self._sensor_based = None
        self._points = None
        self._custom_zones = None
        self._max = None
        self.discriminator = None

        if score is not None:
            self.score = score
        if distribution_buckets is not None:
            self.distribution_buckets = distribution_buckets
        if type is not None:
            self.type = type
        if sensor_based is not None:
            self.sensor_based = sensor_based
        if points is not None:
            self.points = points
        if custom_zones is not None:
            self.custom_zones = custom_zones
        if max is not None:
            self.max = max

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


        :return: The score of this ActivityZone.  # noqa: E501
        :rtype: int
        """
        return self._score

    @score.setter
    def score(self, score):
        """Sets the score of this ActivityZone.


        :param score: The score of this ActivityZone.  # noqa: E501
        :type: int
        """

        self._score = score

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


        :return: The distribution_buckets of this ActivityZone.  # noqa: E501
        :rtype: TimedZoneDistribution
        """
        return self._distribution_buckets

    @distribution_buckets.setter
    def distribution_buckets(self, distribution_buckets):
        """Sets the distribution_buckets of this ActivityZone.


        :param distribution_buckets: The distribution_buckets of this ActivityZone.  # noqa: E501
        :type: TimedZoneDistribution
        """

        self._distribution_buckets = distribution_buckets

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


        :return: The type of this ActivityZone.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this ActivityZone.


        :param type: The type of this ActivityZone.  # noqa: E501
        :type: str
        """
        allowed_values = ["heartrate", "power"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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


        :return: The sensor_based of this ActivityZone.  # noqa: E501
        :rtype: bool
        """
        return self._sensor_based

    @sensor_based.setter
    def sensor_based(self, sensor_based):
        """Sets the sensor_based of this ActivityZone.


        :param sensor_based: The sensor_based of this ActivityZone.  # noqa: E501
        :type: bool
        """

        self._sensor_based = sensor_based

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


        :return: The points of this ActivityZone.  # noqa: E501
        :rtype: int
        """
        return self._points

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


        :param points: The points of this ActivityZone.  # noqa: E501
        :type: int
        """

        self._points = points

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


        :return: The custom_zones of this ActivityZone.  # noqa: E501
        :rtype: bool
        """
        return self._custom_zones

    @custom_zones.setter
    def custom_zones(self, custom_zones):
        """Sets the custom_zones of this ActivityZone.


        :param custom_zones: The custom_zones of this ActivityZone.  # noqa: E501
        :type: bool
        """

        self._custom_zones = custom_zones

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


        :return: The max of this ActivityZone.  # noqa: E501
        :rtype: int
        """
        return self._max

    @max.setter
    def max(self, max):
        """Sets the max of this ActivityZone.


        :param max: The max of this ActivityZone.  # noqa: E501
        :type: int
        """

        self._max = max

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

        return self.__dict__ == other.__dict__

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