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

from pprint import pformat
from six import iteritems
import re


class UsageOutputV1(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 = {
        'bytes': 'int',
        'cache_type': 'str',
        'calls': 'int',
        'content': 'int',
        'credits': 'float',
        'identity': 'str',
        'identity_id': 'str',
        'prompts': 'int',
        'source_label': 'str',
        'source_url': 'str',
        'timestamp': 'str',
        'tokens': 'int',
        'type': 'str'
    }

    attribute_map = {
        'bytes': 'bytes',
        'cache_type': 'cacheType',
        'calls': 'calls',
        'content': 'content',
        'credits': 'credits',
        'identity': 'identity',
        'identity_id': 'identityId',
        'prompts': 'prompts',
        'source_label': 'sourceLabel',
        'source_url': 'sourceUrl',
        'timestamp': 'timestamp',
        'tokens': 'tokens',
        'type': 'type'
    }

    def __init__(self, bytes=None, cache_type=None, calls=None, content=None, credits=None, identity=None, identity_id=None, prompts=None, source_label=None, source_url=None, timestamp=None, tokens=None, type=None):
        """
        UsageOutputV1 - a model defined in Swagger
        """

        self._bytes = None
        self._cache_type = None
        self._calls = None
        self._content = None
        self._credits = None
        self._identity = None
        self._identity_id = None
        self._prompts = None
        self._source_label = None
        self._source_url = None
        self._timestamp = None
        self._tokens = None
        self._type = None

        if bytes is not None:
          self.bytes = bytes
        if cache_type is not None:
          self.cache_type = cache_type
        if calls is not None:
          self.calls = calls
        if content is not None:
          self.content = content
        if credits is not None:
          self.credits = credits
        if identity is not None:
          self.identity = identity
        if identity_id is not None:
          self.identity_id = identity_id
        if prompts is not None:
          self.prompts = prompts
        if source_label is not None:
          self.source_label = source_label
        if source_url is not None:
          self.source_url = source_url
        if timestamp is not None:
          self.timestamp = timestamp
        if tokens is not None:
          self.tokens = tokens
        if type is not None:
          self.type = type

    @property
    def bytes(self):
        """
        Gets the bytes of this UsageOutputV1.
        Amount of data consumed during the specified time period, in bytes

        :return: The bytes of this UsageOutputV1.
        :rtype: int
        """
        return self._bytes

    @bytes.setter
    def bytes(self, bytes):
        """
        Sets the bytes of this UsageOutputV1.
        Amount of data consumed during the specified time period, in bytes

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

        self._bytes = bytes

    @property
    def cache_type(self):
        """
        Gets the cache_type of this UsageOutputV1.
        The caching source that provided the data. Either Seeq's in-memory cache, Seeq's persistent cache, or the datasource itself if it was not yet cached. Only present when aggregated by \"CacheType\"

        :return: The cache_type of this UsageOutputV1.
        :rtype: str
        """
        return self._cache_type

    @cache_type.setter
    def cache_type(self, cache_type):
        """
        Sets the cache_type of this UsageOutputV1.
        The caching source that provided the data. Either Seeq's in-memory cache, Seeq's persistent cache, or the datasource itself if it was not yet cached. Only present when aggregated by \"CacheType\"

        :param cache_type: The cache_type of this UsageOutputV1.
        :type: str
        """

        self._cache_type = cache_type

    @property
    def calls(self):
        """
        Gets the calls of this UsageOutputV1.
        Amount of GenAI api calls consumed during the specified time period

        :return: The calls of this UsageOutputV1.
        :rtype: int
        """
        return self._calls

    @calls.setter
    def calls(self, calls):
        """
        Sets the calls of this UsageOutputV1.
        Amount of GenAI api calls consumed during the specified time period

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

        self._calls = calls

    @property
    def content(self):
        """
        Gets the content of this UsageOutputV1.
        Amount of content usages during the specified time period

        :return: The content of this UsageOutputV1.
        :rtype: int
        """
        return self._content

    @content.setter
    def content(self, content):
        """
        Sets the content of this UsageOutputV1.
        Amount of content usages during the specified time period

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

        self._content = content

    @property
    def credits(self):
        """
        Gets the credits of this UsageOutputV1.
        Amount of Data Lab Resource Credits consumed during the specified time period

        :return: The credits of this UsageOutputV1.
        :rtype: float
        """
        return self._credits

    @credits.setter
    def credits(self, credits):
        """
        Sets the credits of this UsageOutputV1.
        Amount of Data Lab Resource Credits consumed during the specified time period

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

        self._credits = credits

    @property
    def identity(self):
        """
        Gets the identity of this UsageOutputV1.
        User name who initiated the request. Only present when aggregated by this \"User\"

        :return: The identity of this UsageOutputV1.
        :rtype: str
        """
        return self._identity

    @identity.setter
    def identity(self, identity):
        """
        Sets the identity of this UsageOutputV1.
        User name who initiated the request. Only present when aggregated by this \"User\"

        :param identity: The identity of this UsageOutputV1.
        :type: str
        """

        self._identity = identity

    @property
    def identity_id(self):
        """
        Gets the identity_id of this UsageOutputV1.
        Guid of the user who initiated the request. Only present when aggregated by this \"User\"

        :return: The identity_id of this UsageOutputV1.
        :rtype: str
        """
        return self._identity_id

    @identity_id.setter
    def identity_id(self, identity_id):
        """
        Sets the identity_id of this UsageOutputV1.
        Guid of the user who initiated the request. Only present when aggregated by this \"User\"

        :param identity_id: The identity_id of this UsageOutputV1.
        :type: str
        """

        self._identity_id = identity_id

    @property
    def prompts(self):
        """
        Gets the prompts of this UsageOutputV1.
        Amount of GenAI prompts consumed during the specified time period

        :return: The prompts of this UsageOutputV1.
        :rtype: int
        """
        return self._prompts

    @prompts.setter
    def prompts(self, prompts):
        """
        Sets the prompts of this UsageOutputV1.
        Amount of GenAI prompts consumed during the specified time period

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

        self._prompts = prompts

    @property
    def source_label(self):
        """
        Gets the source_label of this UsageOutputV1.
        Name of the source of the request. Only present when aggregated by \"Source\"

        :return: The source_label of this UsageOutputV1.
        :rtype: str
        """
        return self._source_label

    @source_label.setter
    def source_label(self, source_label):
        """
        Sets the source_label of this UsageOutputV1.
        Name of the source of the request. Only present when aggregated by \"Source\"

        :param source_label: The source_label of this UsageOutputV1.
        :type: str
        """

        self._source_label = source_label

    @property
    def source_url(self):
        """
        Gets the source_url of this UsageOutputV1.
        Url for the source of the request. Only present when aggregated by \"Source\"

        :return: The source_url of this UsageOutputV1.
        :rtype: str
        """
        return self._source_url

    @source_url.setter
    def source_url(self, source_url):
        """
        Sets the source_url of this UsageOutputV1.
        Url for the source of the request. Only present when aggregated by \"Source\"

        :param source_url: The source_url of this UsageOutputV1.
        :type: str
        """

        self._source_url = source_url

    @property
    def timestamp(self):
        """
        Gets the timestamp of this UsageOutputV1.
        An ISO-8601 timestamp of the day when the data was consumed. Only present when aggregated by \"Day\" or \"Month\"

        :return: The timestamp of this UsageOutputV1.
        :rtype: str
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp):
        """
        Sets the timestamp of this UsageOutputV1.
        An ISO-8601 timestamp of the day when the data was consumed. Only present when aggregated by \"Day\" or \"Month\"

        :param timestamp: The timestamp of this UsageOutputV1.
        :type: str
        """

        self._timestamp = timestamp

    @property
    def tokens(self):
        """
        Gets the tokens of this UsageOutputV1.
        Amount of GenAI tokens consumed during the specified time period

        :return: The tokens of this UsageOutputV1.
        :rtype: int
        """
        return self._tokens

    @tokens.setter
    def tokens(self, tokens):
        """
        Sets the tokens of this UsageOutputV1.
        Amount of GenAI tokens consumed during the specified time period

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

        self._tokens = tokens

    @property
    def type(self):
        """
        Gets the type of this UsageOutputV1.
        The type of the request. Only present when aggregated by this \"Type\"

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

    @type.setter
    def type(self, type):
        """
        Sets the type of this UsageOutputV1.
        The type of the request. Only present when aggregated by this \"Type\"

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

        self._type = type

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

        return self.__dict__ == other.__dict__

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