ó FRTc@s˜ddlmZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd „ƒYZd efd „ƒYZd efd „ƒYZdS(iÿÿÿÿ(tjsont OptionStatuscBsSeZdZddddd„Zd„Zd„Zdd„Zd„Zd„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. cCs5||_||_||_||_|j|ƒdS(N(tdomaint refresh_fnt refresh_keytsave_fntrefresh(tselfRtdataRRR((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pyt__init__5s     cCs>|d|_|d|_|d|_t|dƒ|_dS(Nt CreationDatetStatet UpdateDatet UpdateVersion(t creation_datetstatust update_datetinttupdate_version(RR((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pyt_update_status=s   cCs|r|j|ƒndS(N(tupdate(Rtoptions((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pyt_update_optionsCscCs‰|sZ|jrZ|j|jjƒ}|rW|jrWx|jD]}||}q=WqWqZn|r…|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. tStatustOptionsN(RRtnameRRR(RRtkey((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pyRGs cCs tj|ƒS(sL Return the JSON representation of the options as a string. (Rtdumps(R((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pytto_jsonYscCs;|jr7|j|jj|jƒƒ}|j|ƒndS(sf Write the current state of the local object back to the CloudSearch service. N(RRRRR(RR((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pytsave_s N( t__name__t __module__t__doc__tNoneR RRRRR(((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pyRs      tIndexFieldStatuscBseZd„ZRS(cCsdS(N((R((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pyRjs(RRR(((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pyR"istAvailabilityOptionsStatuscBseZd„ZRS(cCsdS(N((R((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pyRos(RRR(((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pyR#nstScalingParametersStatuscBseZRS((RR(((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pyR$sstExpressionStatuscBseZRS((RR(((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pyR%wstServicePoliciesStatuscBsGeZd„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((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/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 StatementR+R-R,s aws:SourceIp(R0RtTruetFalsetappend(RR.R/tst add_statementt statementtcondition_namet condition((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/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(Rt service_arnR:(RR/R.((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/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(RR;R:(RR/R.((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/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(NR1R+R-R,s aws:SourceIp(R3tremoveR2R(RR.R/t need_updateR7R8R9((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/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(RR;R@(RR/R.((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/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(RR;R@(RR/R.((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pytdisallow_doc_ipßs ( RRR0R:R<R=R@RARB(((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pyR&{s    N( t boto.compatRtdictRR"R#R$R%R&(((sK/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/optionstatus.pyts M