o
    ɶdzO                     @   s8   d dl mZmZmZ d dlmZ eG dd deZdS )    )formatted_flat_dictNONE_SENTINEL#value_allowed_none_or_none_sentinel)init_model_state_from_kwargsc                   @   s  e Zd ZdZdd Zedd Zejdd Zedd Zejd	d Zed
d Z	e	jdd Z	edd Z
e
jdd Z
edd Zejdd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zedd  Zejd!d  Zed"d# Zejd$d# Zed%d& Zejd'd& Zed(d) Zejd*d) Zed+d, Zejd-d, Zed.d/ Zejd0d/ Zed1d2 Zejd3d2 Zed4d5 Zejd6d5 Zed7d8 Zejd9d8 Zd:d; Zd<d= Zd>d? Zd@S )ATracez'
    Definition of a trace object.
    c                 K   sX  i ddddddddddd	dd
dddddddddddddddddddddddi| _ i ddddddddddd	dd
ddd dd!dd"dd#dd$dd%dd&dd'dd(dd)ddi| _d*| _d*| _d*| _d*| _d*| _d*| _d*| _d*| _	d*| _
d*| _d*| _d*| _d*| _d*| _d*| _d*| _d*| _d*| _d*S )+a  
        Initializes a new Trace object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param key:
            The value to assign to the key property of this Trace.
        :type key: str

        :param root_span_operation_name:
            The value to assign to the root_span_operation_name property of this Trace.
        :type root_span_operation_name: str

        :param time_earliest_span_started:
            The value to assign to the time_earliest_span_started property of this Trace.
        :type time_earliest_span_started: datetime

        :param time_latest_span_ended:
            The value to assign to the time_latest_span_ended property of this Trace.
        :type time_latest_span_ended: datetime

        :param span_count:
            The value to assign to the span_count property of this Trace.
        :type span_count: int

        :param error_span_count:
            The value to assign to the error_span_count property of this Trace.
        :type error_span_count: int

        :param root_span_service_name:
            The value to assign to the root_span_service_name property of this Trace.
        :type root_span_service_name: str

        :param time_root_span_started:
            The value to assign to the time_root_span_started property of this Trace.
        :type time_root_span_started: datetime

        :param time_root_span_ended:
            The value to assign to the time_root_span_ended property of this Trace.
        :type time_root_span_ended: datetime

        :param root_span_duration_in_ms:
            The value to assign to the root_span_duration_in_ms property of this Trace.
        :type root_span_duration_in_ms: int

        :param trace_duration_in_ms:
            The value to assign to the trace_duration_in_ms property of this Trace.
        :type trace_duration_in_ms: int

        :param is_fault:
            The value to assign to the is_fault property of this Trace.
        :type is_fault: bool

        :param trace_status:
            The value to assign to the trace_status property of this Trace.
        :type trace_status: str

        :param trace_error_type:
            The value to assign to the trace_error_type property of this Trace.
        :type trace_error_type: str

        :param trace_error_code:
            The value to assign to the trace_error_code property of this Trace.
        :type trace_error_code: str

        :param service_summaries:
            The value to assign to the service_summaries property of this Trace.
        :type service_summaries: list[oci.apm_traces.models.TraceServiceSummary]

        :param span_summary:
            The value to assign to the span_summary property of this Trace.
        :type span_summary: oci.apm_traces.models.TraceSpanSummary

        :param spans:
            The value to assign to the spans property of this Trace.
        :type spans: list[oci.apm_traces.models.Span]

        keystrroot_span_operation_nametime_earliest_span_starteddatetimetime_latest_span_ended
