# coding: utf-8

"""
    apmplus_server

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: common-version
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from volcenginesdkcore.configuration import Configuration


class TraceForGetTraceDetailOutput(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 = {
        'api_name': 'str',
        'duration_microseconds': 'int',
        'service_name': 'str',
        'service_type': 'str',
        'span_list': 'list[SpanListForGetTraceDetailOutput]',
        'start_time_millisecond': 'int',
        'status': 'int',
        'trace_id': 'str'
    }

    attribute_map = {
        'api_name': 'ApiName',
        'duration_microseconds': 'DurationMicroseconds',
        'service_name': 'ServiceName',
        'service_type': 'ServiceType',
        'span_list': 'SpanList',
        'start_time_millisecond': 'StartTimeMillisecond',
        'status': 'Status',
        'trace_id': 'TraceId'
    }

    def __init__(self, api_name=None, duration_microseconds=None, service_name=None, service_type=None, span_list=None, start_time_millisecond=None, status=None, trace_id=None, _configuration=None):  # noqa: E501
        """TraceForGetTraceDetailOutput - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._api_name = None
        self._duration_microseconds = None
        self._service_name = None
        self._service_type = None
        self._span_list = None
        self._start_time_millisecond = None
        self._status = None
        self._trace_id = None
        self.discriminator = None

        if api_name is not None:
            self.api_name = api_name
        if duration_microseconds is not None:
            self.duration_microseconds = duration_microseconds
        if service_name is not None:
            self.service_name = service_name
        if service_type is not None:
            self.service_type = service_type
        if span_list is not None:
            self.span_list = span_list
        if start_time_millisecond is not None:
            self.start_time_millisecond = start_time_millisecond
        if status is not None:
            self.status = status
        if trace_id is not None:
            self.trace_id = trace_id

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


        :return: The api_name of this TraceForGetTraceDetailOutput.  # noqa: E501
        :rtype: str
        """
        return self._api_name

    @api_name.setter
    def api_name(self, api_name):
        """Sets the api_name of this TraceForGetTraceDetailOutput.


        :param api_name: The api_name of this TraceForGetTraceDetailOutput.  # noqa: E501
        :type: str
        """

        self._api_name = api_name

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


        :return: The duration_microseconds of this TraceForGetTraceDetailOutput.  # noqa: E501
        :rtype: int
        """
        return self._duration_microseconds

    @duration_microseconds.setter
    def duration_microseconds(self, duration_microseconds):
        """Sets the duration_microseconds of this TraceForGetTraceDetailOutput.


        :param duration_microseconds: The duration_microseconds of this TraceForGetTraceDetailOutput.  # noqa: E501
        :type: int
        """

        self._duration_microseconds = duration_microseconds

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


        :return: The service_name of this TraceForGetTraceDetailOutput.  # noqa: E501
        :rtype: str
        """
        return self._service_name

    @service_name.setter
    def service_name(self, service_name):
        """Sets the service_name of this TraceForGetTraceDetailOutput.


        :param service_name: The service_name of this TraceForGetTraceDetailOutput.  # noqa: E501
        :type: str
        """

        self._service_name = service_name

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


        :return: The service_type of this TraceForGetTraceDetailOutput.  # noqa: E501
        :rtype: str
        """
        return self._service_type

    @service_type.setter
    def service_type(self, service_type):
        """Sets the service_type of this TraceForGetTraceDetailOutput.


        :param service_type: The service_type of this TraceForGetTraceDetailOutput.  # noqa: E501
        :type: str
        """

        self._service_type = service_type

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


        :return: The span_list of this TraceForGetTraceDetailOutput.  # noqa: E501
        :rtype: list[SpanListForGetTraceDetailOutput]
        """
        return self._span_list

    @span_list.setter
    def span_list(self, span_list):
        """Sets the span_list of this TraceForGetTraceDetailOutput.


        :param span_list: The span_list of this TraceForGetTraceDetailOutput.  # noqa: E501
        :type: list[SpanListForGetTraceDetailOutput]
        """

        self._span_list = span_list

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


        :return: The start_time_millisecond of this TraceForGetTraceDetailOutput.  # noqa: E501
        :rtype: int
        """
        return self._start_time_millisecond

    @start_time_millisecond.setter
    def start_time_millisecond(self, start_time_millisecond):
        """Sets the start_time_millisecond of this TraceForGetTraceDetailOutput.


        :param start_time_millisecond: The start_time_millisecond of this TraceForGetTraceDetailOutput.  # noqa: E501
        :type: int
        """

        self._start_time_millisecond = start_time_millisecond

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


        :return: The status of this TraceForGetTraceDetailOutput.  # noqa: E501
        :rtype: int
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this TraceForGetTraceDetailOutput.


        :param status: The status of this TraceForGetTraceDetailOutput.  # noqa: E501
        :type: int
        """

        self._status = status

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


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

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


        :param trace_id: The trace_id of this TraceForGetTraceDetailOutput.  # noqa: E501
        :type: str
        """

        self._trace_id = trace_id

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

        for attr, _ in six.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
        if issubclass(TraceForGetTraceDetailOutput, dict):
            for key, value in self.items():
                result[key] = 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, TraceForGetTraceDetailOutput):
            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, TraceForGetTraceDetailOutput):
            return True

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