# 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 RollupSummarizationSchema(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 = {
        'profile_id': 'str',
        'rule': 'list[RollupsummarizationSchemaRule]',
        'database': 'list[RollupsummarizationSchemaDatabase]',
        'data_rollup_order': 'list[RollupsummarizationSchemaDatarolluporder]'
    }

    attribute_map = {
        'profile_id': 'profile-id',
        'rule': 'rule',
        'database': 'database',
        'data_rollup_order': 'data-rollup-order'
    }

    def __init__(self, profile_id=None, rule=None, database=None, data_rollup_order=None):  # noqa: E501
        """RollupSummarizationSchema - a model defined in Swagger"""  # noqa: E501

        self._profile_id = None
        self._rule = None
        self._database = None
        self._data_rollup_order = None
        self.discriminator = None

        if profile_id is not None:
            self.profile_id = profile_id
        if rule is not None:
            self.rule = rule
        if database is not None:
            self.database = database
        if data_rollup_order is not None:
            self.data_rollup_order = data_rollup_order

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

        Profile-id of data rollup summarization instance. Should be of pattern [a-zA-Z][a-zA-Z0-9_-]*  # noqa: E501

        :return: The profile_id of this RollupSummarizationSchema.  # noqa: E501
        :rtype: str
        """
        return self._profile_id

    @profile_id.setter
    def profile_id(self, profile_id):
        """Sets the profile_id of this RollupSummarizationSchema.

        Profile-id of data rollup summarization instance. Should be of pattern [a-zA-Z][a-zA-Z0-9_-]*  # noqa: E501

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

        self._profile_id = profile_id

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


        :return: The rule of this RollupSummarizationSchema.  # noqa: E501
        :rtype: list[RollupsummarizationSchemaRule]
        """
        return self._rule

    @rule.setter
    def rule(self, rule):
        """Sets the rule of this RollupSummarizationSchema.


        :param rule: The rule of this RollupSummarizationSchema.  # noqa: E501
        :type: list[RollupsummarizationSchemaRule]
        """

        self._rule = rule

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


        :return: The database of this RollupSummarizationSchema.  # noqa: E501
        :rtype: list[RollupsummarizationSchemaDatabase]
        """
        return self._database

    @database.setter
    def database(self, database):
        """Sets the database of this RollupSummarizationSchema.


        :param database: The database of this RollupSummarizationSchema.  # noqa: E501
        :type: list[RollupsummarizationSchemaDatabase]
        """

        self._database = database

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

        List of data-roll up orders  # noqa: E501

        :return: The data_rollup_order of this RollupSummarizationSchema.  # noqa: E501
        :rtype: list[RollupsummarizationSchemaDatarolluporder]
        """
        return self._data_rollup_order

    @data_rollup_order.setter
    def data_rollup_order(self, data_rollup_order):
        """Sets the data_rollup_order of this RollupSummarizationSchema.

        List of data-roll up orders  # noqa: E501

        :param data_rollup_order: The data_rollup_order of this RollupSummarizationSchema.  # noqa: E501
        :type: list[RollupsummarizationSchemaDatarolluporder]
        """

        self._data_rollup_order = data_rollup_order

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

        return self.__dict__ == other.__dict__

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