span_countinterror_span_countroot_span_service_nametime_root_span_startedtime_root_span_endedroot_span_duration_in_mstrace_duration_in_msis_faultbooltrace_statustrace_error_typetrace_error_codeservice_summarieszlist[TraceServiceSummary]span_summaryZTraceSpanSummaryspansz
list[Span]ZrootSpanOperationNameZtimeEarliestSpanStartedZtimeLatestSpanEndedZ	spanCountZerrorSpanCountZrootSpanServiceNameZtimeRootSpanStartedZtimeRootSpanEndedZrootSpanDurationInMsZtraceDurationInMsZisFaultZtraceStatusZtraceErrorTypeZtraceErrorCodeZserviceSummariesZspanSummaryN)Zswagger_typesZattribute_map_key_root_span_operation_name_time_earliest_span_started_time_latest_span_ended_span_count_error_span_count_root_span_service_name_time_root_span_started_time_root_span_ended_root_span_duration_in_ms_trace_duration_in_ms	_is_fault_trace_status_trace_error_type_trace_error_code_service_summaries_span_summary_spans)selfkwargs r1   ?usr/lib/python3.10/site-packages/oci/apm_traces/models/trace.py__init__   s   N	
	

zTrace.__init__c                 C      | j S )af  
        **[Required]** Gets the key of this Trace.
        Unique identifier (traceId) for the trace that represents the span set.  Note that this field is
        defined as traceKey in the API and it maps to the traceId in the trace data in Application Performance
        Monitoring.


        :return: The key of this Trace.
        :rtype: str
        r   r/   r1   r1   r2   r         z	Trace.keyc                 C   
   || _ dS )aY  
        Sets the key of this Trace.
        Unique identifier (traceId) for the trace that represents the span set.  Note that this field is
        defined as traceKey in the API and it maps to the traceId in the trace data in Application Performance
        Monitoring.


        :param key: The key of this Trace.
        :type: str
        Nr5   )r/   r   r1   r1   r2   r         
c                 C   r4   )a/  
        Gets the root_span_operation_name of this Trace.
        Root span name associated with the trace. This is the flow start operation name.
        Null is displayed if the root span is not yet completed.


        :return: The root_span_operation_name of this Trace.
        :rtype: str
        r   r6   r1   r1   r2   r	         zTrace.root_span_operation_namec                 C   r8   )aF  
        Sets the root_span_operation_name of this Trace.
        Root span name associated with the trace. This is the flow start operation name.
        Null is displayed if the root span is not yet completed.


        :param root_span_operation_name: The root_span_operation_name of this Trace.
        :type: str
        Nr:   )r/   r	   r1   r1   r2   r	         
c                 C   r4   )z
        Gets the time_earliest_span_started of this Trace.
        Start time of the earliest span in the span collection.


        :return: The time_earliest_span_started of this Trace.
        :rtype: datetime
        r   r6   r1   r1   r2   r
         
z Trace.time_earliest_span_startedc                 C   r8   )z
        Sets the time_earliest_span_started of this Trace.
        Start time of the earliest span in the span collection.


        :param time_earliest_span_started: The time_earliest_span_started of this Trace.
        :type: datetime
        Nr=   )r/   r
   r1   r1   r2   r
         

