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

* 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 fb5957e commit 617af1c
Show file tree
Hide file tree
Showing 22 changed files with 8,853 additions and 248 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,46 @@
]
}
}
},
"rest": {
"libraryClient": "BinauthzManagementServiceV1Client",
"rpcs": {
"CreateAttestor": {
"methods": [
"create_attestor"
]
},
"DeleteAttestor": {
"methods": [
"delete_attestor"
]
},
"GetAttestor": {
"methods": [
"get_attestor"
]
},
"GetPolicy": {
"methods": [
"get_policy"
]
},
"ListAttestors": {
"methods": [
"list_attestors"
]
},
"UpdateAttestor": {
"methods": [
"update_attestor"
]
},
"UpdatePolicy": {
"methods": [
"update_policy"
]
}
}
}
}
},
Expand All @@ -110,6 +150,16 @@
]
}
}
},
"rest": {
"libraryClient": "SystemPolicyV1Client",
"rpcs": {
"GetSystemPolicy": {
"methods": [
"get_system_policy"
]
}
}
}
}
},
Expand All @@ -134,6 +184,16 @@
]
}
}
},
"rest": {
"libraryClient": "ValidationHelperV1Client",
"rpcs": {
"ValidateAttestationOccurrence": {
"methods": [
"validate_attestation_occurrence"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, BinauthzManagementServiceV1Transport
from .transports.grpc import BinauthzManagementServiceV1GrpcTransport
from .transports.grpc_asyncio import BinauthzManagementServiceV1GrpcAsyncIOTransport
from .transports.rest import BinauthzManagementServiceV1RestTransport


class BinauthzManagementServiceV1ClientMeta(type):
Expand All @@ -73,6 +74,7 @@ class BinauthzManagementServiceV1ClientMeta(type):
_transport_registry[
"grpc_asyncio"
] = BinauthzManagementServiceV1GrpcAsyncIOTransport
_transport_registry["rest"] = BinauthzManagementServiceV1RestTransport

def get_transport_class(
cls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,23 @@
from .base import BinauthzManagementServiceV1Transport
from .grpc import BinauthzManagementServiceV1GrpcTransport
from .grpc_asyncio import BinauthzManagementServiceV1GrpcAsyncIOTransport
from .rest import (
BinauthzManagementServiceV1RestInterceptor,
BinauthzManagementServiceV1RestTransport,
)

# Compile a registry of transports.
_transport_registry = (
OrderedDict()
) # type: Dict[str, Type[BinauthzManagementServiceV1Transport]]
_transport_registry["grpc"] = BinauthzManagementServiceV1GrpcTransport
_transport_registry["grpc_asyncio"] = BinauthzManagementServiceV1GrpcAsyncIOTransport
_transport_registry["rest"] = BinauthzManagementServiceV1RestTransport

__all__ = (
"BinauthzManagementServiceV1Transport",
"BinauthzManagementServiceV1GrpcTransport",
"BinauthzManagementServiceV1GrpcAsyncIOTransport",
"BinauthzManagementServiceV1RestTransport",
"BinauthzManagementServiceV1RestInterceptor",
)
Loading

0 comments on commit 617af1c

Please sign in to comment.