
    &g,                         S r SSKJr  SSKJrJrJrJr  SSKJ	r	  SSK
Jr   " S S5      r " S S	5      r " S
 S5      r " S S5      r " S S5      r    SS jrg)zTools for working with `collations`_.

.. _collations: https://www.mongodb.com/docs/manual/reference/collation/

.. seealso:: This module is compatible with both the synchronous and asynchronous PyMongo APIs.
    )annotations)AnyMappingOptionalUnion)common)validate_booleanc                  4    \ rS rSrSrSr Sr Sr Sr Sr	Sr
g	)
CollationStrength   zX
An enum that defines values for `strength` on a
:class:`~pymongo.collation.Collation`.
                N)__name__
__module____qualname____firstlineno____doc__PRIMARY	SECONDARYTERTIARY
QUATERNARY	IDENTICAL__static_attributes__r       VC:\Suresh\moveshuttle\MDcreated\moveengine\venv\Lib\site-packages\pymongo/collation.pyr   r      s1    
 G4I*H'J;INr   r   c                  "    \ rS rSrSrSr SrSrg)CollationAlternate3   zY
An enum that defines values for `alternate` on a
:class:`~pymongo.collation.Collation`.
znon-ignorableshiftedr   N)r   r   r   r   r   NON_IGNORABLESHIFTEDr   r   r   r   r!   r!   3   s    
 $M@Gr   r!   c                  "    \ rS rSrSrSr SrSrg)CollationMaxVariableF   z\
An enum that defines values for `max_variable` on a
:class:`~pymongo.collation.Collation`.
punctspacer   N)r   r   r   r   r   PUNCTSPACEr   r   r   r   r'   r'   F   s    
 E2E#r   r'   c                  (    \ rS rSrSrSr Sr SrSrg)CollationCaseFirstS   zZ
An enum that defines values for `case_first` on a
:class:`~pymongo.collation.Collation`.
upperloweroffr   N)	r   r   r   r   r   UPPERLOWEROFFr   r   r   r   r.   r.   S   s!    
 E*E*
C3r   r.   c                      \ rS rSrSrSr        S
                     SS jjr\SS j5       rSS jr	SS jr
