Skip to content

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

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

Merged
merged 5 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions google/cloud/errorreporting_v1beta1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@
]
}
}
},
"rest": {
"libraryClient": "ErrorGroupServiceClient",
"rpcs": {
"GetGroup": {
"methods": [
"get_group"
]
},
"UpdateGroup": {
"methods": [
"update_group"
]
}
}
}
}
},
Expand Down Expand Up @@ -80,6 +95,26 @@
]
}
}
},
"rest": {
"libraryClient": "ErrorStatsServiceClient",
"rpcs": {
"DeleteEvents": {
"methods": [
"delete_events"
]
},
"ListEvents": {
"methods": [
"list_events"
]
},
"ListGroupStats": {
"methods": [
"list_group_stats"
]
}
}
}
}
},
Expand All @@ -104,6 +139,16 @@
]
}
}
},
"rest": {
"libraryClient": "ReportErrorsServiceClient",
"rpcs": {
"ReportErrorEvent": {
"methods": [
"report_error_event"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
from .transports.base import ErrorGroupServiceTransport, DEFAULT_CLIENT_INFO
from .transports.grpc import ErrorGroupServiceGrpcTransport
from .transports.grpc_asyncio import ErrorGroupServiceGrpcAsyncIOTransport
from .transports.rest import ErrorGroupServiceRestTransport


class ErrorGroupServiceClientMeta(type):
Expand All @@ -66,6 +67,7 @@ class ErrorGroupServiceClientMeta(type):
) # type: Dict[str, Type[ErrorGroupServiceTransport]]
_transport_registry["grpc"] = ErrorGroupServiceGrpcTransport
_transport_registry["grpc_asyncio"] = ErrorGroupServiceGrpcAsyncIOTransport
_transport_registry["rest"] = ErrorGroupServiceRestTransport

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 ErrorGroupServiceTransport
from .grpc import ErrorGroupServiceGrpcTransport
from .grpc_asyncio import ErrorGroupServiceGrpcAsyncIOTransport
from .rest import ErrorGroupServiceRestTransport
from .rest import ErrorGroupServiceRestInterceptor


# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[ErrorGroupServiceTransport]]
_transport_registry["grpc"] = ErrorGroupServiceGrpcTransport
_transport_registry["grpc_asyncio"] = ErrorGroupServiceGrpcAsyncIOTransport
_transport_registry["rest"] = ErrorGroupServiceRestTransport

__all__ = (
"ErrorGroupServiceTransport",
"ErrorGroupServiceGrpcTransport",
"ErrorGroupServiceGrpcAsyncIOTransport",
"ErrorGroupServiceRestTransport",
"ErrorGroupServiceRestInterceptor",
)
Loading