ó FRTc@sxddlZddlmZdefd„ƒYZdefd„ƒYZdefd„ƒYZd efd „ƒYZdS( iÿÿÿÿN(tjsont OptionStatuscBskeZdZd d d d„Zd„Zd„Zd d„Zd„Zd„Z d„Z d„Z d „Z RS( s8 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. cCs,||_||_||_|j|ƒdS(N(tdomaint refresh_fntsave_fntrefresh(tselfRtdataRR((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyt__init__6s   cCs>|d|_|d|_|d|_t|dƒ|_dS(Nt creation_datetstatet update_datetupdate_version(R tstatusR tintR (RR ((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyt_update_status<s   cCs#|r|jtj|ƒƒndS(N(tupdateRtloads(Rtoptions((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyt_update_optionsBscCsY|s*|jr*|j|jjƒ}q*n|rU|j|dƒ|j|dƒndS(sÞ 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. R RN(RRtnameRR(RR((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyRFs  cCs tj|ƒS(sL Return the JSON representation of the options as a string. (Rtdumps(R((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pytto_jsonSscCsdS(N(tNone(RRtattrst connection((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyt startElementYscCs–|dkr||_nz|dkr0||_nb|dkrH||_nJ|dkrft|ƒ|_n,|dkr‚|j|ƒnt|||ƒdS(Nt CreationDatetStatet UpdateDatet UpdateVersiontOptions(tcreatedR tupdatedRR tupdate_from_json_doctsetattr(RRtvalueR((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyt endElement\s        cCs;|jr7|j|jj|jƒƒ}|j|ƒndS(sf Write the current state of the local object back to the CloudSearch service. N(RRRRR(RR((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pytsavejs cCs1x*|j|kr,tjdƒ|jƒqWdS(sƒ Performs polling of CloudSearch to wait for the ``state`` of this object to change to the provided state. iN(R ttimetsleepR(RR ((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pytwait_for_statess N( t__name__t __module__t__doc__RRRRRRRR%R&R)(((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyRs      tIndexFieldStatuscBseZd„Zd„ZRS(cCs|j|ƒdS(N(R(RR((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyRscCsdS(N((R((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyR&‚s(R*R+RR&(((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyR-}s tRankExpressionStatuscBseZRS((R*R+(((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyR.†stServicePoliciesStatuscBsGeZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs1idd6dd6|d6ii|gd6d6d6S( sì 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. tAllowtEffectt*tActiontResources aws:SourceIpt IpAddresst Condition((Rtarntip((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyt new_statementŒscCsüd|kr8|j||ƒ}|g|d<|jƒnÀt}x|dD]u}|d|krIx\|dD]M}|dkrjt}|d|}||dkr·|dj|ƒq·qjqjWqIqIW|rî|j||ƒ}|dj|ƒn|jƒdS(Nt StatementR4R6R5s aws:SourceIp(R9R&tTruetFalsetappend(RR7R8tst add_statementt statementtcondition_namet condition((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyt _allow_ip¦s"    "cCs |jj}|j||ƒdS(sî 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(Rtsearch_service_arnRC(RR8R7((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pytallow_search_ip»s cCs |jj}|j||ƒdS(sð 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(Rtdoc_service_arnRC(RR8R7((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyt allow_doc_ipÇs cCs±d|krdSt}x|dD]u}|d|kr!x\|dD]M}|dkrB|d|}||dkr|dj|ƒt}qqBqBWq!q!W|r­|jƒndS(NR:R4R6R5s aws:SourceIp(R<tremoveR;R&(RR7R8t need_updateR@RARB((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyt _disallow_ipÓs  cCs |jj}|j||ƒdS(só 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(RRDRJ(RR8R7((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pytdisallow_search_ipâs cCs |jj}|j||ƒdS(sõ 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(RRFRJ(RR8R7((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pytdisallow_doc_ipîs ( R*R+R9RCRERGRJRKRL(((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyR/Šs    (R't boto.compatRtdictRR-R.R/(((sJ/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/optionstatus.pyts `