Skip to content

Commit e91cace

Browse files
feat: enable "rest" transport in Python for services supporting numeric enums (#519)
* feat: enable "rest" transport in Python for services supporting numeric enums PiperOrigin-RevId: 508143576 Source-Link: googleapis/googleapis@7a702a9 Source-Link: googleapis/googleapis-gen@6ad1279 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmFkMTI3OWMwZTdhYTc4N2FjNmI2NmM5ZmQ0YTIxMDY5MmVkZmZjZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add rest transport to system test * fix test * fix: Add service_yaml_parameters to py_gapic_library BUILD.bazel targets PiperOrigin-RevId: 510187992 Source-Link: googleapis/googleapis@5edc235 Source-Link: googleapis/googleapis-gen@b0bedb7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBiZWRiNzJlNDc2NWEzZTBiNjc0YTI4YzUwZWEwZjlhOWIyNmE4OSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent fc9f8f4 commit e91cace

File tree

26 files changed

+19806
-511
lines changed

26 files changed

+19806
-511
lines changed

packages/google-cloud-dataproc/google/cloud/dataproc_v1/gapic_metadata.json

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,36 @@
6666
]
6767
}
6868
}
69+
},
70+
"rest": {
71+
"libraryClient": "AutoscalingPolicyServiceClient",
72+
"rpcs": {
73+
"CreateAutoscalingPolicy": {
74+
"methods": [
75+
"create_autoscaling_policy"
76+
]
77+
},
78+
"DeleteAutoscalingPolicy": {
79+
"methods": [
80+
"delete_autoscaling_policy"
81+
]
82+
},
83+
"GetAutoscalingPolicy": {
84+
"methods": [
85+
"get_autoscaling_policy"
86+
]
87+
},
88+
"ListAutoscalingPolicies": {
89+
"methods": [
90+
"list_autoscaling_policies"
91+
]
92+
},
93+
"UpdateAutoscalingPolicy": {
94+
"methods": [
95+
"update_autoscaling_policy"
96+
]
97+
}
98+
}
6999
}
70100
}
71101
},
@@ -120,6 +150,31 @@
120150
]
121151
}
122152
}
153+
},
154+
"rest": {
155+
"libraryClient": "BatchControllerClient",
156+
"rpcs": {
157+
"CreateBatch": {
158+
"methods": [
159+
"create_batch"
160+
]
161+
},
162+
"DeleteBatch": {
163+
"methods": [
164+
"delete_batch"
165+
]
166+
},
167+
"GetBatch": {
168+
"methods": [
169+
"get_batch"
170+
]
171+
},
172+
"ListBatches": {
173+
"methods": [
174+
"list_batches"
175+
]
176+
}
177+
}
123178
}
124179
}
125180
},
@@ -214,6 +269,51 @@
214269
]
215270
}
216271
}
272+
},
273+
"rest": {
274+
"libraryClient": "ClusterControllerClient",
275+
"rpcs": {
276+
"CreateCluster": {
277+
"methods": [
278+
"create_cluster"
279+
]
280+
},
281+
"DeleteCluster": {
282+
"methods": [
283+
"delete_cluster"
284+
]
285+
},
286+
"DiagnoseCluster": {
287+
"methods": [
288+
"diagnose_cluster"
289+
]
290+
},
291+
"GetCluster": {
292+
"methods": [
293+
"get_cluster"
294+
]
295+
},
296+
"ListClusters": {
297+
"methods": [
298+
"list_clusters"
299+
]
300+
},
301+
"StartCluster": {
302+
"methods": [
303+
"start_cluster"
304+
]
305+
},
306+
"StopCluster": {
307+
"methods": [
308+
"stop_cluster"
309+
]
310+
},
311+
"UpdateCluster": {
312+
"methods": [
313+
"update_cluster"
314+
]
315+
}
316+
}
217317
}
218318
}
219319
},
@@ -298,6 +398,46 @@
298398
]
299399
}
300400
}
401+
},
402+
"rest": {
403+
"libraryClient": "JobControllerClient",
404+
"rpcs": {
405+
"CancelJob": {
406+
"methods": [
407+
"cancel_job"
408+
]
409+
},
410+
"DeleteJob": {
411+
"methods": [
412+
"delete_job"
413+
]
414+
},
415+
"GetJob": {
416+
"methods": [
417+
"get_job"
418+
]
419+
},
420+
"ListJobs": {
421+
"methods": [
422+
"list_jobs"
423+
]
424+
},
425+
"SubmitJob": {
426+
"methods": [
427+
"submit_job"
428+
]
429+
},
430+
"SubmitJobAsOperation": {
431+
"methods": [
432+
"submit_job_as_operation"
433+
]
434+
},
435+
"UpdateJob": {
436+
"methods": [
437+
"update_job"
438+
]
439+
}
440+
}
301441
}
302442
}
303443
},
@@ -342,6 +482,26 @@
342482
]
343483
}
344484
}
485+
},
486+
"rest": {
487+
"libraryClient": "NodeGroupControllerClient",
488+
"rpcs": {
489+
"CreateNodeGroup": {
490+
"methods": [
491+
"create_node_group"
492+
]
493+
},
494+
"GetNodeGroup": {
495+
"methods": [
496+
"get_node_group"
497+
]
498+
},
499+
"ResizeNodeGroup": {
500+
"methods": [
501+
"resize_node_group"
502+
]
503+
}
504+
}
345505
}
346506
}
347507
},
@@ -426,6 +586,46 @@
426586
]
427587
}
428588
}
589+
},
590+
"rest": {
591+
"libraryClient": "WorkflowTemplateServiceClient",
592+
"rpcs": {
593+
"CreateWorkflowTemplate": {
594+
"methods": [
595+
"create_workflow_template"
596+
]
597+
},
598+
"DeleteWorkflowTemplate": {
599+
"methods": [
600+
"delete_workflow_template"
601+
]
602+
},
603+
"GetWorkflowTemplate": {
604+
"methods": [
605+
"get_workflow_template"
606+
]
607+
},
608+
"InstantiateInlineWorkflowTemplate": {
609+
"methods": [
610+
"instantiate_inline_workflow_template"
611+
]
612+
},
613+
"InstantiateWorkflowTemplate": {
614+
"methods": [
615+
"instantiate_workflow_template"
616+
]
617+
},
618+
"ListWorkflowTemplates": {
619+
"methods": [
620+
"list_workflow_templates"
621+
]
622+
},
623+
"UpdateWorkflowTemplate": {
624+
"methods": [
625+
"update_workflow_template"
626+
]
627+
}
628+
}
429629
}
430630
}
431631
}

