FRTc@s[ddlZddlZddlmZddlmZdZdefdYZdS(iN(tAWSQueryConnection(t RegionInfocCs |tdddgkrdSdS(Nit1ttruetfalse(tTrue(tval((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pytdo_bool stLayer1cBsdeZdZejjdddZejjdddZd!d!e d!d!d!d!d!d!dd!d!dd!d!e d!dZ d Z dd!d d!d Z d Z d eeed!dZdZdZdZdZdZd!dZd!dZd!dZdZdZdZdZdZdZdZdZdZ d Z!RS("s 2011-02-01tBototcs_region_names us-east-1tcs_region_endpoints#cloudsearch.us-east-1.amazonaws.comit/c Cs| s!t||j|j} n| |_tj|d|jjd|d|d|d|d|d|d|d | d | d | d | d |d|d|dS(Nthosttaws_access_key_idtaws_secret_access_keyt is_securetporttproxyt proxy_portt proxy_usert proxy_passtdebugthttps_connection_factorytpathtsecurity_tokentvalidate_certst profile_name(RtDefaultRegionNametDefaultRegionEndpointtregionRt__init__tendpoint(tselfRRRR RRRRRRRRRt api_versionRRR((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pyR+s*   cCsdgS(Nshmac-v4((R!((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pyt_required_auth_capabilityHstGETcCs|s|}n|j||||}|j} tjj| |jdkrtjjd|rj|nddt} tjj | |} | j | | } x|D]} | j | } qW| s|dkrdSgSt | tr| St| Sn|j|j|j| dS(Nit list_markertSettpythonize_name(t make_requesttreadtbototlogRtstatust jsonresponsetElementRt XmlHandlertparsetgettNonet isinstancetlisttdictt ResponseErrortreason(R!tdoc_pathtactiontparamsRtparenttverbR%tresponsetbodytethtinnertp((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pyt get_responseKs(       cCs,d}i|d6}|j|d|ddS( s: Create a new search domain. :type domain_name: string :param domain_name: A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed. :raises: BaseException, InternalException, LimitExceededException tcreate_domain_responsetcreate_domain_resultt domain_statust DomainNamet CreateDomainR<tPOST(RDRERF(RC(R!t domain_nameR8R:((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pyt create_domainds   tc Csd} i|d6|d6|d6} |dkrj|| ds   cCs3d }i|d6|d6}|j|d|ddS( s Deletes an existing ``RankExpression`` from the search domain. :type domain_name: string :param domain_name: A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed. :type rank_name: string :param rank_name: Name of the ``RankExpression`` to delete. :raises: BaseException, InternalException, ResourceNotFoundException tdelete_rank_expression_responsetdelete_rank_expression_resultR^RGtRankNametDeleteRankExpressionR<RI(RkRlsrank_expression(RC(R!RJR`R8R:((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pytdelete_rank_expression^s  cCs,d}i|d6}|j|d|ddS( s Describes options defining the default search field used by indexing for the search domain. :type domain_name: string :param domain_name: A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed. :raises: BaseException, InternalException, ResourceNotFoundException t&describe_default_search_field_responset$describe_default_search_field_resulttdefault_search_fieldRGtDescribeDefaultSearchFieldR<RI(RpRqsdefault_search_field(RC(R!RJR8R:((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pytdescribe_default_search_fieldws   cCsbd }i}|rCx.t|dD]\}}||d|OptionStatus has ``OptionState`` of ``RequiresIndexDocuments``. :type domain_name: string :param domain_name: A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed. :raises: BaseException, InternalException, ResourceNotFoundException tindex_documents_responsetindex_documents_resultRRGtIndexDocumentsR<RIR%t FieldNames(RRs field_names(RC(R!RJR8R:((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pytindex_documents8s  cCs3d }i|d6|d6}|j|d|ddS( s Updates options defining the default search field used by indexing for the search domain. :type domain_name: string :param domain_name: A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed. :type default_search_field: string :param default_search_field: The IndexField to use for search requests issued with the q parameter. The default is an empty string, which automatically searches all text fields. :raises: BaseException, InternalException, InvalidTypeException, ResourceNotFoundException t$update_default_search_field_responset"update_default_search_field_resultRrRGtDefaultSearchFieldtUpdateDefaultSearchFieldR<RI(RRsdefault_search_field(RC(R!RJRrR8R:((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pytupdate_default_search_fieldRs   cCs3d }i|d6|d6}|j|d|ddS( s Updates the policies controlling access to the services in this search domain. :type domain_name: string :param domain_name: A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed. :type access_policies: string :param access_policies: An IAM access policy as described in The Access Policy Language in Using AWS Identity and Access Management. The maximum size of an access policy document is 100KB. :raises: BaseException, InternalException, LimitExceededException, ResourceNotFoundException, InvalidTypeException t'update_service_access_policies_responset%update_service_access_policies_resultRtAccessPoliciesRGtUpdateServiceAccessPoliciesR<RI(RRsaccess_policies(RC(R!RJRR8R:((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pytupdate_service_access_policiesqs   cCs3d }i|d6|d6}|j|d|ddS( s Updates stemming options used by indexing for the search domain. :type domain_name: string :param domain_name: A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed. :type stems: string :param stems: Maps terms to their stems. The JSON object has a single key called "stems" whose value is a dict mapping terms to their stems. The maximum size of a stemming document is 500KB. Example: {"stems":{"people": "person", "walking":"walk"}} :raises: BaseException, InternalException, InvalidTypeException, LimitExceededException, ResourceNotFoundException t update_stemming_options_responsetupdate_stemming_options_resultRRGtStemstUpdateStemmingOptionsR<RI(RRsstems(RC(R!RJRR8R:((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pytupdate_stemming_optionss   cCs3d }i|d6|d6}|j|d|ddS( s Updates stopword options used by indexing for the search domain. :type domain_name: string :param domain_name: A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed. :type stopwords: string :param stopwords: Lists stopwords in a JSON object. The object has a single key called "stopwords" whose value is an array of strings. The maximum size of a stopwords document is 10KB. Example: {"stopwords": ["a", "an", "the", "of"]} :raises: BaseException, InternalException, InvalidTypeException, LimitExceededException, ResourceNotFoundException t update_stopword_options_responsetupdate_stopword_options_resultRRGt StopwordstUpdateStopwordOptionsR<RI(RRs stopwords(RC(R!RJRR8R:((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pytupdate_stopword_optionss   cCs3d }i|d6|d6}|j|d|ddS( sB Updates synonym options used by indexing for the search domain. :type domain_name: string :param domain_name: A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed. :type synonyms: string :param synonyms: Maps terms to their synonyms. The JSON object has a single key "synonyms" whose value is a dict mapping terms to their synonyms. Each synonym is a simple string or an array of strings. The maximum size of a stopwords document is 100KB. Example: {"synonyms": {"cat": ["feline", "kitten"], "puppy": "dog"}} :raises: BaseException, InternalException, InvalidTypeException, LimitExceededException, ResourceNotFoundException tupdate_synonym_options_responsetupdate_synonym_options_resultRRGtSynonymstUpdateSynonymOptionsR<RI(RRssynonyms(RC(R!RJRR8R:((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pytupdate_synonym_optionss   N("t__name__t __module__t APIVersionR*tconfigR1RRR2RRR#RCRKtFalseR[RaReRjRoRtR}RRRRRRRRRRRR(((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pyR$sF       a K               (R*tboto.jsonresponsetboto.connectionRtboto.regioninfoRRR(((sD/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch/layer1.pyts