# coding: utf-8

"""
    Managed Ray API

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

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


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


class CLIUsagePayload(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 = {
        'trace_id': 'str',
        'cmd_path': 'str',
        'options': 'list[str]',
        'flags_used': 'list[str]',
        'duration_ms': 'float',
        'exit_code': 'int',
        'exception_type': 'str',
        'cli_version': 'str',
        'python_version': 'str',
        'timestamp': 'int',
        'session_id': 'str',
        'event_type': 'str',
        'page_number': 'int'
    }

    attribute_map = {
        'trace_id': 'trace_id',
        'cmd_path': 'cmd_path',
        'options': 'options',
        'flags_used': 'flags_used',
        'duration_ms': 'duration_ms',
        'exit_code': 'exit_code',
        'exception_type': 'exception_type',
        'cli_version': 'cli_version',
        'python_version': 'python_version',
        'timestamp': 'timestamp',
        'session_id': 'session_id',
        'event_type': 'event_type',
        'page_number': 'page_number'
    }

    def __init__(self, trace_id=None, cmd_path=None, options=None, flags_used=None, duration_ms=None, exit_code=None, exception_type=None, cli_version=None, python_version=None, timestamp=None, session_id=None, event_type='command', page_number=None, local_vars_configuration=None):  # noqa: E501
        """CLIUsagePayload - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._trace_id = None
        self._cmd_path = None
        self._options = None
        self._flags_used = None
        self._duration_ms = None
        self._exit_code = None
        self._exception_type = None
        self._cli_version = None
        self._python_version = None
        self._timestamp = None
        self._session_id = None
        self._event_type = None
        self._page_number = None
        self.discriminator = None

        self.trace_id = trace_id
        self.cmd_path = cmd_path
        self.options = options
        self.flags_used = flags_used
        self.duration_ms = duration_ms
        self.exit_code = exit_code
        if exception_type is not None:
            self.exception_type = exception_type
        if cli_version is not None:
            self.cli_version = cli_version
        self.python_version = python_version
        self.timestamp = timestamp
        if session_id is not None:
            self.session_id = session_id
        if event_type is not None:
            self.event_type = event_type
        if page_number is not None:
            self.page_number = page_number

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


        :return: The trace_id of this CLIUsagePayload.  # noqa: E501
        :rtype: str
        """
        return self._trace_id

    @trace_id.setter
    def trace_id(self, trace_id):
        """Sets the trace_id of this CLIUsagePayload.


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

        self._trace_id = trace_id

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


        :return: The cmd_path of this CLIUsagePayload.  # noqa: E501
        :rtype: str
        """
        return self._cmd_path

    @cmd_path.setter
    def cmd_path(self, cmd_path):
        """Sets the cmd_path of this CLIUsagePayload.


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

        self._cmd_path = cmd_path

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


        :return: The options of this CLIUsagePayload.  # noqa: E501
        :rtype: list[str]
        """
        return self._options

    @options.setter
    def options(self, options):
        """Sets the options of this CLIUsagePayload.


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

        self._options = options

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


        :return: The flags_used of this CLIUsagePayload.  # noqa: E501
        :rtype: list[str]
        """
        return self._flags_used

    @flags_used.setter
    def flags_used(self, flags_used):
        """Sets the flags_used of this CLIUsagePayload.


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

        self._flags_used = flags_used

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


        :return: The duration_ms of this CLIUsagePayload.  # noqa: E501
        :rtype: float
        """
        return self._duration_ms

    @duration_ms.setter
    def duration_ms(self, duration_ms):
        """Sets the duration_ms of this CLIUsagePayload.


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

        self._duration_ms = duration_ms

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


        :return: The exit_code of this CLIUsagePayload.  # noqa: E501
        :rtype: int
        """
        return self._exit_code

    @exit_code.setter
    def exit_code(self, exit_code):
        """Sets the exit_code of this CLIUsagePayload.


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

        self._exit_code = exit_code

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


        :return: The exception_type of this CLIUsagePayload.  # noqa: E501
        :rtype: str
        """
        return self._exception_type

    @exception_type.setter
    def exception_type(self, exception_type):
        """Sets the exception_type of this CLIUsagePayload.


        :param exception_type: The exception_type of this CLIUsagePayload.  # noqa: E501
        :type: str
        """

        self._exception_type = exception_type

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


        :return: The cli_version of this CLIUsagePayload.  # noqa: E501
        :rtype: str
        """
        return self._cli_version

    @cli_version.setter
    def cli_version(self, cli_version):
        """Sets the cli_version of this CLIUsagePayload.


        :param cli_version: The cli_version of this CLIUsagePayload.  # noqa: E501
        :type: str
        """

        self._cli_version = cli_version

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


        :return: The python_version of this CLIUsagePayload.  # noqa: E501
        :rtype: str
        """
        return self._python_version

    @python_version.setter
    def python_version(self, python_version):
        """Sets the python_version of this CLIUsagePayload.


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

        self._python_version = python_version

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


        :return: The timestamp of this CLIUsagePayload.  # noqa: E501
        :rtype: int
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp):
        """Sets the timestamp of this CLIUsagePayload.


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

        self._timestamp = timestamp

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


        :return: The session_id of this CLIUsagePayload.  # noqa: E501
        :rtype: str
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id):
        """Sets the session_id of this CLIUsagePayload.


        :param session_id: The session_id of this CLIUsagePayload.  # noqa: E501
        :type: str
        """

        self._session_id = session_id

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


        :return: The event_type of this CLIUsagePayload.  # noqa: E501
        :rtype: str
        """
        return self._event_type

    @event_type.setter
    def event_type(self, event_type):
        """Sets the event_type of this CLIUsagePayload.


        :param event_type: The event_type of this CLIUsagePayload.  # noqa: E501
        :type: str
        """

        self._event_type = event_type

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


        :return: The page_number of this CLIUsagePayload.  # noqa: E501
        :rtype: int
        """
        return self._page_number

    @page_number.setter
    def page_number(self, page_number):
        """Sets the page_number of this CLIUsagePayload.


        :param page_number: The page_number of this CLIUsagePayload.  # noqa: E501
        :type: int
        """

        self._page_number = page_number

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

        for attr, _ in six.iteritems(self.openapi_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 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, CLIUsagePayload):
            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, CLIUsagePayload):
            return True

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