Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
feat: enable "rest" transport in Python for services supporting numer…
Browse files Browse the repository at this point in the history
…ic enums (#339)

* feat: enable "rest" transport in Python for services supporting numeric enums

PiperOrigin-RevId: 508143576

Source-Link: googleapis/googleapis@7a702a9

Source-Link: https://github.com/googleapis/googleapis-gen/commit/6ad1279c0e7aa787ac6b66c9fd4a210692edffcd
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmFkMTI3OWMwZTdhYTc4N2FjNmI2NmM5ZmQ0YTIxMDY5MmVkZmZjZCJ9

* 🦉 Updates from OwlBot post-processor

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

* feat: enable "rest" transport in Python for services supporting numeric enums

PiperOrigin-RevId: 508143576

Source-Link: googleapis/googleapis@7a702a9

Source-Link: https://github.com/googleapis/googleapis-gen/commit/6ad1279c0e7aa787ac6b66c9fd4a210692edffcd
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmFkMTI3OWMwZTdhYTc4N2FjNmI2NmM5ZmQ0YTIxMDY5MmVkZmZjZCJ9

* 🦉 Updates from OwlBot post-processor

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

* update samples and system test to use REST

* 🦉 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 Feb 16, 2023
1 parent c2ed049 commit 50de8ca
Show file tree
Hide file tree
Showing 13 changed files with 9,315 additions and 122 deletions.
110 changes: 110 additions & 0 deletions google/cloud/bigquery_reservation_v1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,116 @@
]
}
}
},
"rest": {
"libraryClient": "ReservationServiceClient",
"rpcs": {
"CreateAssignment": {
"methods": [
"create_assignment"
]
},
"CreateCapacityCommitment": {
"methods": [
"create_capacity_commitment"
]
},
"CreateReservation": {
"methods": [
"create_reservation"
]
},
"DeleteAssignment": {
"methods": [
"delete_assignment"
]
},
"DeleteCapacityCommitment": {
"methods": [
"delete_capacity_commitment"
]
},
"DeleteReservation": {
"methods": [
"delete_reservation"
]
},
"GetBiReservation": {
"methods": [
"get_bi_reservation"
]
},
"GetCapacityCommitment": {
"methods": [
"get_capacity_commitment"
]
},
"GetReservation": {
"methods": [
"get_reservation"
]
},
"ListAssignments": {
"methods": [
"list_assignments"
]
},
"ListCapacityCommitments": {
"methods": [
"list_capacity_commitments"
]
},
"ListReservations": {
"methods": [
"list_reservations"
]
},
"MergeCapacityCommitments": {
"methods": [
"merge_capacity_commitments"
]
},
"MoveAssignment": {
"methods": [
"move_assignment"
]
},
"SearchAllAssignments": {
"methods": [
"search_all_assignments"
]
},
"SearchAssignments": {
"methods": [
"search_assignments"
]
},
"SplitCapacityCommitment": {
"methods": [
"split_capacity_commitment"
]
},
"UpdateAssignment": {
"methods": [
"update_assignment"
]
},
"UpdateBiReservation": {
"methods": [
"update_bi_reservation"
]
},
"UpdateCapacityCommitment": {
"methods": [
"update_capacity_commitment"
]
},
"UpdateReservation": {
"methods": [
"update_reservation"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, ReservationServiceTransport
from .transports.grpc import ReservationServiceGrpcTransport
from .transports.grpc_asyncio import ReservationServiceGrpcAsyncIOTransport
from .transports.rest import ReservationServiceRestTransport


class ReservationServiceClientMeta(type):
Expand All @@ -73,6 +74,7 @@ class ReservationServiceClientMeta(type):
) # type: Dict[str, Type[ReservationServiceTransport]]
_transport_registry["grpc"] = ReservationServiceGrpcTransport
_transport_registry["grpc_asyncio"] = ReservationServiceGrpcAsyncIOTransport
_transport_registry["rest"] = ReservationServiceRestTransport

def get_transport_class(
cls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,20 @@
from .base import ReservationServiceTransport
from .grpc import ReservationServiceGrpcTransport
from .grpc_asyncio import ReservationServiceGrpcAsyncIOTransport
from .rest import ReservationServiceRestInterceptor, ReservationServiceRestTransport

# Compile a registry of transports.
_transport_registry = (
OrderedDict()
) # type: Dict[str, Type[ReservationServiceTransport]]
_transport_registry["grpc"] = ReservationServiceGrpcTransport
_transport_registry["grpc_asyncio"] = ReservationServiceGrpcAsyncIOTransport
_transport_registry["rest"] = ReservationServiceRestTransport

__all__ = (
"ReservationServiceTransport",
"ReservationServiceGrpcTransport",
"ReservationServiceGrpcAsyncIOTransport",
"ReservationServiceRestTransport",
"ReservationServiceRestInterceptor",
)
Loading

0 comments on commit 50de8ca

Please sign in to comment.