Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from
Feb 28, 2023
100 changes: 100 additions & 0 deletions google/cloud/spanner_admin_database_v1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,106 @@
]
}
}
},
"rest": {
"libraryClient": "DatabaseAdminClient",
"rpcs": {
"CopyBackup": {
"methods": [
"copy_backup"
]
},
"CreateBackup": {
"methods": [
"create_backup"
]
},
"CreateDatabase": {
"methods": [
"create_database"
]
},
"DeleteBackup": {
"methods": [
"delete_backup"
]
},
"DropDatabase": {
"methods": [
"drop_database"
]
},
"GetBackup": {
"methods": [
"get_backup"
]
},
"GetDatabase": {
"methods": [
"get_database"
]
},
"GetDatabaseDdl": {
"methods": [
"get_database_ddl"
]
},
"GetIamPolicy": {
"methods": [
"get_iam_policy"
]
},
"ListBackupOperations": {
"methods": [
"list_backup_operations"
]
},
"ListBackups": {
"methods": [
"list_backups"
]
},
"ListDatabaseOperations": {
"methods": [
"list_database_operations"
]
},
"ListDatabaseRoles": {
"methods": [
"list_database_roles"
]
},
"ListDatabases": {
"methods": [
"list_databases"
]
},
"RestoreDatabase": {
"methods": [
"restore_database"
]
},
"SetIamPolicy": {
"methods": [
"set_iam_policy"
]
},
"TestIamPermissions": {
"methods": [
"test_iam_permissions"
]
},
"UpdateBackup": {
"methods": [
"update_backup"
]
},
"UpdateDatabaseDdl": {
"methods": [
"update_database_ddl"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
from .transports.base import DatabaseAdminTransport, DEFAULT_CLIENT_INFO
from .transports.grpc import DatabaseAdminGrpcTransport
from .transports.grpc_asyncio import DatabaseAdminGrpcAsyncIOTransport
from .transports.rest import DatabaseAdminRestTransport


class DatabaseAdminClientMeta(type):
Expand All @@ -76,6 +77,7 @@ class DatabaseAdminClientMeta(type):
_transport_registry = OrderedDict() # type: Dict[str, Type[DatabaseAdminTransport]]
_transport_registry["grpc"] = DatabaseAdminGrpcTransport
_transport_registry["grpc_asyncio"] = DatabaseAdminGrpcAsyncIOTransport
_transport_registry["rest"] = DatabaseAdminRestTransport

def get_transport_class(
cls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,20 @@
from .base import DatabaseAdminTransport
from .grpc import DatabaseAdminGrpcTransport
from .grpc_asyncio import DatabaseAdminGrpcAsyncIOTransport
from .rest import DatabaseAdminRestTransport
from .rest import DatabaseAdminRestInterceptor


# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[DatabaseAdminTransport]]
_transport_registry["grpc"] = DatabaseAdminGrpcTransport
_transport_registry["grpc_asyncio"] = DatabaseAdminGrpcAsyncIOTransport
_transport_registry["rest"] = DatabaseAdminRestTransport

__all__ = (
"DatabaseAdminTransport",
"DatabaseAdminGrpcTransport",
"DatabaseAdminGrpcAsyncIOTransport",
"DatabaseAdminRestTransport",
"DatabaseAdminRestInterceptor",
)
Loading