Skip to content

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 (#237)

* 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

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 9, 2023
1 parent b88e4f7 commit 96314b4
Show file tree
Hide file tree
Showing 9 changed files with 5,780 additions and 163 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,61 @@
]
}
}
},
"rest": {
"libraryClient": "CloudBillingClient",
"rpcs": {
"CreateBillingAccount": {
"methods": [
"create_billing_account"
]
},
"GetBillingAccount": {
"methods": [
"get_billing_account"
]
},
"GetIamPolicy": {
"methods": [
"get_iam_policy"
]
},
"GetProjectBillingInfo": {
"methods": [
"get_project_billing_info"
]
},
"ListBillingAccounts": {
"methods": [
"list_billing_accounts"
]
},
"ListProjectBillingInfo": {
"methods": [
"list_project_billing_info"
]
},
"SetIamPolicy": {
"methods": [
"set_iam_policy"
]
},
"TestIamPermissions": {
"methods": [
"test_iam_permissions"
]
},
"UpdateBillingAccount": {
"methods": [
"update_billing_account"
]
},
"UpdateProjectBillingInfo": {
"methods": [
"update_project_billing_info"
]
}
}
}
}
},
Expand Down Expand Up @@ -150,6 +205,21 @@
]
}
}
},
"rest": {
"libraryClient": "CloudCatalogClient",
"rpcs": {
"ListServices": {
"methods": [
"list_services"
]
},
"ListSkus": {
"methods": [
"list_skus"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, CloudBillingTransport
from .transports.grpc import CloudBillingGrpcTransport
from .transports.grpc_asyncio import CloudBillingGrpcAsyncIOTransport
from .transports.rest import CloudBillingRestTransport


class CloudBillingClientMeta(type):
Expand All @@ -68,6 +69,7 @@ class CloudBillingClientMeta(type):
_transport_registry = OrderedDict() # type: Dict[str, Type[CloudBillingTransport]]
_transport_registry["grpc"] = CloudBillingGrpcTransport
_transport_registry["grpc_asyncio"] = CloudBillingGrpcAsyncIOTransport
_transport_registry["rest"] = CloudBillingRestTransport

def get_transport_class(
cls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@
from .base import CloudBillingTransport
from .grpc import CloudBillingGrpcTransport
from .grpc_asyncio import CloudBillingGrpcAsyncIOTransport
from .rest import CloudBillingRestInterceptor, CloudBillingRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[CloudBillingTransport]]
_transport_registry["grpc"] = CloudBillingGrpcTransport
_transport_registry["grpc_asyncio"] = CloudBillingGrpcAsyncIOTransport
_transport_registry["rest"] = CloudBillingRestTransport

__all__ = (
"CloudBillingTransport",
"CloudBillingGrpcTransport",
"CloudBillingGrpcAsyncIOTransport",
"CloudBillingRestTransport",
"CloudBillingRestInterceptor",
)
Loading

0 comments on commit 96314b4

Please sign in to comment.