o
    ɶd                     @   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                   @   sl   e Zd Zd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
dd Zdd Zdd ZdS )MetriczL
    Metric and threshold details for triggering an autoscaling action.
    CPU_UTILIZATIONMEMORY_UTILIZATIONc                 K   s(   ddd| _ ddd| _d| _d| _dS )a  
        Initializes a new Metric object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param metric_type:
            The value to assign to the metric_type property of this Metric.
            Allowed values for this property are: "CPU_UTILIZATION", "MEMORY_UTILIZATION", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type metric_type: str

        :param threshold:
            The value to assign to the threshold property of this Metric.
        :type threshold: oci.autoscaling.models.Threshold

        strZ	Threshold)metric_type	thresholdZ
metricTyper   N)Zswagger_typesZattribute_map_metric_type
_threshold)selfkwargs r   Ausr/lib/python3.10/site-packages/oci/autoscaling/models/metric.py__init__   s   
zMetric.__init__c                 C      | j S )aW  
        **[Required]** Gets the metric_type of this Metric.
        Allowed values for this property are: "CPU_UTILIZATION", "MEMORY_UTILIZATION", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The metric_type of this Metric.
        :rtype: str
        )r   r   r   r   r   r
   7   s   zMetric.metric_typec                 C   s    ddg}t ||sd}|| _dS )z
        Sets the metric_type of this Metric.

        :param metric_type: The metric_type of this Metric.
        :type: str
        r   r   ZUNKNOWN_ENUM_VALUEN)r   r   )r   r
   Zallowed_valuesr   r   r   r
   D   s   

c                 C   r   )z
        **[Required]** Gets the threshold of this Metric.

        :return: The threshold of this Metric.
        :rtype: oci.autoscaling.models.Threshold
        r   r   r   r   r   r   Q   s   zMetric.thresholdc                 C   s
   || _ dS )z
        Sets the threshold of this Metric.

        :param threshold: The threshold of this Metric.
        :type: oci.autoscaling.models.Threshold
        Nr   )r   r   r   r   r   r   [   s   
c                 C   s   t | S N)r   r   r   r   r   __repr__e   s   zMetric.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r   otherr   r   r   __eq__h   s   zMetric.__eq__c                 C   s
   | |k S r   r   r   r   r   r   __ne__n   s   
zMetric.__ne__N)__name__
__module____qualname____doc__ZMETRIC_TYPE_CPU_UTILIZATIONZMETRIC_TYPE_MEMORY_UTILIZATIONr   propertyr
   setterr   r   r   r   r   r   r   r   r      s     


	
	r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r   r   r   r   <module>   s   