# coding: utf-8

"""
    Paragon Insights APIs

    API interface for PI application  # noqa: E501

    OpenAPI spec version: 4.0.0
    Contact: healthbot-feedback@juniper.net
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class RuleSchemaRulepropertiesSupporteddevicesJuniperPlatforms(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 = {
        'platform_name': 'str',
        'releases': 'list[RuleSchemaRulepropertiesSupporteddevicesJuniperReleases]',
        'sensors': 'list[str]'
    }

    attribute_map = {
        'platform_name': 'platform-name',
        'releases': 'releases',
        'sensors': 'sensors'
    }

    def __init__(self, platform_name=None, releases=None, sensors=None):  # noqa: E501
        """RuleSchemaRulepropertiesSupporteddevicesJuniperPlatforms - a model defined in Swagger"""  # noqa: E501

        self._platform_name = None
        self._releases = None
        self._sensors = None
        self.discriminator = None

        self.platform_name = platform_name
        if releases is not None:
            self.releases = releases
        if sensors is not None:
            self.sensors = sensors

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

        Platform name, Ex: MX960. Should be of pattern [a-zA-Z][a-zA-Z0-9_-]*  # noqa: E501

        :return: The platform_name of this RuleSchemaRulepropertiesSupporteddevicesJuniperPlatforms.  # noqa: E501
        :rtype: str
        """
        return self._platform_name

    @platform_name.setter
    def platform_name(self, platform_name):
        """Sets the platform_name of this RuleSchemaRulepropertiesSupporteddevicesJuniperPlatforms.

        Platform name, Ex: MX960. Should be of pattern [a-zA-Z][a-zA-Z0-9_-]*  # noqa: E501

        :param platform_name: The platform_name of this RuleSchemaRulepropertiesSupporteddevicesJuniperPlatforms.  # noqa: E501
        :type: str
        """
        if platform_name is None:
            raise ValueError("Invalid value for `platform_name`, must not be `None`")  # noqa: E501
        if platform_name is not None and len(platform_name) > 64:
            raise ValueError("Invalid value for `platform_name`, length must be less than or equal to `64`")  # noqa: E501
        if platform_name is not None and len(platform_name) < 1:
            raise ValueError("Invalid value for `platform_name`, length must be greater than or equal to `1`")  # noqa: E501
        if platform_name is not None and not re.search(r'^[a-zA-Z][a-zA-Z0-9_-]*$', platform_name):  # noqa: E501
            raise ValueError(r"Invalid value for `platform_name`, must be a follow pattern or equal to `/^[a-zA-Z][a-zA-Z0-9_-]*$/`")  # noqa: E501

        self._platform_name = platform_name

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

        Release information for the products  # noqa: E501

        :return: The releases of this RuleSchemaRulepropertiesSupporteddevicesJuniperPlatforms.  # noqa: E501
        :rtype: list[RuleSchemaRulepropertiesSupporteddevicesJuniperReleases]
        """
        return self._releases

    @releases.setter
    def releases(self, releases):
        """Sets the releases of this RuleSchemaRulepropertiesSupporteddevicesJuniperPlatforms.

        Release information for the products  # noqa: E501

        :param releases: The releases of this RuleSchemaRulepropertiesSupporteddevicesJuniperPlatforms.  # noqa: E501
        :type: list[RuleSchemaRulepropertiesSupporteddevicesJuniperReleases]
        """

        self._releases = releases

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


        :return: The sensors of this RuleSchemaRulepropertiesSupporteddevicesJuniperPlatforms.  # noqa: E501
        :rtype: list[str]
        """
        return self._sensors

    @sensors.setter
    def sensors(self, sensors):
        """Sets the sensors of this RuleSchemaRulepropertiesSupporteddevicesJuniperPlatforms.


        :param sensors: The sensors of this RuleSchemaRulepropertiesSupporteddevicesJuniperPlatforms.  # noqa: E501
        :type: list[str]
        """

        self._sensors = sensors

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

        return self.__dict__ == other.__dict__

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