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 @ sb e Zd ZdZdZdZdZdd� Zedd� �Z e d d � �Zejdd � �Zdd � Z dd� Zdd� ZdS )�LoadBalancingMethodz$ LoadBalancingMethod model. �IP_HASH�ROUND_ROBIN� STICKY_COOKIEc K s ddi| _ ddi| _d| _dS )a� Initializes a new LoadBalancingMethod 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.waas.models.RoundRobinLoadBalancingMethod` * :class:`~oci.waas.models.StickyCookieLoadBalancingMethod` * :class:`~oci.waas.models.IPHashLoadBalancingMethod` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param method: The value to assign to the method property of this LoadBalancingMethod. Allowed values for this property are: "IP_HASH", "ROUND_ROBIN", "STICKY_COOKIE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type method: str �method�strN)Z swagger_typesZ attribute_map�_method)�self�kwargs� r �I/usr/lib/python3.9/site-packages/oci/waas/models/load_balancing_method.py�__init__ s ��zLoadBalancingMethod.__init__c C s4 | d }|dkrdS |dkr dS |dkr,dS dS d S ) 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 ZRoundRobinLoadBalancingMethodr ZStickyCookieLoadBalancingMethodr ZIPHashLoadBalancingMethodr Nr )Zobject_dictionary�typer r r �get_subtype: s zLoadBalancingMethod.get_subtypec C s | j S )a� **[Required]** Gets the method of this LoadBalancingMethod. Load balancing methods are algorithms used to efficiently distribute traffic among origin servers. - **`IP_HASH`__:** All the incoming requests from the same client IP address should go to the same content origination server. IP_HASH load balancing method uses origin weights when choosing which origin should the hash be assigned to initially. - **`ROUND_ROBIN`__:** Forwards requests sequentially to the available origin servers. The first request - to the first origin server, the second request - to the next origin server, and so on. After it sends a request to the last origin server, it starts again with the first origin server. When using weights on origins, Weighted Round Robin assigns more requests to origins with a greater weight. Over a period of time, origins will receive a number of requests in proportion to their weight. - **`STICKY_COOKIE`__:** Adds a session cookie to the first response from the origin server and identifies the server that sent the response. The client's next request contains the cookie value, and nginx routes the request to the origin server that responded to the first request. STICKY_COOKIE load balancing method falls back to Round Robin for the first request. __ https://docs.cloud.oracle.com/iaas/api/#/en/waas/latest/datatypes/IPHashLoadBalancingMethod __ https://docs.cloud.oracle.com/iaas/api/#/en/waas/latest/datatypes/RoundRobinLoadBalancingMethod __ https://docs.cloud.oracle.com/iaas/api/#/en/waas/latest/datatypes/StickyCookieLoadBalancingMethod Allowed values for this property are: "IP_HASH", "ROUND_ROBIN", "STICKY_COOKIE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :return: The method of this LoadBalancingMethod. :rtype: str )r �r r r r r M s zLoadBalancingMethod.methodc C s g d�}t ||�sd}|| _dS )a� Sets the method of this LoadBalancingMethod. Load balancing methods are algorithms used to efficiently distribute traffic among origin servers. - **`IP_HASH`__:** All the incoming requests from the same client IP address should go to the same content origination server. IP_HASH load balancing method uses origin weights when choosing which origin should the hash be assigned to initially. - **`ROUND_ROBIN`__:** Forwards requests sequentially to the available origin servers. The first request - to the first origin server, the second request - to the next origin server, and so on. After it sends a request to the last origin server, it starts again with the first origin server. When using weights on origins, Weighted Round Robin assigns more requests to origins with a greater weight. Over a period of time, origins will receive a number of requests in proportion to their weight. - **`STICKY_COOKIE`__:** Adds a session cookie to the first response from the origin server and identifies the server that sent the response. The client's next request contains the cookie value, and nginx routes the request to the origin server that responded to the first request. STICKY_COOKIE load balancing method falls back to Round Robin for the first request. __ https://docs.cloud.oracle.com/iaas/api/#/en/waas/latest/datatypes/IPHashLoadBalancingMethod __ https://docs.cloud.oracle.com/iaas/api/#/en/waas/latest/datatypes/RoundRobinLoadBalancingMethod __ https://docs.cloud.oracle.com/iaas/api/#/en/waas/latest/datatypes/StickyCookieLoadBalancingMethod :param method: The method of this LoadBalancingMethod. :type: str )r r r ZUNKNOWN_ENUM_VALUEN)r r )r r Zallowed_valuesr r r r f s c C s t | �S �N)r r r r r �__repr__ s zLoadBalancingMethod.__repr__c C s |d u rdS | j |j kS )NF)�__dict__�r �otherr r r �__eq__� s zLoadBalancingMethod.__eq__c C s | |k S r r r r r r �__ne__� s zLoadBalancingMethod.__ne__N)�__name__� __module__�__qualname__�__doc__ZMETHOD_IP_HASHZMETHOD_ROUND_ROBINZMETHOD_STICKY_COOKIEr �staticmethodr �propertyr �setterr r r r r r r r s r N)Zoci.utilr r r Zoci.decoratorsr �objectr r r r r �<module> s
cải xoăn