SS	 jrSrg)	Collationc   a{	  Collation

:param locale: (string) The locale of the collation. This should be a string
    that identifies an `ICU locale ID` exactly. For example, ``en_US`` is
    valid, but ``en_us`` and ``en-US`` are not. Consult the MongoDB
    documentation for a list of supported locales.
:param caseLevel: (optional) If ``True``, turn on case sensitivity if
    `strength` is 1 or 2 (case sensitivity is implied if `strength` is
    greater than 2). Defaults to ``False``.
:param caseFirst: (optional) Specify that either uppercase or lowercase
    characters take precedence. Must be one of the following values:

      * :data:`~CollationCaseFirst.UPPER`
      * :data:`~CollationCaseFirst.LOWER`
      * :data:`~CollationCaseFirst.OFF` (the default)

:param strength: Specify the comparison strength. This is also
    known as the ICU comparison level. This must be one of the following
    values:

      * :data:`~CollationStrength.PRIMARY`
      * :data:`~CollationStrength.SECONDARY`
      * :data:`~CollationStrength.TERTIARY` (the default)
      * :data:`~CollationStrength.QUATERNARY`
      * :data:`~CollationStrength.IDENTICAL`

    Each successive level builds upon the previous. For example, a
    `strength` of :data:`~CollationStrength.SECONDARY` differentiates
    characters based both on the unadorned base character and its accents.

:param numericOrdering: If ``True``, order numbers numerically
    instead of in collation order (defaults to ``False``).
:param alternate: Specify whether spaces and punctuation are
    considered base characters. This must be one of the following values:

      * :data:`~CollationAlternate.NON_IGNORABLE` (the default)
      * :data:`~CollationAlternate.SHIFTED`

:param maxVariable: When `alternate` is
    :data:`~CollationAlternate.SHIFTED`, this option specifies what
    characters may be ignored. This must be one of the following values:

      * :data:`~CollationMaxVariable.PUNCT` (the default)
      * :data:`~CollationMaxVariable.SPACE`

:param normalization: If ``True``, normalizes text into Unicode
    NFD. Defaults to ``False``.
:param backwards: If ``True``, accents on characters are
    considered from the back of the word to the front, as it is done in some
    French dictionary ordering traditions. Defaults to ``False``.
:param kwargs: Keyword arguments supplying any additional options
    to be sent with this Collation object.

.. versionadded: 3.4

)
__documentNc
                   [         R                  " SU5      nSU0U l        Ub  [        SU5      U R                  S'   Ub$  [         R                  " SU5      U R                  S'   Ub$  [         R                  " SU5      U R                  S'   Ub  [        SU5      U R                  S'   Ub$  [         R                  " SU5      U R                  S'   Ub$  [         R                  " SU5      U R                  S'   Ub  [        SU5      U R                  S'   U	b  [        S	U	5      U R                  S	'   U R                  R                  U
5        g )
Nlocale	caseLevel	caseFirststrengthnumericOrdering	alternatemaxVariablenormalization	backwards)r   validate_string_Collation__documentr	   validate_integerupdate)selfr;   r<   r=   r>   r?   r@   rA   rB   rC   kwargss              r   __init__Collation.__init__   s,    ''&9+3V*< +;K+SDOOK( +1+A+A+y+YDOOK(*0*A*A*h*WDOOJ'&1A!?2DOO-.  +1+A+A+y+YDOOK("-3-C-CMS^-_DOOM*$/?Q^/_DOOO, +;K+SDOOK(v&r   c                6    U R                   R                  5       $ )zThe document representation of this collation.

.. note::
  :class:`Collation` is immutable. Mutating the value of
  :attr:`document` does not mutate this :class:`Collation`.
)rE   copy)rH   s    r   documentCollation.document   s     ##%%r   c                p   ^ U R                   mSR                  SR                  U4S jT 5       5      5      $ )NzCollation({})z, c              3  8   >#    U  H  o S TU   < 3v   M     g7f)=Nr   ).0keyrN   s     r   	<genexpr>%Collation.__repr__.<locals>.<genexpr>   s!     /_V^s%q#8I0JV^s   )rN   formatjoin)rH   rN   s    @r   __repr__Collation.__repr__   s-    ==%%dii/_V^/_&_``r   c                j    [        U[        5      (       a  U R                  UR                  :H  $ [        $ N)
isinstancer7   rN   NotImplementedrH   others     r   __eq__Collation.__eq__   s(    eY''==ENN22r   c                    X:X  + $ r\   r   r_   s     r   __ne__Collation.__ne__   s      r   )NNNNNNNN)r;   strr<   Optional[bool]r=   Optional[str]r>   zOptional[int]r?   rg   r@   rh   rA   rh   rB   rg   rC   rg   rI   r   returnNone)ri   zdict[str, Any])ri   rf   )r`   r   ri   bool)r   r   r   r   r   	__slots__rJ   propertyrN   rY   ra   rd   r   r   r   r   r7   r7   c   s    7r  I
 %)#'"&*.#'%)(,$(!'!' "!' !	!'
  !' (!' !!' #!' &!' "!' !' 
!'F & &a
!r   r7   c                    U c  g [        U [        5      (       a  U R                  $ [        U [        5      (       a  U $ [	        S5      e)NzEcollation must be a dict, an instance of collation.Collation, or None)r]   r7   rN   dict	TypeError)values    r   validate_collation_or_nonerr      sA     }%##~~%
[
\\r   N)rq   z-Optional[Union[Mapping[str, Any], Collation]]ri   zOptional[dict[str, Any]])r   
__future__r   typingr   r   r   r   pymongor   pymongo.write_concernr	   r   r!   r'   r.   r7   rr   r   r   r   <module>rw      sj    # 0 0  2O O, &
$ 
$4 4 s! s!l	]8	]	]r   