
                            S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  S\R                  SS	4S
 jr	S\R                  SS	4S jr
S\R                  SS	4S jrS\R                  SS	4S jrS\R                  S\SS	4S jrg	)z5Flags and helpers for the datastore related commands.    )absolute_import)division)unicode_literals)arg_parsers)parser_argumentsparserreturnNc                     U R                  SS[        R                  " 5       SS9  U R                  SS[        R                  " 5       SS9  g)	z2Adds flags for entity filters to the given parser.z--kindsKINDz
      A list specifying what kinds will be included in the operation. When
      omitted, all Kinds are included. For example, to operate on only the
      'Customer' and 'Order' Kinds:

        $ {command} --kinds='Customer','Order'
      metavartypehelpz--namespaces	NAMESPACEa  
      A list specifying what namespaces will be included in the operation.
      When omitted, all namespaces are included in the operation,
      including the default namespace. To specify that *only* the default
      namespace should be operated on, use the special symbol '(default)'.
      For example, to operate on entities from both the 'customers' and default
      namespaces:

        $ {command} --namespaces='(default)','customers'
      N)add_argumentr   ArgListr   s    1lib/googlecloudsdk/command_lib/datastore/flags.pyAddEntityFilterFlagsr      sX     
	   	 	
	      c                 N    U R                  SS[        R                  " 5       SS9  g)z4Adds an --operation-labels flag to the given parser.z--operation-labelsOPERATION_LABELz
      A string:string map of custom labels to associate with this operation.
      For example:

        $ {command} --operation-labels=comment='customer orders','sales rep'=pending
      r   N)r   r   ArgDictr   s    r   AddLabelsFlagr   9   s,     
	  
r   c                 $    U R                  SSS9  g)zSAdds an index_file flag to the given parser.

Args:
  parser: The argparse parser.

index_filez
        The path to your `index.yaml` file. For a detailed look into defining
        your `index.yaml` file, refer to this configuration guide:
        https://cloud.google.com/datastore/docs/tools/indexconfig#Datastore_About_index_yaml
        r   Nr   r   s    r   AddIndexFileFlagr   H   s     	  r   c                 $    U R                  SSS9  g)zRAdds a --database flag to the given parser.

Args:
  parser: The argparse parser.
z
--databasez      The database to operate on. If not specified, the CLI refers the
      `(default)` database by default.

      For example, to operate on database `testdb`:

        $ {command} --database='testdb'
      r   Nr   r   s    r   AddDatabaseIdFlagr!   X   s     	
  
r   operation_typec                 N    U R                  S[        SSR                  U5      S9  g)zAdds a name flag to the given parser.

Args:
  parser: The argparse parser.
  operation_type: The operate type displayed in help text, a str.
nameNz
        The unique name of the Operation to {}, formatted as either the full
        or relative resource path:

          projects/my-app-id/operations/foo

        or:

          foo
        )r   defaultr   )r   strformat)r   r"   s     r   AddOperationNameFlagr(   k   s1     		 F>"  r   )__doc__
__future__r   r   r   googlecloudsdk.callioper   r   ArgumentInterceptorr   r   r   r!   r&   r(    r   r   <module>r.      s    < &  ' / 4!1!E!E $ @*>> 4 -AA d  .BB t &00BE	r   