Skip to content

Commit

Permalink
feat: Enable REST transport support (#139)
Browse files Browse the repository at this point in the history
* feat: Enable REST transport support for Python analytics-admin, media-translation and dataflow clients

PiperOrigin-RevId: 473076638

Source-Link: googleapis/googleapis@f0e2be4

Source-Link: googleapis/googleapis-gen@c62423e
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzYyNDIzZTAwZDg5OTlhMWZlYmQ1NGU3ZDhlMjI0Y2RjN2UyOWU1ZiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix(deps): require google-api-core>=1.33,>=2.8.0

* fix(deps): require protobuf >= 3.20.1

* feat: add Address Validation API

PiperOrigin-RevId: 473247330

Source-Link: googleapis/googleapis@7b2540a

Source-Link: googleapis/googleapis-gen@206063c
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjA2MDYzY2RlNWRmMmY2MGY3MTI2MjlkOGU2NDZmMzliYmJkZDVhNiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix: integrate  gapic-generator-python-1.4.1 and enable more py_test targets

PiperOrigin-RevId: 473833416

Source-Link: googleapis/googleapis@565a550

Source-Link: googleapis/googleapis-gen@1ee1a06
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWVlMWEwNmM2ZGUzY2E4Yjg0MzU3MmMxZmRlMDU0OGY4NDIzNjk4OSJ9

* 🦉 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 <partheniou@google.com>
  • Loading branch information
3 people authored Sep 13, 2022
1 parent c710da9 commit 38af28c
Show file tree
Hide file tree
Showing 64 changed files with 10,292 additions and 602 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@
]
}
}
},
"rest": {
"libraryClient": "FlexTemplatesServiceClient",
"rpcs": {
"LaunchFlexTemplate": {
"methods": [
"launch_flex_template"
]
}
}
}
}
},
Expand Down Expand Up @@ -110,6 +120,46 @@
]
}
}
},
"rest": {
"libraryClient": "JobsV1Beta3Client",
"rpcs": {
"AggregatedListJobs": {
"methods": [
"aggregated_list_jobs"
]
},
"CheckActiveJobs": {
"methods": [
"check_active_jobs"
]
},
"CreateJob": {
"methods": [
"create_job"
]
},
"GetJob": {
"methods": [
"get_job"
]
},
"ListJobs": {
"methods": [
"list_jobs"
]
},
"SnapshotJob": {
"methods": [
"snapshot_job"
]
},
"UpdateJob": {
"methods": [
"update_job"
]
}
}
}
}
},
Expand All @@ -134,6 +184,16 @@
]
}
}
},
"rest": {
"libraryClient": "MessagesV1Beta3Client",
"rpcs": {
"ListJobMessages": {
"methods": [
"list_job_messages"
]
}
}
}
}
},
Expand Down Expand Up @@ -178,6 +238,26 @@
]
}
}
},
"rest": {
"libraryClient": "MetricsV1Beta3Client",
"rpcs": {
"GetJobExecutionDetails": {
"methods": [
"get_job_execution_details"
]
},
"GetJobMetrics": {
"methods": [
"get_job_metrics"
]
},
"GetStageExecutionDetails": {
"methods": [
"get_stage_execution_details"
]
}
}
}
}
},
Expand Down Expand Up @@ -222,6 +302,26 @@
]
}
}
},
"rest": {
"libraryClient": "SnapshotsV1Beta3Client",
"rpcs": {
"DeleteSnapshot": {
"methods": [
"delete_snapshot"
]
},
"GetSnapshot": {
"methods": [
"get_snapshot"
]
},
"ListSnapshots": {
"methods": [
"list_snapshots"
]
}
}
}
}
},
Expand Down Expand Up @@ -266,6 +366,26 @@
]
}
}
},
"rest": {
"libraryClient": "TemplatesServiceClient",
"rpcs": {
"CreateJobFromTemplate": {
"methods": [
"create_job_from_template"
]
},
"GetTemplate": {
"methods": [
"get_template"
]
},
"LaunchTemplate": {
"methods": [
"launch_template"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, FlexTemplatesServiceTransport
from .transports.grpc import FlexTemplatesServiceGrpcTransport
from .transports.grpc_asyncio import FlexTemplatesServiceGrpcAsyncIOTransport
from .transports.rest import FlexTemplatesServiceRestTransport


class FlexTemplatesServiceClientMeta(type):
Expand All @@ -54,6 +55,7 @@ class FlexTemplatesServiceClientMeta(type):
) # type: Dict[str, Type[FlexTemplatesServiceTransport]]
_transport_registry["grpc"] = FlexTemplatesServiceGrpcTransport
_transport_registry["grpc_asyncio"] = FlexTemplatesServiceGrpcAsyncIOTransport
_transport_registry["rest"] = FlexTemplatesServiceRestTransport

def get_transport_class(
cls,
Expand Down Expand Up @@ -327,6 +329,9 @@ def __init__(
transport (Union[str, FlexTemplatesServiceTransport]): The
transport to use. If set to None, a transport is chosen
automatically.
NOTE: "rest" transport functionality is currently in a
beta state (preview). We welcome your feedback via an
issue in this library's source repository.
client_options (google.api_core.client_options.ClientOptions): Custom options for the
client. It won't take effect if a ``transport`` instance is provided.
(1) The ``api_endpoint`` property can be used to override the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,20 @@
from .base import FlexTemplatesServiceTransport
from .grpc import FlexTemplatesServiceGrpcTransport
from .grpc_asyncio import FlexTemplatesServiceGrpcAsyncIOTransport
from .rest import FlexTemplatesServiceRestInterceptor, FlexTemplatesServiceRestTransport

# Compile a registry of transports.
_transport_registry = (
OrderedDict()
) # type: Dict[str, Type[FlexTemplatesServiceTransport]]
_transport_registry["grpc"] = FlexTemplatesServiceGrpcTransport
_transport_registry["grpc_asyncio"] = FlexTemplatesServiceGrpcAsyncIOTransport
_transport_registry["rest"] = FlexTemplatesServiceRestTransport

__all__ = (
"FlexTemplatesServiceTransport",
"FlexTemplatesServiceGrpcTransport",
"FlexTemplatesServiceGrpcAsyncIOTransport",
"FlexTemplatesServiceRestTransport",
"FlexTemplatesServiceRestInterceptor",
)
Loading

0 comments on commit 38af28c

Please sign in to comment.