# coding: utf-8

"""
    Canopy.Api

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: v1
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from canopy.openapi.configuration import Configuration


class SupportSessionsRequestMetadata(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'database_id': 'str',
        'tenant_id': 'object',
        'query_time_milliseconds': 'float',
        'time_to_query_start_milliseconds': 'float'
    }

    attribute_map = {
        'database_id': 'databaseId',
        'tenant_id': 'tenantId',
        'query_time_milliseconds': 'queryTimeMilliseconds',
        'time_to_query_start_milliseconds': 'timeToQueryStartMilliseconds'
    }

    def __init__(self, database_id=None, tenant_id=None, query_time_milliseconds=None, time_to_query_start_milliseconds=None, local_vars_configuration=None):  # noqa: E501
        """SupportSessionsRequestMetadata - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._database_id = None
        self._tenant_id = None
        self._query_time_milliseconds = None
        self._time_to_query_start_milliseconds = None
        self.discriminator = None

        self.database_id = database_id
        self.tenant_id = tenant_id
        self.query_time_milliseconds = query_time_milliseconds
        self.time_to_query_start_milliseconds = time_to_query_start_milliseconds

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


        :return: The database_id of this SupportSessionsRequestMetadata.  # noqa: E501
        :rtype: str
        """
        return self._database_id

    @database_id.setter
    def database_id(self, database_id):
        """Sets the database_id of this SupportSessionsRequestMetadata.


        :param database_id: The database_id of this SupportSessionsRequestMetadata.  # noqa: E501
        :type database_id: str
        """
        if self.local_vars_configuration.client_side_validation and database_id is None:  # noqa: E501
            raise ValueError("Invalid value for `database_id`, must not be `None`")  # noqa: E501

        self._database_id = database_id

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


        :return: The tenant_id of this SupportSessionsRequestMetadata.  # noqa: E501
        :rtype: object
        """
        return self._tenant_id

    @tenant_id.setter
    def tenant_id(self, tenant_id):
        """Sets the tenant_id of this SupportSessionsRequestMetadata.


        :param tenant_id: The tenant_id of this SupportSessionsRequestMetadata.  # noqa: E501
        :type tenant_id: object
        """
        if self.local_vars_configuration.client_side_validation and tenant_id is None:  # noqa: E501
            raise ValueError("Invalid value for `tenant_id`, must not be `None`")  # noqa: E501

        self._tenant_id = tenant_id

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


        :return: The query_time_milliseconds of this SupportSessionsRequestMetadata.  # noqa: E501
        :rtype: float
        """
        return self._query_time_milliseconds

    @query_time_milliseconds.setter
    def query_time_milliseconds(self, query_time_milliseconds):
        """Sets the query_time_milliseconds of this SupportSessionsRequestMetadata.


        :param query_time_milliseconds: The query_time_milliseconds of this SupportSessionsRequestMetadata.  # noqa: E501
        :type query_time_milliseconds: float
        """
        if self.local_vars_configuration.client_side_validation and query_time_milliseconds is None:  # noqa: E501
            raise ValueError("Invalid value for `query_time_milliseconds`, must not be `None`")  # noqa: E501

        self._query_time_milliseconds = query_time_milliseconds

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


        :return: The time_to_query_start_milliseconds of this SupportSessionsRequestMetadata.  # noqa: E501
        :rtype: float
        """
        return self._time_to_query_start_milliseconds

    @time_to_query_start_milliseconds.setter
    def time_to_query_start_milliseconds(self, time_to_query_start_milliseconds):
        """Sets the time_to_query_start_milliseconds of this SupportSessionsRequestMetadata.


        :param time_to_query_start_milliseconds: The time_to_query_start_milliseconds of this SupportSessionsRequestMetadata.  # noqa: E501
        :type time_to_query_start_milliseconds: float
        """
        if self.local_vars_configuration.client_side_validation and time_to_query_start_milliseconds is None:  # noqa: E501
            raise ValueError("Invalid value for `time_to_query_start_milliseconds`, must not be `None`")  # noqa: E501

        self._time_to_query_start_milliseconds = time_to_query_start_milliseconds

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, SupportSessionsRequestMetadata):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
