google-cloud-dataform 0.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- google/cloud/dataform/__init__.py +247 -0
- google/cloud/dataform/gapic_version.py +16 -0
- google/cloud/dataform/py.typed +2 -0
- google/cloud/dataform_v1/__init__.py +244 -0
- google/cloud/dataform_v1/gapic_metadata.json +838 -0
- google/cloud/dataform_v1/gapic_version.py +16 -0
- google/cloud/dataform_v1/py.typed +2 -0
- google/cloud/dataform_v1/services/__init__.py +15 -0
- google/cloud/dataform_v1/services/dataform/__init__.py +22 -0
- google/cloud/dataform_v1/services/dataform/async_client.py +6371 -0
- google/cloud/dataform_v1/services/dataform/client.py +6895 -0
- google/cloud/dataform_v1/services/dataform/pagers.py +1925 -0
- google/cloud/dataform_v1/services/dataform/transports/__init__.py +36 -0
- google/cloud/dataform_v1/services/dataform/transports/base.py +1060 -0
- google/cloud/dataform_v1/services/dataform/transports/grpc.py +1980 -0
- google/cloud/dataform_v1/services/dataform/transports/grpc_asyncio.py +2337 -0
- google/cloud/dataform_v1/services/dataform/transports/rest.py +12350 -0
- google/cloud/dataform_v1/services/dataform/transports/rest_base.py +3028 -0
- google/cloud/dataform_v1/types/__init__.py +236 -0
- google/cloud/dataform_v1/types/dataform.py +4157 -0
- google/cloud/dataform_v1beta1/__init__.py +244 -0
- google/cloud/dataform_v1beta1/gapic_metadata.json +838 -0
- google/cloud/dataform_v1beta1/gapic_version.py +16 -0
- google/cloud/dataform_v1beta1/py.typed +2 -0
- google/cloud/dataform_v1beta1/services/__init__.py +15 -0
- google/cloud/dataform_v1beta1/services/dataform/__init__.py +22 -0
- google/cloud/dataform_v1beta1/services/dataform/async_client.py +6371 -0
- google/cloud/dataform_v1beta1/services/dataform/client.py +6895 -0
- google/cloud/dataform_v1beta1/services/dataform/pagers.py +1925 -0
- google/cloud/dataform_v1beta1/services/dataform/transports/__init__.py +36 -0
- google/cloud/dataform_v1beta1/services/dataform/transports/base.py +1060 -0
- google/cloud/dataform_v1beta1/services/dataform/transports/grpc.py +1980 -0
- google/cloud/dataform_v1beta1/services/dataform/transports/grpc_asyncio.py +2337 -0
- google/cloud/dataform_v1beta1/services/dataform/transports/rest.py +12350 -0
- google/cloud/dataform_v1beta1/services/dataform/transports/rest_base.py +3028 -0
- google/cloud/dataform_v1beta1/types/__init__.py +236 -0
- google/cloud/dataform_v1beta1/types/dataform.py +4169 -0
- google_cloud_dataform-0.6.1.dist-info/LICENSE +202 -0
- google_cloud_dataform-0.6.1.dist-info/METADATA +229 -0
- google_cloud_dataform-0.6.1.dist-info/RECORD +42 -0
- google_cloud_dataform-0.6.1.dist-info/WHEEL +5 -0
- google_cloud_dataform-0.6.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,3028 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright 2024 Google LLC
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
import json # type: ignore
|
|
17
|
+
import re
|
|
18
|
+
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
|
|
19
|
+
|
|
20
|
+
from google.api_core import gapic_v1, path_template
|
|
21
|
+
from google.cloud.location import locations_pb2 # type: ignore
|
|
22
|
+
from google.iam.v1 import iam_policy_pb2 # type: ignore
|
|
23
|
+
from google.iam.v1 import policy_pb2 # type: ignore
|
|
24
|
+
from google.protobuf import empty_pb2 # type: ignore
|
|
25
|
+
from google.protobuf import json_format
|
|
26
|
+
|
|
27
|
+
from google.cloud.dataform_v1beta1.types import dataform
|
|
28
|
+
|
|
29
|
+
from .base import DEFAULT_CLIENT_INFO, DataformTransport
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class _BaseDataformRestTransport(DataformTransport):
|
|
33
|
+
"""Base REST backend transport for Dataform.
|
|
34
|
+
|
|
35
|
+
Note: This class is not meant to be used directly. Use its sync and
|
|
36
|
+
async sub-classes instead.
|
|
37
|
+
|
|
38
|
+
This class defines the same methods as the primary client, so the
|
|
39
|
+
primary client can load the underlying transport implementation
|
|
40
|
+
and call it.
|
|
41
|
+
|
|
42
|
+
It sends JSON representations of protocol buffers over HTTP/1.1
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
def __init__(
|
|
46
|
+
self,
|
|
47
|
+
*,
|
|
48
|
+
host: str = "dataform.googleapis.com",
|
|
49
|
+
credentials: Optional[Any] = None,
|
|
50
|
+
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
|
|
51
|
+
always_use_jwt_access: Optional[bool] = False,
|
|
52
|
+
url_scheme: str = "https",
|
|
53
|
+
api_audience: Optional[str] = None,
|
|
54
|
+
) -> None:
|
|
55
|
+
"""Instantiate the transport.
|
|
56
|
+
Args:
|
|
57
|
+
host (Optional[str]):
|
|
58
|
+
The hostname to connect to (default: 'dataform.googleapis.com').
|
|
59
|
+
credentials (Optional[Any]): The
|
|
60
|
+
authorization credentials to attach to requests. These
|
|
61
|
+
credentials identify the application to the service; if none
|
|
62
|
+
are specified, the client will attempt to ascertain the
|
|
63
|
+
credentials from the environment.
|
|
64
|
+
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
|
|
65
|
+
The client info used to send a user-agent string along with
|
|
66
|
+
API requests. If ``None``, then default info will be used.
|
|
67
|
+
Generally, you only need to set this if you are developing
|
|
68
|
+
your own client library.
|
|
69
|
+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
|
|
70
|
+
be used for service account credentials.
|
|
71
|
+
url_scheme: the protocol scheme for the API endpoint. Normally
|
|
72
|
+
"https", but for testing or local servers,
|
|
73
|
+
"http" can be specified.
|
|
74
|
+
"""
|
|
75
|
+
# Run the base constructor
|
|
76
|
+
maybe_url_match = re.match("^(?P<scheme>http(?:s)?://)?(?P<host>.*)$", host)
|
|
77
|
+
if maybe_url_match is None:
|
|
78
|
+
raise ValueError(
|
|
79
|
+
f"Unexpected hostname structure: {host}"
|
|
80
|
+
) # pragma: NO COVER
|
|
81
|
+
|
|
82
|
+
url_match_items = maybe_url_match.groupdict()
|
|
83
|
+
|
|
84
|
+
host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host
|
|
85
|
+
|
|
86
|
+
super().__init__(
|
|
87
|
+
host=host,
|
|
88
|
+
credentials=credentials,
|
|
89
|
+
client_info=client_info,
|
|
90
|
+
always_use_jwt_access=always_use_jwt_access,
|
|
91
|
+
api_audience=api_audience,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
class _BaseCancelWorkflowInvocation:
|
|
95
|
+
def __hash__(self): # pragma: NO COVER
|
|
96
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
97
|
+
|
|
98
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
99
|
+
|
|
100
|
+
@classmethod
|
|
101
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
102
|
+
return {
|
|
103
|
+
k: v
|
|
104
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
105
|
+
if k not in message_dict
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@staticmethod
|
|
109
|
+
def _get_http_options():
|
|
110
|
+
http_options: List[Dict[str, str]] = [
|
|
111
|
+
{
|
|
112
|
+
"method": "post",
|
|
113
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel",
|
|
114
|
+
"body": "*",
|
|
115
|
+
},
|
|
116
|
+
]
|
|
117
|
+
return http_options
|
|
118
|
+
|
|
119
|
+
@staticmethod
|
|
120
|
+
def _get_transcoded_request(http_options, request):
|
|
121
|
+
pb_request = dataform.CancelWorkflowInvocationRequest.pb(request)
|
|
122
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
123
|
+
return transcoded_request
|
|
124
|
+
|
|
125
|
+
@staticmethod
|
|
126
|
+
def _get_request_body_json(transcoded_request):
|
|
127
|
+
# Jsonify the request body
|
|
128
|
+
|
|
129
|
+
body = json_format.MessageToJson(
|
|
130
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
131
|
+
)
|
|
132
|
+
return body
|
|
133
|
+
|
|
134
|
+
@staticmethod
|
|
135
|
+
def _get_query_params_json(transcoded_request):
|
|
136
|
+
query_params = json.loads(
|
|
137
|
+
json_format.MessageToJson(
|
|
138
|
+
transcoded_request["query_params"],
|
|
139
|
+
use_integers_for_enums=True,
|
|
140
|
+
)
|
|
141
|
+
)
|
|
142
|
+
query_params.update(
|
|
143
|
+
_BaseDataformRestTransport._BaseCancelWorkflowInvocation._get_unset_required_fields(
|
|
144
|
+
query_params
|
|
145
|
+
)
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
149
|
+
return query_params
|
|
150
|
+
|
|
151
|
+
class _BaseCommitRepositoryChanges:
|
|
152
|
+
def __hash__(self): # pragma: NO COVER
|
|
153
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
154
|
+
|
|
155
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
156
|
+
|
|
157
|
+
@classmethod
|
|
158
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
159
|
+
return {
|
|
160
|
+
k: v
|
|
161
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
162
|
+
if k not in message_dict
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@staticmethod
|
|
166
|
+
def _get_http_options():
|
|
167
|
+
http_options: List[Dict[str, str]] = [
|
|
168
|
+
{
|
|
169
|
+
"method": "post",
|
|
170
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*}:commit",
|
|
171
|
+
"body": "*",
|
|
172
|
+
},
|
|
173
|
+
]
|
|
174
|
+
return http_options
|
|
175
|
+
|
|
176
|
+
@staticmethod
|
|
177
|
+
def _get_transcoded_request(http_options, request):
|
|
178
|
+
pb_request = dataform.CommitRepositoryChangesRequest.pb(request)
|
|
179
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
180
|
+
return transcoded_request
|
|
181
|
+
|
|
182
|
+
@staticmethod
|
|
183
|
+
def _get_request_body_json(transcoded_request):
|
|
184
|
+
# Jsonify the request body
|
|
185
|
+
|
|
186
|
+
body = json_format.MessageToJson(
|
|
187
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
188
|
+
)
|
|
189
|
+
return body
|
|
190
|
+
|
|
191
|
+
@staticmethod
|
|
192
|
+
def _get_query_params_json(transcoded_request):
|
|
193
|
+
query_params = json.loads(
|
|
194
|
+
json_format.MessageToJson(
|
|
195
|
+
transcoded_request["query_params"],
|
|
196
|
+
use_integers_for_enums=True,
|
|
197
|
+
)
|
|
198
|
+
)
|
|
199
|
+
query_params.update(
|
|
200
|
+
_BaseDataformRestTransport._BaseCommitRepositoryChanges._get_unset_required_fields(
|
|
201
|
+
query_params
|
|
202
|
+
)
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
206
|
+
return query_params
|
|
207
|
+
|
|
208
|
+
class _BaseCommitWorkspaceChanges:
|
|
209
|
+
def __hash__(self): # pragma: NO COVER
|
|
210
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
211
|
+
|
|
212
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
213
|
+
|
|
214
|
+
@classmethod
|
|
215
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
216
|
+
return {
|
|
217
|
+
k: v
|
|
218
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
219
|
+
if k not in message_dict
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
@staticmethod
|
|
223
|
+
def _get_http_options():
|
|
224
|
+
http_options: List[Dict[str, str]] = [
|
|
225
|
+
{
|
|
226
|
+
"method": "post",
|
|
227
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit",
|
|
228
|
+
"body": "*",
|
|
229
|
+
},
|
|
230
|
+
]
|
|
231
|
+
return http_options
|
|
232
|
+
|
|
233
|
+
@staticmethod
|
|
234
|
+
def _get_transcoded_request(http_options, request):
|
|
235
|
+
pb_request = dataform.CommitWorkspaceChangesRequest.pb(request)
|
|
236
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
237
|
+
return transcoded_request
|
|
238
|
+
|
|
239
|
+
@staticmethod
|
|
240
|
+
def _get_request_body_json(transcoded_request):
|
|
241
|
+
# Jsonify the request body
|
|
242
|
+
|
|
243
|
+
body = json_format.MessageToJson(
|
|
244
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
245
|
+
)
|
|
246
|
+
return body
|
|
247
|
+
|
|
248
|
+
@staticmethod
|
|
249
|
+
def _get_query_params_json(transcoded_request):
|
|
250
|
+
query_params = json.loads(
|
|
251
|
+
json_format.MessageToJson(
|
|
252
|
+
transcoded_request["query_params"],
|
|
253
|
+
use_integers_for_enums=True,
|
|
254
|
+
)
|
|
255
|
+
)
|
|
256
|
+
query_params.update(
|
|
257
|
+
_BaseDataformRestTransport._BaseCommitWorkspaceChanges._get_unset_required_fields(
|
|
258
|
+
query_params
|
|
259
|
+
)
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
263
|
+
return query_params
|
|
264
|
+
|
|
265
|
+
class _BaseComputeRepositoryAccessTokenStatus:
|
|
266
|
+
def __hash__(self): # pragma: NO COVER
|
|
267
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
268
|
+
|
|
269
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
270
|
+
|
|
271
|
+
@classmethod
|
|
272
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
273
|
+
return {
|
|
274
|
+
k: v
|
|
275
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
276
|
+
if k not in message_dict
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
@staticmethod
|
|
280
|
+
def _get_http_options():
|
|
281
|
+
http_options: List[Dict[str, str]] = [
|
|
282
|
+
{
|
|
283
|
+
"method": "get",
|
|
284
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*}:computeAccessTokenStatus",
|
|
285
|
+
},
|
|
286
|
+
]
|
|
287
|
+
return http_options
|
|
288
|
+
|
|
289
|
+
@staticmethod
|
|
290
|
+
def _get_transcoded_request(http_options, request):
|
|
291
|
+
pb_request = dataform.ComputeRepositoryAccessTokenStatusRequest.pb(request)
|
|
292
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
293
|
+
return transcoded_request
|
|
294
|
+
|
|
295
|
+
@staticmethod
|
|
296
|
+
def _get_query_params_json(transcoded_request):
|
|
297
|
+
query_params = json.loads(
|
|
298
|
+
json_format.MessageToJson(
|
|
299
|
+
transcoded_request["query_params"],
|
|
300
|
+
use_integers_for_enums=True,
|
|
301
|
+
)
|
|
302
|
+
)
|
|
303
|
+
query_params.update(
|
|
304
|
+
_BaseDataformRestTransport._BaseComputeRepositoryAccessTokenStatus._get_unset_required_fields(
|
|
305
|
+
query_params
|
|
306
|
+
)
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
310
|
+
return query_params
|
|
311
|
+
|
|
312
|
+
class _BaseCreateCompilationResult:
|
|
313
|
+
def __hash__(self): # pragma: NO COVER
|
|
314
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
315
|
+
|
|
316
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
317
|
+
|
|
318
|
+
@classmethod
|
|
319
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
320
|
+
return {
|
|
321
|
+
k: v
|
|
322
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
323
|
+
if k not in message_dict
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
@staticmethod
|
|
327
|
+
def _get_http_options():
|
|
328
|
+
http_options: List[Dict[str, str]] = [
|
|
329
|
+
{
|
|
330
|
+
"method": "post",
|
|
331
|
+
"uri": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults",
|
|
332
|
+
"body": "compilation_result",
|
|
333
|
+
},
|
|
334
|
+
]
|
|
335
|
+
return http_options
|
|
336
|
+
|
|
337
|
+
@staticmethod
|
|
338
|
+
def _get_transcoded_request(http_options, request):
|
|
339
|
+
pb_request = dataform.CreateCompilationResultRequest.pb(request)
|
|
340
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
341
|
+
return transcoded_request
|
|
342
|
+
|
|
343
|
+
@staticmethod
|
|
344
|
+
def _get_request_body_json(transcoded_request):
|
|
345
|
+
# Jsonify the request body
|
|
346
|
+
|
|
347
|
+
body = json_format.MessageToJson(
|
|
348
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
349
|
+
)
|
|
350
|
+
return body
|
|
351
|
+
|
|
352
|
+
@staticmethod
|
|
353
|
+
def _get_query_params_json(transcoded_request):
|
|
354
|
+
query_params = json.loads(
|
|
355
|
+
json_format.MessageToJson(
|
|
356
|
+
transcoded_request["query_params"],
|
|
357
|
+
use_integers_for_enums=True,
|
|
358
|
+
)
|
|
359
|
+
)
|
|
360
|
+
query_params.update(
|
|
361
|
+
_BaseDataformRestTransport._BaseCreateCompilationResult._get_unset_required_fields(
|
|
362
|
+
query_params
|
|
363
|
+
)
|
|
364
|
+
)
|
|
365
|
+
|
|
366
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
367
|
+
return query_params
|
|
368
|
+
|
|
369
|
+
class _BaseCreateReleaseConfig:
|
|
370
|
+
def __hash__(self): # pragma: NO COVER
|
|
371
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
372
|
+
|
|
373
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
|
|
374
|
+
"releaseConfigId": "",
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
@classmethod
|
|
378
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
379
|
+
return {
|
|
380
|
+
k: v
|
|
381
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
382
|
+
if k not in message_dict
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
@staticmethod
|
|
386
|
+
def _get_http_options():
|
|
387
|
+
http_options: List[Dict[str, str]] = [
|
|
388
|
+
{
|
|
389
|
+
"method": "post",
|
|
390
|
+
"uri": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/releaseConfigs",
|
|
391
|
+
"body": "release_config",
|
|
392
|
+
},
|
|
393
|
+
]
|
|
394
|
+
return http_options
|
|
395
|
+
|
|
396
|
+
@staticmethod
|
|
397
|
+
def _get_transcoded_request(http_options, request):
|
|
398
|
+
pb_request = dataform.CreateReleaseConfigRequest.pb(request)
|
|
399
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
400
|
+
return transcoded_request
|
|
401
|
+
|
|
402
|
+
@staticmethod
|
|
403
|
+
def _get_request_body_json(transcoded_request):
|
|
404
|
+
# Jsonify the request body
|
|
405
|
+
|
|
406
|
+
body = json_format.MessageToJson(
|
|
407
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
408
|
+
)
|
|
409
|
+
return body
|
|
410
|
+
|
|
411
|
+
@staticmethod
|
|
412
|
+
def _get_query_params_json(transcoded_request):
|
|
413
|
+
query_params = json.loads(
|
|
414
|
+
json_format.MessageToJson(
|
|
415
|
+
transcoded_request["query_params"],
|
|
416
|
+
use_integers_for_enums=True,
|
|
417
|
+
)
|
|
418
|
+
)
|
|
419
|
+
query_params.update(
|
|
420
|
+
_BaseDataformRestTransport._BaseCreateReleaseConfig._get_unset_required_fields(
|
|
421
|
+
query_params
|
|
422
|
+
)
|
|
423
|
+
)
|
|
424
|
+
|
|
425
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
426
|
+
return query_params
|
|
427
|
+
|
|
428
|
+
class _BaseCreateRepository:
|
|
429
|
+
def __hash__(self): # pragma: NO COVER
|
|
430
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
431
|
+
|
|
432
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
|
|
433
|
+
"repositoryId": "",
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
@classmethod
|
|
437
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
438
|
+
return {
|
|
439
|
+
k: v
|
|
440
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
441
|
+
if k not in message_dict
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
@staticmethod
|
|
445
|
+
def _get_http_options():
|
|
446
|
+
http_options: List[Dict[str, str]] = [
|
|
447
|
+
{
|
|
448
|
+
"method": "post",
|
|
449
|
+
"uri": "/v1beta1/{parent=projects/*/locations/*}/repositories",
|
|
450
|
+
"body": "repository",
|
|
451
|
+
},
|
|
452
|
+
]
|
|
453
|
+
return http_options
|
|
454
|
+
|
|
455
|
+
@staticmethod
|
|
456
|
+
def _get_transcoded_request(http_options, request):
|
|
457
|
+
pb_request = dataform.CreateRepositoryRequest.pb(request)
|
|
458
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
459
|
+
return transcoded_request
|
|
460
|
+
|
|
461
|
+
@staticmethod
|
|
462
|
+
def _get_request_body_json(transcoded_request):
|
|
463
|
+
# Jsonify the request body
|
|
464
|
+
|
|
465
|
+
body = json_format.MessageToJson(
|
|
466
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
467
|
+
)
|
|
468
|
+
return body
|
|
469
|
+
|
|
470
|
+
@staticmethod
|
|
471
|
+
def _get_query_params_json(transcoded_request):
|
|
472
|
+
query_params = json.loads(
|
|
473
|
+
json_format.MessageToJson(
|
|
474
|
+
transcoded_request["query_params"],
|
|
475
|
+
use_integers_for_enums=True,
|
|
476
|
+
)
|
|
477
|
+
)
|
|
478
|
+
query_params.update(
|
|
479
|
+
_BaseDataformRestTransport._BaseCreateRepository._get_unset_required_fields(
|
|
480
|
+
query_params
|
|
481
|
+
)
|
|
482
|
+
)
|
|
483
|
+
|
|
484
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
485
|
+
return query_params
|
|
486
|
+
|
|
487
|
+
class _BaseCreateWorkflowConfig:
|
|
488
|
+
def __hash__(self): # pragma: NO COVER
|
|
489
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
490
|
+
|
|
491
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
|
|
492
|
+
"workflowConfigId": "",
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
@classmethod
|
|
496
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
497
|
+
return {
|
|
498
|
+
k: v
|
|
499
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
500
|
+
if k not in message_dict
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
@staticmethod
|
|
504
|
+
def _get_http_options():
|
|
505
|
+
http_options: List[Dict[str, str]] = [
|
|
506
|
+
{
|
|
507
|
+
"method": "post",
|
|
508
|
+
"uri": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowConfigs",
|
|
509
|
+
"body": "workflow_config",
|
|
510
|
+
},
|
|
511
|
+
]
|
|
512
|
+
return http_options
|
|
513
|
+
|
|
514
|
+
@staticmethod
|
|
515
|
+
def _get_transcoded_request(http_options, request):
|
|
516
|
+
pb_request = dataform.CreateWorkflowConfigRequest.pb(request)
|
|
517
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
518
|
+
return transcoded_request
|
|
519
|
+
|
|
520
|
+
@staticmethod
|
|
521
|
+
def _get_request_body_json(transcoded_request):
|
|
522
|
+
# Jsonify the request body
|
|
523
|
+
|
|
524
|
+
body = json_format.MessageToJson(
|
|
525
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
526
|
+
)
|
|
527
|
+
return body
|
|
528
|
+
|
|
529
|
+
@staticmethod
|
|
530
|
+
def _get_query_params_json(transcoded_request):
|
|
531
|
+
query_params = json.loads(
|
|
532
|
+
json_format.MessageToJson(
|
|
533
|
+
transcoded_request["query_params"],
|
|
534
|
+
use_integers_for_enums=True,
|
|
535
|
+
)
|
|
536
|
+
)
|
|
537
|
+
query_params.update(
|
|
538
|
+
_BaseDataformRestTransport._BaseCreateWorkflowConfig._get_unset_required_fields(
|
|
539
|
+
query_params
|
|
540
|
+
)
|
|
541
|
+
)
|
|
542
|
+
|
|
543
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
544
|
+
return query_params
|
|
545
|
+
|
|
546
|
+
class _BaseCreateWorkflowInvocation:
|
|
547
|
+
def __hash__(self): # pragma: NO COVER
|
|
548
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
549
|
+
|
|
550
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
551
|
+
|
|
552
|
+
@classmethod
|
|
553
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
554
|
+
return {
|
|
555
|
+
k: v
|
|
556
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
557
|
+
if k not in message_dict
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
@staticmethod
|
|
561
|
+
def _get_http_options():
|
|
562
|
+
http_options: List[Dict[str, str]] = [
|
|
563
|
+
{
|
|
564
|
+
"method": "post",
|
|
565
|
+
"uri": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations",
|
|
566
|
+
"body": "workflow_invocation",
|
|
567
|
+
},
|
|
568
|
+
]
|
|
569
|
+
return http_options
|
|
570
|
+
|
|
571
|
+
@staticmethod
|
|
572
|
+
def _get_transcoded_request(http_options, request):
|
|
573
|
+
pb_request = dataform.CreateWorkflowInvocationRequest.pb(request)
|
|
574
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
575
|
+
return transcoded_request
|
|
576
|
+
|
|
577
|
+
@staticmethod
|
|
578
|
+
def _get_request_body_json(transcoded_request):
|
|
579
|
+
# Jsonify the request body
|
|
580
|
+
|
|
581
|
+
body = json_format.MessageToJson(
|
|
582
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
583
|
+
)
|
|
584
|
+
return body
|
|
585
|
+
|
|
586
|
+
@staticmethod
|
|
587
|
+
def _get_query_params_json(transcoded_request):
|
|
588
|
+
query_params = json.loads(
|
|
589
|
+
json_format.MessageToJson(
|
|
590
|
+
transcoded_request["query_params"],
|
|
591
|
+
use_integers_for_enums=True,
|
|
592
|
+
)
|
|
593
|
+
)
|
|
594
|
+
query_params.update(
|
|
595
|
+
_BaseDataformRestTransport._BaseCreateWorkflowInvocation._get_unset_required_fields(
|
|
596
|
+
query_params
|
|
597
|
+
)
|
|
598
|
+
)
|
|
599
|
+
|
|
600
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
601
|
+
return query_params
|
|
602
|
+
|
|
603
|
+
class _BaseCreateWorkspace:
|
|
604
|
+
def __hash__(self): # pragma: NO COVER
|
|
605
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
606
|
+
|
|
607
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
|
|
608
|
+
"workspaceId": "",
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
@classmethod
|
|
612
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
613
|
+
return {
|
|
614
|
+
k: v
|
|
615
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
616
|
+
if k not in message_dict
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
@staticmethod
|
|
620
|
+
def _get_http_options():
|
|
621
|
+
http_options: List[Dict[str, str]] = [
|
|
622
|
+
{
|
|
623
|
+
"method": "post",
|
|
624
|
+
"uri": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces",
|
|
625
|
+
"body": "workspace",
|
|
626
|
+
},
|
|
627
|
+
]
|
|
628
|
+
return http_options
|
|
629
|
+
|
|
630
|
+
@staticmethod
|
|
631
|
+
def _get_transcoded_request(http_options, request):
|
|
632
|
+
pb_request = dataform.CreateWorkspaceRequest.pb(request)
|
|
633
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
634
|
+
return transcoded_request
|
|
635
|
+
|
|
636
|
+
@staticmethod
|
|
637
|
+
def _get_request_body_json(transcoded_request):
|
|
638
|
+
# Jsonify the request body
|
|
639
|
+
|
|
640
|
+
body = json_format.MessageToJson(
|
|
641
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
642
|
+
)
|
|
643
|
+
return body
|
|
644
|
+
|
|
645
|
+
@staticmethod
|
|
646
|
+
def _get_query_params_json(transcoded_request):
|
|
647
|
+
query_params = json.loads(
|
|
648
|
+
json_format.MessageToJson(
|
|
649
|
+
transcoded_request["query_params"],
|
|
650
|
+
use_integers_for_enums=True,
|
|
651
|
+
)
|
|
652
|
+
)
|
|
653
|
+
query_params.update(
|
|
654
|
+
_BaseDataformRestTransport._BaseCreateWorkspace._get_unset_required_fields(
|
|
655
|
+
query_params
|
|
656
|
+
)
|
|
657
|
+
)
|
|
658
|
+
|
|
659
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
660
|
+
return query_params
|
|
661
|
+
|
|
662
|
+
class _BaseDeleteReleaseConfig:
|
|
663
|
+
def __hash__(self): # pragma: NO COVER
|
|
664
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
665
|
+
|
|
666
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
667
|
+
|
|
668
|
+
@classmethod
|
|
669
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
670
|
+
return {
|
|
671
|
+
k: v
|
|
672
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
673
|
+
if k not in message_dict
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
@staticmethod
|
|
677
|
+
def _get_http_options():
|
|
678
|
+
http_options: List[Dict[str, str]] = [
|
|
679
|
+
{
|
|
680
|
+
"method": "delete",
|
|
681
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/releaseConfigs/*}",
|
|
682
|
+
},
|
|
683
|
+
]
|
|
684
|
+
return http_options
|
|
685
|
+
|
|
686
|
+
@staticmethod
|
|
687
|
+
def _get_transcoded_request(http_options, request):
|
|
688
|
+
pb_request = dataform.DeleteReleaseConfigRequest.pb(request)
|
|
689
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
690
|
+
return transcoded_request
|
|
691
|
+
|
|
692
|
+
@staticmethod
|
|
693
|
+
def _get_query_params_json(transcoded_request):
|
|
694
|
+
query_params = json.loads(
|
|
695
|
+
json_format.MessageToJson(
|
|
696
|
+
transcoded_request["query_params"],
|
|
697
|
+
use_integers_for_enums=True,
|
|
698
|
+
)
|
|
699
|
+
)
|
|
700
|
+
query_params.update(
|
|
701
|
+
_BaseDataformRestTransport._BaseDeleteReleaseConfig._get_unset_required_fields(
|
|
702
|
+
query_params
|
|
703
|
+
)
|
|
704
|
+
)
|
|
705
|
+
|
|
706
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
707
|
+
return query_params
|
|
708
|
+
|
|
709
|
+
class _BaseDeleteRepository:
|
|
710
|
+
def __hash__(self): # pragma: NO COVER
|
|
711
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
712
|
+
|
|
713
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
714
|
+
|
|
715
|
+
@classmethod
|
|
716
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
717
|
+
return {
|
|
718
|
+
k: v
|
|
719
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
720
|
+
if k not in message_dict
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
@staticmethod
|
|
724
|
+
def _get_http_options():
|
|
725
|
+
http_options: List[Dict[str, str]] = [
|
|
726
|
+
{
|
|
727
|
+
"method": "delete",
|
|
728
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*}",
|
|
729
|
+
},
|
|
730
|
+
]
|
|
731
|
+
return http_options
|
|
732
|
+
|
|
733
|
+
@staticmethod
|
|
734
|
+
def _get_transcoded_request(http_options, request):
|
|
735
|
+
pb_request = dataform.DeleteRepositoryRequest.pb(request)
|
|
736
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
737
|
+
return transcoded_request
|
|
738
|
+
|
|
739
|
+
@staticmethod
|
|
740
|
+
def _get_query_params_json(transcoded_request):
|
|
741
|
+
query_params = json.loads(
|
|
742
|
+
json_format.MessageToJson(
|
|
743
|
+
transcoded_request["query_params"],
|
|
744
|
+
use_integers_for_enums=True,
|
|
745
|
+
)
|
|
746
|
+
)
|
|
747
|
+
query_params.update(
|
|
748
|
+
_BaseDataformRestTransport._BaseDeleteRepository._get_unset_required_fields(
|
|
749
|
+
query_params
|
|
750
|
+
)
|
|
751
|
+
)
|
|
752
|
+
|
|
753
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
754
|
+
return query_params
|
|
755
|
+
|
|
756
|
+
class _BaseDeleteWorkflowConfig:
|
|
757
|
+
def __hash__(self): # pragma: NO COVER
|
|
758
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
759
|
+
|
|
760
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
761
|
+
|
|
762
|
+
@classmethod
|
|
763
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
764
|
+
return {
|
|
765
|
+
k: v
|
|
766
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
767
|
+
if k not in message_dict
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
@staticmethod
|
|
771
|
+
def _get_http_options():
|
|
772
|
+
http_options: List[Dict[str, str]] = [
|
|
773
|
+
{
|
|
774
|
+
"method": "delete",
|
|
775
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowConfigs/*}",
|
|
776
|
+
},
|
|
777
|
+
]
|
|
778
|
+
return http_options
|
|
779
|
+
|
|
780
|
+
@staticmethod
|
|
781
|
+
def _get_transcoded_request(http_options, request):
|
|
782
|
+
pb_request = dataform.DeleteWorkflowConfigRequest.pb(request)
|
|
783
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
784
|
+
return transcoded_request
|
|
785
|
+
|
|
786
|
+
@staticmethod
|
|
787
|
+
def _get_query_params_json(transcoded_request):
|
|
788
|
+
query_params = json.loads(
|
|
789
|
+
json_format.MessageToJson(
|
|
790
|
+
transcoded_request["query_params"],
|
|
791
|
+
use_integers_for_enums=True,
|
|
792
|
+
)
|
|
793
|
+
)
|
|
794
|
+
query_params.update(
|
|
795
|
+
_BaseDataformRestTransport._BaseDeleteWorkflowConfig._get_unset_required_fields(
|
|
796
|
+
query_params
|
|
797
|
+
)
|
|
798
|
+
)
|
|
799
|
+
|
|
800
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
801
|
+
return query_params
|
|
802
|
+
|
|
803
|
+
class _BaseDeleteWorkflowInvocation:
|
|
804
|
+
def __hash__(self): # pragma: NO COVER
|
|
805
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
806
|
+
|
|
807
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
808
|
+
|
|
809
|
+
@classmethod
|
|
810
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
811
|
+
return {
|
|
812
|
+
k: v
|
|
813
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
814
|
+
if k not in message_dict
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
@staticmethod
|
|
818
|
+
def _get_http_options():
|
|
819
|
+
http_options: List[Dict[str, str]] = [
|
|
820
|
+
{
|
|
821
|
+
"method": "delete",
|
|
822
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}",
|
|
823
|
+
},
|
|
824
|
+
]
|
|
825
|
+
return http_options
|
|
826
|
+
|
|
827
|
+
@staticmethod
|
|
828
|
+
def _get_transcoded_request(http_options, request):
|
|
829
|
+
pb_request = dataform.DeleteWorkflowInvocationRequest.pb(request)
|
|
830
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
831
|
+
return transcoded_request
|
|
832
|
+
|
|
833
|
+
@staticmethod
|
|
834
|
+
def _get_query_params_json(transcoded_request):
|
|
835
|
+
query_params = json.loads(
|
|
836
|
+
json_format.MessageToJson(
|
|
837
|
+
transcoded_request["query_params"],
|
|
838
|
+
use_integers_for_enums=True,
|
|
839
|
+
)
|
|
840
|
+
)
|
|
841
|
+
query_params.update(
|
|
842
|
+
_BaseDataformRestTransport._BaseDeleteWorkflowInvocation._get_unset_required_fields(
|
|
843
|
+
query_params
|
|
844
|
+
)
|
|
845
|
+
)
|
|
846
|
+
|
|
847
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
848
|
+
return query_params
|
|
849
|
+
|
|
850
|
+
class _BaseDeleteWorkspace:
|
|
851
|
+
def __hash__(self): # pragma: NO COVER
|
|
852
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
853
|
+
|
|
854
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
855
|
+
|
|
856
|
+
@classmethod
|
|
857
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
858
|
+
return {
|
|
859
|
+
k: v
|
|
860
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
861
|
+
if k not in message_dict
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
@staticmethod
|
|
865
|
+
def _get_http_options():
|
|
866
|
+
http_options: List[Dict[str, str]] = [
|
|
867
|
+
{
|
|
868
|
+
"method": "delete",
|
|
869
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}",
|
|
870
|
+
},
|
|
871
|
+
]
|
|
872
|
+
return http_options
|
|
873
|
+
|
|
874
|
+
@staticmethod
|
|
875
|
+
def _get_transcoded_request(http_options, request):
|
|
876
|
+
pb_request = dataform.DeleteWorkspaceRequest.pb(request)
|
|
877
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
878
|
+
return transcoded_request
|
|
879
|
+
|
|
880
|
+
@staticmethod
|
|
881
|
+
def _get_query_params_json(transcoded_request):
|
|
882
|
+
query_params = json.loads(
|
|
883
|
+
json_format.MessageToJson(
|
|
884
|
+
transcoded_request["query_params"],
|
|
885
|
+
use_integers_for_enums=True,
|
|
886
|
+
)
|
|
887
|
+
)
|
|
888
|
+
query_params.update(
|
|
889
|
+
_BaseDataformRestTransport._BaseDeleteWorkspace._get_unset_required_fields(
|
|
890
|
+
query_params
|
|
891
|
+
)
|
|
892
|
+
)
|
|
893
|
+
|
|
894
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
895
|
+
return query_params
|
|
896
|
+
|
|
897
|
+
class _BaseFetchFileDiff:
|
|
898
|
+
def __hash__(self): # pragma: NO COVER
|
|
899
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
900
|
+
|
|
901
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
|
|
902
|
+
"path": "",
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
@classmethod
|
|
906
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
907
|
+
return {
|
|
908
|
+
k: v
|
|
909
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
910
|
+
if k not in message_dict
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
@staticmethod
|
|
914
|
+
def _get_http_options():
|
|
915
|
+
http_options: List[Dict[str, str]] = [
|
|
916
|
+
{
|
|
917
|
+
"method": "get",
|
|
918
|
+
"uri": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff",
|
|
919
|
+
},
|
|
920
|
+
]
|
|
921
|
+
return http_options
|
|
922
|
+
|
|
923
|
+
@staticmethod
|
|
924
|
+
def _get_transcoded_request(http_options, request):
|
|
925
|
+
pb_request = dataform.FetchFileDiffRequest.pb(request)
|
|
926
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
927
|
+
return transcoded_request
|
|
928
|
+
|
|
929
|
+
@staticmethod
|
|
930
|
+
def _get_query_params_json(transcoded_request):
|
|
931
|
+
query_params = json.loads(
|
|
932
|
+
json_format.MessageToJson(
|
|
933
|
+
transcoded_request["query_params"],
|
|
934
|
+
use_integers_for_enums=True,
|
|
935
|
+
)
|
|
936
|
+
)
|
|
937
|
+
query_params.update(
|
|
938
|
+
_BaseDataformRestTransport._BaseFetchFileDiff._get_unset_required_fields(
|
|
939
|
+
query_params
|
|
940
|
+
)
|
|
941
|
+
)
|
|
942
|
+
|
|
943
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
944
|
+
return query_params
|
|
945
|
+
|
|
946
|
+
class _BaseFetchFileGitStatuses:
|
|
947
|
+
def __hash__(self): # pragma: NO COVER
|
|
948
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
949
|
+
|
|
950
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
951
|
+
|
|
952
|
+
@classmethod
|
|
953
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
954
|
+
return {
|
|
955
|
+
k: v
|
|
956
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
957
|
+
if k not in message_dict
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
@staticmethod
|
|
961
|
+
def _get_http_options():
|
|
962
|
+
http_options: List[Dict[str, str]] = [
|
|
963
|
+
{
|
|
964
|
+
"method": "get",
|
|
965
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses",
|
|
966
|
+
},
|
|
967
|
+
]
|
|
968
|
+
return http_options
|
|
969
|
+
|
|
970
|
+
@staticmethod
|
|
971
|
+
def _get_transcoded_request(http_options, request):
|
|
972
|
+
pb_request = dataform.FetchFileGitStatusesRequest.pb(request)
|
|
973
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
974
|
+
return transcoded_request
|
|
975
|
+
|
|
976
|
+
@staticmethod
|
|
977
|
+
def _get_query_params_json(transcoded_request):
|
|
978
|
+
query_params = json.loads(
|
|
979
|
+
json_format.MessageToJson(
|
|
980
|
+
transcoded_request["query_params"],
|
|
981
|
+
use_integers_for_enums=True,
|
|
982
|
+
)
|
|
983
|
+
)
|
|
984
|
+
query_params.update(
|
|
985
|
+
_BaseDataformRestTransport._BaseFetchFileGitStatuses._get_unset_required_fields(
|
|
986
|
+
query_params
|
|
987
|
+
)
|
|
988
|
+
)
|
|
989
|
+
|
|
990
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
991
|
+
return query_params
|
|
992
|
+
|
|
993
|
+
class _BaseFetchGitAheadBehind:
|
|
994
|
+
def __hash__(self): # pragma: NO COVER
|
|
995
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
996
|
+
|
|
997
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
998
|
+
|
|
999
|
+
@classmethod
|
|
1000
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1001
|
+
return {
|
|
1002
|
+
k: v
|
|
1003
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1004
|
+
if k not in message_dict
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
@staticmethod
|
|
1008
|
+
def _get_http_options():
|
|
1009
|
+
http_options: List[Dict[str, str]] = [
|
|
1010
|
+
{
|
|
1011
|
+
"method": "get",
|
|
1012
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind",
|
|
1013
|
+
},
|
|
1014
|
+
]
|
|
1015
|
+
return http_options
|
|
1016
|
+
|
|
1017
|
+
@staticmethod
|
|
1018
|
+
def _get_transcoded_request(http_options, request):
|
|
1019
|
+
pb_request = dataform.FetchGitAheadBehindRequest.pb(request)
|
|
1020
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1021
|
+
return transcoded_request
|
|
1022
|
+
|
|
1023
|
+
@staticmethod
|
|
1024
|
+
def _get_query_params_json(transcoded_request):
|
|
1025
|
+
query_params = json.loads(
|
|
1026
|
+
json_format.MessageToJson(
|
|
1027
|
+
transcoded_request["query_params"],
|
|
1028
|
+
use_integers_for_enums=True,
|
|
1029
|
+
)
|
|
1030
|
+
)
|
|
1031
|
+
query_params.update(
|
|
1032
|
+
_BaseDataformRestTransport._BaseFetchGitAheadBehind._get_unset_required_fields(
|
|
1033
|
+
query_params
|
|
1034
|
+
)
|
|
1035
|
+
)
|
|
1036
|
+
|
|
1037
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1038
|
+
return query_params
|
|
1039
|
+
|
|
1040
|
+
class _BaseFetchRemoteBranches:
|
|
1041
|
+
def __hash__(self): # pragma: NO COVER
|
|
1042
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1043
|
+
|
|
1044
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1045
|
+
|
|
1046
|
+
@classmethod
|
|
1047
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1048
|
+
return {
|
|
1049
|
+
k: v
|
|
1050
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1051
|
+
if k not in message_dict
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
@staticmethod
|
|
1055
|
+
def _get_http_options():
|
|
1056
|
+
http_options: List[Dict[str, str]] = [
|
|
1057
|
+
{
|
|
1058
|
+
"method": "get",
|
|
1059
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches",
|
|
1060
|
+
},
|
|
1061
|
+
]
|
|
1062
|
+
return http_options
|
|
1063
|
+
|
|
1064
|
+
@staticmethod
|
|
1065
|
+
def _get_transcoded_request(http_options, request):
|
|
1066
|
+
pb_request = dataform.FetchRemoteBranchesRequest.pb(request)
|
|
1067
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1068
|
+
return transcoded_request
|
|
1069
|
+
|
|
1070
|
+
@staticmethod
|
|
1071
|
+
def _get_query_params_json(transcoded_request):
|
|
1072
|
+
query_params = json.loads(
|
|
1073
|
+
json_format.MessageToJson(
|
|
1074
|
+
transcoded_request["query_params"],
|
|
1075
|
+
use_integers_for_enums=True,
|
|
1076
|
+
)
|
|
1077
|
+
)
|
|
1078
|
+
query_params.update(
|
|
1079
|
+
_BaseDataformRestTransport._BaseFetchRemoteBranches._get_unset_required_fields(
|
|
1080
|
+
query_params
|
|
1081
|
+
)
|
|
1082
|
+
)
|
|
1083
|
+
|
|
1084
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1085
|
+
return query_params
|
|
1086
|
+
|
|
1087
|
+
class _BaseFetchRepositoryHistory:
|
|
1088
|
+
def __hash__(self): # pragma: NO COVER
|
|
1089
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1090
|
+
|
|
1091
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1092
|
+
|
|
1093
|
+
@classmethod
|
|
1094
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1095
|
+
return {
|
|
1096
|
+
k: v
|
|
1097
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1098
|
+
if k not in message_dict
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
@staticmethod
|
|
1102
|
+
def _get_http_options():
|
|
1103
|
+
http_options: List[Dict[str, str]] = [
|
|
1104
|
+
{
|
|
1105
|
+
"method": "get",
|
|
1106
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchHistory",
|
|
1107
|
+
},
|
|
1108
|
+
]
|
|
1109
|
+
return http_options
|
|
1110
|
+
|
|
1111
|
+
@staticmethod
|
|
1112
|
+
def _get_transcoded_request(http_options, request):
|
|
1113
|
+
pb_request = dataform.FetchRepositoryHistoryRequest.pb(request)
|
|
1114
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1115
|
+
return transcoded_request
|
|
1116
|
+
|
|
1117
|
+
@staticmethod
|
|
1118
|
+
def _get_query_params_json(transcoded_request):
|
|
1119
|
+
query_params = json.loads(
|
|
1120
|
+
json_format.MessageToJson(
|
|
1121
|
+
transcoded_request["query_params"],
|
|
1122
|
+
use_integers_for_enums=True,
|
|
1123
|
+
)
|
|
1124
|
+
)
|
|
1125
|
+
query_params.update(
|
|
1126
|
+
_BaseDataformRestTransport._BaseFetchRepositoryHistory._get_unset_required_fields(
|
|
1127
|
+
query_params
|
|
1128
|
+
)
|
|
1129
|
+
)
|
|
1130
|
+
|
|
1131
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1132
|
+
return query_params
|
|
1133
|
+
|
|
1134
|
+
class _BaseGetCompilationResult:
|
|
1135
|
+
def __hash__(self): # pragma: NO COVER
|
|
1136
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1137
|
+
|
|
1138
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1139
|
+
|
|
1140
|
+
@classmethod
|
|
1141
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1142
|
+
return {
|
|
1143
|
+
k: v
|
|
1144
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1145
|
+
if k not in message_dict
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
@staticmethod
|
|
1149
|
+
def _get_http_options():
|
|
1150
|
+
http_options: List[Dict[str, str]] = [
|
|
1151
|
+
{
|
|
1152
|
+
"method": "get",
|
|
1153
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}",
|
|
1154
|
+
},
|
|
1155
|
+
]
|
|
1156
|
+
return http_options
|
|
1157
|
+
|
|
1158
|
+
@staticmethod
|
|
1159
|
+
def _get_transcoded_request(http_options, request):
|
|
1160
|
+
pb_request = dataform.GetCompilationResultRequest.pb(request)
|
|
1161
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1162
|
+
return transcoded_request
|
|
1163
|
+
|
|
1164
|
+
@staticmethod
|
|
1165
|
+
def _get_query_params_json(transcoded_request):
|
|
1166
|
+
query_params = json.loads(
|
|
1167
|
+
json_format.MessageToJson(
|
|
1168
|
+
transcoded_request["query_params"],
|
|
1169
|
+
use_integers_for_enums=True,
|
|
1170
|
+
)
|
|
1171
|
+
)
|
|
1172
|
+
query_params.update(
|
|
1173
|
+
_BaseDataformRestTransport._BaseGetCompilationResult._get_unset_required_fields(
|
|
1174
|
+
query_params
|
|
1175
|
+
)
|
|
1176
|
+
)
|
|
1177
|
+
|
|
1178
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1179
|
+
return query_params
|
|
1180
|
+
|
|
1181
|
+
class _BaseGetConfig:
|
|
1182
|
+
def __hash__(self): # pragma: NO COVER
|
|
1183
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1184
|
+
|
|
1185
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1186
|
+
|
|
1187
|
+
@classmethod
|
|
1188
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1189
|
+
return {
|
|
1190
|
+
k: v
|
|
1191
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1192
|
+
if k not in message_dict
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
@staticmethod
|
|
1196
|
+
def _get_http_options():
|
|
1197
|
+
http_options: List[Dict[str, str]] = [
|
|
1198
|
+
{
|
|
1199
|
+
"method": "get",
|
|
1200
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/config}",
|
|
1201
|
+
},
|
|
1202
|
+
]
|
|
1203
|
+
return http_options
|
|
1204
|
+
|
|
1205
|
+
@staticmethod
|
|
1206
|
+
def _get_transcoded_request(http_options, request):
|
|
1207
|
+
pb_request = dataform.GetConfigRequest.pb(request)
|
|
1208
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1209
|
+
return transcoded_request
|
|
1210
|
+
|
|
1211
|
+
@staticmethod
|
|
1212
|
+
def _get_query_params_json(transcoded_request):
|
|
1213
|
+
query_params = json.loads(
|
|
1214
|
+
json_format.MessageToJson(
|
|
1215
|
+
transcoded_request["query_params"],
|
|
1216
|
+
use_integers_for_enums=True,
|
|
1217
|
+
)
|
|
1218
|
+
)
|
|
1219
|
+
query_params.update(
|
|
1220
|
+
_BaseDataformRestTransport._BaseGetConfig._get_unset_required_fields(
|
|
1221
|
+
query_params
|
|
1222
|
+
)
|
|
1223
|
+
)
|
|
1224
|
+
|
|
1225
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1226
|
+
return query_params
|
|
1227
|
+
|
|
1228
|
+
class _BaseGetReleaseConfig:
|
|
1229
|
+
def __hash__(self): # pragma: NO COVER
|
|
1230
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1231
|
+
|
|
1232
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1233
|
+
|
|
1234
|
+
@classmethod
|
|
1235
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1236
|
+
return {
|
|
1237
|
+
k: v
|
|
1238
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1239
|
+
if k not in message_dict
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
@staticmethod
|
|
1243
|
+
def _get_http_options():
|
|
1244
|
+
http_options: List[Dict[str, str]] = [
|
|
1245
|
+
{
|
|
1246
|
+
"method": "get",
|
|
1247
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/releaseConfigs/*}",
|
|
1248
|
+
},
|
|
1249
|
+
]
|
|
1250
|
+
return http_options
|
|
1251
|
+
|
|
1252
|
+
@staticmethod
|
|
1253
|
+
def _get_transcoded_request(http_options, request):
|
|
1254
|
+
pb_request = dataform.GetReleaseConfigRequest.pb(request)
|
|
1255
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1256
|
+
return transcoded_request
|
|
1257
|
+
|
|
1258
|
+
@staticmethod
|
|
1259
|
+
def _get_query_params_json(transcoded_request):
|
|
1260
|
+
query_params = json.loads(
|
|
1261
|
+
json_format.MessageToJson(
|
|
1262
|
+
transcoded_request["query_params"],
|
|
1263
|
+
use_integers_for_enums=True,
|
|
1264
|
+
)
|
|
1265
|
+
)
|
|
1266
|
+
query_params.update(
|
|
1267
|
+
_BaseDataformRestTransport._BaseGetReleaseConfig._get_unset_required_fields(
|
|
1268
|
+
query_params
|
|
1269
|
+
)
|
|
1270
|
+
)
|
|
1271
|
+
|
|
1272
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1273
|
+
return query_params
|
|
1274
|
+
|
|
1275
|
+
class _BaseGetRepository:
|
|
1276
|
+
def __hash__(self): # pragma: NO COVER
|
|
1277
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1278
|
+
|
|
1279
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1280
|
+
|
|
1281
|
+
@classmethod
|
|
1282
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1283
|
+
return {
|
|
1284
|
+
k: v
|
|
1285
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1286
|
+
if k not in message_dict
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
@staticmethod
|
|
1290
|
+
def _get_http_options():
|
|
1291
|
+
http_options: List[Dict[str, str]] = [
|
|
1292
|
+
{
|
|
1293
|
+
"method": "get",
|
|
1294
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*}",
|
|
1295
|
+
},
|
|
1296
|
+
]
|
|
1297
|
+
return http_options
|
|
1298
|
+
|
|
1299
|
+
@staticmethod
|
|
1300
|
+
def _get_transcoded_request(http_options, request):
|
|
1301
|
+
pb_request = dataform.GetRepositoryRequest.pb(request)
|
|
1302
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1303
|
+
return transcoded_request
|
|
1304
|
+
|
|
1305
|
+
@staticmethod
|
|
1306
|
+
def _get_query_params_json(transcoded_request):
|
|
1307
|
+
query_params = json.loads(
|
|
1308
|
+
json_format.MessageToJson(
|
|
1309
|
+
transcoded_request["query_params"],
|
|
1310
|
+
use_integers_for_enums=True,
|
|
1311
|
+
)
|
|
1312
|
+
)
|
|
1313
|
+
query_params.update(
|
|
1314
|
+
_BaseDataformRestTransport._BaseGetRepository._get_unset_required_fields(
|
|
1315
|
+
query_params
|
|
1316
|
+
)
|
|
1317
|
+
)
|
|
1318
|
+
|
|
1319
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1320
|
+
return query_params
|
|
1321
|
+
|
|
1322
|
+
class _BaseGetWorkflowConfig:
|
|
1323
|
+
def __hash__(self): # pragma: NO COVER
|
|
1324
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1325
|
+
|
|
1326
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1327
|
+
|
|
1328
|
+
@classmethod
|
|
1329
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1330
|
+
return {
|
|
1331
|
+
k: v
|
|
1332
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1333
|
+
if k not in message_dict
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
@staticmethod
|
|
1337
|
+
def _get_http_options():
|
|
1338
|
+
http_options: List[Dict[str, str]] = [
|
|
1339
|
+
{
|
|
1340
|
+
"method": "get",
|
|
1341
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowConfigs/*}",
|
|
1342
|
+
},
|
|
1343
|
+
]
|
|
1344
|
+
return http_options
|
|
1345
|
+
|
|
1346
|
+
@staticmethod
|
|
1347
|
+
def _get_transcoded_request(http_options, request):
|
|
1348
|
+
pb_request = dataform.GetWorkflowConfigRequest.pb(request)
|
|
1349
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1350
|
+
return transcoded_request
|
|
1351
|
+
|
|
1352
|
+
@staticmethod
|
|
1353
|
+
def _get_query_params_json(transcoded_request):
|
|
1354
|
+
query_params = json.loads(
|
|
1355
|
+
json_format.MessageToJson(
|
|
1356
|
+
transcoded_request["query_params"],
|
|
1357
|
+
use_integers_for_enums=True,
|
|
1358
|
+
)
|
|
1359
|
+
)
|
|
1360
|
+
query_params.update(
|
|
1361
|
+
_BaseDataformRestTransport._BaseGetWorkflowConfig._get_unset_required_fields(
|
|
1362
|
+
query_params
|
|
1363
|
+
)
|
|
1364
|
+
)
|
|
1365
|
+
|
|
1366
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1367
|
+
return query_params
|
|
1368
|
+
|
|
1369
|
+
class _BaseGetWorkflowInvocation:
|
|
1370
|
+
def __hash__(self): # pragma: NO COVER
|
|
1371
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1372
|
+
|
|
1373
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1374
|
+
|
|
1375
|
+
@classmethod
|
|
1376
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1377
|
+
return {
|
|
1378
|
+
k: v
|
|
1379
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1380
|
+
if k not in message_dict
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
@staticmethod
|
|
1384
|
+
def _get_http_options():
|
|
1385
|
+
http_options: List[Dict[str, str]] = [
|
|
1386
|
+
{
|
|
1387
|
+
"method": "get",
|
|
1388
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}",
|
|
1389
|
+
},
|
|
1390
|
+
]
|
|
1391
|
+
return http_options
|
|
1392
|
+
|
|
1393
|
+
@staticmethod
|
|
1394
|
+
def _get_transcoded_request(http_options, request):
|
|
1395
|
+
pb_request = dataform.GetWorkflowInvocationRequest.pb(request)
|
|
1396
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1397
|
+
return transcoded_request
|
|
1398
|
+
|
|
1399
|
+
@staticmethod
|
|
1400
|
+
def _get_query_params_json(transcoded_request):
|
|
1401
|
+
query_params = json.loads(
|
|
1402
|
+
json_format.MessageToJson(
|
|
1403
|
+
transcoded_request["query_params"],
|
|
1404
|
+
use_integers_for_enums=True,
|
|
1405
|
+
)
|
|
1406
|
+
)
|
|
1407
|
+
query_params.update(
|
|
1408
|
+
_BaseDataformRestTransport._BaseGetWorkflowInvocation._get_unset_required_fields(
|
|
1409
|
+
query_params
|
|
1410
|
+
)
|
|
1411
|
+
)
|
|
1412
|
+
|
|
1413
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1414
|
+
return query_params
|
|
1415
|
+
|
|
1416
|
+
class _BaseGetWorkspace:
|
|
1417
|
+
def __hash__(self): # pragma: NO COVER
|
|
1418
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1419
|
+
|
|
1420
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1421
|
+
|
|
1422
|
+
@classmethod
|
|
1423
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1424
|
+
return {
|
|
1425
|
+
k: v
|
|
1426
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1427
|
+
if k not in message_dict
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
@staticmethod
|
|
1431
|
+
def _get_http_options():
|
|
1432
|
+
http_options: List[Dict[str, str]] = [
|
|
1433
|
+
{
|
|
1434
|
+
"method": "get",
|
|
1435
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}",
|
|
1436
|
+
},
|
|
1437
|
+
]
|
|
1438
|
+
return http_options
|
|
1439
|
+
|
|
1440
|
+
@staticmethod
|
|
1441
|
+
def _get_transcoded_request(http_options, request):
|
|
1442
|
+
pb_request = dataform.GetWorkspaceRequest.pb(request)
|
|
1443
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1444
|
+
return transcoded_request
|
|
1445
|
+
|
|
1446
|
+
@staticmethod
|
|
1447
|
+
def _get_query_params_json(transcoded_request):
|
|
1448
|
+
query_params = json.loads(
|
|
1449
|
+
json_format.MessageToJson(
|
|
1450
|
+
transcoded_request["query_params"],
|
|
1451
|
+
use_integers_for_enums=True,
|
|
1452
|
+
)
|
|
1453
|
+
)
|
|
1454
|
+
query_params.update(
|
|
1455
|
+
_BaseDataformRestTransport._BaseGetWorkspace._get_unset_required_fields(
|
|
1456
|
+
query_params
|
|
1457
|
+
)
|
|
1458
|
+
)
|
|
1459
|
+
|
|
1460
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1461
|
+
return query_params
|
|
1462
|
+
|
|
1463
|
+
class _BaseInstallNpmPackages:
|
|
1464
|
+
def __hash__(self): # pragma: NO COVER
|
|
1465
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1466
|
+
|
|
1467
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1468
|
+
|
|
1469
|
+
@classmethod
|
|
1470
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1471
|
+
return {
|
|
1472
|
+
k: v
|
|
1473
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1474
|
+
if k not in message_dict
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
@staticmethod
|
|
1478
|
+
def _get_http_options():
|
|
1479
|
+
http_options: List[Dict[str, str]] = [
|
|
1480
|
+
{
|
|
1481
|
+
"method": "post",
|
|
1482
|
+
"uri": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages",
|
|
1483
|
+
"body": "*",
|
|
1484
|
+
},
|
|
1485
|
+
]
|
|
1486
|
+
return http_options
|
|
1487
|
+
|
|
1488
|
+
@staticmethod
|
|
1489
|
+
def _get_transcoded_request(http_options, request):
|
|
1490
|
+
pb_request = dataform.InstallNpmPackagesRequest.pb(request)
|
|
1491
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1492
|
+
return transcoded_request
|
|
1493
|
+
|
|
1494
|
+
@staticmethod
|
|
1495
|
+
def _get_request_body_json(transcoded_request):
|
|
1496
|
+
# Jsonify the request body
|
|
1497
|
+
|
|
1498
|
+
body = json_format.MessageToJson(
|
|
1499
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
1500
|
+
)
|
|
1501
|
+
return body
|
|
1502
|
+
|
|
1503
|
+
@staticmethod
|
|
1504
|
+
def _get_query_params_json(transcoded_request):
|
|
1505
|
+
query_params = json.loads(
|
|
1506
|
+
json_format.MessageToJson(
|
|
1507
|
+
transcoded_request["query_params"],
|
|
1508
|
+
use_integers_for_enums=True,
|
|
1509
|
+
)
|
|
1510
|
+
)
|
|
1511
|
+
query_params.update(
|
|
1512
|
+
_BaseDataformRestTransport._BaseInstallNpmPackages._get_unset_required_fields(
|
|
1513
|
+
query_params
|
|
1514
|
+
)
|
|
1515
|
+
)
|
|
1516
|
+
|
|
1517
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1518
|
+
return query_params
|
|
1519
|
+
|
|
1520
|
+
class _BaseListCompilationResults:
|
|
1521
|
+
def __hash__(self): # pragma: NO COVER
|
|
1522
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1523
|
+
|
|
1524
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1525
|
+
|
|
1526
|
+
@classmethod
|
|
1527
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1528
|
+
return {
|
|
1529
|
+
k: v
|
|
1530
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1531
|
+
if k not in message_dict
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
@staticmethod
|
|
1535
|
+
def _get_http_options():
|
|
1536
|
+
http_options: List[Dict[str, str]] = [
|
|
1537
|
+
{
|
|
1538
|
+
"method": "get",
|
|
1539
|
+
"uri": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults",
|
|
1540
|
+
},
|
|
1541
|
+
]
|
|
1542
|
+
return http_options
|
|
1543
|
+
|
|
1544
|
+
@staticmethod
|
|
1545
|
+
def _get_transcoded_request(http_options, request):
|
|
1546
|
+
pb_request = dataform.ListCompilationResultsRequest.pb(request)
|
|
1547
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1548
|
+
return transcoded_request
|
|
1549
|
+
|
|
1550
|
+
@staticmethod
|
|
1551
|
+
def _get_query_params_json(transcoded_request):
|
|
1552
|
+
query_params = json.loads(
|
|
1553
|
+
json_format.MessageToJson(
|
|
1554
|
+
transcoded_request["query_params"],
|
|
1555
|
+
use_integers_for_enums=True,
|
|
1556
|
+
)
|
|
1557
|
+
)
|
|
1558
|
+
query_params.update(
|
|
1559
|
+
_BaseDataformRestTransport._BaseListCompilationResults._get_unset_required_fields(
|
|
1560
|
+
query_params
|
|
1561
|
+
)
|
|
1562
|
+
)
|
|
1563
|
+
|
|
1564
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1565
|
+
return query_params
|
|
1566
|
+
|
|
1567
|
+
class _BaseListReleaseConfigs:
|
|
1568
|
+
def __hash__(self): # pragma: NO COVER
|
|
1569
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1570
|
+
|
|
1571
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1572
|
+
|
|
1573
|
+
@classmethod
|
|
1574
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1575
|
+
return {
|
|
1576
|
+
k: v
|
|
1577
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1578
|
+
if k not in message_dict
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
@staticmethod
|
|
1582
|
+
def _get_http_options():
|
|
1583
|
+
http_options: List[Dict[str, str]] = [
|
|
1584
|
+
{
|
|
1585
|
+
"method": "get",
|
|
1586
|
+
"uri": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/releaseConfigs",
|
|
1587
|
+
},
|
|
1588
|
+
]
|
|
1589
|
+
return http_options
|
|
1590
|
+
|
|
1591
|
+
@staticmethod
|
|
1592
|
+
def _get_transcoded_request(http_options, request):
|
|
1593
|
+
pb_request = dataform.ListReleaseConfigsRequest.pb(request)
|
|
1594
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1595
|
+
return transcoded_request
|
|
1596
|
+
|
|
1597
|
+
@staticmethod
|
|
1598
|
+
def _get_query_params_json(transcoded_request):
|
|
1599
|
+
query_params = json.loads(
|
|
1600
|
+
json_format.MessageToJson(
|
|
1601
|
+
transcoded_request["query_params"],
|
|
1602
|
+
use_integers_for_enums=True,
|
|
1603
|
+
)
|
|
1604
|
+
)
|
|
1605
|
+
query_params.update(
|
|
1606
|
+
_BaseDataformRestTransport._BaseListReleaseConfigs._get_unset_required_fields(
|
|
1607
|
+
query_params
|
|
1608
|
+
)
|
|
1609
|
+
)
|
|
1610
|
+
|
|
1611
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1612
|
+
return query_params
|
|
1613
|
+
|
|
1614
|
+
class _BaseListRepositories:
|
|
1615
|
+
def __hash__(self): # pragma: NO COVER
|
|
1616
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1617
|
+
|
|
1618
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1619
|
+
|
|
1620
|
+
@classmethod
|
|
1621
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1622
|
+
return {
|
|
1623
|
+
k: v
|
|
1624
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1625
|
+
if k not in message_dict
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
@staticmethod
|
|
1629
|
+
def _get_http_options():
|
|
1630
|
+
http_options: List[Dict[str, str]] = [
|
|
1631
|
+
{
|
|
1632
|
+
"method": "get",
|
|
1633
|
+
"uri": "/v1beta1/{parent=projects/*/locations/*}/repositories",
|
|
1634
|
+
},
|
|
1635
|
+
]
|
|
1636
|
+
return http_options
|
|
1637
|
+
|
|
1638
|
+
@staticmethod
|
|
1639
|
+
def _get_transcoded_request(http_options, request):
|
|
1640
|
+
pb_request = dataform.ListRepositoriesRequest.pb(request)
|
|
1641
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1642
|
+
return transcoded_request
|
|
1643
|
+
|
|
1644
|
+
@staticmethod
|
|
1645
|
+
def _get_query_params_json(transcoded_request):
|
|
1646
|
+
query_params = json.loads(
|
|
1647
|
+
json_format.MessageToJson(
|
|
1648
|
+
transcoded_request["query_params"],
|
|
1649
|
+
use_integers_for_enums=True,
|
|
1650
|
+
)
|
|
1651
|
+
)
|
|
1652
|
+
query_params.update(
|
|
1653
|
+
_BaseDataformRestTransport._BaseListRepositories._get_unset_required_fields(
|
|
1654
|
+
query_params
|
|
1655
|
+
)
|
|
1656
|
+
)
|
|
1657
|
+
|
|
1658
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1659
|
+
return query_params
|
|
1660
|
+
|
|
1661
|
+
class _BaseListWorkflowConfigs:
|
|
1662
|
+
def __hash__(self): # pragma: NO COVER
|
|
1663
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1664
|
+
|
|
1665
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1666
|
+
|
|
1667
|
+
@classmethod
|
|
1668
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1669
|
+
return {
|
|
1670
|
+
k: v
|
|
1671
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1672
|
+
if k not in message_dict
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
@staticmethod
|
|
1676
|
+
def _get_http_options():
|
|
1677
|
+
http_options: List[Dict[str, str]] = [
|
|
1678
|
+
{
|
|
1679
|
+
"method": "get",
|
|
1680
|
+
"uri": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowConfigs",
|
|
1681
|
+
},
|
|
1682
|
+
]
|
|
1683
|
+
return http_options
|
|
1684
|
+
|
|
1685
|
+
@staticmethod
|
|
1686
|
+
def _get_transcoded_request(http_options, request):
|
|
1687
|
+
pb_request = dataform.ListWorkflowConfigsRequest.pb(request)
|
|
1688
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1689
|
+
return transcoded_request
|
|
1690
|
+
|
|
1691
|
+
@staticmethod
|
|
1692
|
+
def _get_query_params_json(transcoded_request):
|
|
1693
|
+
query_params = json.loads(
|
|
1694
|
+
json_format.MessageToJson(
|
|
1695
|
+
transcoded_request["query_params"],
|
|
1696
|
+
use_integers_for_enums=True,
|
|
1697
|
+
)
|
|
1698
|
+
)
|
|
1699
|
+
query_params.update(
|
|
1700
|
+
_BaseDataformRestTransport._BaseListWorkflowConfigs._get_unset_required_fields(
|
|
1701
|
+
query_params
|
|
1702
|
+
)
|
|
1703
|
+
)
|
|
1704
|
+
|
|
1705
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1706
|
+
return query_params
|
|
1707
|
+
|
|
1708
|
+
class _BaseListWorkflowInvocations:
|
|
1709
|
+
def __hash__(self): # pragma: NO COVER
|
|
1710
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1711
|
+
|
|
1712
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1713
|
+
|
|
1714
|
+
@classmethod
|
|
1715
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1716
|
+
return {
|
|
1717
|
+
k: v
|
|
1718
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1719
|
+
if k not in message_dict
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
@staticmethod
|
|
1723
|
+
def _get_http_options():
|
|
1724
|
+
http_options: List[Dict[str, str]] = [
|
|
1725
|
+
{
|
|
1726
|
+
"method": "get",
|
|
1727
|
+
"uri": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations",
|
|
1728
|
+
},
|
|
1729
|
+
]
|
|
1730
|
+
return http_options
|
|
1731
|
+
|
|
1732
|
+
@staticmethod
|
|
1733
|
+
def _get_transcoded_request(http_options, request):
|
|
1734
|
+
pb_request = dataform.ListWorkflowInvocationsRequest.pb(request)
|
|
1735
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1736
|
+
return transcoded_request
|
|
1737
|
+
|
|
1738
|
+
@staticmethod
|
|
1739
|
+
def _get_query_params_json(transcoded_request):
|
|
1740
|
+
query_params = json.loads(
|
|
1741
|
+
json_format.MessageToJson(
|
|
1742
|
+
transcoded_request["query_params"],
|
|
1743
|
+
use_integers_for_enums=True,
|
|
1744
|
+
)
|
|
1745
|
+
)
|
|
1746
|
+
query_params.update(
|
|
1747
|
+
_BaseDataformRestTransport._BaseListWorkflowInvocations._get_unset_required_fields(
|
|
1748
|
+
query_params
|
|
1749
|
+
)
|
|
1750
|
+
)
|
|
1751
|
+
|
|
1752
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1753
|
+
return query_params
|
|
1754
|
+
|
|
1755
|
+
class _BaseListWorkspaces:
|
|
1756
|
+
def __hash__(self): # pragma: NO COVER
|
|
1757
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1758
|
+
|
|
1759
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1760
|
+
|
|
1761
|
+
@classmethod
|
|
1762
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1763
|
+
return {
|
|
1764
|
+
k: v
|
|
1765
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1766
|
+
if k not in message_dict
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
@staticmethod
|
|
1770
|
+
def _get_http_options():
|
|
1771
|
+
http_options: List[Dict[str, str]] = [
|
|
1772
|
+
{
|
|
1773
|
+
"method": "get",
|
|
1774
|
+
"uri": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces",
|
|
1775
|
+
},
|
|
1776
|
+
]
|
|
1777
|
+
return http_options
|
|
1778
|
+
|
|
1779
|
+
@staticmethod
|
|
1780
|
+
def _get_transcoded_request(http_options, request):
|
|
1781
|
+
pb_request = dataform.ListWorkspacesRequest.pb(request)
|
|
1782
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1783
|
+
return transcoded_request
|
|
1784
|
+
|
|
1785
|
+
@staticmethod
|
|
1786
|
+
def _get_query_params_json(transcoded_request):
|
|
1787
|
+
query_params = json.loads(
|
|
1788
|
+
json_format.MessageToJson(
|
|
1789
|
+
transcoded_request["query_params"],
|
|
1790
|
+
use_integers_for_enums=True,
|
|
1791
|
+
)
|
|
1792
|
+
)
|
|
1793
|
+
query_params.update(
|
|
1794
|
+
_BaseDataformRestTransport._BaseListWorkspaces._get_unset_required_fields(
|
|
1795
|
+
query_params
|
|
1796
|
+
)
|
|
1797
|
+
)
|
|
1798
|
+
|
|
1799
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1800
|
+
return query_params
|
|
1801
|
+
|
|
1802
|
+
class _BaseMakeDirectory:
|
|
1803
|
+
def __hash__(self): # pragma: NO COVER
|
|
1804
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1805
|
+
|
|
1806
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1807
|
+
|
|
1808
|
+
@classmethod
|
|
1809
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1810
|
+
return {
|
|
1811
|
+
k: v
|
|
1812
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1813
|
+
if k not in message_dict
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
@staticmethod
|
|
1817
|
+
def _get_http_options():
|
|
1818
|
+
http_options: List[Dict[str, str]] = [
|
|
1819
|
+
{
|
|
1820
|
+
"method": "post",
|
|
1821
|
+
"uri": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory",
|
|
1822
|
+
"body": "*",
|
|
1823
|
+
},
|
|
1824
|
+
]
|
|
1825
|
+
return http_options
|
|
1826
|
+
|
|
1827
|
+
@staticmethod
|
|
1828
|
+
def _get_transcoded_request(http_options, request):
|
|
1829
|
+
pb_request = dataform.MakeDirectoryRequest.pb(request)
|
|
1830
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1831
|
+
return transcoded_request
|
|
1832
|
+
|
|
1833
|
+
@staticmethod
|
|
1834
|
+
def _get_request_body_json(transcoded_request):
|
|
1835
|
+
# Jsonify the request body
|
|
1836
|
+
|
|
1837
|
+
body = json_format.MessageToJson(
|
|
1838
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
1839
|
+
)
|
|
1840
|
+
return body
|
|
1841
|
+
|
|
1842
|
+
@staticmethod
|
|
1843
|
+
def _get_query_params_json(transcoded_request):
|
|
1844
|
+
query_params = json.loads(
|
|
1845
|
+
json_format.MessageToJson(
|
|
1846
|
+
transcoded_request["query_params"],
|
|
1847
|
+
use_integers_for_enums=True,
|
|
1848
|
+
)
|
|
1849
|
+
)
|
|
1850
|
+
query_params.update(
|
|
1851
|
+
_BaseDataformRestTransport._BaseMakeDirectory._get_unset_required_fields(
|
|
1852
|
+
query_params
|
|
1853
|
+
)
|
|
1854
|
+
)
|
|
1855
|
+
|
|
1856
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1857
|
+
return query_params
|
|
1858
|
+
|
|
1859
|
+
class _BaseMoveDirectory:
|
|
1860
|
+
def __hash__(self): # pragma: NO COVER
|
|
1861
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1862
|
+
|
|
1863
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1864
|
+
|
|
1865
|
+
@classmethod
|
|
1866
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1867
|
+
return {
|
|
1868
|
+
k: v
|
|
1869
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1870
|
+
if k not in message_dict
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
@staticmethod
|
|
1874
|
+
def _get_http_options():
|
|
1875
|
+
http_options: List[Dict[str, str]] = [
|
|
1876
|
+
{
|
|
1877
|
+
"method": "post",
|
|
1878
|
+
"uri": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory",
|
|
1879
|
+
"body": "*",
|
|
1880
|
+
},
|
|
1881
|
+
]
|
|
1882
|
+
return http_options
|
|
1883
|
+
|
|
1884
|
+
@staticmethod
|
|
1885
|
+
def _get_transcoded_request(http_options, request):
|
|
1886
|
+
pb_request = dataform.MoveDirectoryRequest.pb(request)
|
|
1887
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1888
|
+
return transcoded_request
|
|
1889
|
+
|
|
1890
|
+
@staticmethod
|
|
1891
|
+
def _get_request_body_json(transcoded_request):
|
|
1892
|
+
# Jsonify the request body
|
|
1893
|
+
|
|
1894
|
+
body = json_format.MessageToJson(
|
|
1895
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
1896
|
+
)
|
|
1897
|
+
return body
|
|
1898
|
+
|
|
1899
|
+
@staticmethod
|
|
1900
|
+
def _get_query_params_json(transcoded_request):
|
|
1901
|
+
query_params = json.loads(
|
|
1902
|
+
json_format.MessageToJson(
|
|
1903
|
+
transcoded_request["query_params"],
|
|
1904
|
+
use_integers_for_enums=True,
|
|
1905
|
+
)
|
|
1906
|
+
)
|
|
1907
|
+
query_params.update(
|
|
1908
|
+
_BaseDataformRestTransport._BaseMoveDirectory._get_unset_required_fields(
|
|
1909
|
+
query_params
|
|
1910
|
+
)
|
|
1911
|
+
)
|
|
1912
|
+
|
|
1913
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1914
|
+
return query_params
|
|
1915
|
+
|
|
1916
|
+
class _BaseMoveFile:
|
|
1917
|
+
def __hash__(self): # pragma: NO COVER
|
|
1918
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1919
|
+
|
|
1920
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1921
|
+
|
|
1922
|
+
@classmethod
|
|
1923
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1924
|
+
return {
|
|
1925
|
+
k: v
|
|
1926
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1927
|
+
if k not in message_dict
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
@staticmethod
|
|
1931
|
+
def _get_http_options():
|
|
1932
|
+
http_options: List[Dict[str, str]] = [
|
|
1933
|
+
{
|
|
1934
|
+
"method": "post",
|
|
1935
|
+
"uri": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile",
|
|
1936
|
+
"body": "*",
|
|
1937
|
+
},
|
|
1938
|
+
]
|
|
1939
|
+
return http_options
|
|
1940
|
+
|
|
1941
|
+
@staticmethod
|
|
1942
|
+
def _get_transcoded_request(http_options, request):
|
|
1943
|
+
pb_request = dataform.MoveFileRequest.pb(request)
|
|
1944
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1945
|
+
return transcoded_request
|
|
1946
|
+
|
|
1947
|
+
@staticmethod
|
|
1948
|
+
def _get_request_body_json(transcoded_request):
|
|
1949
|
+
# Jsonify the request body
|
|
1950
|
+
|
|
1951
|
+
body = json_format.MessageToJson(
|
|
1952
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
1953
|
+
)
|
|
1954
|
+
return body
|
|
1955
|
+
|
|
1956
|
+
@staticmethod
|
|
1957
|
+
def _get_query_params_json(transcoded_request):
|
|
1958
|
+
query_params = json.loads(
|
|
1959
|
+
json_format.MessageToJson(
|
|
1960
|
+
transcoded_request["query_params"],
|
|
1961
|
+
use_integers_for_enums=True,
|
|
1962
|
+
)
|
|
1963
|
+
)
|
|
1964
|
+
query_params.update(
|
|
1965
|
+
_BaseDataformRestTransport._BaseMoveFile._get_unset_required_fields(
|
|
1966
|
+
query_params
|
|
1967
|
+
)
|
|
1968
|
+
)
|
|
1969
|
+
|
|
1970
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1971
|
+
return query_params
|
|
1972
|
+
|
|
1973
|
+
class _BasePullGitCommits:
|
|
1974
|
+
def __hash__(self): # pragma: NO COVER
|
|
1975
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
1976
|
+
|
|
1977
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1978
|
+
|
|
1979
|
+
@classmethod
|
|
1980
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1981
|
+
return {
|
|
1982
|
+
k: v
|
|
1983
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1984
|
+
if k not in message_dict
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
@staticmethod
|
|
1988
|
+
def _get_http_options():
|
|
1989
|
+
http_options: List[Dict[str, str]] = [
|
|
1990
|
+
{
|
|
1991
|
+
"method": "post",
|
|
1992
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull",
|
|
1993
|
+
"body": "*",
|
|
1994
|
+
},
|
|
1995
|
+
]
|
|
1996
|
+
return http_options
|
|
1997
|
+
|
|
1998
|
+
@staticmethod
|
|
1999
|
+
def _get_transcoded_request(http_options, request):
|
|
2000
|
+
pb_request = dataform.PullGitCommitsRequest.pb(request)
|
|
2001
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2002
|
+
return transcoded_request
|
|
2003
|
+
|
|
2004
|
+
@staticmethod
|
|
2005
|
+
def _get_request_body_json(transcoded_request):
|
|
2006
|
+
# Jsonify the request body
|
|
2007
|
+
|
|
2008
|
+
body = json_format.MessageToJson(
|
|
2009
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
2010
|
+
)
|
|
2011
|
+
return body
|
|
2012
|
+
|
|
2013
|
+
@staticmethod
|
|
2014
|
+
def _get_query_params_json(transcoded_request):
|
|
2015
|
+
query_params = json.loads(
|
|
2016
|
+
json_format.MessageToJson(
|
|
2017
|
+
transcoded_request["query_params"],
|
|
2018
|
+
use_integers_for_enums=True,
|
|
2019
|
+
)
|
|
2020
|
+
)
|
|
2021
|
+
query_params.update(
|
|
2022
|
+
_BaseDataformRestTransport._BasePullGitCommits._get_unset_required_fields(
|
|
2023
|
+
query_params
|
|
2024
|
+
)
|
|
2025
|
+
)
|
|
2026
|
+
|
|
2027
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2028
|
+
return query_params
|
|
2029
|
+
|
|
2030
|
+
class _BasePushGitCommits:
|
|
2031
|
+
def __hash__(self): # pragma: NO COVER
|
|
2032
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2033
|
+
|
|
2034
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
2035
|
+
|
|
2036
|
+
@classmethod
|
|
2037
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2038
|
+
return {
|
|
2039
|
+
k: v
|
|
2040
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2041
|
+
if k not in message_dict
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
@staticmethod
|
|
2045
|
+
def _get_http_options():
|
|
2046
|
+
http_options: List[Dict[str, str]] = [
|
|
2047
|
+
{
|
|
2048
|
+
"method": "post",
|
|
2049
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:push",
|
|
2050
|
+
"body": "*",
|
|
2051
|
+
},
|
|
2052
|
+
]
|
|
2053
|
+
return http_options
|
|
2054
|
+
|
|
2055
|
+
@staticmethod
|
|
2056
|
+
def _get_transcoded_request(http_options, request):
|
|
2057
|
+
pb_request = dataform.PushGitCommitsRequest.pb(request)
|
|
2058
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2059
|
+
return transcoded_request
|
|
2060
|
+
|
|
2061
|
+
@staticmethod
|
|
2062
|
+
def _get_request_body_json(transcoded_request):
|
|
2063
|
+
# Jsonify the request body
|
|
2064
|
+
|
|
2065
|
+
body = json_format.MessageToJson(
|
|
2066
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
2067
|
+
)
|
|
2068
|
+
return body
|
|
2069
|
+
|
|
2070
|
+
@staticmethod
|
|
2071
|
+
def _get_query_params_json(transcoded_request):
|
|
2072
|
+
query_params = json.loads(
|
|
2073
|
+
json_format.MessageToJson(
|
|
2074
|
+
transcoded_request["query_params"],
|
|
2075
|
+
use_integers_for_enums=True,
|
|
2076
|
+
)
|
|
2077
|
+
)
|
|
2078
|
+
query_params.update(
|
|
2079
|
+
_BaseDataformRestTransport._BasePushGitCommits._get_unset_required_fields(
|
|
2080
|
+
query_params
|
|
2081
|
+
)
|
|
2082
|
+
)
|
|
2083
|
+
|
|
2084
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2085
|
+
return query_params
|
|
2086
|
+
|
|
2087
|
+
class _BaseQueryCompilationResultActions:
|
|
2088
|
+
def __hash__(self): # pragma: NO COVER
|
|
2089
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2090
|
+
|
|
2091
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
2092
|
+
|
|
2093
|
+
@classmethod
|
|
2094
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2095
|
+
return {
|
|
2096
|
+
k: v
|
|
2097
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2098
|
+
if k not in message_dict
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
@staticmethod
|
|
2102
|
+
def _get_http_options():
|
|
2103
|
+
http_options: List[Dict[str, str]] = [
|
|
2104
|
+
{
|
|
2105
|
+
"method": "get",
|
|
2106
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query",
|
|
2107
|
+
},
|
|
2108
|
+
]
|
|
2109
|
+
return http_options
|
|
2110
|
+
|
|
2111
|
+
@staticmethod
|
|
2112
|
+
def _get_transcoded_request(http_options, request):
|
|
2113
|
+
pb_request = dataform.QueryCompilationResultActionsRequest.pb(request)
|
|
2114
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2115
|
+
return transcoded_request
|
|
2116
|
+
|
|
2117
|
+
@staticmethod
|
|
2118
|
+
def _get_query_params_json(transcoded_request):
|
|
2119
|
+
query_params = json.loads(
|
|
2120
|
+
json_format.MessageToJson(
|
|
2121
|
+
transcoded_request["query_params"],
|
|
2122
|
+
use_integers_for_enums=True,
|
|
2123
|
+
)
|
|
2124
|
+
)
|
|
2125
|
+
query_params.update(
|
|
2126
|
+
_BaseDataformRestTransport._BaseQueryCompilationResultActions._get_unset_required_fields(
|
|
2127
|
+
query_params
|
|
2128
|
+
)
|
|
2129
|
+
)
|
|
2130
|
+
|
|
2131
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2132
|
+
return query_params
|
|
2133
|
+
|
|
2134
|
+
class _BaseQueryDirectoryContents:
|
|
2135
|
+
def __hash__(self): # pragma: NO COVER
|
|
2136
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2137
|
+
|
|
2138
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
2139
|
+
|
|
2140
|
+
@classmethod
|
|
2141
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2142
|
+
return {
|
|
2143
|
+
k: v
|
|
2144
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2145
|
+
if k not in message_dict
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
@staticmethod
|
|
2149
|
+
def _get_http_options():
|
|
2150
|
+
http_options: List[Dict[str, str]] = [
|
|
2151
|
+
{
|
|
2152
|
+
"method": "get",
|
|
2153
|
+
"uri": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents",
|
|
2154
|
+
},
|
|
2155
|
+
]
|
|
2156
|
+
return http_options
|
|
2157
|
+
|
|
2158
|
+
@staticmethod
|
|
2159
|
+
def _get_transcoded_request(http_options, request):
|
|
2160
|
+
pb_request = dataform.QueryDirectoryContentsRequest.pb(request)
|
|
2161
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2162
|
+
return transcoded_request
|
|
2163
|
+
|
|
2164
|
+
@staticmethod
|
|
2165
|
+
def _get_query_params_json(transcoded_request):
|
|
2166
|
+
query_params = json.loads(
|
|
2167
|
+
json_format.MessageToJson(
|
|
2168
|
+
transcoded_request["query_params"],
|
|
2169
|
+
use_integers_for_enums=True,
|
|
2170
|
+
)
|
|
2171
|
+
)
|
|
2172
|
+
query_params.update(
|
|
2173
|
+
_BaseDataformRestTransport._BaseQueryDirectoryContents._get_unset_required_fields(
|
|
2174
|
+
query_params
|
|
2175
|
+
)
|
|
2176
|
+
)
|
|
2177
|
+
|
|
2178
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2179
|
+
return query_params
|
|
2180
|
+
|
|
2181
|
+
class _BaseQueryRepositoryDirectoryContents:
|
|
2182
|
+
def __hash__(self): # pragma: NO COVER
|
|
2183
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2184
|
+
|
|
2185
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
2186
|
+
|
|
2187
|
+
@classmethod
|
|
2188
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2189
|
+
return {
|
|
2190
|
+
k: v
|
|
2191
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2192
|
+
if k not in message_dict
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
@staticmethod
|
|
2196
|
+
def _get_http_options():
|
|
2197
|
+
http_options: List[Dict[str, str]] = [
|
|
2198
|
+
{
|
|
2199
|
+
"method": "get",
|
|
2200
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*}:queryDirectoryContents",
|
|
2201
|
+
},
|
|
2202
|
+
]
|
|
2203
|
+
return http_options
|
|
2204
|
+
|
|
2205
|
+
@staticmethod
|
|
2206
|
+
def _get_transcoded_request(http_options, request):
|
|
2207
|
+
pb_request = dataform.QueryRepositoryDirectoryContentsRequest.pb(request)
|
|
2208
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2209
|
+
return transcoded_request
|
|
2210
|
+
|
|
2211
|
+
@staticmethod
|
|
2212
|
+
def _get_query_params_json(transcoded_request):
|
|
2213
|
+
query_params = json.loads(
|
|
2214
|
+
json_format.MessageToJson(
|
|
2215
|
+
transcoded_request["query_params"],
|
|
2216
|
+
use_integers_for_enums=True,
|
|
2217
|
+
)
|
|
2218
|
+
)
|
|
2219
|
+
query_params.update(
|
|
2220
|
+
_BaseDataformRestTransport._BaseQueryRepositoryDirectoryContents._get_unset_required_fields(
|
|
2221
|
+
query_params
|
|
2222
|
+
)
|
|
2223
|
+
)
|
|
2224
|
+
|
|
2225
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2226
|
+
return query_params
|
|
2227
|
+
|
|
2228
|
+
class _BaseQueryWorkflowInvocationActions:
|
|
2229
|
+
def __hash__(self): # pragma: NO COVER
|
|
2230
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2231
|
+
|
|
2232
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
2233
|
+
|
|
2234
|
+
@classmethod
|
|
2235
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2236
|
+
return {
|
|
2237
|
+
k: v
|
|
2238
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2239
|
+
if k not in message_dict
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
@staticmethod
|
|
2243
|
+
def _get_http_options():
|
|
2244
|
+
http_options: List[Dict[str, str]] = [
|
|
2245
|
+
{
|
|
2246
|
+
"method": "get",
|
|
2247
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query",
|
|
2248
|
+
},
|
|
2249
|
+
]
|
|
2250
|
+
return http_options
|
|
2251
|
+
|
|
2252
|
+
@staticmethod
|
|
2253
|
+
def _get_transcoded_request(http_options, request):
|
|
2254
|
+
pb_request = dataform.QueryWorkflowInvocationActionsRequest.pb(request)
|
|
2255
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2256
|
+
return transcoded_request
|
|
2257
|
+
|
|
2258
|
+
@staticmethod
|
|
2259
|
+
def _get_query_params_json(transcoded_request):
|
|
2260
|
+
query_params = json.loads(
|
|
2261
|
+
json_format.MessageToJson(
|
|
2262
|
+
transcoded_request["query_params"],
|
|
2263
|
+
use_integers_for_enums=True,
|
|
2264
|
+
)
|
|
2265
|
+
)
|
|
2266
|
+
query_params.update(
|
|
2267
|
+
_BaseDataformRestTransport._BaseQueryWorkflowInvocationActions._get_unset_required_fields(
|
|
2268
|
+
query_params
|
|
2269
|
+
)
|
|
2270
|
+
)
|
|
2271
|
+
|
|
2272
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2273
|
+
return query_params
|
|
2274
|
+
|
|
2275
|
+
class _BaseReadFile:
|
|
2276
|
+
def __hash__(self): # pragma: NO COVER
|
|
2277
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2278
|
+
|
|
2279
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
|
|
2280
|
+
"path": "",
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2283
|
+
@classmethod
|
|
2284
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2285
|
+
return {
|
|
2286
|
+
k: v
|
|
2287
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2288
|
+
if k not in message_dict
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
@staticmethod
|
|
2292
|
+
def _get_http_options():
|
|
2293
|
+
http_options: List[Dict[str, str]] = [
|
|
2294
|
+
{
|
|
2295
|
+
"method": "get",
|
|
2296
|
+
"uri": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile",
|
|
2297
|
+
},
|
|
2298
|
+
]
|
|
2299
|
+
return http_options
|
|
2300
|
+
|
|
2301
|
+
@staticmethod
|
|
2302
|
+
def _get_transcoded_request(http_options, request):
|
|
2303
|
+
pb_request = dataform.ReadFileRequest.pb(request)
|
|
2304
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2305
|
+
return transcoded_request
|
|
2306
|
+
|
|
2307
|
+
@staticmethod
|
|
2308
|
+
def _get_query_params_json(transcoded_request):
|
|
2309
|
+
query_params = json.loads(
|
|
2310
|
+
json_format.MessageToJson(
|
|
2311
|
+
transcoded_request["query_params"],
|
|
2312
|
+
use_integers_for_enums=True,
|
|
2313
|
+
)
|
|
2314
|
+
)
|
|
2315
|
+
query_params.update(
|
|
2316
|
+
_BaseDataformRestTransport._BaseReadFile._get_unset_required_fields(
|
|
2317
|
+
query_params
|
|
2318
|
+
)
|
|
2319
|
+
)
|
|
2320
|
+
|
|
2321
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2322
|
+
return query_params
|
|
2323
|
+
|
|
2324
|
+
class _BaseReadRepositoryFile:
|
|
2325
|
+
def __hash__(self): # pragma: NO COVER
|
|
2326
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2327
|
+
|
|
2328
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
|
|
2329
|
+
"path": "",
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2332
|
+
@classmethod
|
|
2333
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2334
|
+
return {
|
|
2335
|
+
k: v
|
|
2336
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2337
|
+
if k not in message_dict
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
@staticmethod
|
|
2341
|
+
def _get_http_options():
|
|
2342
|
+
http_options: List[Dict[str, str]] = [
|
|
2343
|
+
{
|
|
2344
|
+
"method": "get",
|
|
2345
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*}:readFile",
|
|
2346
|
+
},
|
|
2347
|
+
]
|
|
2348
|
+
return http_options
|
|
2349
|
+
|
|
2350
|
+
@staticmethod
|
|
2351
|
+
def _get_transcoded_request(http_options, request):
|
|
2352
|
+
pb_request = dataform.ReadRepositoryFileRequest.pb(request)
|
|
2353
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2354
|
+
return transcoded_request
|
|
2355
|
+
|
|
2356
|
+
@staticmethod
|
|
2357
|
+
def _get_query_params_json(transcoded_request):
|
|
2358
|
+
query_params = json.loads(
|
|
2359
|
+
json_format.MessageToJson(
|
|
2360
|
+
transcoded_request["query_params"],
|
|
2361
|
+
use_integers_for_enums=True,
|
|
2362
|
+
)
|
|
2363
|
+
)
|
|
2364
|
+
query_params.update(
|
|
2365
|
+
_BaseDataformRestTransport._BaseReadRepositoryFile._get_unset_required_fields(
|
|
2366
|
+
query_params
|
|
2367
|
+
)
|
|
2368
|
+
)
|
|
2369
|
+
|
|
2370
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2371
|
+
return query_params
|
|
2372
|
+
|
|
2373
|
+
class _BaseRemoveDirectory:
|
|
2374
|
+
def __hash__(self): # pragma: NO COVER
|
|
2375
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2376
|
+
|
|
2377
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
2378
|
+
|
|
2379
|
+
@classmethod
|
|
2380
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2381
|
+
return {
|
|
2382
|
+
k: v
|
|
2383
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2384
|
+
if k not in message_dict
|
|
2385
|
+
}
|
|
2386
|
+
|
|
2387
|
+
@staticmethod
|
|
2388
|
+
def _get_http_options():
|
|
2389
|
+
http_options: List[Dict[str, str]] = [
|
|
2390
|
+
{
|
|
2391
|
+
"method": "post",
|
|
2392
|
+
"uri": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory",
|
|
2393
|
+
"body": "*",
|
|
2394
|
+
},
|
|
2395
|
+
]
|
|
2396
|
+
return http_options
|
|
2397
|
+
|
|
2398
|
+
@staticmethod
|
|
2399
|
+
def _get_transcoded_request(http_options, request):
|
|
2400
|
+
pb_request = dataform.RemoveDirectoryRequest.pb(request)
|
|
2401
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2402
|
+
return transcoded_request
|
|
2403
|
+
|
|
2404
|
+
@staticmethod
|
|
2405
|
+
def _get_request_body_json(transcoded_request):
|
|
2406
|
+
# Jsonify the request body
|
|
2407
|
+
|
|
2408
|
+
body = json_format.MessageToJson(
|
|
2409
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
2410
|
+
)
|
|
2411
|
+
return body
|
|
2412
|
+
|
|
2413
|
+
@staticmethod
|
|
2414
|
+
def _get_query_params_json(transcoded_request):
|
|
2415
|
+
query_params = json.loads(
|
|
2416
|
+
json_format.MessageToJson(
|
|
2417
|
+
transcoded_request["query_params"],
|
|
2418
|
+
use_integers_for_enums=True,
|
|
2419
|
+
)
|
|
2420
|
+
)
|
|
2421
|
+
query_params.update(
|
|
2422
|
+
_BaseDataformRestTransport._BaseRemoveDirectory._get_unset_required_fields(
|
|
2423
|
+
query_params
|
|
2424
|
+
)
|
|
2425
|
+
)
|
|
2426
|
+
|
|
2427
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2428
|
+
return query_params
|
|
2429
|
+
|
|
2430
|
+
class _BaseRemoveFile:
|
|
2431
|
+
def __hash__(self): # pragma: NO COVER
|
|
2432
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2433
|
+
|
|
2434
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
2435
|
+
|
|
2436
|
+
@classmethod
|
|
2437
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2438
|
+
return {
|
|
2439
|
+
k: v
|
|
2440
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2441
|
+
if k not in message_dict
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
@staticmethod
|
|
2445
|
+
def _get_http_options():
|
|
2446
|
+
http_options: List[Dict[str, str]] = [
|
|
2447
|
+
{
|
|
2448
|
+
"method": "post",
|
|
2449
|
+
"uri": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile",
|
|
2450
|
+
"body": "*",
|
|
2451
|
+
},
|
|
2452
|
+
]
|
|
2453
|
+
return http_options
|
|
2454
|
+
|
|
2455
|
+
@staticmethod
|
|
2456
|
+
def _get_transcoded_request(http_options, request):
|
|
2457
|
+
pb_request = dataform.RemoveFileRequest.pb(request)
|
|
2458
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2459
|
+
return transcoded_request
|
|
2460
|
+
|
|
2461
|
+
@staticmethod
|
|
2462
|
+
def _get_request_body_json(transcoded_request):
|
|
2463
|
+
# Jsonify the request body
|
|
2464
|
+
|
|
2465
|
+
body = json_format.MessageToJson(
|
|
2466
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
2467
|
+
)
|
|
2468
|
+
return body
|
|
2469
|
+
|
|
2470
|
+
@staticmethod
|
|
2471
|
+
def _get_query_params_json(transcoded_request):
|
|
2472
|
+
query_params = json.loads(
|
|
2473
|
+
json_format.MessageToJson(
|
|
2474
|
+
transcoded_request["query_params"],
|
|
2475
|
+
use_integers_for_enums=True,
|
|
2476
|
+
)
|
|
2477
|
+
)
|
|
2478
|
+
query_params.update(
|
|
2479
|
+
_BaseDataformRestTransport._BaseRemoveFile._get_unset_required_fields(
|
|
2480
|
+
query_params
|
|
2481
|
+
)
|
|
2482
|
+
)
|
|
2483
|
+
|
|
2484
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2485
|
+
return query_params
|
|
2486
|
+
|
|
2487
|
+
class _BaseResetWorkspaceChanges:
|
|
2488
|
+
def __hash__(self): # pragma: NO COVER
|
|
2489
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2490
|
+
|
|
2491
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
2492
|
+
|
|
2493
|
+
@classmethod
|
|
2494
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2495
|
+
return {
|
|
2496
|
+
k: v
|
|
2497
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2498
|
+
if k not in message_dict
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2501
|
+
@staticmethod
|
|
2502
|
+
def _get_http_options():
|
|
2503
|
+
http_options: List[Dict[str, str]] = [
|
|
2504
|
+
{
|
|
2505
|
+
"method": "post",
|
|
2506
|
+
"uri": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset",
|
|
2507
|
+
"body": "*",
|
|
2508
|
+
},
|
|
2509
|
+
]
|
|
2510
|
+
return http_options
|
|
2511
|
+
|
|
2512
|
+
@staticmethod
|
|
2513
|
+
def _get_transcoded_request(http_options, request):
|
|
2514
|
+
pb_request = dataform.ResetWorkspaceChangesRequest.pb(request)
|
|
2515
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2516
|
+
return transcoded_request
|
|
2517
|
+
|
|
2518
|
+
@staticmethod
|
|
2519
|
+
def _get_request_body_json(transcoded_request):
|
|
2520
|
+
# Jsonify the request body
|
|
2521
|
+
|
|
2522
|
+
body = json_format.MessageToJson(
|
|
2523
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
2524
|
+
)
|
|
2525
|
+
return body
|
|
2526
|
+
|
|
2527
|
+
@staticmethod
|
|
2528
|
+
def _get_query_params_json(transcoded_request):
|
|
2529
|
+
query_params = json.loads(
|
|
2530
|
+
json_format.MessageToJson(
|
|
2531
|
+
transcoded_request["query_params"],
|
|
2532
|
+
use_integers_for_enums=True,
|
|
2533
|
+
)
|
|
2534
|
+
)
|
|
2535
|
+
query_params.update(
|
|
2536
|
+
_BaseDataformRestTransport._BaseResetWorkspaceChanges._get_unset_required_fields(
|
|
2537
|
+
query_params
|
|
2538
|
+
)
|
|
2539
|
+
)
|
|
2540
|
+
|
|
2541
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2542
|
+
return query_params
|
|
2543
|
+
|
|
2544
|
+
class _BaseSearchFiles:
|
|
2545
|
+
def __hash__(self): # pragma: NO COVER
|
|
2546
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2547
|
+
|
|
2548
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
2549
|
+
|
|
2550
|
+
@classmethod
|
|
2551
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2552
|
+
return {
|
|
2553
|
+
k: v
|
|
2554
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2555
|
+
if k not in message_dict
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
@staticmethod
|
|
2559
|
+
def _get_http_options():
|
|
2560
|
+
http_options: List[Dict[str, str]] = [
|
|
2561
|
+
{
|
|
2562
|
+
"method": "get",
|
|
2563
|
+
"uri": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:searchFiles",
|
|
2564
|
+
},
|
|
2565
|
+
]
|
|
2566
|
+
return http_options
|
|
2567
|
+
|
|
2568
|
+
@staticmethod
|
|
2569
|
+
def _get_transcoded_request(http_options, request):
|
|
2570
|
+
pb_request = dataform.SearchFilesRequest.pb(request)
|
|
2571
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2572
|
+
return transcoded_request
|
|
2573
|
+
|
|
2574
|
+
@staticmethod
|
|
2575
|
+
def _get_query_params_json(transcoded_request):
|
|
2576
|
+
query_params = json.loads(
|
|
2577
|
+
json_format.MessageToJson(
|
|
2578
|
+
transcoded_request["query_params"],
|
|
2579
|
+
use_integers_for_enums=True,
|
|
2580
|
+
)
|
|
2581
|
+
)
|
|
2582
|
+
query_params.update(
|
|
2583
|
+
_BaseDataformRestTransport._BaseSearchFiles._get_unset_required_fields(
|
|
2584
|
+
query_params
|
|
2585
|
+
)
|
|
2586
|
+
)
|
|
2587
|
+
|
|
2588
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2589
|
+
return query_params
|
|
2590
|
+
|
|
2591
|
+
class _BaseUpdateConfig:
|
|
2592
|
+
def __hash__(self): # pragma: NO COVER
|
|
2593
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2594
|
+
|
|
2595
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
2596
|
+
|
|
2597
|
+
@classmethod
|
|
2598
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2599
|
+
return {
|
|
2600
|
+
k: v
|
|
2601
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2602
|
+
if k not in message_dict
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
@staticmethod
|
|
2606
|
+
def _get_http_options():
|
|
2607
|
+
http_options: List[Dict[str, str]] = [
|
|
2608
|
+
{
|
|
2609
|
+
"method": "patch",
|
|
2610
|
+
"uri": "/v1beta1/{config.name=projects/*/locations/*/config}",
|
|
2611
|
+
"body": "config",
|
|
2612
|
+
},
|
|
2613
|
+
]
|
|
2614
|
+
return http_options
|
|
2615
|
+
|
|
2616
|
+
@staticmethod
|
|
2617
|
+
def _get_transcoded_request(http_options, request):
|
|
2618
|
+
pb_request = dataform.UpdateConfigRequest.pb(request)
|
|
2619
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2620
|
+
return transcoded_request
|
|
2621
|
+
|
|
2622
|
+
@staticmethod
|
|
2623
|
+
def _get_request_body_json(transcoded_request):
|
|
2624
|
+
# Jsonify the request body
|
|
2625
|
+
|
|
2626
|
+
body = json_format.MessageToJson(
|
|
2627
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
2628
|
+
)
|
|
2629
|
+
return body
|
|
2630
|
+
|
|
2631
|
+
@staticmethod
|
|
2632
|
+
def _get_query_params_json(transcoded_request):
|
|
2633
|
+
query_params = json.loads(
|
|
2634
|
+
json_format.MessageToJson(
|
|
2635
|
+
transcoded_request["query_params"],
|
|
2636
|
+
use_integers_for_enums=True,
|
|
2637
|
+
)
|
|
2638
|
+
)
|
|
2639
|
+
query_params.update(
|
|
2640
|
+
_BaseDataformRestTransport._BaseUpdateConfig._get_unset_required_fields(
|
|
2641
|
+
query_params
|
|
2642
|
+
)
|
|
2643
|
+
)
|
|
2644
|
+
|
|
2645
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2646
|
+
return query_params
|
|
2647
|
+
|
|
2648
|
+
class _BaseUpdateReleaseConfig:
|
|
2649
|
+
def __hash__(self): # pragma: NO COVER
|
|
2650
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2651
|
+
|
|
2652
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
2653
|
+
|
|
2654
|
+
@classmethod
|
|
2655
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2656
|
+
return {
|
|
2657
|
+
k: v
|
|
2658
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2659
|
+
if k not in message_dict
|
|
2660
|
+
}
|
|
2661
|
+
|
|
2662
|
+
@staticmethod
|
|
2663
|
+
def _get_http_options():
|
|
2664
|
+
http_options: List[Dict[str, str]] = [
|
|
2665
|
+
{
|
|
2666
|
+
"method": "patch",
|
|
2667
|
+
"uri": "/v1beta1/{release_config.name=projects/*/locations/*/repositories/*/releaseConfigs/*}",
|
|
2668
|
+
"body": "release_config",
|
|
2669
|
+
},
|
|
2670
|
+
]
|
|
2671
|
+
return http_options
|
|
2672
|
+
|
|
2673
|
+
@staticmethod
|
|
2674
|
+
def _get_transcoded_request(http_options, request):
|
|
2675
|
+
pb_request = dataform.UpdateReleaseConfigRequest.pb(request)
|
|
2676
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2677
|
+
return transcoded_request
|
|
2678
|
+
|
|
2679
|
+
@staticmethod
|
|
2680
|
+
def _get_request_body_json(transcoded_request):
|
|
2681
|
+
# Jsonify the request body
|
|
2682
|
+
|
|
2683
|
+
body = json_format.MessageToJson(
|
|
2684
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
2685
|
+
)
|
|
2686
|
+
return body
|
|
2687
|
+
|
|
2688
|
+
@staticmethod
|
|
2689
|
+
def _get_query_params_json(transcoded_request):
|
|
2690
|
+
query_params = json.loads(
|
|
2691
|
+
json_format.MessageToJson(
|
|
2692
|
+
transcoded_request["query_params"],
|
|
2693
|
+
use_integers_for_enums=True,
|
|
2694
|
+
)
|
|
2695
|
+
)
|
|
2696
|
+
query_params.update(
|
|
2697
|
+
_BaseDataformRestTransport._BaseUpdateReleaseConfig._get_unset_required_fields(
|
|
2698
|
+
query_params
|
|
2699
|
+
)
|
|
2700
|
+
)
|
|
2701
|
+
|
|
2702
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2703
|
+
return query_params
|
|
2704
|
+
|
|
2705
|
+
class _BaseUpdateRepository:
|
|
2706
|
+
def __hash__(self): # pragma: NO COVER
|
|
2707
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2708
|
+
|
|
2709
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
2710
|
+
|
|
2711
|
+
@classmethod
|
|
2712
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2713
|
+
return {
|
|
2714
|
+
k: v
|
|
2715
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2716
|
+
if k not in message_dict
|
|
2717
|
+
}
|
|
2718
|
+
|
|
2719
|
+
@staticmethod
|
|
2720
|
+
def _get_http_options():
|
|
2721
|
+
http_options: List[Dict[str, str]] = [
|
|
2722
|
+
{
|
|
2723
|
+
"method": "patch",
|
|
2724
|
+
"uri": "/v1beta1/{repository.name=projects/*/locations/*/repositories/*}",
|
|
2725
|
+
"body": "repository",
|
|
2726
|
+
},
|
|
2727
|
+
]
|
|
2728
|
+
return http_options
|
|
2729
|
+
|
|
2730
|
+
@staticmethod
|
|
2731
|
+
def _get_transcoded_request(http_options, request):
|
|
2732
|
+
pb_request = dataform.UpdateRepositoryRequest.pb(request)
|
|
2733
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2734
|
+
return transcoded_request
|
|
2735
|
+
|
|
2736
|
+
@staticmethod
|
|
2737
|
+
def _get_request_body_json(transcoded_request):
|
|
2738
|
+
# Jsonify the request body
|
|
2739
|
+
|
|
2740
|
+
body = json_format.MessageToJson(
|
|
2741
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
2742
|
+
)
|
|
2743
|
+
return body
|
|
2744
|
+
|
|
2745
|
+
@staticmethod
|
|
2746
|
+
def _get_query_params_json(transcoded_request):
|
|
2747
|
+
query_params = json.loads(
|
|
2748
|
+
json_format.MessageToJson(
|
|
2749
|
+
transcoded_request["query_params"],
|
|
2750
|
+
use_integers_for_enums=True,
|
|
2751
|
+
)
|
|
2752
|
+
)
|
|
2753
|
+
query_params.update(
|
|
2754
|
+
_BaseDataformRestTransport._BaseUpdateRepository._get_unset_required_fields(
|
|
2755
|
+
query_params
|
|
2756
|
+
)
|
|
2757
|
+
)
|
|
2758
|
+
|
|
2759
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2760
|
+
return query_params
|
|
2761
|
+
|
|
2762
|
+
class _BaseUpdateWorkflowConfig:
|
|
2763
|
+
def __hash__(self): # pragma: NO COVER
|
|
2764
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2765
|
+
|
|
2766
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
2767
|
+
|
|
2768
|
+
@classmethod
|
|
2769
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2770
|
+
return {
|
|
2771
|
+
k: v
|
|
2772
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2773
|
+
if k not in message_dict
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2776
|
+
@staticmethod
|
|
2777
|
+
def _get_http_options():
|
|
2778
|
+
http_options: List[Dict[str, str]] = [
|
|
2779
|
+
{
|
|
2780
|
+
"method": "patch",
|
|
2781
|
+
"uri": "/v1beta1/{workflow_config.name=projects/*/locations/*/repositories/*/workflowConfigs/*}",
|
|
2782
|
+
"body": "workflow_config",
|
|
2783
|
+
},
|
|
2784
|
+
]
|
|
2785
|
+
return http_options
|
|
2786
|
+
|
|
2787
|
+
@staticmethod
|
|
2788
|
+
def _get_transcoded_request(http_options, request):
|
|
2789
|
+
pb_request = dataform.UpdateWorkflowConfigRequest.pb(request)
|
|
2790
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2791
|
+
return transcoded_request
|
|
2792
|
+
|
|
2793
|
+
@staticmethod
|
|
2794
|
+
def _get_request_body_json(transcoded_request):
|
|
2795
|
+
# Jsonify the request body
|
|
2796
|
+
|
|
2797
|
+
body = json_format.MessageToJson(
|
|
2798
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
2799
|
+
)
|
|
2800
|
+
return body
|
|
2801
|
+
|
|
2802
|
+
@staticmethod
|
|
2803
|
+
def _get_query_params_json(transcoded_request):
|
|
2804
|
+
query_params = json.loads(
|
|
2805
|
+
json_format.MessageToJson(
|
|
2806
|
+
transcoded_request["query_params"],
|
|
2807
|
+
use_integers_for_enums=True,
|
|
2808
|
+
)
|
|
2809
|
+
)
|
|
2810
|
+
query_params.update(
|
|
2811
|
+
_BaseDataformRestTransport._BaseUpdateWorkflowConfig._get_unset_required_fields(
|
|
2812
|
+
query_params
|
|
2813
|
+
)
|
|
2814
|
+
)
|
|
2815
|
+
|
|
2816
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2817
|
+
return query_params
|
|
2818
|
+
|
|
2819
|
+
class _BaseWriteFile:
|
|
2820
|
+
def __hash__(self): # pragma: NO COVER
|
|
2821
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2822
|
+
|
|
2823
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
2824
|
+
|
|
2825
|
+
@classmethod
|
|
2826
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
2827
|
+
return {
|
|
2828
|
+
k: v
|
|
2829
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
2830
|
+
if k not in message_dict
|
|
2831
|
+
}
|
|
2832
|
+
|
|
2833
|
+
@staticmethod
|
|
2834
|
+
def _get_http_options():
|
|
2835
|
+
http_options: List[Dict[str, str]] = [
|
|
2836
|
+
{
|
|
2837
|
+
"method": "post",
|
|
2838
|
+
"uri": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile",
|
|
2839
|
+
"body": "*",
|
|
2840
|
+
},
|
|
2841
|
+
]
|
|
2842
|
+
return http_options
|
|
2843
|
+
|
|
2844
|
+
@staticmethod
|
|
2845
|
+
def _get_transcoded_request(http_options, request):
|
|
2846
|
+
pb_request = dataform.WriteFileRequest.pb(request)
|
|
2847
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
2848
|
+
return transcoded_request
|
|
2849
|
+
|
|
2850
|
+
@staticmethod
|
|
2851
|
+
def _get_request_body_json(transcoded_request):
|
|
2852
|
+
# Jsonify the request body
|
|
2853
|
+
|
|
2854
|
+
body = json_format.MessageToJson(
|
|
2855
|
+
transcoded_request["body"], use_integers_for_enums=True
|
|
2856
|
+
)
|
|
2857
|
+
return body
|
|
2858
|
+
|
|
2859
|
+
@staticmethod
|
|
2860
|
+
def _get_query_params_json(transcoded_request):
|
|
2861
|
+
query_params = json.loads(
|
|
2862
|
+
json_format.MessageToJson(
|
|
2863
|
+
transcoded_request["query_params"],
|
|
2864
|
+
use_integers_for_enums=True,
|
|
2865
|
+
)
|
|
2866
|
+
)
|
|
2867
|
+
query_params.update(
|
|
2868
|
+
_BaseDataformRestTransport._BaseWriteFile._get_unset_required_fields(
|
|
2869
|
+
query_params
|
|
2870
|
+
)
|
|
2871
|
+
)
|
|
2872
|
+
|
|
2873
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
2874
|
+
return query_params
|
|
2875
|
+
|
|
2876
|
+
class _BaseGetLocation:
|
|
2877
|
+
def __hash__(self): # pragma: NO COVER
|
|
2878
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2879
|
+
|
|
2880
|
+
@staticmethod
|
|
2881
|
+
def _get_http_options():
|
|
2882
|
+
http_options: List[Dict[str, str]] = [
|
|
2883
|
+
{
|
|
2884
|
+
"method": "get",
|
|
2885
|
+
"uri": "/v1beta1/{name=projects/*/locations/*}",
|
|
2886
|
+
},
|
|
2887
|
+
]
|
|
2888
|
+
return http_options
|
|
2889
|
+
|
|
2890
|
+
@staticmethod
|
|
2891
|
+
def _get_transcoded_request(http_options, request):
|
|
2892
|
+
request_kwargs = json_format.MessageToDict(request)
|
|
2893
|
+
transcoded_request = path_template.transcode(http_options, **request_kwargs)
|
|
2894
|
+
return transcoded_request
|
|
2895
|
+
|
|
2896
|
+
@staticmethod
|
|
2897
|
+
def _get_query_params_json(transcoded_request):
|
|
2898
|
+
query_params = json.loads(json.dumps(transcoded_request["query_params"]))
|
|
2899
|
+
return query_params
|
|
2900
|
+
|
|
2901
|
+
class _BaseListLocations:
|
|
2902
|
+
def __hash__(self): # pragma: NO COVER
|
|
2903
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2904
|
+
|
|
2905
|
+
@staticmethod
|
|
2906
|
+
def _get_http_options():
|
|
2907
|
+
http_options: List[Dict[str, str]] = [
|
|
2908
|
+
{
|
|
2909
|
+
"method": "get",
|
|
2910
|
+
"uri": "/v1beta1/{name=projects/*}/locations",
|
|
2911
|
+
},
|
|
2912
|
+
]
|
|
2913
|
+
return http_options
|
|
2914
|
+
|
|
2915
|
+
@staticmethod
|
|
2916
|
+
def _get_transcoded_request(http_options, request):
|
|
2917
|
+
request_kwargs = json_format.MessageToDict(request)
|
|
2918
|
+
transcoded_request = path_template.transcode(http_options, **request_kwargs)
|
|
2919
|
+
return transcoded_request
|
|
2920
|
+
|
|
2921
|
+
@staticmethod
|
|
2922
|
+
def _get_query_params_json(transcoded_request):
|
|
2923
|
+
query_params = json.loads(json.dumps(transcoded_request["query_params"]))
|
|
2924
|
+
return query_params
|
|
2925
|
+
|
|
2926
|
+
class _BaseGetIamPolicy:
|
|
2927
|
+
def __hash__(self): # pragma: NO COVER
|
|
2928
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2929
|
+
|
|
2930
|
+
@staticmethod
|
|
2931
|
+
def _get_http_options():
|
|
2932
|
+
http_options: List[Dict[str, str]] = [
|
|
2933
|
+
{
|
|
2934
|
+
"method": "get",
|
|
2935
|
+
"uri": "/v1beta1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy",
|
|
2936
|
+
},
|
|
2937
|
+
{
|
|
2938
|
+
"method": "get",
|
|
2939
|
+
"uri": "/v1beta1/{resource=projects/*/locations/*/repositories/*/workspaces/*}:getIamPolicy",
|
|
2940
|
+
},
|
|
2941
|
+
]
|
|
2942
|
+
return http_options
|
|
2943
|
+
|
|
2944
|
+
@staticmethod
|
|
2945
|
+
def _get_transcoded_request(http_options, request):
|
|
2946
|
+
request_kwargs = json_format.MessageToDict(request)
|
|
2947
|
+
transcoded_request = path_template.transcode(http_options, **request_kwargs)
|
|
2948
|
+
return transcoded_request
|
|
2949
|
+
|
|
2950
|
+
@staticmethod
|
|
2951
|
+
def _get_query_params_json(transcoded_request):
|
|
2952
|
+
query_params = json.loads(json.dumps(transcoded_request["query_params"]))
|
|
2953
|
+
return query_params
|
|
2954
|
+
|
|
2955
|
+
class _BaseSetIamPolicy:
|
|
2956
|
+
def __hash__(self): # pragma: NO COVER
|
|
2957
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2958
|
+
|
|
2959
|
+
@staticmethod
|
|
2960
|
+
def _get_http_options():
|
|
2961
|
+
http_options: List[Dict[str, str]] = [
|
|
2962
|
+
{
|
|
2963
|
+
"method": "post",
|
|
2964
|
+
"uri": "/v1beta1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy",
|
|
2965
|
+
"body": "*",
|
|
2966
|
+
},
|
|
2967
|
+
{
|
|
2968
|
+
"method": "post",
|
|
2969
|
+
"uri": "/v1beta1/{resource=projects/*/locations/*/repositories/*/workspaces/*}:setIamPolicy",
|
|
2970
|
+
"body": "*",
|
|
2971
|
+
},
|
|
2972
|
+
]
|
|
2973
|
+
return http_options
|
|
2974
|
+
|
|
2975
|
+
@staticmethod
|
|
2976
|
+
def _get_transcoded_request(http_options, request):
|
|
2977
|
+
request_kwargs = json_format.MessageToDict(request)
|
|
2978
|
+
transcoded_request = path_template.transcode(http_options, **request_kwargs)
|
|
2979
|
+
return transcoded_request
|
|
2980
|
+
|
|
2981
|
+
@staticmethod
|
|
2982
|
+
def _get_request_body_json(transcoded_request):
|
|
2983
|
+
body = json.dumps(transcoded_request["body"])
|
|
2984
|
+
return body
|
|
2985
|
+
|
|
2986
|
+
@staticmethod
|
|
2987
|
+
def _get_query_params_json(transcoded_request):
|
|
2988
|
+
query_params = json.loads(json.dumps(transcoded_request["query_params"]))
|
|
2989
|
+
return query_params
|
|
2990
|
+
|
|
2991
|
+
class _BaseTestIamPermissions:
|
|
2992
|
+
def __hash__(self): # pragma: NO COVER
|
|
2993
|
+
return NotImplementedError("__hash__ must be implemented.")
|
|
2994
|
+
|
|
2995
|
+
@staticmethod
|
|
2996
|
+
def _get_http_options():
|
|
2997
|
+
http_options: List[Dict[str, str]] = [
|
|
2998
|
+
{
|
|
2999
|
+
"method": "post",
|
|
3000
|
+
"uri": "/v1beta1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions",
|
|
3001
|
+
"body": "*",
|
|
3002
|
+
},
|
|
3003
|
+
{
|
|
3004
|
+
"method": "post",
|
|
3005
|
+
"uri": "/v1beta1/{resource=projects/*/locations/*/repositories/*/workspaces/*}:testIamPermissions",
|
|
3006
|
+
"body": "*",
|
|
3007
|
+
},
|
|
3008
|
+
]
|
|
3009
|
+
return http_options
|
|
3010
|
+
|
|
3011
|
+
@staticmethod
|
|
3012
|
+
def _get_transcoded_request(http_options, request):
|
|
3013
|
+
request_kwargs = json_format.MessageToDict(request)
|
|
3014
|
+
transcoded_request = path_template.transcode(http_options, **request_kwargs)
|
|
3015
|
+
return transcoded_request
|
|
3016
|
+
|
|
3017
|
+
@staticmethod
|
|
3018
|
+
def _get_request_body_json(transcoded_request):
|
|
3019
|
+
body = json.dumps(transcoded_request["body"])
|
|
3020
|
+
return body
|
|
3021
|
+
|
|
3022
|
+
@staticmethod
|
|
3023
|
+
def _get_query_params_json(transcoded_request):
|
|
3024
|
+
query_params = json.loads(json.dumps(transcoded_request["query_params"]))
|
|
3025
|
+
return query_params
|
|
3026
|
+
|
|
3027
|
+
|
|
3028
|
+
__all__ = ("_BaseDataformRestTransport",)
|