
                            S r SSK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	  \R                  " \R                  R                  \R                  R                  5      \R                   " S S	\R                  5      5       5       rg)
z(gcloud datastore emulator start command.    N)arg_parsers)base)datastore_util)util)javac                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	Start   zSStart a local datastore emulator.

This command starts a local datastore emulator.
EXAMPLESzN
To start a local datastore emulator, run:

  $ {command} --data-dir=DATA-DIR
c                     U R                  SSS SS9  U R                  SSSS	S
9  U R                  5       nUR                  SS[        SSS9  UR                  SSSSS
9  g )Nz--host-portFc                 >    [         R                  R                  U SS9$ )NTipv6_enabled)r   HostPortParse)args    (lib/surface/emulators/datastore/start.py<lambda>Start.Args.<locals>.<lambda>/   s    --33Cd3K    a*  The host:port to which the emulator should be bound. Can take the form of a single address (hostname, IPv4, or IPv6) and/or port:

  [ADDRESS][:PORT]

In this format you must enclose IPv6 addresses in square brackets: e.g.

  [2001:db8:0:0:0:ff00:42:8329]:8080

The default value is localhost:8081.)requiredtypehelpz--store-on-diskT
store_truez)Whether data should be persisted to disk.)defaultactionr   z--consistencyg?zFraction of eventually consistent operations that should succeed immediately. Setting to 1.0 can be useful for unit tests, but may mask incorrect assumptions about non-ancestor queries which are eventually consistent.)r   r   r   r   z!--use-firestore-in-datastore-modezRuns the emulator in Cloud Firestore in Datastore Mode. Reads are always strongly consistent and --consistency flag may not be specified.)add_argumentadd_mutually_exclusive_groupfloat)parsergroups     r   Args
Start.Args*   s    
K/	  
0 8	  :
 //1E	E  F 
+	  r   c                    UR                   (       dD  [        R                  R                  [        R
                  " 5       [        R                  S9Ul         UR                   R                  =(       d    SUR                   l        UR                   R                  =(       d    SUR                   l	        [        R                  " [        R                  SS9  [        R                  " U5        [        R                  " U5       n[        R                  " U5        [         R"                  " US5        S S S 5        g ! , (       d  f       g = f)Nr   	localhost8081   )min_version	datastore)	host_portr   r   r   r   GetHostPortsockethas_ipv6hostportr   RequireJavaInstalledDATASTORE_TITLEPrepareGCDDataDirStartGCDEmulatorWriteGCDEnvYamlr   PrefixOutput)selfargsprocs      r   Run	Start.RunN   s    >>"++11

$
$
&V__ 2 Fdn..--<DNN..--7DNNn<<"M$$T*		(	(	.$$$T*
k* 
/	.	.s   .D88
E N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr"   r9   __static_attributes__r;   r   r   r	   r	      s2      - ! !F+r   r	   )r@   r,   googlecloudsdk.callioper   r   $googlecloudsdk.command_lib.emulatorsr   r   googlecloudsdk.command_lib.utilr   ReleaseTracksReleaseTrackALPHABETADefaultUniverseOnlyCommandr	   r;   r   r   <module>rM      sq    /  / ( ? 5 0 D%%++T->->-C-CD=+DLL =+  E=+r   