o
    ɶdP,                     @   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                   @   sh  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d(d) Zd*d+ Zd,d- Zd.S )/Spanz&
    Definition of a span object.
    c                 K   s   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| _d| _d| _dS )a  
        Initializes a new Span 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 Span.
        :type key: str

        :param parent_span_key:
            The value to assign to the parent_span_key property of this Span.
        :type parent_span_key: str

        :param trace_key:
            The value to assign to the trace_key property of this Span.
        :type trace_key: str

        :param time_started:
            The value to assign to the time_started property of this Span.
        :type time_started: datetime

        :param time_ended:
            The value to assign to the time_ended property of this Span.
        :type time_ended: datetime

        :param duration_in_ms:
            The value to assign to the duration_in_ms property of this Span.
        :type duration_in_ms: int

        :param operation_name:
            The value to assign to the operation_name property of this Span.
        :type operation_name: str

        :param service_name:
            The value to assign to the service_name property of this Span.
        :type service_name: str

        :param kind:
            The value to assign to the kind property of this Span.
        :type kind: str

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

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

        :param is_error:
            The value to assign to the is_error property of this Span.
        :type is_error: bool

        strdatetimeintz	list[Tag]zlist[SpanLogCollection]bool)keyparent_span_key	trace_keytime_started
time_endedduration_in_msoperation_nameservice_namekindtagslogsis_errorr   ZparentSpanKeyZtraceKeyZtimeStartedZ	timeEndedZdurationInMsZoperationNameZserviceNamer   r   r   ZisErrorN)Zswagger_typesZattribute_map_key_parent_span_key
_trace_key_time_started_time_ended_duration_in_ms_operation_name_service_name_kind_tags_logs	_is_error)selfkwargs r%   >usr/lib/python3.10/site-packages/oci/apm_traces/models/span.py__init__   sL   7
zSpan.__init__c                 C      | j S )aC  
        **[Required]** Gets the key of this Span.
        Unique identifier (spanId) for the span.  Note that this field is
        defined as spanKey in the API and it maps to the spanId in the trace data
        in Application Performance Monitoring.


        :return: The key of this Span.
        :rtype: str
        r   r#   r%   r%   r&   r   s   s   zSpan.keyc                 C   
   || _ dS )a6  
        Sets the key of this Span.
        Unique identifier (spanId) for the span.  Note that this field is
        defined as spanKey in the API and it maps to the spanId in the trace data
        in Application Performance Monitoring.


        :param key: The key of this Span.
        :type: str
        Nr)   )r#   r   r%   r%   r&   r      s   
c                 C   r(   )z
        Gets the parent_span_key of this Span.
        Unique parent identifier for the span if one exists. For root spans this will be null.


        :return: The parent_span_key of this Span.
        :rtype: str
        r   r*   r%   r%   r&   r         
zSpan.parent_span_keyc                 C   r+   )z
        Sets the parent_span_key of this Span.
        Unique parent identifier for the span if one exists. For root spans this will be null.


        :param parent_span_key: The parent_span_key of this Span.
        :type: str
        Nr,   )r#   r   r%   r%   r&   r         

