Skip to content

Commit 9ba6616

Browse files
[CHANGE ME] Re-generated datastore to pick up changes in the API or client library generator.
1 parent fd126fd commit 9ba6616

File tree

12 files changed

+2657
-4086
lines changed

12 files changed

+2657
-4086
lines changed

datastore/google/cloud/datastore_v1/gapic/datastore_client.py

Lines changed: 165 additions & 181 deletions
Large diffs are not rendered by default.

datastore/google/cloud/datastore_v1/gapic/datastore_client_config.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"google.datastore.v1.Datastore": {
44
"retry_codes": {
55
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
6-
"non_idempotent": [],
6+
"non_idempotent": []
77
},
88
"retry_params": {
99
"default": {
@@ -13,46 +13,46 @@
1313
"initial_rpc_timeout_millis": 60000,
1414
"rpc_timeout_multiplier": 1.0,
1515
"max_rpc_timeout_millis": 60000,
16-
"total_timeout_millis": 600000,
16+
"total_timeout_millis": 600000
1717
}
1818
},
1919
"methods": {
2020
"Lookup": {
2121
"timeout_millis": 60000,
2222
"retry_codes_name": "idempotent",
23-
"retry_params_name": "default",
23+
"retry_params_name": "default"
2424
},
2525
"RunQuery": {
2626
"timeout_millis": 60000,
2727
"retry_codes_name": "idempotent",
28-
"retry_params_name": "default",
28+
"retry_params_name": "default"
2929
},
3030
"BeginTransaction": {
3131
"timeout_millis": 60000,
3232
"retry_codes_name": "non_idempotent",
33-
"retry_params_name": "default",
33+
"retry_params_name": "default"
3434
},
3535
"Commit": {
3636
"timeout_millis": 60000,
3737
"retry_codes_name": "non_idempotent",
38-
"retry_params_name": "default",
38+
"retry_params_name": "default"
3939
},
4040
"Rollback": {
4141
"timeout_millis": 60000,
4242
"retry_codes_name": "non_idempotent",
43-
"retry_params_name": "default",
43+
"retry_params_name": "default"
4444
},
4545
"AllocateIds": {
4646
"timeout_millis": 60000,
4747
"retry_codes_name": "non_idempotent",
48-
"retry_params_name": "default",
48+
"retry_params_name": "default"
4949
},
5050
"ReserveIds": {
5151
"timeout_millis": 60000,
5252
"retry_codes_name": "idempotent",
53-
"retry_params_name": "default",
54-
},
55-
},
53+
"retry_params_name": "default"
54+
}
55+
}
5656
}
5757
}
5858
}

datastore/google/cloud/datastore_v1/gapic/enums.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class NullValue(enum.IntEnum):
2828
Attributes:
2929
NULL_VALUE (int): Null value.
3030
"""
31-
3231
NULL_VALUE = 0
3332

3433

@@ -44,7 +43,6 @@ class Mode(enum.IntEnum):
4443
`here <https://cloud.google.com/datastore/docs/concepts/transactions>`__.
4544
NON_TRANSACTIONAL (int): Non-transactional: The mutations may not apply as all or none.
4645
"""
47-
4846
MODE_UNSPECIFIED = 0
4947
TRANSACTIONAL = 1
5048
NON_TRANSACTIONAL = 2
@@ -59,7 +57,6 @@ class Operator(enum.IntEnum):
5957
OPERATOR_UNSPECIFIED (int): Unspecified. This value must not be used.
6058
AND (int): The results are required to satisfy each of the combined filters.
6159
"""
62-
6360
OPERATOR_UNSPECIFIED = 0
6461
AND = 1
6562

@@ -80,7 +77,6 @@ class ResultType(enum.IntEnum):
8077
PROJECTION (int): A projected subset of properties. The entity may have no key.
8178
KEY_ONLY (int): Only the key.
8279
"""
83-
8480
RESULT_TYPE_UNSPECIFIED = 0
8581
FULL = 1
8682
PROJECTION = 2
@@ -101,7 +97,6 @@ class Operator(enum.IntEnum):
10197
EQUAL (int): Equal.
10298
HAS_ANCESTOR (int): Has ancestor.
10399
"""
104-
105100
OPERATOR_UNSPECIFIED = 0
106101
LESS_THAN = 1
107102
LESS_THAN_OR_EQUAL = 2
@@ -121,7 +116,6 @@ class Direction(enum.IntEnum):
121116
ASCENDING (int): Ascending.
122117
DESCENDING (int): Descending.
123118
"""
124-
125119
DIRECTION_UNSPECIFIED = 0
126120
ASCENDING = 1
127121
DESCENDING = 2
@@ -140,7 +134,6 @@ class MoreResultsType(enum.IntEnum):
140134
cursor.
141135
NO_MORE_RESULTS (int): The query is finished, and there are no more results.
142136
"""
143-
144137
MORE_RESULTS_TYPE_UNSPECIFIED = 0
145138
NOT_FINISHED = 1
146139
MORE_RESULTS_AFTER_LIMIT = 2
@@ -158,7 +151,6 @@ class ReadConsistency(enum.IntEnum):
158151
STRONG (int): Strong consistency.
159152
EVENTUAL (int): Eventual consistency.
160153
"""
161-
162154
READ_CONSISTENCY_UNSPECIFIED = 0
163155
STRONG = 1
164156
EVENTUAL = 2

