https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/boto/cloudsearch/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/boto/cloudsearch/__pycache__/optionstatus.cpython-310.pyc
o

ckF["�@sXddlZddlmZGdd�de�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZdS)�N)�jsonc@s\eZdZdZddd�Zdd�Zdd�Zdd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�ZdS)�OptionStatusa8
    Presents a combination of status field (defined below) which are
    accessed as attributes and option values which are stored in the
    native Python dictionary.  In this class, the option values are
    merged from a JSON object that is stored as the Option part of
    the object.

    :ivar domain_name: The name of the domain this option is associated with.
    :ivar create_date: A timestamp for when this option was created.
    :ivar state: The state of processing a change to an option.
        Possible values:

        * RequiresIndexDocuments: the option's latest value will not
          be visible in searches until IndexDocuments has been called
          and indexing is complete.
        * Processing: the option's latest value is not yet visible in
          all searches but is in the process of being activated.
        * Active: the option's latest value is completely visible.

    :ivar update_date: A timestamp for when this option was updated.
    :ivar update_version: A unique integer that indicates when this
        option was last updated.
    NcCs ||_||_||_|�|�dS�N)�domain�
refresh_fn�save_fn�refresh)�selfr�datarr�r�?/usr/lib/python3/dist-packages/boto/cloudsearch/optionstatus.py�__init__6szOptionStatus.__init__cCs0|d|_|d|_|d|_t|d�|_dS)N�
creation_date�state�update_date�update_version)r�statusr�intr)r	rrrr�_update_status<s


zOptionStatus._update_statuscCs|r|�t�|��dSdSr)�updater�loads�r	�optionsrrr�_update_optionsBs�zOptionStatus._update_optionscCs@|s|jr|�|jj�}|r|�|d�|�|d�dSdS)z�
        Refresh the local state of the object.  You can either pass
        new state data in as the parameter ``data`` or, if that parameter
        is omitted, the state data will be retrieved from CloudSearch.
        rrN)rr�namerr�r	r
rrrrFs�zOptionStatus.refreshcCs
t�|�S)zL
        Return the JSON representation of the options as a string.
        )r�dumps�r	rrr�to_jsonSs
zOptionStatus.to_jsoncC�dSrr)r	r�attrs�
connectionrrr�startElementY�zOptionStatus.startElementcCsr|dkr	||_dS|dkr||_dS|dkr||_dS|dkr&t|�|_dS|dkr1|�|�dSt|||�dS)N�CreationDate�State�
UpdateDate�
UpdateVersion�Options)�createdr�updatedrr�update_from_json_doc�setattr)r	r�valuer!rrr�
endElement\s


zOptionStatus.endElementcCs,|jr|�|jj|���}|�|�dSdS)zf
        Write the current state of the local object back to the
        CloudSearch service.
        N)rrrrrrrrr�savejs�zOptionStatus.savecCs.|j|krt�d�|��|j|ksdSdS)z�
        Performs polling of CloudSearch to wait for the ``state``
        of this object to change to the provided state.
        �N)r�time�sleepr)r	rrrr�wait_for_statess

�zOptionStatus.wait_for_state)NNNr)
�__name__�
__module__�__qualname__�__doc__r
rrrrr"r.r/r3rrrrrs


	rc@seZdZdd�Zdd�ZdS)�IndexFieldStatuscCs|�|�dSr)rrrrrrsz IndexFieldStatus._update_optionscCrrrrrrrr/�r#zIndexFieldStatus.saveN)r4r5r6rr/rrrrr8}sr8c@seZdZdS)�RankExpressionStatusN)r4r5r6rrrrr9�sr9c@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�ServicePoliciesStatuscCsdd|dd|giid�S)a�
        Returns a new policy statement that will allow
        access to the service described by ``arn`` by the
        ip specified in ``ip``.

        :type arn: string
        :param arn: The Amazon Resource Notation identifier for the
            service you wish to provide access to.  This would be
            either the search service or the document service.

        :type ip: string
        :param ip: An IP address or CIDR block you wish to grant access
            to.
        �Allow�*�	IpAddress�aws:SourceIp)�Effect�Action�Resource�	Conditionr)r	�arn�iprrr�
new_statement�s���z#ServicePoliciesStatus.new_statementcCs�d|vr|�||�}|g|d<|��dSd}|dD](}|d|krC|dD]}|dkrBd}|d|}||dvrB|d�|�q'q|rS|�||�}|d�|�|��dS)N�	StatementTrArBr=Fr>)rEr/�append)r	rCrD�s�
add_statement�	statement�condition_name�	conditionrrr�	_allow_ip�s$
�zServicePoliciesStatus._allow_ipcC�|jj}|�||�dS)z�
        Add the provided ip address or CIDR block to the list of
        allowable address for the search service.

        :type ip: string
        :param ip: An IP address or CIDR block you wish to grant access
            to.
        N)r�search_service_arnrM�r	rDrCrrr�allow_search_ip��	z%ServicePoliciesStatus.allow_search_ipcCrN)z�
        Add the provided ip address or CIDR block to the list of
        allowable address for the document service.

        :type ip: string
        :param ip: An IP address or CIDR block you wish to grant access
            to.
        N)r�doc_service_arnrMrPrrr�allow_doc_ip�rRz"ServicePoliciesStatus.allow_doc_ipcCs~d|vrdSd}|dD](}|d|kr4|dD]}|dkr3|d|}||dvr3|d�|�d}qq|r=|��dSdS)NrFFrArBr=r>T)�remover/)r	rCrD�need_updaterJrKrLrrr�_disallow_ip�s��z"ServicePoliciesStatus._disallow_ipcCrN)z�
        Remove the provided ip address or CIDR block from the list of
        allowable address for the search service.

        :type ip: string
        :param ip: An IP address or CIDR block you wish to grant access
            to.
        N)rrOrWrPrrr�disallow_search_ip�rRz(ServicePoliciesStatus.disallow_search_ipcCrN)z�
        Remove the provided ip address or CIDR block from the list of
        allowable address for the document service.

        :type ip: string
        :param ip: An IP address or CIDR block you wish to grant access
            to.
        N)rrSrWrPrrr�disallow_doc_ip�rRz%ServicePoliciesStatus.disallow_doc_ipN)
r4r5r6rErMrQrTrWrXrYrrrrr:�sr:)r1�boto.compatr�dictrr8r9r:rrrr�<module>s`	

https://t.me/RX1948 - 2025