
    k                     J    d dl Z d dlmZ  G d de      Z G d de      Zd Zy)    N)bigtable_pb2c                       e Zd ZdZd Zy)BigtableStubDService for reading from and writing to existing Bigtable tables.
  c                 p   |j                  dt        j                  j                  t        j                  j
                        | _        |j                  dt        j                  j                  t        j                  j
                        | _	        |j                  dt        j                  j                  t        j                  j
                        | _        |j                  dt        j                  j                  t        j                  j
                        | _        |j                  dt        j"                  j                  t        j$                  j
                        | _        |j                  dt        j(                  j                  t        j*                  j
                        | _        y)	z;Constructor.

    Args:
      channel: A grpc.Channel.
    z%/google.bigtable.v2.Bigtable/ReadRows)request_serializerresponse_deserializerz*/google.bigtable.v2.Bigtable/SampleRowKeysz&/google.bigtable.v2.Bigtable/MutateRowz'/google.bigtable.v2.Bigtable/MutateRowsz./google.bigtable.v2.Bigtable/CheckAndMutateRowz//google.bigtable.v2.Bigtable/ReadModifyWriteRowN)unary_stream,google_dot_bigtable_dot_v2_dot_bigtable__pb2ReadRowsRequestSerializeToStringReadRowsResponse
FromStringReadRowsSampleRowKeysRequestSampleRowKeysResponseSampleRowKeysunary_unaryMutateRowRequestMutateRowResponse	MutateRowMutateRowsRequestMutateRowsResponse
MutateRowsCheckAndMutateRowRequestCheckAndMutateRowResponseCheckAndMutateRowReadModifyWriteRowRequestReadModifyWriteRowResponseReadModifyWriteRow)selfchannels     7lib/third_party/google/bigtable/v2/bigtable_pb2_grpc.py__init__zBigtableStub.__init__   sa    ((/GWWiiJ[[ff ) 
DM
 !--4G\\nnJ``kk . 
D
 ((0GXXjjJ\\gg ) 
DN
 **1GYYkkJ]]hh + 
DO
 %008G``rrJddoo 1 
D
 &119GaassJeepp 2 
D    N)__name__
__module____qualname____doc__r$    r%   r#   r   r      s    #
r%   r   c                   4    e Zd ZdZd Zd Zd Zd Zd Zd Z	y)	BigtableServicerr   c                     |j                  t        j                  j                         |j	                  d       t        d      )aA  Streams back the contents of all requested rows in key order, optionally
    applying the same Reader filter to each. Depending on their size,
    rows and cells may be broken up across multiple responses, but
    atomicity of each row will still be preserved. See the
    ReadRowsResponse documentation for details.
    Method not implemented!set_codegrpc
StatusCodeUNIMPLEMENTEDset_detailsNotImplementedErrorr!   requestcontexts      r#   r   zBigtableServicer.ReadRows5   7     T__22312
7
88r%   c                     |j                  t        j                  j                         |j	                  d       t        d      )zReturns a sample of row keys in the table. The returned row keys will
    delimit contiguous sections of the table of approximately equal size,
    which can be used to break up the data for distributed tasks like
    mapreduces.
    r.   r/   r6   s      r#   r   zBigtableServicer.SampleRowKeys@   s7     T__22312
7
88r%   c                     |j                  t        j                  j                         |j	                  d       t        d      )zMutates a row atomically. Cells already present in the row are left
    unchanged unless explicitly changed by `mutation`.
    r.   r/   r6   s      r#   r   zBigtableServicer.MutateRowJ   s7     T__22312
7
88r%   c                     |j                  t        j                  j                         |j	                  d       t        d      )zMutates multiple rows in a batch. Each individual row is mutated
    atomically as in MutateRow, but the entire batch is not executed
    atomically.
    r.   r/   r6   s      r#   r   zBigtableServicer.MutateRowsR   s7    
 T__22312
7
88r%   c                     |j                  t        j                  j                         |j	                  d       t        d      )zOMutates a row atomically based on the output of a predicate Reader filter.
    r.   r/   r6   s      r#   r   z"BigtableServicer.CheckAndMutateRow[   s7     T__22312
7
88r%   c                     |j                  t        j                  j                         |j	                  d       t        d      )av  Modifies a row atomically on the server. The method reads the latest
    existing timestamp and value from the specified columns and writes a new
    entry based on pre-defined read/modify/write rules. The new value for the
    timestamp is the greater of the existing timestamp or the current server
    time. The method returns the new contents of all modified cells.
    r.   r/   r6   s      r#   r    z#BigtableServicer.ReadModifyWriteRowb   r9   r%   N)
r&   r'   r(   r)   r   r   r   r   r   r    r*   r%   r#   r,   r,   1   s%    	99999	9r%   r,   c           
      &   t        j                  | j                  t        j                  j
                  t        j                  j                        t        j                  | j                  t        j                  j
                  t        j                  j                        t        j                  | j                  t        j                  j
                  t        j                  j                        t        j                  | j                  t        j                   j
                  t        j"                  j                        t        j                  | j$                  t        j&                  j
                  t        j(                  j                        t        j                  | j*                  t        j,                  j
                  t        j.                  j                        d}t        j0                  d|      }|j3                  |f       y )N)request_deserializerresponse_serializer)r   r   r   r   r   r    zgoogle.bigtable.v2.Bigtable)r1   unary_stream_rpc_method_handlerr   r   r   r   r   r   r   r   r   unary_unary_rpc_method_handlerr   r   r   r   r   r   r   r   r   r    r   r   method_handlers_generic_handleradd_generic_rpc_handlers)servicerserverrpc_method_handlersgeneric_handlers       r#   add_BigtableServicer_to_serverrJ   n   s|   66


K[[ffJ[[mm
 ;;

 
 K``kkJ``rr
 66


K\\ggJ\\nn
 88


K]]hhJ]]oo
  >>

$
$KddooJddvv
 !??

%
%KeeppJeeww5@ 88#%8:/!!?"45r%   )r1   google.bigtable.v2r   r   objectr   r,   rJ   r*   r%   r#   <module>rM      s*     ['
6 '
T:9v :9z#6r%   