# coding: utf-8

"""
    Seeq REST API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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

from pprint import pformat
from six import iteritems
import re


class ThresholdMetricOutputV1(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 = {
        'additional_properties': 'list[ScalarPropertyV1]',
        'aggregation_condition_id': 'str',
        'aggregation_function': 'str',
        'bounding_condition': 'ItemPreviewWithAssetsV1',
        'bounding_condition_maximum_duration': 'ScalarValueOutputV1',
        'data_id': 'str',
        'datasource_class': 'str',
        'datasource_id': 'str',
        'description': 'str',
        'display_item': 'ItemPreviewV1',
        'duration': 'ScalarValueOutputV1',
        'effective_permissions': 'PermissionsV1',
        'id': 'str',
        'is_archived': 'bool',
        'is_redacted': 'bool',
        'measured_item': 'ItemPreviewWithAssetsV1',
        'name': 'str',
        'neutral_color': 'str',
        'number_format': 'str',
        'period': 'ScalarValueOutputV1',
        'process_type': 'str',
        'scoped_to': 'str',
        'status_message': 'str',
        'thresholds': 'list[ThresholdOutputV1]',
        'translation_key': 'str',
        'type': 'str',
        'value_unit_of_measure': 'str'
    }

    attribute_map = {
        'additional_properties': 'additionalProperties',
        'aggregation_condition_id': 'aggregationConditionId',
        'aggregation_function': 'aggregationFunction',
        'bounding_condition': 'boundingCondition',
        'bounding_condition_maximum_duration': 'boundingConditionMaximumDuration',
        'data_id': 'dataId',
        'datasource_class': 'datasourceClass',
        'datasource_id': 'datasourceId',
        'description': 'description',
        'display_item': 'displayItem',
        'duration': 'duration',
        'effective_permissions': 'effectivePermissions',
        'id': 'id',
        'is_archived': 'isArchived',
        'is_redacted': 'isRedacted',
        'measured_item': 'measuredItem',
        'name': 'name',
        'neutral_color': 'neutralColor',
        'number_format': 'numberFormat',
        'period': 'period',
        'process_type': 'processType',
        'scoped_to': 'scopedTo',
        'status_message': 'statusMessage',
        'thresholds': 'thresholds',
        'translation_key': 'translationKey',
        'type': 'type',
        'value_unit_of_measure': 'valueUnitOfMeasure'
    }

    def __init__(self, additional_properties=None, aggregation_condition_id=None, aggregation_function=None, bounding_condition=None, bounding_condition_maximum_duration=None, data_id=None, datasource_class=None, datasource_id=None, description=None, display_item=None, duration=None, effective_permissions=None, id=None, is_archived=False, is_redacted=False, measured_item=None, name=None, neutral_color=None, number_format=None, period=None, process_type=None, scoped_to=None, status_message=None, thresholds=None, translation_key=None, type=None, value_unit_of_measure=None):
        """
        ThresholdMetricOutputV1 - a model defined in Swagger
        """

        self._additional_properties = None
        self._aggregation_condition_id = None
        self._aggregation_function = None
        self._bounding_condition = None
        self._bounding_condition_maximum_duration = None
        self._data_id = None
        self._datasource_class = None
        self._datasource_id = None
        self._description = None
        self._display_item = None
        self._duration = None
        self._effective_permissions = None
        self._id = None
        self._is_archived = None
        self._is_redacted = None
        self._measured_item = None
        self._name = None
        self._neutral_color = None
        self._number_format = None
        self._period = None
        self._process_type = None
        self._scoped_to = None
        self._status_message = None
        self._thresholds = None
        self._translation_key = None
        self._type = None
        self._value_unit_of_measure = None

        if additional_properties is not None:
          self.additional_properties = additional_properties
        if aggregation_condition_id is not None:
          self.aggregation_condition_id = aggregation_condition_id
        if aggregation_function is not None:
          self.aggregation_function = aggregation_function
        if bounding_condition is not None:
          self.bounding_condition = bounding_condition
        if bounding_condition_maximum_duration is not None:
          self.bounding_condition_maximum_duration = bounding_condition_maximum_duration
        if data_id is not None:
          self.data_id = data_id
        if datasource_class is not None:
          self.datasource_class = datasource_class
        if datasource_id is not None:
          self.datasource_id = datasource_id
        if description is not None:
          self.description = description
        if display_item is not None:
          self.display_item = display_item
        if duration is not None:
          self.duration = duration
        if effective_permissions is not None:
          self.effective_permissions = effective_permissions
        if id is not None:
          self.id = id
        if is_archived is not None:
          self.is_archived = is_archived
        if is_redacted is not None:
          self.is_redacted = is_redacted
        if measured_item is not None:
          self.measured_item = measured_item
        if name is not None:
          self.name = name
        if neutral_color is not None:
          self.neutral_color = neutral_color
        if number_format is not None:
          self.number_format = number_format
        if period is not None:
          self.period = period
        if process_type is not None:
          self.process_type = process_type
        if scoped_to is not None:
          self.scoped_to = scoped_to
        if status_message is not None:
          self.status_message = status_message
        if thresholds is not None:
          self.thresholds = thresholds
        if translation_key is not None:
          self.translation_key = translation_key
        if type is not None:
          self.type = type
        if value_unit_of_measure is not None:
          self.value_unit_of_measure = value_unit_of_measure

    @property
    def additional_properties(self):
        """
        Gets the additional_properties of this ThresholdMetricOutputV1.
        Additional properties of the item

        :return: The additional_properties of this ThresholdMetricOutputV1.
        :rtype: list[ScalarPropertyV1]
        """
        return self._additional_properties

    @additional_properties.setter
    def additional_properties(self, additional_properties):
        """
        Sets the additional_properties of this ThresholdMetricOutputV1.
        Additional properties of the item

        :param additional_properties: The additional_properties of this ThresholdMetricOutputV1.
        :type: list[ScalarPropertyV1]
        """

        self._additional_properties = additional_properties

    @property
    def aggregation_condition_id(self):
        """
        Gets the aggregation_condition_id of this ThresholdMetricOutputV1.
        The ID of the aggregation condition representing metric value information

        :return: The aggregation_condition_id of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._aggregation_condition_id

    @aggregation_condition_id.setter
    def aggregation_condition_id(self, aggregation_condition_id):
        """
        Sets the aggregation_condition_id of this ThresholdMetricOutputV1.
        The ID of the aggregation condition representing metric value information

        :param aggregation_condition_id: The aggregation_condition_id of this ThresholdMetricOutputV1.
        :type: str
        """

        self._aggregation_condition_id = aggregation_condition_id

    @property
    def aggregation_function(self):
        """
        Gets the aggregation_function of this ThresholdMetricOutputV1.
        Aggregation formula that aggregates the measured item

        :return: The aggregation_function of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._aggregation_function

    @aggregation_function.setter
    def aggregation_function(self, aggregation_function):
        """
        Sets the aggregation_function of this ThresholdMetricOutputV1.
        Aggregation formula that aggregates the measured item

        :param aggregation_function: The aggregation_function of this ThresholdMetricOutputV1.
        :type: str
        """

        self._aggregation_function = aggregation_function

    @property
    def bounding_condition(self):
        """
        Gets the bounding_condition of this ThresholdMetricOutputV1.

        :return: The bounding_condition of this ThresholdMetricOutputV1.
        :rtype: ItemPreviewWithAssetsV1
        """
        return self._bounding_condition

    @bounding_condition.setter
    def bounding_condition(self, bounding_condition):
        """
        Sets the bounding_condition of this ThresholdMetricOutputV1.

        :param bounding_condition: The bounding_condition of this ThresholdMetricOutputV1.
        :type: ItemPreviewWithAssetsV1
        """

        self._bounding_condition = bounding_condition

    @property
    def bounding_condition_maximum_duration(self):
        """
        Gets the bounding_condition_maximum_duration of this ThresholdMetricOutputV1.

        :return: The bounding_condition_maximum_duration of this ThresholdMetricOutputV1.
        :rtype: ScalarValueOutputV1
        """
        return self._bounding_condition_maximum_duration

    @bounding_condition_maximum_duration.setter
    def bounding_condition_maximum_duration(self, bounding_condition_maximum_duration):
        """
        Sets the bounding_condition_maximum_duration of this ThresholdMetricOutputV1.

        :param bounding_condition_maximum_duration: The bounding_condition_maximum_duration of this ThresholdMetricOutputV1.
        :type: ScalarValueOutputV1
        """

        self._bounding_condition_maximum_duration = bounding_condition_maximum_duration

    @property
    def data_id(self):
        """
        Gets the data_id of this ThresholdMetricOutputV1.
        The data ID of this asset. Note: This is not the Seeq ID, but the unique identifier that the remote datasource uses.

        :return: The data_id of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._data_id

    @data_id.setter
    def data_id(self, data_id):
        """
        Sets the data_id of this ThresholdMetricOutputV1.
        The data ID of this asset. Note: This is not the Seeq ID, but the unique identifier that the remote datasource uses.

        :param data_id: The data_id of this ThresholdMetricOutputV1.
        :type: str
        """

        self._data_id = data_id

    @property
    def datasource_class(self):
        """
        Gets the datasource_class of this ThresholdMetricOutputV1.
        The datasource class, which is the type of system holding the item, such as OSIsoft PI

        :return: The datasource_class of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._datasource_class

    @datasource_class.setter
    def datasource_class(self, datasource_class):
        """
        Sets the datasource_class of this ThresholdMetricOutputV1.
        The datasource class, which is the type of system holding the item, such as OSIsoft PI

        :param datasource_class: The datasource_class of this ThresholdMetricOutputV1.
        :type: str
        """

        self._datasource_class = datasource_class

    @property
    def datasource_id(self):
        """
        Gets the datasource_id of this ThresholdMetricOutputV1.
        The datasource identifier, which is how the datasource holding this item identifies itself

        :return: The datasource_id of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._datasource_id

    @datasource_id.setter
    def datasource_id(self, datasource_id):
        """
        Sets the datasource_id of this ThresholdMetricOutputV1.
        The datasource identifier, which is how the datasource holding this item identifies itself

        :param datasource_id: The datasource_id of this ThresholdMetricOutputV1.
        :type: str
        """

        self._datasource_id = datasource_id

    @property
    def description(self):
        """
        Gets the description of this ThresholdMetricOutputV1.
        Clarifying information or other plain language description of this item

        :return: The description of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """
        Sets the description of this ThresholdMetricOutputV1.
        Clarifying information or other plain language description of this item

        :param description: The description of this ThresholdMetricOutputV1.
        :type: str
        """

        self._description = description

    @property
    def display_item(self):
        """
        Gets the display_item of this ThresholdMetricOutputV1.

        :return: The display_item of this ThresholdMetricOutputV1.
        :rtype: ItemPreviewV1
        """
        return self._display_item

    @display_item.setter
    def display_item(self, display_item):
        """
        Sets the display_item of this ThresholdMetricOutputV1.

        :param display_item: The display_item of this ThresholdMetricOutputV1.
        :type: ItemPreviewV1
        """
        if display_item is None:
            raise ValueError("Invalid value for `display_item`, must not be `None`")

        self._display_item = display_item

    @property
    def duration(self):
        """
        Gets the duration of this ThresholdMetricOutputV1.

        :return: The duration of this ThresholdMetricOutputV1.
        :rtype: ScalarValueOutputV1
        """
        return self._duration

    @duration.setter
    def duration(self, duration):
        """
        Sets the duration of this ThresholdMetricOutputV1.

        :param duration: The duration of this ThresholdMetricOutputV1.
        :type: ScalarValueOutputV1
        """

        self._duration = duration

    @property
    def effective_permissions(self):
        """
        Gets the effective_permissions of this ThresholdMetricOutputV1.

        :return: The effective_permissions of this ThresholdMetricOutputV1.
        :rtype: PermissionsV1
        """
        return self._effective_permissions

    @effective_permissions.setter
    def effective_permissions(self, effective_permissions):
        """
        Sets the effective_permissions of this ThresholdMetricOutputV1.

        :param effective_permissions: The effective_permissions of this ThresholdMetricOutputV1.
        :type: PermissionsV1
        """

        self._effective_permissions = effective_permissions

    @property
    def id(self):
        """
        Gets the id of this ThresholdMetricOutputV1.
        The ID that can be used to interact with the item

        :return: The id of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this ThresholdMetricOutputV1.
        The ID that can be used to interact with the item

        :param id: The id of this ThresholdMetricOutputV1.
        :type: str
        """
        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")

        self._id = id

    @property
    def is_archived(self):
        """
        Gets the is_archived of this ThresholdMetricOutputV1.
        Whether item is archived

        :return: The is_archived of this ThresholdMetricOutputV1.
        :rtype: bool
        """
        return self._is_archived

    @is_archived.setter
    def is_archived(self, is_archived):
        """
        Sets the is_archived of this ThresholdMetricOutputV1.
        Whether item is archived

        :param is_archived: The is_archived of this ThresholdMetricOutputV1.
        :type: bool
        """

        self._is_archived = is_archived

    @property
    def is_redacted(self):
        """
        Gets the is_redacted of this ThresholdMetricOutputV1.
        Whether item is redacted

        :return: The is_redacted of this ThresholdMetricOutputV1.
        :rtype: bool
        """
        return self._is_redacted

    @is_redacted.setter
    def is_redacted(self, is_redacted):
        """
        Sets the is_redacted of this ThresholdMetricOutputV1.
        Whether item is redacted

        :param is_redacted: The is_redacted of this ThresholdMetricOutputV1.
        :type: bool
        """

        self._is_redacted = is_redacted

    @property
    def measured_item(self):
        """
        Gets the measured_item of this ThresholdMetricOutputV1.

        :return: The measured_item of this ThresholdMetricOutputV1.
        :rtype: ItemPreviewWithAssetsV1
        """
        return self._measured_item

    @measured_item.setter
    def measured_item(self, measured_item):
        """
        Sets the measured_item of this ThresholdMetricOutputV1.

        :param measured_item: The measured_item of this ThresholdMetricOutputV1.
        :type: ItemPreviewWithAssetsV1
        """
        if measured_item is None:
            raise ValueError("Invalid value for `measured_item`, must not be `None`")

        self._measured_item = measured_item

    @property
    def name(self):
        """
        Gets the name of this ThresholdMetricOutputV1.
        The human readable name

        :return: The name of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this ThresholdMetricOutputV1.
        The human readable name

        :param name: The name of this ThresholdMetricOutputV1.
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")

        self._name = name

    @property
    def neutral_color(self):
        """
        Gets the neutral_color of this ThresholdMetricOutputV1.
        Either the custom-set neutral color for this metric or the color of the neutral Priority

        :return: The neutral_color of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._neutral_color

    @neutral_color.setter
    def neutral_color(self, neutral_color):
        """
        Sets the neutral_color of this ThresholdMetricOutputV1.
        Either the custom-set neutral color for this metric or the color of the neutral Priority

        :param neutral_color: The neutral_color of this ThresholdMetricOutputV1.
        :type: str
        """

        self._neutral_color = neutral_color

    @property
    def number_format(self):
        """
        Gets the number_format of this ThresholdMetricOutputV1.
        The format string used for numbers associated with this signal.

        :return: The number_format of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._number_format

    @number_format.setter
    def number_format(self, number_format):
        """
        Sets the number_format of this ThresholdMetricOutputV1.
        The format string used for numbers associated with this signal.

        :param number_format: The number_format of this ThresholdMetricOutputV1.
        :type: str
        """

        self._number_format = number_format

    @property
    def period(self):
        """
        Gets the period of this ThresholdMetricOutputV1.

        :return: The period of this ThresholdMetricOutputV1.
        :rtype: ScalarValueOutputV1
        """
        return self._period

    @period.setter
    def period(self, period):
        """
        Sets the period of this ThresholdMetricOutputV1.

        :param period: The period of this ThresholdMetricOutputV1.
        :type: ScalarValueOutputV1
        """

        self._period = period

    @property
    def process_type(self):
        """
        Gets the process_type of this ThresholdMetricOutputV1.
        The process type of threshold metric. Will be Continuous if duration and period are specified, Condition if boundingCondition is specified, and otherwise Simple.

        :return: The process_type of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._process_type

    @process_type.setter
    def process_type(self, process_type):
        """
        Sets the process_type of this ThresholdMetricOutputV1.
        The process type of threshold metric. Will be Continuous if duration and period are specified, Condition if boundingCondition is specified, and otherwise Simple.

        :param process_type: The process_type of this ThresholdMetricOutputV1.
        :type: str
        """
        if process_type is None:
            raise ValueError("Invalid value for `process_type`, must not be `None`")
        allowed_values = ["Simple", "Condition", "Continuous"]
        if process_type not in allowed_values:
            raise ValueError(
                "Invalid value for `process_type` ({0}), must be one of {1}"
                .format(process_type, allowed_values)
            )

        self._process_type = process_type

    @property
    def scoped_to(self):
        """
        Gets the scoped_to of this ThresholdMetricOutputV1.
        The ID of the workbook to which this item is scoped or null if it is in the global scope.

        :return: The scoped_to of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._scoped_to

    @scoped_to.setter
    def scoped_to(self, scoped_to):
        """
        Sets the scoped_to of this ThresholdMetricOutputV1.
        The ID of the workbook to which this item is scoped or null if it is in the global scope.

        :param scoped_to: The scoped_to of this ThresholdMetricOutputV1.
        :type: str
        """

        self._scoped_to = scoped_to

    @property
    def status_message(self):
        """
        Gets the status_message of this ThresholdMetricOutputV1.
        A plain language status message with information about any issues that may have been encountered during an operation

        :return: The status_message of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._status_message

    @status_message.setter
    def status_message(self, status_message):
        """
        Sets the status_message of this ThresholdMetricOutputV1.
        A plain language status message with information about any issues that may have been encountered during an operation

        :param status_message: The status_message of this ThresholdMetricOutputV1.
        :type: str
        """

        self._status_message = status_message

    @property
    def thresholds(self):
        """
        Gets the thresholds of this ThresholdMetricOutputV1.
        The list of thresholds that are scalars, signals, or conditions along with the associated priority. These thresholds are those that were used as inputs and which are used to generate the condition thresholds

        :return: The thresholds of this ThresholdMetricOutputV1.
        :rtype: list[ThresholdOutputV1]
        """
        return self._thresholds

    @thresholds.setter
    def thresholds(self, thresholds):
        """
        Sets the thresholds of this ThresholdMetricOutputV1.
        The list of thresholds that are scalars, signals, or conditions along with the associated priority. These thresholds are those that were used as inputs and which are used to generate the condition thresholds

        :param thresholds: The thresholds of this ThresholdMetricOutputV1.
        :type: list[ThresholdOutputV1]
        """

        self._thresholds = thresholds

    @property
    def translation_key(self):
        """
        Gets the translation_key of this ThresholdMetricOutputV1.
        The item's translation key, if any

        :return: The translation_key of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._translation_key

    @translation_key.setter
    def translation_key(self, translation_key):
        """
        Sets the translation_key of this ThresholdMetricOutputV1.
        The item's translation key, if any

        :param translation_key: The translation_key of this ThresholdMetricOutputV1.
        :type: str
        """

        self._translation_key = translation_key

    @property
    def type(self):
        """
        Gets the type of this ThresholdMetricOutputV1.
        The type of the item

        :return: The type of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """
        Sets the type of this ThresholdMetricOutputV1.
        The type of the item

        :param type: The type of this ThresholdMetricOutputV1.
        :type: str
        """
        if type is None:
            raise ValueError("Invalid value for `type`, must not be `None`")

        self._type = type

    @property
    def value_unit_of_measure(self):
        """
        Gets the value_unit_of_measure of this ThresholdMetricOutputV1.
        The unit of measure of the metric

        :return: The value_unit_of_measure of this ThresholdMetricOutputV1.
        :rtype: str
        """
        return self._value_unit_of_measure

    @value_unit_of_measure.setter
    def value_unit_of_measure(self, value_unit_of_measure):
        """
        Sets the value_unit_of_measure of this ThresholdMetricOutputV1.
        The unit of measure of the metric

        :param value_unit_of_measure: The value_unit_of_measure of this ThresholdMetricOutputV1.
        :type: str
        """

        self._value_unit_of_measure = value_unit_of_measure

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, ThresholdMetricOutputV1):
            return False

        return self.__dict__ == other.__dict__

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