c                 C   r(   )z
        **[Required]** Gets the trace_key of this Span.
        Unique identifier for the trace.


        :return: The trace_key of this Span.
        :rtype: str
        r   r*   r%   r%   r&   r      r-   zSpan.trace_keyc                 C   r+   )z
        Sets the trace_key of this Span.
        Unique identifier for the trace.


        :param trace_key: The trace_key of this Span.
        :type: str
        Nr/   )r#   r   r%   r%   r&   r      r.   c                 C   r(   )z
        **[Required]** Gets the time_started of this Span.
        Span start time.  Timestamp when the span was started.


        :return: The time_started of this Span.
        :rtype: datetime
        r   r*   r%   r%   r&   r      r-   zSpan.time_startedc                 C   r+   )z
        Sets the time_started of this Span.
        Span start time.  Timestamp when the span was started.


        :param time_started: The time_started of this Span.
        :type: datetime
        Nr0   )r#   r   r%   r%   r&   r      r.   c                 C   r(   )z
        **[Required]** Gets the time_ended of this Span.
        Span end time.  Timestamp when the span was completed.


        :return: The time_ended of this Span.
        :rtype: datetime
        r   r*   r%   r%   r&   r      r-   zSpan.time_endedc                 C   r+   )z
        Sets the time_ended of this Span.
        Span end time.  Timestamp when the span was completed.


        :param time_ended: The time_ended of this Span.
        :type: datetime
        Nr1   )r#   r   r%   r%   r&   r      r.   c                 C   r(   )z
        **[Required]** Gets the duration_in_ms of this Span.
        Total span duration in milliseconds.


        :return: The duration_in_ms of this Span.
        :rtype: int
        r   r*   r%   r%   r&   r      r-   zSpan.duration_in_msc                 C   r+   )z
        Sets the duration_in_ms of this Span.
        Total span duration in milliseconds.


        :param duration_in_ms: The duration_in_ms of this Span.
        :type: int
        Nr2   )r#   r   r%   r%   r&   r      r.   c                 C   r(   )z
        **[Required]** Gets the operation_name of this Span.
        Span name associated with the trace.  This is usually the method or URI of the request.


        :return: The operation_name of this Span.
        :rtype: str
        r   r*   r%   r%   r&   r     r-   zSpan.operation_namec                 C   r+   )z
        Sets the operation_name of this Span.
        Span name associated with the trace.  This is usually the method or URI of the request.


        :param operation_name: The operation_name of this Span.
        :type: str
        Nr3   )r#   r   r%   r%   r&   r     r.   c                 C   r(   )z
        Gets the service_name of this Span.
        Service name associated with the span.


        :return: The service_name of this Span.
        :rtype: str
        r   r*   r%   r%   r&   r     r-   zSpan.service_namec                 C   r+   )z
        Sets the service_name of this Span.
        Service name associated with the span.


        :param service_name: The service_name of this Span.
        :type: str
        Nr4   )r#   r   r%   r%   r&   r   +  r.   c                 C   r(   )z
        Gets the kind of this Span.
        Kind associated with the span.


        :return: The kind of this Span.
        :rtype: str
        r   r*   r%   r%   r&   r   7  r-   z	Span.kindc                 C   r+   )z
        Sets the kind of this Span.
        Kind associated with the span.


        :param kind: The kind of this Span.
        :type: str
        Nr5   )r#   r   r%   r%   r&   r   C  r.   c                 C   r(   )z
        Gets the tags of this Span.
        List of tags associated with the span.


        :return: The tags of this Span.
        :rtype: list[oci.apm_traces.models.Tag]
        r    r*   r%   r%   r&   r   O  r-   z	Span.tagsc                 C   r+   )z
        Sets the tags of this Span.
        List of tags associated with the span.


        :param tags: The tags of this Span.
        :type: list[oci.apm_traces.models.Tag]
        Nr6   )r#   r   r%   r%   r&   r   [  r.   c                 C   r(   )z
        Gets the logs of this Span.
        List of logs associated with the span.


        :return: The logs of this Span.
        :rtype: list[oci.apm_traces.models.SpanLogCollection]
        r!   r*   r%   r%   r&   r   g  r-   z	Span.logsc                 C   r+   )z
        Sets the logs of this Span.
        List of logs associated with the span.


        :param logs: The logs of this Span.
        :type: list[oci.apm_traces.models.SpanLogCollection]
        Nr7   )r#   r   r%   r%   r&   r   s  r.   c                 C   r(   )z
        **[Required]** Gets the is_error of this Span.
        Indicates if the span has an error.


        :return: The is_error of this Span.
        :rtype: bool
        r"   r*   r%   r%   r&   r     r-   zSpan.is_errorc                 C   r+   )z
        Sets the is_error of this Span.
        Indicates if the span has an error.


        :param is_error: The is_error of this Span.
        :type: bool
        Nr8   )r#   r   r%   r%   r&   r     r.   c                 C   s   t | S N)r   r*   r%   r%   r&   __repr__  s   zSpan.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r#   otherr%   r%   r&   __eq__  s   zSpan.__eq__c                 C   s
   | |k S r9   r%   r<   r%   r%   r&   __ne__  s   
zSpan.__ne__N)__name__
__module____qualname____doc__r'   propertyr   setterr   r   r   r   r   r   r   r   r   r   r   r:   r>   r?   r%   r%   r%   r&   r      sl    a























r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r%   r%   r%   r&   <module>   s   