datastore/google/cloud/datastore_v1/gapic/transports/datastore_grpc_transport.py

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ class DatastoreGrpcTransport(object):
2727
which can be used to take advantage of advanced
2828
features of gRPC.
2929
"""
30-
3130
# The scopes needed to make gRPC calls to all of the methods defined
3231
# in this service.
3332
_OAUTH_SCOPES = (
34-
"https://www.googleapis.com/auth/cloud-platform",
35-
"https://www.googleapis.com/auth/datastore",
33+
'https://www.googleapis.com/auth/cloud-platform',
34+
'https://www.googleapis.com/auth/datastore',
3635
)
3736

38-
def __init__(
39-
self, channel=None, credentials=None, address="datastore.googleapis.com:443"
40-
):
37+
def __init__(self,
38+
channel=None,
39+
credentials=None,
40+
address='datastore.googleapis.com:443'):
4141
"""Instantiate the transport class.
4242
4343
Args:
@@ -55,21 +55,28 @@ def __init__(
5555
# exception (channels come with credentials baked in already).
5656
if channel is not None and credentials is not None:
5757
raise ValueError(
58-
"The `channel` and `credentials` arguments are mutually " "exclusive."
59-
)
58+
'The `channel` and `credentials` arguments are mutually '
59+
'exclusive.', )
6060

6161
# Create the channel.
6262
if channel is None:
63-
channel = self.create_channel(address=address, credentials=credentials)
63+
channel = self.create_channel(
64+
address=address,
65+
credentials=credentials,
66+
)
6467

6568
self._channel = channel
6669

6770
# gRPC uses objects called "stubs" that are bound to the
6871
# channel and provide a basic method for each RPC.
69-
self._stubs = {"datastore_stub": datastore_pb2_grpc.DatastoreStub(channel)}
72+
self._stubs = {
73+
'datastore_stub': datastore_pb2_grpc.DatastoreStub(channel),
74+
}
7075

7176
@classmethod
72-
def create_channel(cls, address="datastore.googleapis.com:443", credentials=None):
77+
def create_channel(cls,
78+
address='datastore.googleapis.com:443',
79+
credentials=None):
7380
"""Create and return a gRPC channel object.
7481
7582
Args:
@@ -84,7 +91,9 @@ def create_channel(cls, address="datastore.googleapis.com:443", credentials=None
8491
grpc.Channel: A gRPC channel object.
8592
"""
8693
return google.api_core.grpc_helpers.create_channel(
87-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
94+
address,
95+
credentials=credentials,
96+
scopes=cls._OAUTH_SCOPES,
8897
)
8998

9099
@property
@@ -107,7 +116,7 @@ def lookup(self):
107116
deserialized request object and returns a
108117
deserialized response object.
109118
"""
110-
return self._stubs["datastore_stub"].Lookup
119+
return self._stubs['datastore_stub'].Lookup
111120

112121
@property
113122
def run_query(self):
@@ -120,7 +129,7 @@ def run_query(self):
120129
deserialized request object and returns a
121130
deserialized response object.
122131
"""
123-
return self._stubs["datastore_stub"].RunQuery
132+
return self._stubs['datastore_stub'].RunQuery
124133

125134
@property
126135
def begin_transaction(self):
@@ -133,7 +142,7 @@ def begin_transaction(self):
133142
deserialized request object and returns a
134143
deserialized response object.
135144
"""
136-
return self._stubs["datastore_stub"].BeginTransaction
145+
return self._stubs['datastore_stub'].BeginTransaction
137146

138147
@property
139148
def commit(self):
@@ -147,7 +156,7 @@ def commit(self):
147156
deserialized request object and returns a
148157
deserialized response object.
149158
"""
150-
return self._stubs["datastore_stub"].Commit
159+
return self._stubs['datastore_stub'].Commit
151160

152161
@property
153162
def rollback(self):
@@ -160,7 +169,7 @@ def rollback(self):
160169
deserialized request object and returns a
161170
deserialized response object.
162171
"""
163-
return self._stubs["datastore_stub"].Rollback
172+
return self._stubs['datastore_stub'].Rollback
164173

165174
@property
166175
def allocate_ids(self):
@@ -174,7 +183,7 @@ def allocate_ids(self):
174183
deserialized request object and returns a
175184
deserialized response object.
176185
"""
177-
return self._stubs["datastore_stub"].AllocateIds
186+
return self._stubs['datastore_stub'].AllocateIds
178187

179188
@property
180189
def reserve_ids(self):
@@ -188,4 +197,4 @@ def reserve_ids(self):
188197
deserialized request object and returns a
189198
deserialized response object.
190199
"""
191-
return self._stubs["datastore_stub"].ReserveIds
200+
return self._stubs['datastore_stub'].ReserveIds

0 commit comments

Comments
 (0)