Skip to content

Commit 96314b4

Browse files
feat: enable "rest" transport in Python for services supporting numeric 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>
1 parent b88e4f7 commit 96314b4

9 files changed

Lines changed: 5780 additions & 163 deletions

File tree

packages/google-cloud-billing/google/cloud/billing_v1/gapic_metadata.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,61 @@
116116
]
117117
}
118118
}
119+
},
120+
"rest": {
121+
"libraryClient": "CloudBillingClient",
122+
"rpcs": {
123+
"CreateBillingAccount": {
124+
"methods": [
125+
"create_billing_account"
126+
]
127+
},
128+
"GetBillingAccount": {
129+
"methods": [
130+
"get_billing_account"
131+
]
132+
},
133+
"GetIamPolicy": {
134+
"methods": [
135+
"get_iam_policy"
136+
]
137+
},
138+
"GetProjectBillingInfo": {
139+
"methods": [
140+
"get_project_billing_info"
141+
]
142+
},
143+
"ListBillingAccounts": {
144+
"methods": [
145+
"list_billing_accounts"
146+
]
147+
},
148+
"ListProjectBillingInfo": {
149+
"methods": [
150+
"list_project_billing_info"
151+
]
152+
},
153+
"SetIamPolicy": {
154+
"methods": [
155+
"set_iam_policy"
156+
]
157+
},
158+
"TestIamPermissions": {
159+
"methods": [
160+
"test_iam_permissions"
161+
]
162+
},
163+
"UpdateBillingAccount": {
164+
"methods": [
165+
"update_billing_account"
166+
]
167+
},
168+
"UpdateProjectBillingInfo": {
169+
"methods": [
170+
"update_project_billing_info"
171+
]
172+
}
173+
}
119174
}
120175
}
121176
},
@@ -150,6 +205,21 @@
150205
]
151206
}
152207
}
208+
},
209+
"rest": {
210+
"libraryClient": "CloudCatalogClient",
211+
"rpcs": {
212+
"ListServices": {
213+
"methods": [
214+
"list_services"
215+
]
216+
},
217+
"ListSkus": {
218+
"methods": [
219+
"list_skus"
220+
]
221+
}
222+
}
153223
}
154224
}
155225
}

packages/google-cloud-billing/google/cloud/billing_v1/services/cloud_billing/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
from .transports.base import DEFAULT_CLIENT_INFO, CloudBillingTransport
5656
from .transports.grpc import CloudBillingGrpcTransport
5757
from .transports.grpc_asyncio import CloudBillingGrpcAsyncIOTransport
58+
from .transports.rest import CloudBillingRestTransport
5859

5960

6061
class CloudBillingClientMeta(type):
@@ -68,6 +69,7 @@ class CloudBillingClientMeta(type):
6869
_transport_registry = OrderedDict() # type: Dict[str, Type[CloudBillingTransport]]
6970
_transport_registry["grpc"] = CloudBillingGrpcTransport
7071
_transport_registry["grpc_asyncio"] = CloudBillingGrpcAsyncIOTransport
72+
_transport_registry["rest"] = CloudBillingRestTransport
7173

7274
def get_transport_class(
7375
cls,

packages/google-cloud-billing/google/cloud/billing_v1/services/cloud_billing/transports/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@
1919
from .base import CloudBillingTransport
2020
from .grpc import CloudBillingGrpcTransport
2121
from .grpc_asyncio import CloudBillingGrpcAsyncIOTransport
22+
from .rest import CloudBillingRestInterceptor, CloudBillingRestTransport
2223

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

2830
__all__ = (
2931
"CloudBillingTransport",
3032
"CloudBillingGrpcTransport",
3133
"CloudBillingGrpcAsyncIOTransport",
34+
"CloudBillingRestTransport",
35+
"CloudBillingRestInterceptor",
3236
)

0 commit comments

Comments
 (0)