c                 C   r4   )z
        Gets the time_latest_span_ended of this Trace.
        End time of the span that most recently ended in the span collection.


        :return: The time_latest_span_ended of this Trace.
        :rtype: datetime
        r    r6   r1   r1   r2   r      r>   zTrace.time_latest_span_endedc                 C   r8   )z
        Sets the time_latest_span_ended of this Trace.
        End time of the span that most recently ended in the span collection.


        :param time_latest_span_ended: The time_latest_span_ended of this Trace.
        :type: datetime
        Nr@   )r/   r   r1   r1   r2   r      r?   c                 C   r4   )aV  
        Gets the span_count of this Trace.
        The number of spans that have been processed by the system for the trace.  Note that there
        could be additional spans that have not been processed or reported yet if the trace is still
        in progress.


        :return: The span_count of this Trace.
        :rtype: int
        r!   r6   r1   r1   r2   r     r7   zTrace.span_countc                 C   r8   )a_  
        Sets the span_count of this Trace.
        The number of spans that have been processed by the system for the trace.  Note that there
        could be additional spans that have not been processed or reported yet if the trace is still
        in progress.


        :param span_count: The span_count of this Trace.
        :type: int
        NrA   )r/   r   r1   r1   r2   r     r9   c                 C   r4   )a[  
        Gets the error_span_count of this Trace.
        The number of spans with errors that have been processed by the system for the trace.
        Note that the number of spans with errors will be less than or equal to the total number of spans in the trace.


        :return: The error_span_count of this Trace.
        :rtype: int
        r"   r6   r1   r1   r2   r     r;   zTrace.error_span_countc                 C   r8   )aj  
        Sets the error_span_count of this Trace.
        The number of spans with errors that have been processed by the system for the trace.
        Note that the number of spans with errors will be less than or equal to the total number of spans in the trace.


        :param error_span_count: The error_span_count of this Trace.
        :type: int
        NrB   )r/   r   r1   r1   r2   r   ,  r<   c                 C   r4   )z
        Gets the root_span_service_name of this Trace.
        Service associated with the trace.


        :return: The root_span_service_name of this Trace.
        :rtype: str
        r#   r6   r1   r1   r2   r   9  r>   zTrace.root_span_service_namec                 C   r8   )z
        Sets the root_span_service_name of this Trace.
        Service associated with the trace.


        :param root_span_service_name: The root_span_service_name of this Trace.
        :type: str
        NrC   )r/   r   r1   r1   r2   r   E  r?   c                 C   r4   )z
        Gets the time_root_span_started of this Trace.
        Start time of the root span for the span collection.


        :return: The time_root_span_started of this Trace.
        :rtype: datetime
        r$   r6   r1   r1   r2   r   Q  r>   zTrace.time_root_span_startedc                 C   r8   )z
        Sets the time_root_span_started of this Trace.
        Start time of the root span for the span collection.


        :param time_root_span_started: The time_root_span_started of this Trace.
        :type: datetime
        NrD   )r/   r   r1   r1   r2   r   ]  r?   c                 C   r4   )z
        Gets the time_root_span_ended of this Trace.
        End time of the root span for the span collection.


        :return: The time_root_span_ended of this Trace.
        :rtype: datetime
        r%   r6   r1   r1   r2   r   i  r>   zTrace.time_root_span_endedc                 C   r8   )z
        Sets the time_root_span_ended of this Trace.
        End time of the root span for the span collection.


        :param time_root_span_ended: The time_root_span_ended of this Trace.
        :type: datetime
        NrE   )r/   r   r1   r1   r2   r   u  r?   c                 C   r4   )z
        Gets the root_span_duration_in_ms of this Trace.
        Time taken for the root span operation to complete in milliseconds.


        :return: The root_span_duration_in_ms of this Trace.
        :rtype: int
        r&   r6   r1   r1   r2   r     r>   zTrace.root_span_duration_in_msc                 C   r8   )z
        Sets the root_span_duration_in_ms of this Trace.
        Time taken for the root span operation to complete in milliseconds.


        :param root_span_duration_in_ms: The root_span_duration_in_ms of this Trace.
        :type: int
        NrF   )r/   r   r1   r1   r2   r     r?   c                 C   r4   )z
        Gets the trace_duration_in_ms of this Trace.
        Time between the start of the earliest span and the end of the most recent span in milliseconds.


        :return: The trace_duration_in_ms of this Trace.
        :rtype: int
        r'   r6   r1   r1   r2   r     r>   zTrace.trace_duration_in_msc                 C   r8   )a	  
        Sets the trace_duration_in_ms of this Trace.
        Time between the start of the earliest span and the end of the most recent span in milliseconds.


        :param trace_duration_in_ms: The trace_duration_in_ms of this Trace.
        :type: int
        NrG   )r/   r   r1   r1   r2   r     r?   c                 C   r4   )z
        Gets the is_fault of this Trace.
        Boolean flag that indicates whether the trace has an error.


        :return: The is_fault of this Trace.
        :rtype: bool
        r(   r6   r1   r1   r2   r     r>   zTrace.is_faultc                 C   r8   )z
        Sets the is_fault of this Trace.
        Boolean flag that indicates whether the trace has an error.


        :param is_fault: The is_fault of this Trace.
        :type: bool
        NrH   )r/   r   r1   r1   r2   r     r?   c                 C   r4   )aQ  
        Gets the trace_status of this Trace.
        The status of the trace.
        The trace statuses are defined as follows:
        complete - a root span has been recorded, but there is no information on the errors.
        success - a complete root span is recorded there is a successful error type and error code - HTTP 200.
        incomplete - the root span has not yet been received.
        error - the root span returned with an error. There may or may not be an associated error code or error type.


        :return: The trace_status of this Trace.
        :rtype: str
        r)   r6   r1   r1   r2   r     s   zTrace.trace_statusc                 C   r8   )a\  
        Sets the trace_status of this Trace.
        The status of the trace.
        The trace statuses are defined as follows:
        complete - a root span has been recorded, but there is no information on the errors.
        success - a complete root span is recorded there is a successful error type and error code - HTTP 200.
        incomplete - the root span has not yet been received.
        error - the root span returned with an error. There may or may not be an associated error code or error type.


        :param trace_status: The trace_status of this Trace.
        :type: str
        NrI   )r/   r   r1   r1   r2   r     s   
