ó
è?F[c           @   s   d  e  f d „  ƒ  YZ d S(   t   SourceAttributec           B   s>   e  Z d  Z d Z d „  Z e d „  ƒ Z e j d „  ƒ Z RS(   sL  
    Provide information about attributes for an index field.
    A maximum of 20 source attributes can be configured for
    each index field.

    :ivar default: Optional default value if the source attribute
        is not specified in a document.
        
    :ivar name: The name of the document source field to add
        to this ``IndexField``.

    :ivar data_function: Identifies the transformation to apply
        when copying data from a source attribute.
        
    :ivar data_map: The value is a dict with the following keys:
        * cases - A dict that translates source field values
            to custom values.
        * default - An optional default value to use if the
            source attribute is not specified in a document.
        * name - the name of the document source field to add
            to this ``IndexField``
    :ivar data_trim_title: Trims common title words from a source
        document attribute when populating an ``IndexField``.
        This can be used to create an ``IndexField`` you can
        use for sorting.  The value is a dict with the following
        fields:
        * default - An optional default value.
        * language - an IETF RFC 4646 language code.
        * separator - The separator that follows the text to trim.
        * name - The name of the document source field to add.
    t   Copyt	   TrimTitlet   Mapc         C   s/   i  |  _  |  j d |  _ i  |  _ i  |  _ d  S(   Ni    (   t	   data_copyt   ValidDataFunctionst   _data_functiont   data_mapt   data_trim_title(   t   self(    (    s?   lib/python2.7/site-packages/boto/cloudsearch/sourceattribute.pyt   __init__;   s    		c         C   s   |  j  S(   N(   R   (   R	   (    (    s?   lib/python2.7/site-packages/boto/cloudsearch/sourceattribute.pyt   data_functionA   s    c         C   sA   | |  j  k r4 d j |  j  ƒ } t d | ƒ ‚ n  | |  _ d  S(   Nt   |s    data_function must be one of: %s(   R   t   joint
   ValueErrorR   (   R	   t   valuet   valid(    (    s?   lib/python2.7/site-packages/boto/cloudsearch/sourceattribute.pyR   E   s    (   R   R   R   (   t   __name__t
   __module__t   __doc__R   R
   t   propertyR   t   setter(    (    (    s?   lib/python2.7/site-packages/boto/cloudsearch/sourceattribute.pyR       s
   	N(   t   objectR    (    (    (    s?   lib/python2.7/site-packages/boto/cloudsearch/sourceattribute.pyt   <module>   s    