# 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: 66.119.1-v202603241138-CD
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from pprint import pformat
from six import iteritems
import re


class PrecachedItemOutputV1(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 = {
        'cache_id': 'str',
        'capsule_property_infos': 'list[PreCachedConditionCapsulePropertyInfoV1]',
        'data_id': 'str',
        'last_certain_key_nanos': 'int',
        'max_duration_nanos': 'int',
        'max_interpolation_nanos': 'int',
        'type': 'str',
        'uncertainty_override_nanos': 'int',
        'value_uom': 'str'
    }

    attribute_map = {
        'cache_id': 'cacheId',
        'capsule_property_infos': 'capsulePropertyInfos',
        'data_id': 'dataId',
        'last_certain_key_nanos': 'lastCertainKeyNanos',
        'max_duration_nanos': 'maxDurationNanos',
        'max_interpolation_nanos': 'maxInterpolationNanos',
        'type': 'type',
        'uncertainty_override_nanos': 'uncertaintyOverrideNanos',
        'value_uom': 'valueUom'
    }

    def __init__(self, cache_id=None, capsule_property_infos=None, data_id=None, last_certain_key_nanos=None, max_duration_nanos=None, max_interpolation_nanos=None, type=None, uncertainty_override_nanos=None, value_uom=None):
        """
        PrecachedItemOutputV1 - a model defined in Swagger
        """

        self._cache_id = None
        self._capsule_property_infos = None
        self._data_id = None
        self._last_certain_key_nanos = None
        self._max_duration_nanos = None
        self._max_interpolation_nanos = None
        self._type = None
        self._uncertainty_override_nanos = None
        self._value_uom = None

        if cache_id is not None:
          self.cache_id = cache_id
        if capsule_property_infos is not None:
          self.capsule_property_infos = capsule_property_infos
        if data_id is not None:
          self.data_id = data_id
        if last_certain_key_nanos is not None:
          self.last_certain_key_nanos = last_certain_key_nanos
        if max_duration_nanos is not None:
          self.max_duration_nanos = max_duration_nanos
        if max_interpolation_nanos is not None:
          self.max_interpolation_nanos = max_interpolation_nanos
        if type is not None:
          self.type = type
        if uncertainty_override_nanos is not None:
          self.uncertainty_override_nanos = uncertainty_override_nanos
        if value_uom is not None:
          self.value_uom = value_uom

    @property
    def cache_id(self):
        """
        Gets the cache_id of this PrecachedItemOutputV1.
        The cache ID of the pre-cached item. This is provided so that agents can pass it along to the datasource proxy so that it can evaluate the staleness of pre-cached data updates.

        :return: The cache_id of this PrecachedItemOutputV1.
        :rtype: str
        """
        return self._cache_id

    @cache_id.setter
    def cache_id(self, cache_id):
        """
        Sets the cache_id of this PrecachedItemOutputV1.
        The cache ID of the pre-cached item. This is provided so that agents can pass it along to the datasource proxy so that it can evaluate the staleness of pre-cached data updates.

        :param cache_id: The cache_id of this PrecachedItemOutputV1.
        :type: str
        """

        self._cache_id = cache_id

    @property
    def capsule_property_infos(self):
        """
        Gets the capsule_property_infos of this PrecachedItemOutputV1.
        If type is \"StoredCondition\" (i.e., if this object represent a pre-cached condition), this field is a list of capsule property descriptions for capsules in this condition. If type is any other value, this field is null.

        :return: The capsule_property_infos of this PrecachedItemOutputV1.
        :rtype: list[PreCachedConditionCapsulePropertyInfoV1]
        """
        return self._capsule_property_infos

    @capsule_property_infos.setter
    def capsule_property_infos(self, capsule_property_infos):
        """
        Sets the capsule_property_infos of this PrecachedItemOutputV1.
        If type is \"StoredCondition\" (i.e., if this object represent a pre-cached condition), this field is a list of capsule property descriptions for capsules in this condition. If type is any other value, this field is null.

        :param capsule_property_infos: The capsule_property_infos of this PrecachedItemOutputV1.
        :type: list[PreCachedConditionCapsulePropertyInfoV1]
        """

        self._capsule_property_infos = capsule_property_infos

    @property
    def data_id(self):
        """
        Gets the data_id of this PrecachedItemOutputV1.
        The data ID of the pre-cached item.

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

    @data_id.setter
    def data_id(self, data_id):
        """
        Sets the data_id of this PrecachedItemOutputV1.
        The data ID of the pre-cached item.

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

        self._data_id = data_id

    @property
    def last_certain_key_nanos(self):
        """
        Gets the last_certain_key_nanos of this PrecachedItemOutputV1.
        The last certain key time (in nanoseconds) - if known - for the pre-cached item.

        :return: The last_certain_key_nanos of this PrecachedItemOutputV1.
        :rtype: int
        """
        return self._last_certain_key_nanos

    @last_certain_key_nanos.setter
    def last_certain_key_nanos(self, last_certain_key_nanos):
        """
        Sets the last_certain_key_nanos of this PrecachedItemOutputV1.
        The last certain key time (in nanoseconds) - if known - for the pre-cached item.

        :param last_certain_key_nanos: The last_certain_key_nanos of this PrecachedItemOutputV1.
        :type: int
        """

        self._last_certain_key_nanos = last_certain_key_nanos

    @property
    def max_duration_nanos(self):
        """
        Gets the max_duration_nanos of this PrecachedItemOutputV1.
        If type is \"StoredCondition\" (i.e., if this object represent a pre-cached condition), this field is the maximum duration of that condition in nanoseconds. If type is any other value, this field is null.

        :return: The max_duration_nanos of this PrecachedItemOutputV1.
        :rtype: int
        """
        return self._max_duration_nanos

    @max_duration_nanos.setter
    def max_duration_nanos(self, max_duration_nanos):
        """
        Sets the max_duration_nanos of this PrecachedItemOutputV1.
        If type is \"StoredCondition\" (i.e., if this object represent a pre-cached condition), this field is the maximum duration of that condition in nanoseconds. If type is any other value, this field is null.

        :param max_duration_nanos: The max_duration_nanos of this PrecachedItemOutputV1.
        :type: int
        """

        self._max_duration_nanos = max_duration_nanos

    @property
    def max_interpolation_nanos(self):
        """
        Gets the max_interpolation_nanos of this PrecachedItemOutputV1.
        If type is \"StoredSignal\" (i.e., if this object represent a pre-cached signal), this field is the maximum interpolation of that signal in nanoseconds. If type is any other value, this field is null.

        :return: The max_interpolation_nanos of this PrecachedItemOutputV1.
        :rtype: int
        """
        return self._max_interpolation_nanos

    @max_interpolation_nanos.setter
    def max_interpolation_nanos(self, max_interpolation_nanos):
        """
        Sets the max_interpolation_nanos of this PrecachedItemOutputV1.
        If type is \"StoredSignal\" (i.e., if this object represent a pre-cached signal), this field is the maximum interpolation of that signal in nanoseconds. If type is any other value, this field is null.

        :param max_interpolation_nanos: The max_interpolation_nanos of this PrecachedItemOutputV1.
        :type: int
        """

        self._max_interpolation_nanos = max_interpolation_nanos

    @property
    def type(self):
        """
        Gets the type of this PrecachedItemOutputV1.
        The type of the pre-cached item, which can be either \"StoredSignal\" for a signal or \"StoredCondition\" for a condition.

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

    @type.setter
    def type(self, type):
        """
        Sets the type of this PrecachedItemOutputV1.
        The type of the pre-cached item, which can be either \"StoredSignal\" for a signal or \"StoredCondition\" for a condition.

        :param type: The type of this PrecachedItemOutputV1.
        :type: str
        """

        self._type = type

    @property
    def uncertainty_override_nanos(self):
        """
        Gets the uncertainty_override_nanos of this PrecachedItemOutputV1.
        The value of the \"Uncertainty Override\" property of this series or null if this property is unset.

        :return: The uncertainty_override_nanos of this PrecachedItemOutputV1.
        :rtype: int
        """
        return self._uncertainty_override_nanos

    @uncertainty_override_nanos.setter
    def uncertainty_override_nanos(self, uncertainty_override_nanos):
        """
        Sets the uncertainty_override_nanos of this PrecachedItemOutputV1.
        The value of the \"Uncertainty Override\" property of this series or null if this property is unset.

        :param uncertainty_override_nanos: The uncertainty_override_nanos of this PrecachedItemOutputV1.
        :type: int
        """

        self._uncertainty_override_nanos = uncertainty_override_nanos

    @property
    def value_uom(self):
        """
        Gets the value_uom of this PrecachedItemOutputV1.
        If type is \"StoredSignal\" (i.e., if this object represent a pre-cached signal), this field is the unit of measure for sample values. If type is any other value, this field is null.

        :return: The value_uom of this PrecachedItemOutputV1.
        :rtype: str
        """
        return self._value_uom

    @value_uom.setter
    def value_uom(self, value_uom):
        """
        Sets the value_uom of this PrecachedItemOutputV1.
        If type is \"StoredSignal\" (i.e., if this object represent a pre-cached signal), this field is the unit of measure for sample values. If type is any other value, this field is null.

        :param value_uom: The value_uom of this PrecachedItemOutputV1.
        :type: str
        """

        self._value_uom = value_uom

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

        return self.__dict__ == other.__dict__

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