ruạṛ
a ���f� � @ s8 d dl mZmZmZ d dlmZ eG dd� de��ZdS )� )�formatted_flat_dict� NONE_SENTINEL�#value_allowed_none_or_none_sentinel)�init_model_state_from_kwargsc @ s� e Zd ZdZdZdZdd� Zedd� �Ze dd � �Z e jd d � �Z e dd� �Zejd d� �Ze dd� �Z e jdd� �Z dd� Zdd� Zdd� ZdS )�ScalingConfigurationz? Scaling configuration for the metric expression rule. � THRESHOLD�QUERYc K s2 dddd�| _ dddd�| _d| _d| _d| _dS )a� Initializes a new ScalingConfiguration object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class: * :class:`~oci.data_science.models.CustomExpressionQueryScalingConfiguration` * :class:`~oci.data_science.models.PredefinedExpressionThresholdScalingConfiguration` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param scaling_configuration_type: The value to assign to the scaling_configuration_type property of this ScalingConfiguration. Allowed values for this property are: "THRESHOLD", "QUERY" :type scaling_configuration_type: str :param pending_duration: The value to assign to the pending_duration property of this ScalingConfiguration. :type pending_duration: str :param instance_count_adjustment: The value to assign to the instance_count_adjustment property of this ScalingConfiguration. :type instance_count_adjustment: int �str�int)�scaling_configuration_type�pending_duration�instance_count_adjustment�scalingConfigurationTypeZpendingDurationZinstanceCountAdjustmentN)Z swagger_typesZ attribute_map�_scaling_configuration_type�_pending_duration�_instance_count_adjustment)�self�kwargs� r �Q/usr/lib/python3.9/site-packages/oci/data_science/models/scaling_configuration.py�__init__ s ��zScalingConfiguration.__init__c C s( | d }|dkrdS |dkr dS dS dS )z� Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype. r r Z)CustomExpressionQueryScalingConfigurationr Z1PredefinedExpressionThresholdScalingConfigurationr Nr )Zobject_dictionary�typer r r �get_subtypeB s z ScalingConfiguration.get_subtypec C s | j S )a5 **[Required]** Gets the scaling_configuration_type of this ScalingConfiguration. The type of scaling configuration. Allowed values for this property are: "THRESHOLD", "QUERY" :return: The scaling_configuration_type of this ScalingConfiguration. :rtype: str )r �r r r r r R s z/ScalingConfiguration.scaling_configuration_typec C s* ddg}t ||�s td|� ���|| _dS )z� Sets the scaling_configuration_type of this ScalingConfiguration. The type of scaling configuration. :param scaling_configuration_type: The scaling_configuration_type of this ScalingConfiguration. :type: str r r zGInvalid value for `scaling_configuration_type`, must be None or one of N)r � ValueErrorr )r r Zallowed_valuesr r r r ` s �c C s | j S )a Gets the pending_duration of this ScalingConfiguration. The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING" or vice versa. For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING"; likewise, the alarm must persist in not breaching the condition for five minutes before the alarm updates its state to "OK." The duration is specified as a string in ISO 8601 format (`PT10M` for ten minutes or `PT1H` for one hour). Minimum: PT3M. Maximum: PT1H. Default: PT3M. :return: The pending_duration of this ScalingConfiguration. :rtype: str �r r r r r r q s z%ScalingConfiguration.pending_durationc C s || _ dS )a, Sets the pending_duration of this ScalingConfiguration. The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING" or vice versa. For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING"; likewise, the alarm must persist in not breaching the condition for five minutes before the alarm updates its state to "OK." The duration is specified as a string in ISO 8601 format (`PT10M` for ten minutes or `PT1H` for one hour). Minimum: PT3M. Maximum: PT1H. Default: PT3M. :param pending_duration: The pending_duration of this ScalingConfiguration. :type: str Nr )r r r r r r � s c C s | j S )z� Gets the instance_count_adjustment of this ScalingConfiguration. The value is used for adjusting the count of instances by. :return: The instance_count_adjustment of this ScalingConfiguration. :rtype: int �r r r r r r � s z.ScalingConfiguration.instance_count_adjustmentc C s || _ dS )a Sets the instance_count_adjustment of this ScalingConfiguration. The value is used for adjusting the count of instances by. :param instance_count_adjustment: The instance_count_adjustment of this ScalingConfiguration. :type: int Nr )r r r r r r � s c C s t | �S �N)r r r r r �__repr__� s zScalingConfiguration.__repr__c C s |d u rdS | j |j kS )NF)�__dict__�r �otherr r r �__eq__� s zScalingConfiguration.__eq__c C s | |k S r r r r r r �__ne__� s zScalingConfiguration.__ne__N)�__name__� __module__�__qualname__�__doc__Z$SCALING_CONFIGURATION_TYPE_THRESHOLDZ SCALING_CONFIGURATION_TYPE_QUERYr �staticmethodr �propertyr �setterr r r r"