c                 C   r4   )z
        Gets the trace_error_type of this Trace.
        Error type of the trace.


        :return: The trace_error_type of this Trace.
        :rtype: str
        r*   r6   r1   r1   r2   r     r>   zTrace.trace_error_typec                 C   r8   )z
        Sets the trace_error_type of this Trace.
        Error type of the trace.


        :param trace_error_type: The trace_error_type of this Trace.
        :type: str
        NrJ   )r/   r   r1   r1   r2   r     r?   c                 C   r4   )z
        Gets the trace_error_code of this Trace.
        Error code of the trace.


        :return: The trace_error_code of this Trace.
        :rtype: str
        r+   r6   r1   r1   r2   r     r>   zTrace.trace_error_codec                 C   r8   )z
        Sets the trace_error_code of this Trace.
        Error code of the trace.


        :param trace_error_code: The trace_error_code of this Trace.
        :type: str
        NrK   )r/   r   r1   r1   r2   r     r?   c                 C   r4   )z
        Gets the service_summaries of this Trace.
        A summary of the spans by service.


        :return: The service_summaries of this Trace.
        :rtype: list[oci.apm_traces.models.TraceServiceSummary]
        r,   r6   r1   r1   r2   r     r>   zTrace.service_summariesc                 C   r8   )z
        Sets the service_summaries of this Trace.
        A summary of the spans by service.


        :param service_summaries: The service_summaries of this Trace.
        :type: list[oci.apm_traces.models.TraceServiceSummary]
        NrL   )r/   r   r1   r1   r2   r   '  r?   c                 C   r4   )z
        Gets the span_summary of this Trace.

        :return: The span_summary of this Trace.
        :rtype: oci.apm_traces.models.TraceSpanSummary
        r-   r6   r1   r1   r2   r   3  s   zTrace.span_summaryc                 C   r8   )z
        Sets the span_summary of this Trace.

        :param span_summary: The span_summary of this Trace.
        :type: oci.apm_traces.models.TraceSpanSummary
        NrM   )r/   r   r1   r1   r2   r   =  s   
c                 C   r4   )z
        **[Required]** Gets the spans of this Trace.
        An array of spans in the trace.


        :return: The spans of this Trace.
        :rtype: list[oci.apm_traces.models.Span]
        r.   r6   r1   r1   r2   r   G  r>   zTrace.spansc                 C   r8   )z
        Sets the spans of this Trace.
        An array of spans in the trace.


        :param spans: The spans of this Trace.
        :type: list[oci.apm_traces.models.Span]
        NrN   )r/   r   r1   r1   r2   r   S  r?   c                 C   s   t | S N)r   r6   r1   r1   r2   __repr___  s   zTrace.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r/   otherr1   r1   r2   __eq__b  s   zTrace.__eq__c                 C   s
   | |k S rO   r1   rR   r1   r1   r2   __ne__h  s   
zTrace.__ne__N)__name__
__module____qualname____doc__r3   propertyr   setterr	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rP   rT   rU   r1   r1   r1   r2   r      s     
































	
	

r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r1   r1   r1   r2   <module>   s   