packages/google-cloud-dataproc/google/cloud/dataproc_v1/services/autoscaling_policy_service/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
from .transports.base import AutoscalingPolicyServiceTransport, DEFAULT_CLIENT_INFO
5252
from .transports.grpc import AutoscalingPolicyServiceGrpcTransport
5353
from .transports.grpc_asyncio import AutoscalingPolicyServiceGrpcAsyncIOTransport
54+
from .transports.rest import AutoscalingPolicyServiceRestTransport
5455

5556

5657
class AutoscalingPolicyServiceClientMeta(type):
@@ -66,6 +67,7 @@ class AutoscalingPolicyServiceClientMeta(type):
6667
) # type: Dict[str, Type[AutoscalingPolicyServiceTransport]]
6768
_transport_registry["grpc"] = AutoscalingPolicyServiceGrpcTransport
6869
_transport_registry["grpc_asyncio"] = AutoscalingPolicyServiceGrpcAsyncIOTransport
70+
_transport_registry["rest"] = AutoscalingPolicyServiceRestTransport
6971

7072
def get_transport_class(
7173
cls,

packages/google-cloud-dataproc/google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
from .base import AutoscalingPolicyServiceTransport
2020
from .grpc import AutoscalingPolicyServiceGrpcTransport
2121
from .grpc_asyncio import AutoscalingPolicyServiceGrpcAsyncIOTransport
22+
from .rest import AutoscalingPolicyServiceRestTransport
23+
from .rest import AutoscalingPolicyServiceRestInterceptor
2224

2325

2426
# Compile a registry of transports.
@@ -27,9 +29,12 @@
2729
) # type: Dict[str, Type[AutoscalingPolicyServiceTransport]]
2830
_transport_registry["grpc"] = AutoscalingPolicyServiceGrpcTransport
2931
_transport_registry["grpc_asyncio"] = AutoscalingPolicyServiceGrpcAsyncIOTransport
32+
_transport_registry["rest"] = AutoscalingPolicyServiceRestTransport
3033

3134
__all__ = (
3235
"AutoscalingPolicyServiceTransport",
3336
"AutoscalingPolicyServiceGrpcTransport",
3437
"AutoscalingPolicyServiceGrpcAsyncIOTransport",
38+
"AutoscalingPolicyServiceRestTransport",
39+
"AutoscalingPolicyServiceRestInterceptor",
3540
)

0 commit comments

Comments
 (0)