FRTc@sddlmZddlmZddlmZddlmZddlmZddlmZddlm Z dZ d e fd YZ d S( i(tIndexFieldStatus(tServicePoliciesStatus(tExpressionStatus(tAvailabilityOptionsStatus(tScalingParametersStatus(tDocumentServiceConnection(tSearchConnectioncCs#|tddddgkrtStS(NttruetTruetTRUEi(RtFalse(tvalue((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyt handle_bool stDomainc BseZdZdZdZedZedZedZedZ e j dZ edZ e j d Z ed Z e j d Z ed Z e j d Z edZej dZedZej dZedZedZdZdZdZdZdZdZd"dZdeeeeed"d"dZd"dZdZdZd Zd!Z RS(#s A Cloudsearch domain. :ivar name: The name of the domain. :ivar id: The internally generated unique identifier for the domain. :ivar created: A boolean which is True if the domain is created. It can take several minutes to initialize a domain when CreateDomain is called. Newly created search domains are returned with a False value for Created until domain creation is complete :ivar deleted: A boolean which is True if the search domain has been deleted. The system must clean up resources dedicated to the search domain when delete is called. Newly deleted search domains are returned from list_domains with a True value for deleted for several minutes until resource cleanup is complete. :ivar processing: True if processing is being done to activate the current domain configuration. :ivar num_searchable_docs: The number of documents that have been submittted to the domain and indexed. :ivar requires_index_document: True if index_documents needs to be called to activate the current domain configuration. :ivar search_instance_count: The number of search instances that are available to process search requests. :ivar search_instance_type: The instance type that is being used to process search requests. :ivar search_partition_count: The number of partitions across which the search index is spread. cCs||_|j|dS(s# Constructor - Create a domain object from a layer1 and data params :type layer1: :class:`boto.cloudsearch2.layer1.Layer1` object :param layer1: A :class:`boto.cloudsearch2.layer1.Layer1` object which is used to perform operations on the domain. N(tlayer1tupdate_from_data(tselfRtdata((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyt__init__Ns cCs|d|_|d|_|d|_|d|_|d|_|d|_|d|_|jdd|_ |d |_ |d |_ |d |_ |d |_ dS( NtCreatedtDeletedt ProcessingtRequiresIndexDocumentstDomainIdt DomainNametSearchInstanceCounttSearchInstanceTypetSearchPartitionCountt DocServicetARNt SearchService(tcreatedtdeletedt processingtrequires_index_documentst domain_idt domain_nametsearch_instance_counttgettNonetsearch_instance_typetsearch_partition_countt _doc_servicet _service_arnt_search_service(RR((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyRYs          cCs|jS(N(R+(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyt service_arngscCs |jdS(NtEndpoint(R*(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pytdoc_service_endpointkscCs |jdS(NR.(R,(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pytsearch_service_endpointoscCs|jS(N(t_created(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyRsscCst||_dS(N(R R1(RR ((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyRwscCs|jS(N(t_deleted(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyR {scCst||_dS(N(R R2(RR ((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyR scCs|jS(N(t _processing(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyR!scCst||_dS(N(R R3(RR ((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyR!scCs|jS(N(t_requires_index_documents(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyR"scCst||_dS(N(R R4(RR ((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyR"scCs|jS(N(t_search_partition_count(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyR)scCst||_dS(N(tintR5(RR ((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyR)scCs|jS(N(t_search_instance_count(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyR%scCst||_dS(N(R6R7(RR ((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyR%scCs|jS(N(R$(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pytnamescCs|jS(N(R#(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pytidscCs|jj|jS(sK Delete this domain and all index data associated with it. (Rt delete_domainR8(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pytdeletescCs|jj|jS(s; Return a list of Analysis Scheme objects. (Rtdescribe_analysis_schemesR8(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pytget_analysis_schemesscCs1t|d|jjddddgd|jjS(s: Return a :class:`boto.cloudsearch2.option.AvailabilityOptionsStatus` object representing the currently defined availability options for the domain. :return: OptionsStatus object :rtype: :class:`boto.cloudsearch2.option.AvailabilityOptionsStatus` object t refresh_fnt refresh_keyt#DescribeAvailabilityOptionsResponset!DescribeAvailabilityOptionsResulttAvailabilityOptionstsave_fn(RRtdescribe_availability_optionstupdate_availability_options(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pytget_availability_optionss  cCs1t|d|jjddddgd|jjS(s; Return a :class:`boto.cloudsearch2.option.ScalingParametersStatus` object representing the currently defined scaling options for the domain. :return: ScalingParametersStatus object :rtype: :class:`boto.cloudsearch2.option.ScalingParametersStatus` object R>R?t!DescribeScalingParametersResponsetDescribeScalingParametersResulttScalingParametersRC(RRtdescribe_scaling_parameterstupdate_scaling_parameters(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pytget_scaling_optionss  cCs1t|d|jjddddgd|jjS(s) Return a :class:`boto.cloudsearch2.option.ServicePoliciesStatus` object representing the currently defined access policies for the domain. :return: ServicePoliciesStatus object :rtype: :class:`boto.cloudsearch2.option.ServicePoliciesStatus` object R>R?t%DescribeServiceAccessPoliciesResponset#DescribeServiceAccessPoliciesResulttAccessPoliciesRC(RRt describe_service_access_policiestupdate_service_access_policies(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pytget_access_policiess  cCs|jj|jdS(s* Tells the search domain to start indexing its documents using the latest text processing options and IndexFields. This operation must be invoked to make options whose OptionStatus has OptionState of RequiresIndexDocuments visible in search results. N(Rtindex_documentsR8(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyRSscCsJ|jj|j|}|ddd}g|D]}t||^q1S(s Return a list of index fields defined for this domain. :return: list of IndexFieldStatus objects :rtype: list of :class:`boto.cloudsearch2.option.IndexFieldStatus` object tDescribeIndexFieldsResponsetDescribeIndexFieldsResultt IndexFields(Rtdescribe_index_fieldsR8R(Rt field_namesRtd((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pytget_index_fieldss tc Csi|d6|d6} |dkrwi|d6|d6|d6|d6| d<|r]|| dd > >>> * Boolean operators (including the ternary operator): && || ! ?: * Comparison operators: < <= == >= > * Mathematical functions: abs ceil exp floor ln log2 log10 logn max min pow sqrt pow * Trigonometric functions: acos acosh asin asinh atan atan2 atanh cos cosh sin sinh tanh tan * The haversin distance function Expressions always return an integer value from 0 to the maximum 64-bit signed integer value (2^63 - 1). Intermediate results are calculated as double-precision floating point values and the return value is rounded to the nearest integer. If the expression is invalid or evaluates to a negative value, it returns 0. If the expression evaluates to a value greater than the maximum, it returns the maximum value. The source data for an Expression can be the name of an IndexField of type int or double, another Expression or the reserved name _score. The _score source is defined to return as a double from 0 to 10.0 (inclusive) to indicate how relevant a document is to the search request, taking into account repetition of search terms in the document and proximity of search terms to each other in each matching IndexField in the document. For more information about using rank expressions to customize ranking, see the Amazon CloudSearch Developer Guide. :return: ExpressionStatus object :rtype: :class:`boto.cloudsearch2.option.ExpressionStatus` object :raises: BaseException, InternalException, LimitExceededException, InvalidTypeException, ResourceNotFoundException tDefineExpressionResponsetDefineExpressionResultt Expression(Rtdefine_expressionR8RR(RR8R R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pytcreate_expressions 9 cCs td|S(Ntdomain(R(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pytget_document_servicescCs td|S(NR(R(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pytget_search_servicescCs d|jS(Ns (R$(R((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyt__repr__sN(!t__name__t __module__t__doc__RRtpropertyR-R/R0RtsetterR R!R"R)R%R8R9R;R=RFRLRRRSR'RZR RRRRRR(((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyR &sH&          B  N( tboto.cloudsearch2.optionstatusRRRRRtboto.cloudsearch2.documentRtboto.cloudsearch2.searchRR tobjectR (((sE/opt/freeware/lib/python2.7/site-packages/boto/cloudsearch2/domain.pyts