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

from pprint import pformat
from six import iteritems
import re


class CacheBlock(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 = {
        'authoritative_region': 'AuthoritativeRegionOutputV1',
        'blob_id': 'int',
        'capsules': 'list[CapsuleV1]',
        'creation_time': 'str',
        'cursor': 'str',
        'last_access_time': 'str',
        'length_in_bytes': 'int',
        'length_in_datums': 'int',
        'record_id': 'int',
        'samples': 'list[SampleOutputV1]',
        'series_id': 'str',
        'ttl': 'int'
    }

    attribute_map = {
        'authoritative_region': 'authoritativeRegion',
        'blob_id': 'blobId',
        'capsules': 'capsules',
        'creation_time': 'creationTime',
        'cursor': 'cursor',
        'last_access_time': 'lastAccessTime',
        'length_in_bytes': 'lengthInBytes',
        'length_in_datums': 'lengthInDatums',
        'record_id': 'recordId',
        'samples': 'samples',
        'series_id': 'seriesId',
        'ttl': 'ttl'
    }

    def __init__(self, authoritative_region=None, blob_id=None, capsules=None, creation_time=None, cursor=None, last_access_time=None, length_in_bytes=None, length_in_datums=None, record_id=None, samples=None, series_id=None, ttl=None):
        """
        CacheBlock - a model defined in Swagger
        """

        self._authoritative_region = None
        self._blob_id = None
        self._capsules = None
        self._creation_time = None
        self._cursor = None
        self._last_access_time = None
        self._length_in_bytes = None
        self._length_in_datums = None
        self._record_id = None
        self._samples = None
        self._series_id = None
        self._ttl = None

        if authoritative_region is not None:
          self.authoritative_region = authoritative_region
        if blob_id is not None:
          self.blob_id = blob_id
        if capsules is not None:
          self.capsules = capsules
        if creation_time is not None:
          self.creation_time = creation_time
        if cursor is not None:
          self.cursor = cursor
        if last_access_time is not None:
          self.last_access_time = last_access_time
        if length_in_bytes is not None:
          self.length_in_bytes = length_in_bytes
        if length_in_datums is not None:
          self.length_in_datums = length_in_datums
        if record_id is not None:
          self.record_id = record_id
        if samples is not None:
          self.samples = samples
        if series_id is not None:
          self.series_id = series_id
        if ttl is not None:
          self.ttl = ttl

    @property
    def authoritative_region(self):
        """
        Gets the authoritative_region of this CacheBlock.

        :return: The authoritative_region of this CacheBlock.
        :rtype: AuthoritativeRegionOutputV1
        """
        return self._authoritative_region

    @authoritative_region.setter
    def authoritative_region(self, authoritative_region):
        """
        Sets the authoritative_region of this CacheBlock.

        :param authoritative_region: The authoritative_region of this CacheBlock.
        :type: AuthoritativeRegionOutputV1
        """

        self._authoritative_region = authoritative_region

    @property
    def blob_id(self):
        """
        Gets the blob_id of this CacheBlock.

        :return: The blob_id of this CacheBlock.
        :rtype: int
        """
        return self._blob_id

    @blob_id.setter
    def blob_id(self, blob_id):
        """
        Sets the blob_id of this CacheBlock.

        :param blob_id: The blob_id of this CacheBlock.
        :type: int
        """

        self._blob_id = blob_id

    @property
    def capsules(self):
        """
        Gets the capsules of this CacheBlock.

        :return: The capsules of this CacheBlock.
        :rtype: list[CapsuleV1]
        """
        return self._capsules

    @capsules.setter
    def capsules(self, capsules):
        """
        Sets the capsules of this CacheBlock.

        :param capsules: The capsules of this CacheBlock.
        :type: list[CapsuleV1]
        """

        self._capsules = capsules

    @property
    def creation_time(self):
        """
        Gets the creation_time of this CacheBlock.

        :return: The creation_time of this CacheBlock.
        :rtype: str
        """
        return self._creation_time

    @creation_time.setter
    def creation_time(self, creation_time):
        """
        Sets the creation_time of this CacheBlock.

        :param creation_time: The creation_time of this CacheBlock.
        :type: str
        """

        self._creation_time = creation_time

    @property
    def cursor(self):
        """
        Gets the cursor of this CacheBlock.

        :return: The cursor of this CacheBlock.
        :rtype: str
        """
        return self._cursor

    @cursor.setter
    def cursor(self, cursor):
        """
        Sets the cursor of this CacheBlock.

        :param cursor: The cursor of this CacheBlock.
        :type: str
        """

        self._cursor = cursor

    @property
    def last_access_time(self):
        """
        Gets the last_access_time of this CacheBlock.

        :return: The last_access_time of this CacheBlock.
        :rtype: str
        """
        return self._last_access_time

    @last_access_time.setter
    def last_access_time(self, last_access_time):
        """
        Sets the last_access_time of this CacheBlock.

        :param last_access_time: The last_access_time of this CacheBlock.
        :type: str
        """

        self._last_access_time = last_access_time

    @property
    def length_in_bytes(self):
        """
        Gets the length_in_bytes of this CacheBlock.

        :return: The length_in_bytes of this CacheBlock.
        :rtype: int
        """
        return self._length_in_bytes

    @length_in_bytes.setter
    def length_in_bytes(self, length_in_bytes):
        """
        Sets the length_in_bytes of this CacheBlock.

        :param length_in_bytes: The length_in_bytes of this CacheBlock.
        :type: int
        """

        self._length_in_bytes = length_in_bytes

    @property
    def length_in_datums(self):
        """
        Gets the length_in_datums of this CacheBlock.

        :return: The length_in_datums of this CacheBlock.
        :rtype: int
        """
        return self._length_in_datums

    @length_in_datums.setter
    def length_in_datums(self, length_in_datums):
        """
        Sets the length_in_datums of this CacheBlock.

        :param length_in_datums: The length_in_datums of this CacheBlock.
        :type: int
        """

        self._length_in_datums = length_in_datums

    @property
    def record_id(self):
        """
        Gets the record_id of this CacheBlock.

        :return: The record_id of this CacheBlock.
        :rtype: int
        """
        return self._record_id

    @record_id.setter
    def record_id(self, record_id):
        """
        Sets the record_id of this CacheBlock.

        :param record_id: The record_id of this CacheBlock.
        :type: int
        """

        self._record_id = record_id

    @property
    def samples(self):
        """
        Gets the samples of this CacheBlock.

        :return: The samples of this CacheBlock.
        :rtype: list[SampleOutputV1]
        """
        return self._samples

    @samples.setter
    def samples(self, samples):
        """
        Sets the samples of this CacheBlock.

        :param samples: The samples of this CacheBlock.
        :type: list[SampleOutputV1]
        """

        self._samples = samples

    @property
    def series_id(self):
        """
        Gets the series_id of this CacheBlock.

        :return: The series_id of this CacheBlock.
        :rtype: str
        """
        return self._series_id

    @series_id.setter
    def series_id(self, series_id):
        """
        Sets the series_id of this CacheBlock.

        :param series_id: The series_id of this CacheBlock.
        :type: str
        """

        self._series_id = series_id

    @property
    def ttl(self):
        """
        Gets the ttl of this CacheBlock.

        :return: The ttl of this CacheBlock.
        :rtype: int
        """
        return self._ttl

    @ttl.setter
    def ttl(self, ttl):
        """
        Sets the ttl of this CacheBlock.

        :param ttl: The ttl of this CacheBlock.
        :type: int
        """

        self._ttl = ttl

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

        return self.__dict__ == other.__dict__

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