From dd6d4ec906d8d1afca7ef8f1e85a983f6b56a1f7 Mon Sep 17 00:00:00 2001 From: Albert Callarisa Date: Fri, 16 Jan 2026 09:24:10 +0100 Subject: [PATCH 01/22] use 1.17.0.dev (#885) Signed-off-by: Albert Callarisa --- dapr/version/version.py | 2 +- examples/demo_actor/demo_actor/requirements.txt | 2 +- examples/demo_workflow/demo_workflow/requirements.txt | 2 +- examples/invoke-simple/requirements.txt | 4 ++-- examples/w3c-tracing/requirements.txt | 4 ++-- examples/workflow/requirements.txt | 4 ++-- ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py | 2 +- ext/dapr-ext-fastapi/setup.cfg | 2 +- ext/dapr-ext-grpc/dapr/ext/grpc/version.py | 2 +- ext/dapr-ext-grpc/setup.cfg | 4 ++-- ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py | 2 +- ext/dapr-ext-strands/dapr/ext/strands/version.py | 2 +- ext/dapr-ext-strands/setup.cfg | 4 ++-- ext/dapr-ext-workflow/dapr/ext/workflow/version.py | 2 +- ext/dapr-ext-workflow/setup.cfg | 2 +- ext/flask_dapr/flask_dapr/version.py | 2 +- ext/flask_dapr/setup.cfg | 2 +- 17 files changed, 22 insertions(+), 22 deletions(-) diff --git a/dapr/version/version.py b/dapr/version/version.py index c8ee50c56..cd6ba3565 100644 --- a/dapr/version/version.py +++ b/dapr/version/version.py @@ -13,4 +13,4 @@ limitations under the License. """ -__version__ = '1.16.0.dev' +__version__ = '1.17.0.dev' diff --git a/examples/demo_actor/demo_actor/requirements.txt b/examples/demo_actor/demo_actor/requirements.txt index c4ec19d73..3ec219df2 100644 --- a/examples/demo_actor/demo_actor/requirements.txt +++ b/examples/demo_actor/demo_actor/requirements.txt @@ -1 +1 @@ -dapr-ext-fastapi>=1.16.0.dev +dapr-ext-fastapi>=1.17.0.dev diff --git a/examples/demo_workflow/demo_workflow/requirements.txt b/examples/demo_workflow/demo_workflow/requirements.txt index 1e5f89620..cfb28adca 100644 --- a/examples/demo_workflow/demo_workflow/requirements.txt +++ b/examples/demo_workflow/demo_workflow/requirements.txt @@ -1 +1 @@ -dapr-ext-workflow>=1.16.0.dev +dapr-ext-workflow>=1.17.0.dev diff --git a/examples/invoke-simple/requirements.txt b/examples/invoke-simple/requirements.txt index 056db33d1..299df8fd7 100644 --- a/examples/invoke-simple/requirements.txt +++ b/examples/invoke-simple/requirements.txt @@ -1,2 +1,2 @@ -dapr-ext-grpc >= 1.16.0.dev -dapr >= 1.16.0.dev +dapr-ext-grpc >= 1.17.0.dev +dapr >= 1.17.0.dev diff --git a/examples/w3c-tracing/requirements.txt b/examples/w3c-tracing/requirements.txt index 8b1f04b01..32683b57c 100644 --- a/examples/w3c-tracing/requirements.txt +++ b/examples/w3c-tracing/requirements.txt @@ -1,5 +1,5 @@ -dapr-ext-grpc >= 1.16.0.dev -dapr >= 1.16.0.dev +dapr-ext-grpc >= 1.17.0.dev +dapr >= 1.17.0.dev opentelemetry-sdk opentelemetry-instrumentation-grpc opentelemetry-exporter-zipkin diff --git a/examples/workflow/requirements.txt b/examples/workflow/requirements.txt index c5af70b9d..faabd0063 100644 --- a/examples/workflow/requirements.txt +++ b/examples/workflow/requirements.txt @@ -1,2 +1,2 @@ -dapr-ext-workflow>=1.16.0.dev -dapr>=1.16.0.dev +dapr-ext-workflow>=1.17.0.dev +dapr>=1.17.0.dev diff --git a/ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py b/ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py index c8ee50c56..cd6ba3565 100644 --- a/ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py +++ b/ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py @@ -13,4 +13,4 @@ limitations under the License. """ -__version__ = '1.16.0.dev' +__version__ = '1.17.0.dev' diff --git a/ext/dapr-ext-fastapi/setup.cfg b/ext/dapr-ext-fastapi/setup.cfg index 8b37613fb..c182b2bc8 100644 --- a/ext/dapr-ext-fastapi/setup.cfg +++ b/ext/dapr-ext-fastapi/setup.cfg @@ -24,7 +24,7 @@ python_requires = >=3.9 packages = find_namespace: include_package_data = True install_requires = - dapr >= 1.16.0.dev + dapr >= 1.17.0.dev uvicorn >= 0.11.6 fastapi >= 0.60.1 diff --git a/ext/dapr-ext-grpc/dapr/ext/grpc/version.py b/ext/dapr-ext-grpc/dapr/ext/grpc/version.py index c8ee50c56..cd6ba3565 100644 --- a/ext/dapr-ext-grpc/dapr/ext/grpc/version.py +++ b/ext/dapr-ext-grpc/dapr/ext/grpc/version.py @@ -13,4 +13,4 @@ limitations under the License. """ -__version__ = '1.16.0.dev' +__version__ = '1.17.0.dev' diff --git a/ext/dapr-ext-grpc/setup.cfg b/ext/dapr-ext-grpc/setup.cfg index 7d4d2e898..4225c1abb 100644 --- a/ext/dapr-ext-grpc/setup.cfg +++ b/ext/dapr-ext-grpc/setup.cfg @@ -24,7 +24,7 @@ python_requires = >=3.9 packages = find_namespace: include_package_data = True install_requires = - dapr >= 1.16.0.dev + dapr >= 1.17.0.dev cloudevents >= 1.0.0 [options.packages.find] @@ -36,4 +36,4 @@ exclude = [options.package_data] dapr.ext.grpc = - py.typed \ No newline at end of file + py.typed diff --git a/ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py b/ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py index dae1485d2..b81f0d988 100644 --- a/ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py +++ b/ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py @@ -13,4 +13,4 @@ limitations under the License. """ -__version__ = '1.16.0.dev' +__version__ = '1.17.0.dev' diff --git a/ext/dapr-ext-strands/dapr/ext/strands/version.py b/ext/dapr-ext-strands/dapr/ext/strands/version.py index dae1485d2..b81f0d988 100644 --- a/ext/dapr-ext-strands/dapr/ext/strands/version.py +++ b/ext/dapr-ext-strands/dapr/ext/strands/version.py @@ -13,4 +13,4 @@ limitations under the License. """ -__version__ = '1.16.0.dev' +__version__ = '1.17.0.dev' diff --git a/ext/dapr-ext-strands/setup.cfg b/ext/dapr-ext-strands/setup.cfg index 3149e8d2d..5ccd58357 100644 --- a/ext/dapr-ext-strands/setup.cfg +++ b/ext/dapr-ext-strands/setup.cfg @@ -24,7 +24,7 @@ python_requires = >=3.10 packages = find_namespace: include_package_data = True install_requires = - dapr >= 1.16.1rc1 + dapr >= 1.17.0.dev strands-agents strands-agents-tools python-ulid >= 3.0.0 @@ -39,4 +39,4 @@ exclude = [options.package_data] dapr.ext.strands = - py.typed \ No newline at end of file + py.typed diff --git a/ext/dapr-ext-workflow/dapr/ext/workflow/version.py b/ext/dapr-ext-workflow/dapr/ext/workflow/version.py index c8ee50c56..cd6ba3565 100644 --- a/ext/dapr-ext-workflow/dapr/ext/workflow/version.py +++ b/ext/dapr-ext-workflow/dapr/ext/workflow/version.py @@ -13,4 +13,4 @@ limitations under the License. """ -__version__ = '1.16.0.dev' +__version__ = '1.17.0.dev' diff --git a/ext/dapr-ext-workflow/setup.cfg b/ext/dapr-ext-workflow/setup.cfg index a621308fc..c01fa43b9 100644 --- a/ext/dapr-ext-workflow/setup.cfg +++ b/ext/dapr-ext-workflow/setup.cfg @@ -24,7 +24,7 @@ python_requires = >=3.9 packages = find_namespace: include_package_data = True install_requires = - dapr >= 1.16.0.dev + dapr >= 1.17.0.dev durabletask-dapr >= 0.2.0a12 [options.packages.find] diff --git a/ext/flask_dapr/flask_dapr/version.py b/ext/flask_dapr/flask_dapr/version.py index c8ee50c56..cd6ba3565 100644 --- a/ext/flask_dapr/flask_dapr/version.py +++ b/ext/flask_dapr/flask_dapr/version.py @@ -13,4 +13,4 @@ limitations under the License. """ -__version__ = '1.16.0.dev' +__version__ = '1.17.0.dev' diff --git a/ext/flask_dapr/setup.cfg b/ext/flask_dapr/setup.cfg index 826136c54..c19bf5b5c 100644 --- a/ext/flask_dapr/setup.cfg +++ b/ext/flask_dapr/setup.cfg @@ -26,7 +26,7 @@ include_package_data = true zip_safe = false install_requires = Flask >= 1.1 - dapr >= 1.16.0.dev + dapr >= 1.17.0.dev [options.package_data] flask_dapr = From 9f89746c10a0f846d93b788f40714bdc7d5b5bcd Mon Sep 17 00:00:00 2001 From: Albert Callarisa Date: Fri, 16 Jan 2026 09:42:54 +0100 Subject: [PATCH 02/22] Trigger ci for new ext tags (#886) Signed-off-by: Albert Callarisa --- .github/workflows/build-tag.yaml | 2 ++ .github/workflows/fossa.yaml | 2 ++ .github/workflows/validate_examples.yaml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/build-tag.yaml b/.github/workflows/build-tag.yaml index 42e95268c..aabcbca23 100644 --- a/.github/workflows/build-tag.yaml +++ b/.github/workflows/build-tag.yaml @@ -8,6 +8,8 @@ on: - grpc-v* - flask-v* - fastapi-v* + - langgraph-v* + - strands-v* workflow_dispatch: jobs: diff --git a/.github/workflows/fossa.yaml b/.github/workflows/fossa.yaml index 18b45526c..fda00b65c 100644 --- a/.github/workflows/fossa.yaml +++ b/.github/workflows/fossa.yaml @@ -26,6 +26,8 @@ on: - grpc-v* - flask-v* - fastapi-v* + - langgraph-v* + - strands-v* pull_request: branches: - main diff --git a/.github/workflows/validate_examples.yaml b/.github/workflows/validate_examples.yaml index c89147dc3..cece4ea5a 100644 --- a/.github/workflows/validate_examples.yaml +++ b/.github/workflows/validate_examples.yaml @@ -11,6 +11,8 @@ on: - grpc-v* - fastapi-v* - flask-v* + - langgraph-v* + - strands-v* pull_request: branches: - main From 92f20f538b7d73878cc613390bf30c26073614d8 Mon Sep 17 00:00:00 2001 From: Casper Nielsen Date: Fri, 16 Jan 2026 12:29:01 +0100 Subject: [PATCH 03/22] fix(bug): workflow client missing close function to pass to durable task (#889) * chore(deps): bump dapr dep to 1.17.0.dev Signed-off-by: Casper Nielsen * chore(deps): bump durabletask-dapr to 0.2.0a15 Signed-off-by: Casper Nielsen * feat: ensure taskhubgrpcclient expose .close() method for clients to pass down a close call to durabletask Signed-off-by: Casper Nielsen --------- Signed-off-by: Casper Nielsen --- dev-requirements.txt | 2 +- ext/dapr-ext-langgraph/setup.cfg | 2 +- .../dapr/ext/workflow/dapr_workflow_client.py | 4 ++++ ext/dapr-ext-workflow/setup.cfg | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 828ef8aa4..59bd44c84 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -14,7 +14,7 @@ Flask>=1.1 # needed for auto fix ruff===0.14.1 # needed for dapr-ext-workflow -durabletask-dapr >= 0.2.0a9 +durabletask-dapr >= 0.2.0a15 # needed for .env file loading in examples python-dotenv>=1.0.0 # needed for enhanced schema generation from function features diff --git a/ext/dapr-ext-langgraph/setup.cfg b/ext/dapr-ext-langgraph/setup.cfg index f08a79548..5a252a797 100644 --- a/ext/dapr-ext-langgraph/setup.cfg +++ b/ext/dapr-ext-langgraph/setup.cfg @@ -24,7 +24,7 @@ python_requires = >=3.10 packages = find_namespace: include_package_data = True install_requires = - dapr >= 1.16.1rc1 + dapr >= 1.17.0.dev langgraph >= 0.3.6 langchain >= 0.1.17 python-ulid >= 3.0.0 diff --git a/ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py b/ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py index 461bfd43a..36a731c47 100644 --- a/ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py +++ b/ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py @@ -277,3 +277,7 @@ def purge_workflow(self, instance_id: str, recursive: bool = True): recursive: The optional flag to also purge data from all child workflows. """ return self.__obj.purge_orchestration(instance_id, recursive) + + def close(self): + """Closes the gRPC connection used by the client.""" + return self.__obj.close() diff --git a/ext/dapr-ext-workflow/setup.cfg b/ext/dapr-ext-workflow/setup.cfg index c01fa43b9..2f938bfb4 100644 --- a/ext/dapr-ext-workflow/setup.cfg +++ b/ext/dapr-ext-workflow/setup.cfg @@ -25,7 +25,7 @@ packages = find_namespace: include_package_data = True install_requires = dapr >= 1.17.0.dev - durabletask-dapr >= 0.2.0a12 + durabletask-dapr >= 0.2.0a15 [options.packages.find] include = From de3eef69c846443d7c3b321596cf1461c8b4a2fa Mon Sep 17 00:00:00 2001 From: Josh van Leeuwen Date: Mon, 19 Jan 2026 12:04:15 +0000 Subject: [PATCH 04/22] Workflow: remove sleeps from example (#894) * Workflow: remove sleeps from example Remove arbitrary sleeps from workflow examples Signed-off-by: joshvanl * tox -e ruff Signed-off-by: joshvanl --------- Signed-off-by: joshvanl --- examples/workflow/child_workflow.py | 5 +---- examples/workflow/cross-app1.py | 5 +---- examples/workflow/cross-app2.py | 2 +- examples/workflow/cross-app3.py | 2 +- examples/workflow/fan_out_fan_in.py | 1 - 5 files changed, 4 insertions(+), 11 deletions(-) diff --git a/examples/workflow/child_workflow.py b/examples/workflow/child_workflow.py index 57ab2fc3e..20b675ea0 100644 --- a/examples/workflow/child_workflow.py +++ b/examples/workflow/child_workflow.py @@ -10,7 +10,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import time import dapr.ext.workflow as wf @@ -40,12 +39,10 @@ def child_workflow(ctx: wf.DaprWorkflowContext): if __name__ == '__main__': wfr.start() - time.sleep(10) # wait for workflow runtime to start wf_client = wf.DaprWorkflowClient() instance_id = wf_client.schedule_new_workflow(workflow=main_workflow) - # Wait for the workflow to complete - time.sleep(5) + wf_client.wait_for_workflow_completion(instance_id) wfr.shutdown() diff --git a/examples/workflow/cross-app1.py b/examples/workflow/cross-app1.py index 1ef7b48da..9b968def3 100644 --- a/examples/workflow/cross-app1.py +++ b/examples/workflow/cross-app1.py @@ -10,7 +10,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import time from datetime import timedelta import dapr.ext.workflow as wf @@ -46,13 +45,11 @@ def app1_workflow(ctx: wf.DaprWorkflowContext): if __name__ == '__main__': wfr.start() - time.sleep(10) # wait for workflow runtime to start wf_client = wf.DaprWorkflowClient() print('app1 - triggering app1 workflow', flush=True) instance_id = wf_client.schedule_new_workflow(workflow=app1_workflow) - # Wait for the workflow to complete - time.sleep(7) + wf_client.wait_for_workflow_completion(instance_id) wfr.shutdown() diff --git a/examples/workflow/cross-app2.py b/examples/workflow/cross-app2.py index 2af65912c..7e97b58c0 100644 --- a/examples/workflow/cross-app2.py +++ b/examples/workflow/cross-app2.py @@ -46,5 +46,5 @@ def app2_workflow(ctx: wf.DaprWorkflowContext): if __name__ == '__main__': wfr.start() - time.sleep(15) # wait for workflow runtime to start + time.sleep(15) # Keep the workflow runtime running for a while to process workflows wfr.shutdown() diff --git a/examples/workflow/cross-app3.py b/examples/workflow/cross-app3.py index 4bcc158a0..6b72de7e4 100644 --- a/examples/workflow/cross-app3.py +++ b/examples/workflow/cross-app3.py @@ -29,5 +29,5 @@ def app3_activity(ctx: wf.DaprWorkflowContext) -> int: if __name__ == '__main__': wfr.start() - time.sleep(15) # wait for workflow runtime to start + time.sleep(15) # Keep the workflow runtime alive for a while to process requests wfr.shutdown() diff --git a/examples/workflow/fan_out_fan_in.py b/examples/workflow/fan_out_fan_in.py index f625ea287..9cd1ff6cb 100644 --- a/examples/workflow/fan_out_fan_in.py +++ b/examples/workflow/fan_out_fan_in.py @@ -55,7 +55,6 @@ def process_results(ctx, final_result: int): if __name__ == '__main__': wfr.start() - time.sleep(10) # wait for workflow runtime to start wf_client = wf.DaprWorkflowClient() instance_id = wf_client.schedule_new_workflow(workflow=batch_processing_workflow, input=10) From 39d00365006ce0e27fed0480f3644b089168ea39 Mon Sep 17 00:00:00 2001 From: Albert Callarisa Date: Tue, 27 Jan 2026 17:50:54 +0100 Subject: [PATCH 05/22] Workflow versioning (#893) Signed-off-by: Albert Callarisa --- dev-requirements.txt | 2 +- examples/workflow/README.md | 47 +++ examples/workflow/versioning.py | 291 ++++++++++++++++++ .../ext/workflow/dapr_workflow_context.py | 4 + .../dapr/ext/workflow/workflow_runtime.py | 68 ++++ .../dapr/ext/workflow/workflow_state.py | 3 + ext/dapr-ext-workflow/setup.cfg | 2 +- 7 files changed, 415 insertions(+), 2 deletions(-) create mode 100644 examples/workflow/versioning.py diff --git a/dev-requirements.txt b/dev-requirements.txt index 59bd44c84..a0e45d61e 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -14,7 +14,7 @@ Flask>=1.1 # needed for auto fix ruff===0.14.1 # needed for dapr-ext-workflow -durabletask-dapr >= 0.2.0a15 +durabletask-dapr >= 0.2.0a16 # needed for .env file loading in examples python-dotenv>=1.0.0 # needed for enhanced schema generation from function features diff --git a/examples/workflow/README.md b/examples/workflow/README.md index ac70cfa84..68bb9d1ed 100644 --- a/examples/workflow/README.md +++ b/examples/workflow/README.md @@ -461,3 +461,50 @@ app1 - received workflow error from app2 ``` among others. This shows that the workflow calls are failing as expected, and they are being handled as expected too. + +### Versioning + +This example demonstrates how to version a workflow. +The test consists of two parts: +1. Uses most of the common features of the workflow versioning. It also leaves some workflows stalled to demonstrate the stalled workflow feature. +2. Fixes the stalled workflows to get them to completion. + +It had to be done in two parts because the runtime needs to be restarted in order to rerun stalled workflows. + + The Dapr CLI can be started using the following command: + + + +```sh +dapr run --app-id wf-versioning-example -- python3 versioning.py part1 +dapr run --app-id wf-versioning-example --log-level debug -- python3 versioning.py part2 +``` + diff --git a/examples/workflow/versioning.py b/examples/workflow/versioning.py new file mode 100644 index 000000000..5328538a7 --- /dev/null +++ b/examples/workflow/versioning.py @@ -0,0 +1,291 @@ +# -*- coding: utf-8 -*- +# Copyright 2026 The Dapr Authors +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import sys +import time + +import dapr.ext.workflow as wf + +current_test = 0 + + +def print_test(message): + print(f'test{current_test}: {message}', flush=True) + + +print_activity = None + +wfr = None + + +def new_wfr(): + global wfr + global print_activity + + if wfr is not None: + wfr.shutdown() + wfr = wf.WorkflowRuntime() + + def print_activity(ctx, input): + return print_test(input) + + wfr.register_activity(print_activity, name='print_activity') + + +new_wfr() + + +def test_full_versioning(client: wf.DaprWorkflowClient): + global current_test + + # Start with only one version defined. Runnig the workflow should run this version as it normally would. + current_test = 1 + + @wfr.versioned_workflow(name='workflow', is_latest=True) + def version1_workflow(ctx: wf.DaprWorkflowContext): + yield ctx.call_activity(print_activity, input='Received workflow call for version1') + yield ctx.wait_for_external_event(name='event') + yield ctx.call_activity(print_activity, input='Finished workflow for version1') + return 1 + + print_test('triggering workflow') + instance_id = client.schedule_new_workflow(workflow=version1_workflow) + client.raise_workflow_event(instance_id, event_name='event') + client.wait_for_workflow_completion(instance_id, timeout_in_seconds=30) + + # Now we start a workflow, but introduce a latest version half way. It should resume the execution in the old version. + current_test = 2 + print_test('triggering workflow') + instance_id = client.schedule_new_workflow(workflow=version1_workflow) + time.sleep(2) # wait for the workflow to start and wait for the event + + @wfr.versioned_workflow(name='workflow', is_latest=True) + def version2_workflow(ctx: wf.DaprWorkflowContext): + yield ctx.call_activity(print_activity, input='Received workflow call for version2') + yield ctx.wait_for_external_event(name='event') + yield ctx.call_activity(print_activity, input='Finished workflow for version2') + return 1 + + client.raise_workflow_event(instance_id, event_name='event') + client.wait_for_workflow_completion(instance_id, timeout_in_seconds=30) + + # Now we have the two versions defined, running the workflow now should run v2 as it's the latest version. + current_test = 3 + print_test('triggering workflow') + instance_id = client.schedule_new_workflow(workflow=version1_workflow) + client.raise_workflow_event(instance_id, event_name='event') + client.wait_for_workflow_completion(instance_id, timeout_in_seconds=30) + + +def test_patching(client: wf.DaprWorkflowClient): + global current_test + + @wfr.workflow + def patching_workflow(ctx: wf.DaprWorkflowContext): + # This function will be changed throughout the test, to simulate different scenarios + return workflow_code(ctx) + + # Runs the patched branch by default + current_test = 4 + + def workflow_code_v1_patch1_only(ctx: wf.DaprWorkflowContext): + yield ctx.call_activity(print_activity, input='start') + if ctx.is_patched('patch1'): + yield ctx.call_activity(print_activity, input='patch1 is patched') + else: + yield ctx.call_activity(print_activity, input='patch1 is not patched') + return 1 + + workflow_code = workflow_code_v1_patch1_only + instance_id = client.schedule_new_workflow(workflow=patching_workflow) + client.wait_for_workflow_completion(instance_id, timeout_in_seconds=30) + + # When the execution passed the place where a patch is introduced, it should be not patched. + def workflow_code_v2_patch2_after_event(ctx: wf.DaprWorkflowContext): + yield ctx.call_activity(print_activity, input='start') + yield ctx.wait_for_external_event(name='event') + if ctx.is_patched('patch2'): + yield ctx.call_activity(print_activity, input='patch2 is patched') + else: + yield ctx.call_activity(print_activity, input='patch2 is not patched') + return 1 + + workflow_code = workflow_code_v2_patch2_after_event + current_test = 5 + instance_id = client.schedule_new_workflow(workflow=patching_workflow) + time.sleep(2) + + def workflow_code_v3_patch1_and_patch2_with_event(ctx: wf.DaprWorkflowContext): + yield ctx.call_activity(print_activity, input='start') + if ctx.is_patched('patch1'): + yield ctx.call_activity(print_activity, input='patch1 is patched') + else: + yield ctx.call_activity(print_activity, input='patch1 is not patched') + yield ctx.wait_for_external_event(name='event') + if ctx.is_patched('patch2'): + yield ctx.call_activity(print_activity, input='patch2 is patched') + else: + yield ctx.call_activity(print_activity, input='patch2 is not patched') + return 1 + + workflow_code = workflow_code_v3_patch1_and_patch2_with_event + client.raise_workflow_event(instance_id, event_name='event') + client.wait_for_workflow_completion(instance_id, timeout_in_seconds=30) + + # It remembers previous patches. + def workflow_code_v4_silence_patch1(ctx: wf.DaprWorkflowContext): + yield ctx.call_activity(print_activity, input='start') + if ctx.is_patched('patch1'): + pass # keep it silenced for now, we'll add logs later and this ones would confuse the test + else: + pass + yield ctx.wait_for_external_event(name='event') + if ctx.is_patched('patch2'): + yield ctx.call_activity(print_activity, input='patch2 is patched') + else: + yield ctx.call_activity(print_activity, input='patch2 is not patched') + return 1 + + workflow_code = workflow_code_v4_silence_patch1 + current_test = 6 + instance_id = client.schedule_new_workflow(workflow=patching_workflow) + time.sleep(2) + + workflow_code = workflow_code_v3_patch1_and_patch2_with_event + client.raise_workflow_event(instance_id, event_name='event') + client.wait_for_workflow_completion(instance_id, timeout_in_seconds=30) + + +def test_full_versioning_stall(client: wf.DaprWorkflowClient): + global current_test + + new_wfr() + + @wfr.versioned_workflow(name='stall_workflow', is_latest=True) + def version1_workflow(ctx: wf.DaprWorkflowContext): + yield ctx.call_activity(print_activity, input='Received workflow call for version1') + yield ctx.wait_for_external_event(name='event') + yield ctx.call_activity(print_activity, input='Finished workflow for version1') + return 1 + + wfr.start() + current_test = 7 + instance_id = client.schedule_new_workflow(workflow=version1_workflow) + time.sleep(3) + new_wfr() + + @wfr.versioned_workflow(name='stall_workflow', is_latest=True) + def version2_workflow(ctx: wf.DaprWorkflowContext): + yield ctx.call_activity(print_activity, input='Received workflow call for version2') + yield ctx.wait_for_external_event(name='event') + yield ctx.call_activity(print_activity, input='Finished workflow for version2') + return 1 + + wfr.start() + client.raise_workflow_event(instance_id, event_name='event') + time.sleep(2) + md = client.get_workflow_state(instance_id) + if md.runtime_status == wf.WorkflowStatus.STALLED: + print_test('Workflow is stalled') + else: + print_test('Workflow is not stalled') + + +def test_patching_stall(client: wf.DaprWorkflowClient): + global current_test + + current_test = 8 + + @wfr.workflow + def patching_workflow(ctx: wf.DaprWorkflowContext): + # This function will be changed throughout the test, to simulate different scenarios + return workflow_code(ctx) + + def workflow_code_v1_with_patch1_check(ctx: wf.DaprWorkflowContext): + if ctx.is_patched('patch1'): + pass + else: + pass + yield ctx.wait_for_external_event(name='event') + return 1 + + workflow_code = workflow_code_v1_with_patch1_check + instance_id = client.schedule_new_workflow(workflow=patching_workflow) + time.sleep(2) + + def workflow_code_v2_without_patch1_check(ctx: wf.DaprWorkflowContext): + # Removed patch1 check + yield ctx.wait_for_external_event(name='event') + return 1 + + workflow_code = workflow_code_v2_without_patch1_check + client.raise_workflow_event(instance_id, event_name='event') + time.sleep(2) + md = client.get_workflow_state(instance_id) + if md.runtime_status == wf.WorkflowStatus.STALLED: + print_test('Workflow is stalled') + else: + print_test('Workflow is not stalled') + + +def main(): + args = sys.argv[1:] + if len(args) == 0: + print('Usage: python versioning.py ') + return + if args[0] == 'part1': + wfr.start() + time.sleep(2) # wait for workflow runtime to start + client = wf.DaprWorkflowClient() + + test_full_versioning(client) + test_patching(client) + + test_full_versioning_stall(client) + test_patching_stall(client) + wfr.shutdown() + elif args[0] == 'part2': + global current_test + current_test = 100 + print_test('part2') + + @wfr.versioned_workflow(name='stall_workflow', is_latest=False) + def version1_workflow(ctx: wf.DaprWorkflowContext): + yield ctx.call_activity(print_activity, input='Received workflow call for version1') + yield ctx.wait_for_external_event(name='event') + yield ctx.call_activity(print_activity, input='Finished stalled version1 workflow') + return 1 + + @wfr.versioned_workflow(name='stall_workflow', is_latest=True) + def version2_workflow(ctx: wf.DaprWorkflowContext): + yield ctx.call_activity(print_activity, input='Received workflow call for version2') + yield ctx.wait_for_external_event(name='event') + yield ctx.call_activity(print_activity, input='Finished stalled version2 workflow') + return 1 + + @wfr.workflow + def patching_workflow(ctx: wf.DaprWorkflowContext): + if ctx.is_patched('patch1'): + pass + else: + pass + yield ctx.wait_for_external_event(name='event') + yield ctx.call_activity(print_activity, input='Finished stalled patching workflow') + return 1 + + wfr.start() + time.sleep(10) + wfr.shutdown() + + +if __name__ == '__main__': + main() diff --git a/ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_context.py b/ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_context.py index 714def3f2..cc0cfe8ba 100644 --- a/ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_context.py +++ b/ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_context.py @@ -153,6 +153,10 @@ def continue_as_new(self, new_input: Any, *, save_events: bool = False) -> None: self._logger.debug(f'{self.instance_id}: Continuing as new') self.__obj.continue_as_new(new_input, save_events=save_events) + def is_patched(self, patch_name: str) -> bool: + self._logger.debug(f'{self.instance_id}: Checking if {patch_name} is patched') + return self.__obj.is_patched(patch_name) + def when_all(tasks: List[task.Task[T]]) -> task.WhenAllTask[T]: """Returns a task that completes when all of the provided tasks complete or when one of the diff --git a/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_runtime.py b/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_runtime.py index 593e55c68..58b0912a0 100644 --- a/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_runtime.py +++ b/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_runtime.py @@ -108,6 +108,42 @@ def orchestrationWrapper(ctx: task.OrchestrationContext, inp: Optional[TInput] = ) fn.__dict__['_workflow_registered'] = True + def register_versioned_workflow( + self, fn: Workflow, *, name: str, version_name: Optional[str] = None, is_latest: bool + ): + self._logger.info( + f"Registering version {version_name} of workflow '{fn.__name__}' with runtime" + ) + + def orchestrationWrapper(ctx: task.OrchestrationContext, inp: Optional[TInput] = None): + """Responsible to call Workflow function in orchestrationWrapper""" + daprWfContext = DaprWorkflowContext(ctx, self._logger.get_options()) + if inp is None: + return fn(daprWfContext) + return fn(daprWfContext, inp) + + if hasattr(fn, '_workflow_registered'): + # whenever a workflow is registered, it has a _dapr_alternate_name attribute + alt_name = fn.__dict__['_dapr_alternate_name'] + raise ValueError(f'Workflow {fn.__name__} already registered as {alt_name}') + if hasattr(fn, '_dapr_alternate_name'): + alt_name = fn._dapr_alternate_name + if name is not None: + m = f'Workflow {fn.__name__} already has an alternate name {alt_name}' + raise ValueError(m) + else: + fn.__dict__['_dapr_alternate_name'] = name + + actual_version_name = version_name if version_name is not None else fn.__name__ + + self.__worker._registry.add_named_orchestrator( + name, + orchestrationWrapper, + version_name=actual_version_name, + is_latest=is_latest, + ) + fn.__dict__['_workflow_registered'] = True + def register_activity(self, fn: Activity, *, name: Optional[str] = None): """Registers a workflow activity as a function that takes a specified input type and returns a specified output type. @@ -146,6 +182,38 @@ def shutdown(self): """Stops the listening for work items on a background thread.""" self.__worker.stop() + def versioned_workflow( + self, + __fn: Workflow = None, + *, + name: str, + version_name: Optional[str] = None, + is_latest: bool, + ): + def wrapper(fn: Workflow): + self.register_versioned_workflow( + fn, name=name, version_name=version_name, is_latest=is_latest + ) + + @wraps(fn) + def innerfn(): + return fn + + if hasattr(fn, '_dapr_alternate_name'): + innerfn.__dict__['_dapr_alternate_name'] = fn.__dict__['_dapr_alternate_name'] + else: + innerfn.__dict__['_dapr_alternate_name'] = name + + innerfn.__signature__ = inspect.signature(fn) + return innerfn + + if __fn: + # This case is true when the decorator is used without arguments + # and the function to be decorated is passed as the first argument. + return wrapper(__fn) + + return wrapper + def workflow(self, __fn: Workflow = None, *, name: Optional[str] = None): """Decorator to register a workflow function. diff --git a/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_state.py b/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_state.py index af1d7e735..79b2c95a6 100644 --- a/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_state.py +++ b/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_state.py @@ -27,6 +27,7 @@ class WorkflowStatus(Enum): TERMINATED = 4 PENDING = 5 SUSPENDED = 6 + STALLED = 7 class WorkflowState: @@ -53,6 +54,8 @@ def runtime_status(self) -> WorkflowStatus: return WorkflowStatus.PENDING elif self.__obj.runtime_status == client.OrchestrationStatus.SUSPENDED: return WorkflowStatus.SUSPENDED + elif self.__obj.runtime_status == client.OrchestrationStatus.STALLED: + return WorkflowStatus.STALLED else: return WorkflowStatus.UNKNOWN diff --git a/ext/dapr-ext-workflow/setup.cfg b/ext/dapr-ext-workflow/setup.cfg index 2f938bfb4..897a8116c 100644 --- a/ext/dapr-ext-workflow/setup.cfg +++ b/ext/dapr-ext-workflow/setup.cfg @@ -25,7 +25,7 @@ packages = find_namespace: include_package_data = True install_requires = dapr >= 1.17.0.dev - durabletask-dapr >= 0.2.0a15 + durabletask-dapr >= 0.2.0a16 [options.packages.find] include = From 40b5734da90511f93fc9453aec9f93543476d440 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 6 Feb 2026 12:56:11 -0600 Subject: [PATCH 06/22] feat(convo): add new fields to conversation api (#902) * feat(convo): add new fields to conversation api Signed-off-by: Samantha Coyle * fix: update proto/grpc code generator and add more tests Signed-off-by: Samantha Coyle * style: appease linter Signed-off-by: Samantha Coyle * style: tox -e type fixes Signed-off-by: Samantha Coyle --------- Signed-off-by: Samantha Coyle --- dapr/clients/grpc/client.py | 10 + dapr/clients/grpc/conversation.py | 70 +++++- dapr/proto/runtime/v1/ai_pb2.py | 113 +++++---- dapr/proto/runtime/v1/ai_pb2.pyi | 228 ++++++++++++++++-- dapr/proto/runtime/v1/appcallback_pb2.py | 14 +- dapr/proto/runtime/v1/appcallback_pb2_grpc.py | 44 ++++ dapr/proto/runtime/v1/dapr_pb2.py | 6 +- dapr/proto/runtime/v1/dapr_pb2_grpc.py | 44 ++++ tests/clients/fake_dapr_server.py | 14 ++ tests/clients/test_conversation.py | 194 +++++++++++++++ 10 files changed, 657 insertions(+), 80 deletions(-) diff --git a/dapr/clients/grpc/client.py b/dapr/clients/grpc/client.py index ccf0ed721..faf356491 100644 --- a/dapr/clients/grpc/client.py +++ b/dapr/clients/grpc/client.py @@ -25,8 +25,10 @@ import grpc # type: ignore from google.protobuf.any_pb2 import Any as GrpcAny +from google.protobuf.duration_pb2 import Duration as GrpcDuration from google.protobuf.empty_pb2 import Empty as GrpcEmpty from google.protobuf.message import Message as GrpcMessage +from google.protobuf.struct_pb2 import Struct as GrpcStruct from grpc import ( # type: ignore RpcError, StreamStreamClientInterceptor, @@ -1787,6 +1789,8 @@ def converse_alpha2( temperature: Optional[float] = None, tools: Optional[List[conversation.ConversationTools]] = None, tool_choice: Optional[str] = None, + response_format: Optional[GrpcStruct] = None, + prompt_cache_retention: Optional[GrpcDuration] = None, ) -> conversation.ConversationResponseAlpha2: """Invoke an LLM using the conversation API (Alpha2) with tool calling support. @@ -1800,6 +1804,8 @@ def converse_alpha2( temperature: Optional temperature setting for the LLM to optimize for creativity or predictability tools: Optional list of tools available for the LLM to call tool_choice: Optional control over which tools can be called ('none', 'auto', 'required', or specific tool name) + response_format: Optional response format (google.protobuf.struct_pb2.Struct, ex: json_schema for structured output) + prompt_cache_retention: Optional retention for prompt cache (google.protobuf.duration_pb2.Duration) Returns: ConversationResponseAlpha2 containing the conversation results with choices and tool calls @@ -1856,6 +1862,10 @@ def converse_alpha2( request.temperature = temperature if tool_choice is not None: request.tool_choice = tool_choice + if response_format is not None and hasattr(request, 'response_format'): + request.response_format.CopyFrom(response_format) + if prompt_cache_retention is not None and hasattr(request, 'prompt_cache_retention'): + request.prompt_cache_retention.CopyFrom(prompt_cache_retention) try: response, call = self.retry_policy.run_rpc(self._stub.ConverseAlpha2.with_call, request) diff --git a/dapr/clients/grpc/conversation.py b/dapr/clients/grpc/conversation.py index d11c41979..8fc3db067 100644 --- a/dapr/clients/grpc/conversation.py +++ b/dapr/clients/grpc/conversation.py @@ -338,11 +338,46 @@ class ConversationResultAlpha2Choices: message: ConversationResultAlpha2Message +@dataclass +class ConversationResultAlpha2CompletionUsageCompletionTokensDetails: + """Breakdown of tokens used in the completion.""" + + accepted_prediction_tokens: int = 0 + audio_tokens: int = 0 + reasoning_tokens: int = 0 + rejected_prediction_tokens: int = 0 + + +@dataclass +class ConversationResultAlpha2CompletionUsagePromptTokensDetails: + """Breakdown of tokens used in the prompt.""" + + audio_tokens: int = 0 + cached_tokens: int = 0 + + +@dataclass +class ConversationResultAlpha2CompletionUsage: + """Token usage for one Alpha2 conversation result.""" + + completion_tokens: int = 0 + prompt_tokens: int = 0 + total_tokens: int = 0 + completion_tokens_details: Optional[ + ConversationResultAlpha2CompletionUsageCompletionTokensDetails + ] = None + prompt_tokens_details: Optional[ConversationResultAlpha2CompletionUsagePromptTokensDetails] = ( + None + ) + + @dataclass class ConversationResultAlpha2: """One of the outputs in Alpha2 response from conversation input.""" choices: List[ConversationResultAlpha2Choices] = field(default_factory=list) + model: Optional[str] = None + usage: Optional[ConversationResultAlpha2CompletionUsage] = None @dataclass @@ -657,5 +692,38 @@ def _get_outputs_from_grpc_response( ) ) - outputs.append(ConversationResultAlpha2(choices=choices)) + model: Optional[str] = None + usage: Optional[ConversationResultAlpha2CompletionUsage] = None + if hasattr(output, 'model') and getattr(output, 'model', None): + model = output.model + if hasattr(output, 'usage') and output.usage: + u = output.usage + completion_details: Optional[ + ConversationResultAlpha2CompletionUsageCompletionTokensDetails + ] = None + prompt_details: Optional[ConversationResultAlpha2CompletionUsagePromptTokensDetails] = ( + None + ) + if hasattr(u, 'completion_tokens_details') and u.completion_tokens_details: + cd = u.completion_tokens_details + completion_details = ConversationResultAlpha2CompletionUsageCompletionTokensDetails( + accepted_prediction_tokens=getattr(cd, 'accepted_prediction_tokens', 0) or 0, + audio_tokens=getattr(cd, 'audio_tokens', 0) or 0, + reasoning_tokens=getattr(cd, 'reasoning_tokens', 0) or 0, + rejected_prediction_tokens=getattr(cd, 'rejected_prediction_tokens', 0) or 0, + ) + if hasattr(u, 'prompt_tokens_details') and u.prompt_tokens_details: + pd = u.prompt_tokens_details + prompt_details = ConversationResultAlpha2CompletionUsagePromptTokensDetails( + audio_tokens=getattr(pd, 'audio_tokens', 0) or 0, + cached_tokens=getattr(pd, 'cached_tokens', 0) or 0, + ) + usage = ConversationResultAlpha2CompletionUsage( + completion_tokens=getattr(u, 'completion_tokens', 0) or 0, + prompt_tokens=getattr(u, 'prompt_tokens', 0) or 0, + total_tokens=getattr(u, 'total_tokens', 0) or 0, + completion_tokens_details=completion_details, + prompt_tokens_details=prompt_details, + ) + outputs.append(ConversationResultAlpha2(choices=choices, model=model, usage=usage)) return outputs diff --git a/dapr/proto/runtime/v1/ai_pb2.py b/dapr/proto/runtime/v1/ai_pb2.py index 0f56cd0d9..574eb7a4e 100644 --- a/dapr/proto/runtime/v1/ai_pb2.py +++ b/dapr/proto/runtime/v1/ai_pb2.py @@ -24,9 +24,10 @@ from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x64\x61pr/proto/runtime/v1/ai.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xeb\x03\n\x13\x43onversationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\tcontextID\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x38\n\x06inputs\x18\x03 \x03(\x0b\x32(.dapr.proto.runtime.v1.ConversationInput\x12N\n\nparameters\x18\x04 \x03(\x0b\x32:.dapr.proto.runtime.v1.ConversationRequest.ParametersEntry\x12J\n\x08metadata\x18\x05 \x03(\x0b\x32\x38.dapr.proto.runtime.v1.ConversationRequest.MetadataEntry\x12\x15\n\x08scrubPII\x18\x06 \x01(\x08H\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x07 \x01(\x01H\x02\x88\x01\x01\x1aG\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x02\x18\x01\x42\x0c\n\n_contextIDB\x0b\n\t_scrubPIIB\x0e\n\x0c_temperature\"\xe6\x04\n\x19\x43onversationRequestAlpha2\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\ncontext_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x12>\n\x06inputs\x18\x03 \x03(\x0b\x32..dapr.proto.runtime.v1.ConversationInputAlpha2\x12T\n\nparameters\x18\x04 \x03(\x0b\x32@.dapr.proto.runtime.v1.ConversationRequestAlpha2.ParametersEntry\x12P\n\x08metadata\x18\x05 \x03(\x0b\x32>.dapr.proto.runtime.v1.ConversationRequestAlpha2.MetadataEntry\x12\x16\n\tscrub_pii\x18\x06 \x01(\x08H\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x07 \x01(\x01H\x02\x88\x01\x01\x12\x37\n\x05tools\x18\x08 \x03(\x0b\x32(.dapr.proto.runtime.v1.ConversationTools\x12\x18\n\x0btool_choice\x18\t \x01(\tH\x03\x88\x01\x01\x1aG\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b_context_idB\x0c\n\n_scrub_piiB\x0e\n\x0c_temperatureB\x0e\n\x0c_tool_choice\"h\n\x11\x43onversationInput\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\x04role\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08scrubPII\x18\x03 \x01(\x08H\x01\x88\x01\x01:\x02\x18\x01\x42\x07\n\x05_roleB\x0b\n\t_scrubPII\"}\n\x17\x43onversationInputAlpha2\x12<\n\x08messages\x18\x01 \x03(\x0b\x32*.dapr.proto.runtime.v1.ConversationMessage\x12\x16\n\tscrub_pii\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\x0c\n\n_scrub_pii\"\x97\x03\n\x13\x43onversationMessage\x12M\n\x0cof_developer\x18\x01 \x01(\x0b\x32\x35.dapr.proto.runtime.v1.ConversationMessageOfDeveloperH\x00\x12G\n\tof_system\x18\x02 \x01(\x0b\x32\x32.dapr.proto.runtime.v1.ConversationMessageOfSystemH\x00\x12\x43\n\x07of_user\x18\x03 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationMessageOfUserH\x00\x12M\n\x0cof_assistant\x18\x04 \x01(\x0b\x32\x35.dapr.proto.runtime.v1.ConversationMessageOfAssistantH\x00\x12\x43\n\x07of_tool\x18\x05 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationMessageOfToolH\x00\x42\x0f\n\rmessage_types\"\x80\x01\n\x1e\x43onversationMessageOfDeveloper\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\x07\n\x05_name\"}\n\x1b\x43onversationMessageOfSystem\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\x07\n\x05_name\"{\n\x19\x43onversationMessageOfUser\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\x07\n\x05_name\"\xc2\x01\n\x1e\x43onversationMessageOfAssistant\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContent\x12@\n\ntool_calls\x18\x03 \x03(\x0b\x32,.dapr.proto.runtime.v1.ConversationToolCallsB\x07\n\x05_name\"\x8f\x01\n\x19\x43onversationMessageOfTool\x12\x14\n\x07tool_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x42\n\x07\x63ontent\x18\x03 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\n\n\x08_tool_id\"\x89\x01\n\x15\x43onversationToolCalls\x12\x0f\n\x02id\x18\x01 \x01(\tH\x01\x88\x01\x01\x12J\n\x08\x66unction\x18\x02 \x01(\x0b\x32\x36.dapr.proto.runtime.v1.ConversationToolCallsOfFunctionH\x00\x42\x0c\n\ntool_typesB\x05\n\x03_id\"B\n\x1f\x43onversationToolCallsOfFunction\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\targuments\x18\x02 \x01(\t\"*\n\x1a\x43onversationMessageContent\x12\x0c\n\x04text\x18\x01 \x01(\t\"\xc0\x01\n\x12\x43onversationResult\x12\x0e\n\x06result\x18\x01 \x01(\t\x12M\n\nparameters\x18\x02 \x03(\x0b\x32\x39.dapr.proto.runtime.v1.ConversationResult.ParametersEntry\x1aG\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01:\x02\x18\x01\"]\n\x18\x43onversationResultAlpha2\x12\x41\n\x07\x63hoices\x18\x01 \x03(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationResultChoices\"\x84\x01\n\x19\x43onversationResultChoices\x12\x15\n\rfinish_reason\x18\x01 \x01(\t\x12\r\n\x05index\x18\x02 \x01(\x03\x12\x41\n\x07message\x18\x03 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationResultMessage\"n\n\x19\x43onversationResultMessage\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12@\n\ntool_calls\x18\x02 \x03(\x0b\x32,.dapr.proto.runtime.v1.ConversationToolCalls\"|\n\x14\x43onversationResponse\x12\x16\n\tcontextID\x18\x01 \x01(\tH\x00\x88\x01\x01\x12:\n\x07outputs\x18\x02 \x03(\x0b\x32).dapr.proto.runtime.v1.ConversationResult:\x02\x18\x01\x42\x0c\n\n_contextID\"\x86\x01\n\x1a\x43onversationResponseAlpha2\x12\x17\n\ncontext_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12@\n\x07outputs\x18\x02 \x03(\x0b\x32/.dapr.proto.runtime.v1.ConversationResultAlpha2B\r\n\x0b_context_id\"g\n\x11\x43onversationTools\x12\x44\n\x08\x66unction\x18\x01 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationToolsFunctionH\x00\x42\x0c\n\ntool_types\"\x80\x01\n\x19\x43onversationToolsFunction\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tH\x00\x88\x01\x01\x12+\n\nparameters\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x0e\n\x0c_descriptionBi\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x64\x61pr/proto/runtime/v1/ai.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1egoogle/protobuf/duration.proto\"\xeb\x03\n\x13\x43onversationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\tcontextID\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x38\n\x06inputs\x18\x03 \x03(\x0b\x32(.dapr.proto.runtime.v1.ConversationInput\x12N\n\nparameters\x18\x04 \x03(\x0b\x32:.dapr.proto.runtime.v1.ConversationRequest.ParametersEntry\x12J\n\x08metadata\x18\x05 \x03(\x0b\x32\x38.dapr.proto.runtime.v1.ConversationRequest.MetadataEntry\x12\x15\n\x08scrubPII\x18\x06 \x01(\x08H\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x07 \x01(\x01H\x02\x88\x01\x01\x1aG\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x02\x18\x01\x42\x0c\n\n_contextIDB\x0b\n\t_scrubPIIB\x0e\n\x0c_temperature\"\x8c\x06\n\x19\x43onversationRequestAlpha2\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\ncontext_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x12>\n\x06inputs\x18\x03 \x03(\x0b\x32..dapr.proto.runtime.v1.ConversationInputAlpha2\x12T\n\nparameters\x18\x04 \x03(\x0b\x32@.dapr.proto.runtime.v1.ConversationRequestAlpha2.ParametersEntry\x12P\n\x08metadata\x18\x05 \x03(\x0b\x32>.dapr.proto.runtime.v1.ConversationRequestAlpha2.MetadataEntry\x12\x16\n\tscrub_pii\x18\x06 \x01(\x08H\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x07 \x01(\x01H\x02\x88\x01\x01\x12\x37\n\x05tools\x18\x08 \x03(\x0b\x32(.dapr.proto.runtime.v1.ConversationTools\x12\x18\n\x0btool_choice\x18\t \x01(\tH\x03\x88\x01\x01\x12\x35\n\x0fresponse_format\x18\n \x01(\x0b\x32\x17.google.protobuf.StructH\x04\x88\x01\x01\x12>\n\x16prompt_cache_retention\x18\x0b \x01(\x0b\x32\x19.google.protobuf.DurationH\x05\x88\x01\x01\x1aG\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b_context_idB\x0c\n\n_scrub_piiB\x0e\n\x0c_temperatureB\x0e\n\x0c_tool_choiceB\x12\n\x10_response_formatB\x19\n\x17_prompt_cache_retention\"h\n\x11\x43onversationInput\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\x04role\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08scrubPII\x18\x03 \x01(\x08H\x01\x88\x01\x01:\x02\x18\x01\x42\x07\n\x05_roleB\x0b\n\t_scrubPII\"}\n\x17\x43onversationInputAlpha2\x12<\n\x08messages\x18\x01 \x03(\x0b\x32*.dapr.proto.runtime.v1.ConversationMessage\x12\x16\n\tscrub_pii\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\x0c\n\n_scrub_pii\"\x97\x03\n\x13\x43onversationMessage\x12M\n\x0cof_developer\x18\x01 \x01(\x0b\x32\x35.dapr.proto.runtime.v1.ConversationMessageOfDeveloperH\x00\x12G\n\tof_system\x18\x02 \x01(\x0b\x32\x32.dapr.proto.runtime.v1.ConversationMessageOfSystemH\x00\x12\x43\n\x07of_user\x18\x03 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationMessageOfUserH\x00\x12M\n\x0cof_assistant\x18\x04 \x01(\x0b\x32\x35.dapr.proto.runtime.v1.ConversationMessageOfAssistantH\x00\x12\x43\n\x07of_tool\x18\x05 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationMessageOfToolH\x00\x42\x0f\n\rmessage_types\"\x80\x01\n\x1e\x43onversationMessageOfDeveloper\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\x07\n\x05_name\"}\n\x1b\x43onversationMessageOfSystem\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\x07\n\x05_name\"{\n\x19\x43onversationMessageOfUser\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\x07\n\x05_name\"\xc2\x01\n\x1e\x43onversationMessageOfAssistant\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContent\x12@\n\ntool_calls\x18\x03 \x03(\x0b\x32,.dapr.proto.runtime.v1.ConversationToolCallsB\x07\n\x05_name\"\x8f\x01\n\x19\x43onversationMessageOfTool\x12\x14\n\x07tool_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x42\n\x07\x63ontent\x18\x03 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\n\n\x08_tool_id\"\x89\x01\n\x15\x43onversationToolCalls\x12\x0f\n\x02id\x18\x01 \x01(\tH\x01\x88\x01\x01\x12J\n\x08\x66unction\x18\x02 \x01(\x0b\x32\x36.dapr.proto.runtime.v1.ConversationToolCallsOfFunctionH\x00\x42\x0c\n\ntool_typesB\x05\n\x03_id\"B\n\x1f\x43onversationToolCallsOfFunction\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\targuments\x18\x02 \x01(\t\"*\n\x1a\x43onversationMessageContent\x12\x0c\n\x04text\x18\x01 \x01(\t\"\xc0\x01\n\x12\x43onversationResult\x12\x0e\n\x06result\x18\x01 \x01(\t\x12M\n\nparameters\x18\x02 \x03(\x0b\x32\x39.dapr.proto.runtime.v1.ConversationResult.ParametersEntry\x1aG\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01:\x02\x18\x01\"\xd9\x01\n\x18\x43onversationResultAlpha2\x12\x41\n\x07\x63hoices\x18\x01 \x03(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationResultChoices\x12\x12\n\x05model\x18\x02 \x01(\tH\x00\x88\x01\x01\x12R\n\x05usage\x18\x03 \x01(\x0b\x32>.dapr.proto.runtime.v1.ConversationResultAlpha2CompletionUsageH\x01\x88\x01\x01\x42\x08\n\x06_modelB\x08\n\x06_usage\"\x9f\x03\n\'ConversationResultAlpha2CompletionUsage\x12\x19\n\x11\x63ompletion_tokens\x18\x01 \x01(\x04\x12\x15\n\rprompt_tokens\x18\x02 \x01(\x04\x12\x14\n\x0ctotal_tokens\x18\x03 \x01(\x04\x12}\n\x19\x63ompletion_tokens_details\x18\x04 \x01(\x0b\x32U.dapr.proto.runtime.v1.ConversationResultAlpha2CompletionUsageCompletionTokensDetailsH\x00\x88\x01\x01\x12u\n\x15prompt_tokens_details\x18\x05 \x01(\x0b\x32Q.dapr.proto.runtime.v1.ConversationResultAlpha2CompletionUsagePromptTokensDetailsH\x01\x88\x01\x01\x42\x1c\n\x1a_completion_tokens_detailsB\x18\n\x16_prompt_tokens_details\"\xb8\x01\n>ConversationResultAlpha2CompletionUsageCompletionTokensDetails\x12\"\n\x1a\x61\x63\x63\x65pted_prediction_tokens\x18\x01 \x01(\x04\x12\x14\n\x0c\x61udio_tokens\x18\x02 \x01(\x04\x12\x18\n\x10reasoning_tokens\x18\x03 \x01(\x04\x12\"\n\x1arejected_prediction_tokens\x18\x04 \x01(\x04\"i\n:ConversationResultAlpha2CompletionUsagePromptTokensDetails\x12\x14\n\x0c\x61udio_tokens\x18\x01 \x01(\x04\x12\x15\n\rcached_tokens\x18\x02 \x01(\x04\"\x84\x01\n\x19\x43onversationResultChoices\x12\x15\n\rfinish_reason\x18\x01 \x01(\t\x12\r\n\x05index\x18\x02 \x01(\x03\x12\x41\n\x07message\x18\x03 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationResultMessage\"n\n\x19\x43onversationResultMessage\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12@\n\ntool_calls\x18\x02 \x03(\x0b\x32,.dapr.proto.runtime.v1.ConversationToolCalls\"|\n\x14\x43onversationResponse\x12\x16\n\tcontextID\x18\x01 \x01(\tH\x00\x88\x01\x01\x12:\n\x07outputs\x18\x02 \x03(\x0b\x32).dapr.proto.runtime.v1.ConversationResult:\x02\x18\x01\x42\x0c\n\n_contextID\"\x86\x01\n\x1a\x43onversationResponseAlpha2\x12\x17\n\ncontext_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12@\n\x07outputs\x18\x02 \x03(\x0b\x32/.dapr.proto.runtime.v1.ConversationResultAlpha2B\r\n\x0b_context_id\"g\n\x11\x43onversationTools\x12\x44\n\x08\x66unction\x18\x01 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationToolsFunctionH\x00\x42\x0c\n\ntool_types\"\x80\x01\n\x19\x43onversationToolsFunction\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tH\x00\x88\x01\x01\x12+\n\nparameters\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x0e\n\x0c_descriptionBi\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -52,56 +53,62 @@ _globals['_CONVERSATIONRESULT']._serialized_options = b'\030\001' _globals['_CONVERSATIONRESPONSE']._loaded_options = None _globals['_CONVERSATIONRESPONSE']._serialized_options = b'\030\001' - _globals['_CONVERSATIONREQUEST']._serialized_start=115 - _globals['_CONVERSATIONREQUEST']._serialized_end=606 - _globals['_CONVERSATIONREQUEST_PARAMETERSENTRY']._serialized_start=439 - _globals['_CONVERSATIONREQUEST_PARAMETERSENTRY']._serialized_end=510 - _globals['_CONVERSATIONREQUEST_METADATAENTRY']._serialized_start=512 - _globals['_CONVERSATIONREQUEST_METADATAENTRY']._serialized_end=559 - _globals['_CONVERSATIONREQUESTALPHA2']._serialized_start=609 - _globals['_CONVERSATIONREQUESTALPHA2']._serialized_end=1223 - _globals['_CONVERSATIONREQUESTALPHA2_PARAMETERSENTRY']._serialized_start=439 - _globals['_CONVERSATIONREQUESTALPHA2_PARAMETERSENTRY']._serialized_end=510 - _globals['_CONVERSATIONREQUESTALPHA2_METADATAENTRY']._serialized_start=512 - _globals['_CONVERSATIONREQUESTALPHA2_METADATAENTRY']._serialized_end=559 - _globals['_CONVERSATIONINPUT']._serialized_start=1225 - _globals['_CONVERSATIONINPUT']._serialized_end=1329 - _globals['_CONVERSATIONINPUTALPHA2']._serialized_start=1331 - _globals['_CONVERSATIONINPUTALPHA2']._serialized_end=1456 - _globals['_CONVERSATIONMESSAGE']._serialized_start=1459 - _globals['_CONVERSATIONMESSAGE']._serialized_end=1866 - _globals['_CONVERSATIONMESSAGEOFDEVELOPER']._serialized_start=1869 - _globals['_CONVERSATIONMESSAGEOFDEVELOPER']._serialized_end=1997 - _globals['_CONVERSATIONMESSAGEOFSYSTEM']._serialized_start=1999 - _globals['_CONVERSATIONMESSAGEOFSYSTEM']._serialized_end=2124 - _globals['_CONVERSATIONMESSAGEOFUSER']._serialized_start=2126 - _globals['_CONVERSATIONMESSAGEOFUSER']._serialized_end=2249 - _globals['_CONVERSATIONMESSAGEOFASSISTANT']._serialized_start=2252 - _globals['_CONVERSATIONMESSAGEOFASSISTANT']._serialized_end=2446 - _globals['_CONVERSATIONMESSAGEOFTOOL']._serialized_start=2449 - _globals['_CONVERSATIONMESSAGEOFTOOL']._serialized_end=2592 - _globals['_CONVERSATIONTOOLCALLS']._serialized_start=2595 - _globals['_CONVERSATIONTOOLCALLS']._serialized_end=2732 - _globals['_CONVERSATIONTOOLCALLSOFFUNCTION']._serialized_start=2734 - _globals['_CONVERSATIONTOOLCALLSOFFUNCTION']._serialized_end=2800 - _globals['_CONVERSATIONMESSAGECONTENT']._serialized_start=2802 - _globals['_CONVERSATIONMESSAGECONTENT']._serialized_end=2844 - _globals['_CONVERSATIONRESULT']._serialized_start=2847 - _globals['_CONVERSATIONRESULT']._serialized_end=3039 - _globals['_CONVERSATIONRESULT_PARAMETERSENTRY']._serialized_start=439 - _globals['_CONVERSATIONRESULT_PARAMETERSENTRY']._serialized_end=510 - _globals['_CONVERSATIONRESULTALPHA2']._serialized_start=3041 - _globals['_CONVERSATIONRESULTALPHA2']._serialized_end=3134 - _globals['_CONVERSATIONRESULTCHOICES']._serialized_start=3137 - _globals['_CONVERSATIONRESULTCHOICES']._serialized_end=3269 - _globals['_CONVERSATIONRESULTMESSAGE']._serialized_start=3271 - _globals['_CONVERSATIONRESULTMESSAGE']._serialized_end=3381 - _globals['_CONVERSATIONRESPONSE']._serialized_start=3383 - _globals['_CONVERSATIONRESPONSE']._serialized_end=3507 - _globals['_CONVERSATIONRESPONSEALPHA2']._serialized_start=3510 - _globals['_CONVERSATIONRESPONSEALPHA2']._serialized_end=3644 - _globals['_CONVERSATIONTOOLS']._serialized_start=3646 - _globals['_CONVERSATIONTOOLS']._serialized_end=3749 - _globals['_CONVERSATIONTOOLSFUNCTION']._serialized_start=3752 - _globals['_CONVERSATIONTOOLSFUNCTION']._serialized_end=3880 + _globals['_CONVERSATIONREQUEST']._serialized_start=147 + _globals['_CONVERSATIONREQUEST']._serialized_end=638 + _globals['_CONVERSATIONREQUEST_PARAMETERSENTRY']._serialized_start=471 + _globals['_CONVERSATIONREQUEST_PARAMETERSENTRY']._serialized_end=542 + _globals['_CONVERSATIONREQUEST_METADATAENTRY']._serialized_start=544 + _globals['_CONVERSATIONREQUEST_METADATAENTRY']._serialized_end=591 + _globals['_CONVERSATIONREQUESTALPHA2']._serialized_start=641 + _globals['_CONVERSATIONREQUESTALPHA2']._serialized_end=1421 + _globals['_CONVERSATIONREQUESTALPHA2_PARAMETERSENTRY']._serialized_start=471 + _globals['_CONVERSATIONREQUESTALPHA2_PARAMETERSENTRY']._serialized_end=542 + _globals['_CONVERSATIONREQUESTALPHA2_METADATAENTRY']._serialized_start=544 + _globals['_CONVERSATIONREQUESTALPHA2_METADATAENTRY']._serialized_end=591 + _globals['_CONVERSATIONINPUT']._serialized_start=1423 + _globals['_CONVERSATIONINPUT']._serialized_end=1527 + _globals['_CONVERSATIONINPUTALPHA2']._serialized_start=1529 + _globals['_CONVERSATIONINPUTALPHA2']._serialized_end=1654 + _globals['_CONVERSATIONMESSAGE']._serialized_start=1657 + _globals['_CONVERSATIONMESSAGE']._serialized_end=2064 + _globals['_CONVERSATIONMESSAGEOFDEVELOPER']._serialized_start=2067 + _globals['_CONVERSATIONMESSAGEOFDEVELOPER']._serialized_end=2195 + _globals['_CONVERSATIONMESSAGEOFSYSTEM']._serialized_start=2197 + _globals['_CONVERSATIONMESSAGEOFSYSTEM']._serialized_end=2322 + _globals['_CONVERSATIONMESSAGEOFUSER']._serialized_start=2324 + _globals['_CONVERSATIONMESSAGEOFUSER']._serialized_end=2447 + _globals['_CONVERSATIONMESSAGEOFASSISTANT']._serialized_start=2450 + _globals['_CONVERSATIONMESSAGEOFASSISTANT']._serialized_end=2644 + _globals['_CONVERSATIONMESSAGEOFTOOL']._serialized_start=2647 + _globals['_CONVERSATIONMESSAGEOFTOOL']._serialized_end=2790 + _globals['_CONVERSATIONTOOLCALLS']._serialized_start=2793 + _globals['_CONVERSATIONTOOLCALLS']._serialized_end=2930 + _globals['_CONVERSATIONTOOLCALLSOFFUNCTION']._serialized_start=2932 + _globals['_CONVERSATIONTOOLCALLSOFFUNCTION']._serialized_end=2998 + _globals['_CONVERSATIONMESSAGECONTENT']._serialized_start=3000 + _globals['_CONVERSATIONMESSAGECONTENT']._serialized_end=3042 + _globals['_CONVERSATIONRESULT']._serialized_start=3045 + _globals['_CONVERSATIONRESULT']._serialized_end=3237 + _globals['_CONVERSATIONRESULT_PARAMETERSENTRY']._serialized_start=471 + _globals['_CONVERSATIONRESULT_PARAMETERSENTRY']._serialized_end=542 + _globals['_CONVERSATIONRESULTALPHA2']._serialized_start=3240 + _globals['_CONVERSATIONRESULTALPHA2']._serialized_end=3457 + _globals['_CONVERSATIONRESULTALPHA2COMPLETIONUSAGE']._serialized_start=3460 + _globals['_CONVERSATIONRESULTALPHA2COMPLETIONUSAGE']._serialized_end=3875 + _globals['_CONVERSATIONRESULTALPHA2COMPLETIONUSAGECOMPLETIONTOKENSDETAILS']._serialized_start=3878 + _globals['_CONVERSATIONRESULTALPHA2COMPLETIONUSAGECOMPLETIONTOKENSDETAILS']._serialized_end=4062 + _globals['_CONVERSATIONRESULTALPHA2COMPLETIONUSAGEPROMPTTOKENSDETAILS']._serialized_start=4064 + _globals['_CONVERSATIONRESULTALPHA2COMPLETIONUSAGEPROMPTTOKENSDETAILS']._serialized_end=4169 + _globals['_CONVERSATIONRESULTCHOICES']._serialized_start=4172 + _globals['_CONVERSATIONRESULTCHOICES']._serialized_end=4304 + _globals['_CONVERSATIONRESULTMESSAGE']._serialized_start=4306 + _globals['_CONVERSATIONRESULTMESSAGE']._serialized_end=4416 + _globals['_CONVERSATIONRESPONSE']._serialized_start=4418 + _globals['_CONVERSATIONRESPONSE']._serialized_end=4542 + _globals['_CONVERSATIONRESPONSEALPHA2']._serialized_start=4545 + _globals['_CONVERSATIONRESPONSEALPHA2']._serialized_end=4679 + _globals['_CONVERSATIONTOOLS']._serialized_start=4681 + _globals['_CONVERSATIONTOOLS']._serialized_end=4784 + _globals['_CONVERSATIONTOOLSFUNCTION']._serialized_start=4787 + _globals['_CONVERSATIONTOOLSFUNCTION']._serialized_end=4915 # @@protoc_insertion_point(module_scope) diff --git a/dapr/proto/runtime/v1/ai_pb2.pyi b/dapr/proto/runtime/v1/ai_pb2.pyi index 0497cae3b..4689b847a 100644 --- a/dapr/proto/runtime/v1/ai_pb2.pyi +++ b/dapr/proto/runtime/v1/ai_pb2.pyi @@ -18,6 +18,7 @@ import builtins import collections.abc import google.protobuf.any_pb2 import google.protobuf.descriptor +import google.protobuf.duration_pb2 import google.protobuf.internal.containers import google.protobuf.message import google.protobuf.struct_pb2 @@ -39,7 +40,12 @@ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor @deprecated("""This message has been marked as deprecated using proto message options.""") @typing.final class ConversationRequest(google.protobuf.message.Message): - """ConversationRequest is the request object for Conversation.""" + """Note: in general for conversation api reference these links: + https://platform.openai.com/docs/api-reference/chat/create + https://github.com/openai/openai-go/blob/main/chatcompletion.go + + ConversationRequest is the request object for Conversation. + """ DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -139,7 +145,9 @@ Global___ConversationRequest: typing_extensions.TypeAlias = ConversationRequest @typing.final class ConversationRequestAlpha2(google.protobuf.message.Message): - """ConversationRequestAlpha2 is the new request object for Conversation. + """Also, when we go stable we need to remove context_id and parameters in ConversationRequestAlpha2 as these are not used. + + ConversationRequestAlpha2 is the new request object for Conversation. Many of these fields are inspired by openai.ChatCompletionNewParams https://github.com/openai/openai-go/blob/main/chatcompletion.go#L2106 """ @@ -192,6 +200,8 @@ class ConversationRequestAlpha2(google.protobuf.message.Message): TEMPERATURE_FIELD_NUMBER: builtins.int TOOLS_FIELD_NUMBER: builtins.int TOOL_CHOICE_FIELD_NUMBER: builtins.int + RESPONSE_FORMAT_FIELD_NUMBER: builtins.int + PROMPT_CACHE_RETENTION_FIELD_NUMBER: builtins.int name: builtins.str """The name of Conversation component""" context_id: builtins.str @@ -213,9 +223,7 @@ class ConversationRequestAlpha2(google.protobuf.message.Message): """ @property def inputs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationInputAlpha2]: - """Inputs for the conversation, support multiple input in one time. - This is the revamped conversation inputs better matching openai. - """ + """Inputs for the conversation.""" @property def parameters(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.any_pb2.Any]: @@ -223,7 +231,13 @@ class ConversationRequestAlpha2(google.protobuf.message.Message): @property def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: - """The metadata passing to conversation components.""" + """Set of 16 key-value pairs that can be attached to the conversation. + This can be useful for storing additional information about the object in a structured format, + and querying for objects via API or the dashboard. + Keys are strings with a maximum length of 64 characters. + Values are strings with a maximum length of 512 characters. + NOTE: In the next iteration of this API, this will be within the HTTP/gRPC headers instead. + """ @property def tools(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationTools]: @@ -233,6 +247,30 @@ class ConversationRequestAlpha2(google.protobuf.message.Message): may be different than tools specified later on. """ + @property + def response_format(self) -> google.protobuf.struct_pb2.Struct: + """Structured outputs described using a JSON Schema object. + Use this when you want strict, typed structured output. + This corresponds to OpenAI's: + { "type": "json_schema", "json_schema": { ... } } + + The schema must be provided as a parsed JSON object. + Note: This is currently only supported by OpenAI components. + This is only supported by Deepseek, GoogleAI, HuggingFace, OpenAI, and Anthropic. + inspired by openai.ResponseFormat + ref: https://github.com/openai/openai-go/blob/main/chatcompletion.go#L3111 + """ + + @property + def prompt_cache_retention(self) -> google.protobuf.duration_pb2.Duration: + """Retention policy for the prompt cache. + If using OpenAI with this value set to `24h` it enables extended prompt caching, + which keeps cached prefixes active for longer, up to a maximum of 24 hours. + [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + inspired by openai.ChatCompletionMessageParamUnion.PromptCacheRetention + ref: https://github.com/openai/openai-go/blob/main/chatcompletion.go#L3030 + """ + def __init__( self, *, @@ -245,13 +283,19 @@ class ConversationRequestAlpha2(google.protobuf.message.Message): temperature: builtins.float | None = ..., tools: collections.abc.Iterable[Global___ConversationTools] | None = ..., tool_choice: builtins.str | None = ..., + response_format: google.protobuf.struct_pb2.Struct | None = ..., + prompt_cache_retention: google.protobuf.duration_pb2.Duration | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_context_id", b"_context_id", "_scrub_pii", b"_scrub_pii", "_temperature", b"_temperature", "_tool_choice", b"_tool_choice", "context_id", b"context_id", "scrub_pii", b"scrub_pii", "temperature", b"temperature", "tool_choice", b"tool_choice"] + _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_context_id", b"_context_id", "_prompt_cache_retention", b"_prompt_cache_retention", "_response_format", b"_response_format", "_scrub_pii", b"_scrub_pii", "_temperature", b"_temperature", "_tool_choice", b"_tool_choice", "context_id", b"context_id", "prompt_cache_retention", b"prompt_cache_retention", "response_format", b"response_format", "scrub_pii", b"scrub_pii", "temperature", b"temperature", "tool_choice", b"tool_choice"] def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_context_id", b"_context_id", "_scrub_pii", b"_scrub_pii", "_temperature", b"_temperature", "_tool_choice", b"_tool_choice", "context_id", b"context_id", "inputs", b"inputs", "metadata", b"metadata", "name", b"name", "parameters", b"parameters", "scrub_pii", b"scrub_pii", "temperature", b"temperature", "tool_choice", b"tool_choice", "tools", b"tools"] + _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_context_id", b"_context_id", "_prompt_cache_retention", b"_prompt_cache_retention", "_response_format", b"_response_format", "_scrub_pii", b"_scrub_pii", "_temperature", b"_temperature", "_tool_choice", b"_tool_choice", "context_id", b"context_id", "inputs", b"inputs", "metadata", b"metadata", "name", b"name", "parameters", b"parameters", "prompt_cache_retention", b"prompt_cache_retention", "response_format", b"response_format", "scrub_pii", b"scrub_pii", "temperature", b"temperature", "tool_choice", b"tool_choice", "tools", b"tools"] def ClearField(self, field_name: _ClearFieldArgType) -> None: ... _WhichOneofReturnType__context_id: typing_extensions.TypeAlias = typing.Literal["context_id"] _WhichOneofArgType__context_id: typing_extensions.TypeAlias = typing.Literal["_context_id", b"_context_id"] + _WhichOneofReturnType__prompt_cache_retention: typing_extensions.TypeAlias = typing.Literal["prompt_cache_retention"] + _WhichOneofArgType__prompt_cache_retention: typing_extensions.TypeAlias = typing.Literal["_prompt_cache_retention", b"_prompt_cache_retention"] + _WhichOneofReturnType__response_format: typing_extensions.TypeAlias = typing.Literal["response_format"] + _WhichOneofArgType__response_format: typing_extensions.TypeAlias = typing.Literal["_response_format", b"_response_format"] _WhichOneofReturnType__scrub_pii: typing_extensions.TypeAlias = typing.Literal["scrub_pii"] _WhichOneofArgType__scrub_pii: typing_extensions.TypeAlias = typing.Literal["_scrub_pii", b"_scrub_pii"] _WhichOneofReturnType__temperature: typing_extensions.TypeAlias = typing.Literal["temperature"] @@ -261,6 +305,10 @@ class ConversationRequestAlpha2(google.protobuf.message.Message): @typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__context_id) -> _WhichOneofReturnType__context_id | None: ... @typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__prompt_cache_retention) -> _WhichOneofReturnType__prompt_cache_retention | None: ... + @typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__response_format) -> _WhichOneofReturnType__response_format | None: ... + @typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__scrub_pii) -> _WhichOneofReturnType__scrub_pii | None: ... @typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__temperature) -> _WhichOneofReturnType__temperature | None: ... @@ -309,7 +357,9 @@ Global___ConversationInput: typing_extensions.TypeAlias = ConversationInput @typing.final class ConversationInputAlpha2(google.protobuf.message.Message): - """directly inspired by openai.ChatCompletionNewParams + """TODO: when going stable just make these flat in the ConversationRequestAlpha2, + or reevaluate the grouping of fields... + directly inspired by openai.ChatCompletionNewParams https://github.com/openai/openai-go/blob/main/chatcompletion.go#L2106 """ @@ -497,9 +547,7 @@ class ConversationMessageOfAssistant(google.protobuf.message.Message): TOOL_CALLS_FIELD_NUMBER: builtins.int name: builtins.str @property - def content(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationMessageContent]: - """TODO: there is an audio field here to bring in when the time comes 1.17 or later.""" - + def content(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationMessageContent]: ... @property def tool_calls(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationToolCalls]: """Tool calls generated by the model, such as function calls for the client to then make.""" @@ -523,7 +571,11 @@ Global___ConversationMessageOfAssistant: typing_extensions.TypeAlias = Conversat @typing.final class ConversationMessageOfTool(google.protobuf.message.Message): - """inspired by openai.ChatCompletionToolMessageParam + """Note on ConversationMessageOfTool.tool_id: openai does have this as required; + however, some llm providers (ie mistral) do not require this field, + so we denote as optional. + + inspired by openai.ChatCompletionToolMessageParam https://github.com/openai/openai-go/blob/main/chatcompletion.go#L2011 ConversationMessageOfTool is intended to be the contents of a conversation message, as the role of a tool. @@ -573,7 +625,9 @@ class ConversationToolCalls(google.protobuf.message.Message): FUNCTION_FIELD_NUMBER: builtins.int id: builtins.str @property - def function(self) -> Global___ConversationToolCallsOfFunction: ... + def function(self) -> Global___ConversationToolCallsOfFunction: + """TODO: we are currently missing an OfCustom -> ConversationToolCallsOfFunction""" + def __init__( self, *, @@ -598,7 +652,7 @@ Global___ConversationToolCalls: typing_extensions.TypeAlias = ConversationToolCa @typing.final class ConversationToolCallsOfFunction(google.protobuf.message.Message): """inspired by openai.ChatCompletionMessageToolCallFunctionParam - https://github.com/openai/openai-go/blob/main/chatcompletion.go#L1692 + https://github.com/openai/openai-go/blob/main/chatcompletion.go#L1859 """ DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -696,25 +750,161 @@ Global___ConversationResult: typing_extensions.TypeAlias = ConversationResult class ConversationResultAlpha2(google.protobuf.message.Message): """inspired by openai.ChatCompletion ConversationResultAlpha2 is the result for one input. + https://github.com/openai/openai-go/blob/main/chatcompletion.go#L167 """ DESCRIPTOR: google.protobuf.descriptor.Descriptor CHOICES_FIELD_NUMBER: builtins.int + MODEL_FIELD_NUMBER: builtins.int + USAGE_FIELD_NUMBER: builtins.int + model: builtins.str + """The model used for the conversation.""" @property def choices(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationResultChoices]: """Result for the conversation input.""" + @property + def usage(self) -> Global___ConversationResultAlpha2CompletionUsage: + """Usage statistics for the completion request.""" + def __init__( self, *, choices: collections.abc.Iterable[Global___ConversationResultChoices] | None = ..., + model: builtins.str | None = ..., + usage: Global___ConversationResultAlpha2CompletionUsage | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["choices", b"choices"] + _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_model", b"_model", "_usage", b"_usage", "model", b"model", "usage", b"usage"] + def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... + _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_model", b"_model", "_usage", b"_usage", "choices", b"choices", "model", b"model", "usage", b"usage"] def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType__model: typing_extensions.TypeAlias = typing.Literal["model"] + _WhichOneofArgType__model: typing_extensions.TypeAlias = typing.Literal["_model", b"_model"] + _WhichOneofReturnType__usage: typing_extensions.TypeAlias = typing.Literal["usage"] + _WhichOneofArgType__usage: typing_extensions.TypeAlias = typing.Literal["_usage", b"_usage"] + @typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__model) -> _WhichOneofReturnType__model | None: ... + @typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__usage) -> _WhichOneofReturnType__usage | None: ... Global___ConversationResultAlpha2: typing_extensions.TypeAlias = ConversationResultAlpha2 +@typing.final +class ConversationResultAlpha2CompletionUsage(google.protobuf.message.Message): + """ref: https://github.com/openai/openai-go/blob/main/completion.go#L162 + inspired by openai.ChatCompletion.Usage of type CompletionUsage + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + COMPLETION_TOKENS_FIELD_NUMBER: builtins.int + PROMPT_TOKENS_FIELD_NUMBER: builtins.int + TOTAL_TOKENS_FIELD_NUMBER: builtins.int + COMPLETION_TOKENS_DETAILS_FIELD_NUMBER: builtins.int + PROMPT_TOKENS_DETAILS_FIELD_NUMBER: builtins.int + completion_tokens: builtins.int + """Number of tokens in the generated completion.""" + prompt_tokens: builtins.int + """Number of tokens in the prompt.""" + total_tokens: builtins.int + """Total number of tokens used in the request (prompt + completion).""" + @property + def completion_tokens_details(self) -> Global___ConversationResultAlpha2CompletionUsageCompletionTokensDetails: + """Breakdown of tokens used in completion.""" + + @property + def prompt_tokens_details(self) -> Global___ConversationResultAlpha2CompletionUsagePromptTokensDetails: + """Breakdown of tokens used in the prompt.""" + + def __init__( + self, + *, + completion_tokens: builtins.int = ..., + prompt_tokens: builtins.int = ..., + total_tokens: builtins.int = ..., + completion_tokens_details: Global___ConversationResultAlpha2CompletionUsageCompletionTokensDetails | None = ..., + prompt_tokens_details: Global___ConversationResultAlpha2CompletionUsagePromptTokensDetails | None = ..., + ) -> None: ... + _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_completion_tokens_details", b"_completion_tokens_details", "_prompt_tokens_details", b"_prompt_tokens_details", "completion_tokens_details", b"completion_tokens_details", "prompt_tokens_details", b"prompt_tokens_details"] + def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... + _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_completion_tokens_details", b"_completion_tokens_details", "_prompt_tokens_details", b"_prompt_tokens_details", "completion_tokens", b"completion_tokens", "completion_tokens_details", b"completion_tokens_details", "prompt_tokens", b"prompt_tokens", "prompt_tokens_details", b"prompt_tokens_details", "total_tokens", b"total_tokens"] + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType__completion_tokens_details: typing_extensions.TypeAlias = typing.Literal["completion_tokens_details"] + _WhichOneofArgType__completion_tokens_details: typing_extensions.TypeAlias = typing.Literal["_completion_tokens_details", b"_completion_tokens_details"] + _WhichOneofReturnType__prompt_tokens_details: typing_extensions.TypeAlias = typing.Literal["prompt_tokens_details"] + _WhichOneofArgType__prompt_tokens_details: typing_extensions.TypeAlias = typing.Literal["_prompt_tokens_details", b"_prompt_tokens_details"] + @typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__completion_tokens_details) -> _WhichOneofReturnType__completion_tokens_details | None: ... + @typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__prompt_tokens_details) -> _WhichOneofReturnType__prompt_tokens_details | None: ... + +Global___ConversationResultAlpha2CompletionUsage: typing_extensions.TypeAlias = ConversationResultAlpha2CompletionUsage + +@typing.final +class ConversationResultAlpha2CompletionUsageCompletionTokensDetails(google.protobuf.message.Message): + """inspired by openai.CompletionUsageCompletionTokensDetails + ref: https://github.com/openai/openai-go/blob/main/completion.go#L192 + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ACCEPTED_PREDICTION_TOKENS_FIELD_NUMBER: builtins.int + AUDIO_TOKENS_FIELD_NUMBER: builtins.int + REASONING_TOKENS_FIELD_NUMBER: builtins.int + REJECTED_PREDICTION_TOKENS_FIELD_NUMBER: builtins.int + accepted_prediction_tokens: builtins.int + """When using Predicted Outputs, + the number of tokens in the prediction that appeared in the completion. + """ + audio_tokens: builtins.int + """Audio input tokens generated by the model.""" + reasoning_tokens: builtins.int + """Tokens generated by the model for reasoning.""" + rejected_prediction_tokens: builtins.int + """When using Predicted Outputs, the number of tokens in the prediction that did + not appear in the completion. However, like reasoning tokens, these tokens are + still counted in the total completion tokens for purposes of billing, output, + and context window limits. + """ + def __init__( + self, + *, + accepted_prediction_tokens: builtins.int = ..., + audio_tokens: builtins.int = ..., + reasoning_tokens: builtins.int = ..., + rejected_prediction_tokens: builtins.int = ..., + ) -> None: ... + _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["accepted_prediction_tokens", b"accepted_prediction_tokens", "audio_tokens", b"audio_tokens", "reasoning_tokens", b"reasoning_tokens", "rejected_prediction_tokens", b"rejected_prediction_tokens"] + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ConversationResultAlpha2CompletionUsageCompletionTokensDetails: typing_extensions.TypeAlias = ConversationResultAlpha2CompletionUsageCompletionTokensDetails + +@typing.final +class ConversationResultAlpha2CompletionUsagePromptTokensDetails(google.protobuf.message.Message): + """inspired by openai.CompletionUsagePromptTokensDetails + ref: https://github.com/openai/openai-go/blob/main/completion.go#L223C6-L223C40 + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + AUDIO_TOKENS_FIELD_NUMBER: builtins.int + CACHED_TOKENS_FIELD_NUMBER: builtins.int + audio_tokens: builtins.int + """Audio input tokens present in the prompt.""" + cached_tokens: builtins.int + """Cached tokens present in the prompt.""" + def __init__( + self, + *, + audio_tokens: builtins.int = ..., + cached_tokens: builtins.int = ..., + ) -> None: ... + _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["audio_tokens", b"audio_tokens", "cached_tokens", b"cached_tokens"] + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ConversationResultAlpha2CompletionUsagePromptTokensDetails: typing_extensions.TypeAlias = ConversationResultAlpha2CompletionUsagePromptTokensDetails + @typing.final class ConversationResultChoices(google.protobuf.message.Message): """inspired by openai.ChatCompletionChoice @@ -737,7 +927,9 @@ class ConversationResultChoices(google.protobuf.message.Message): index: builtins.int """The index of the choice in the list of choices.""" @property - def message(self) -> Global___ConversationResultMessage: ... + def message(self) -> Global___ConversationResultMessage: + """A chat completion message generated by the model.""" + def __init__( self, *, @@ -889,7 +1081,7 @@ class ConversationToolsFunction(google.protobuf.message.Message): def parameters(self) -> google.protobuf.struct_pb2.Struct: """The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, - and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. + and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list. """ diff --git a/dapr/proto/runtime/v1/appcallback_pb2.py b/dapr/proto/runtime/v1/appcallback_pb2.py index eb8fdea45..24267f1e4 100644 --- a/dapr/proto/runtime/v1/appcallback_pb2.py +++ b/dapr/proto/runtime/v1/appcallback_pb2.py @@ -28,7 +28,7 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'dapr/proto/runtime/v1/appcallback.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\x19google/protobuf/any.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a!dapr/proto/common/v1/common.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xa6\x01\n\x0fJobEventRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\"\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x14\n\x0c\x63ontent_type\x18\x04 \x01(\t\x12;\n\x0ehttp_extension\x18\x05 \x01(\x0b\x32#.dapr.proto.common.v1.HTTPExtension\"\x12\n\x10JobEventResponse\"\xdb\x01\n\x11TopicEventRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x14\n\x0cspec_version\x18\x04 \x01(\t\x12\x19\n\x11\x64\x61ta_content_type\x18\x05 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x07 \x01(\x0c\x12\r\n\x05topic\x18\x06 \x01(\t\x12\x13\n\x0bpubsub_name\x18\x08 \x01(\t\x12\x0c\n\x04path\x18\t \x01(\t\x12+\n\nextensions\x18\n \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa6\x01\n\x12TopicEventResponse\x12R\n\x06status\x18\x01 \x01(\x0e\x32\x42.dapr.proto.runtime.v1.TopicEventResponse.TopicEventResponseStatus\"<\n\x18TopicEventResponseStatus\x12\x0b\n\x07SUCCESS\x10\x00\x12\t\n\x05RETRY\x10\x01\x12\x08\n\x04\x44ROP\x10\x02\"\xab\x01\n\x13TopicEventCERequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x14\n\x0cspec_version\x18\x04 \x01(\t\x12\x19\n\x11\x64\x61ta_content_type\x18\x05 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x06 \x01(\x0c\x12+\n\nextensions\x18\x07 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa5\x02\n\x1aTopicEventBulkRequestEntry\x12\x10\n\x08\x65ntry_id\x18\x01 \x01(\t\x12\x0f\n\x05\x62ytes\x18\x02 \x01(\x0cH\x00\x12\x41\n\x0b\x63loud_event\x18\x03 \x01(\x0b\x32*.dapr.proto.runtime.v1.TopicEventCERequestH\x00\x12\x14\n\x0c\x63ontent_type\x18\x04 \x01(\t\x12Q\n\x08metadata\x18\x05 \x03(\x0b\x32?.dapr.proto.runtime.v1.TopicEventBulkRequestEntry.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x07\n\x05\x65vent\"\xa6\x02\n\x15TopicEventBulkRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x42\n\x07\x65ntries\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.TopicEventBulkRequestEntry\x12L\n\x08metadata\x18\x03 \x03(\x0b\x32:.dapr.proto.runtime.v1.TopicEventBulkRequest.MetadataEntry\x12\r\n\x05topic\x18\x04 \x01(\t\x12\x13\n\x0bpubsub_name\x18\x05 \x01(\t\x12\x0c\n\x04type\x18\x06 \x01(\t\x12\x0c\n\x04path\x18\x07 \x01(\t\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x83\x01\n\x1bTopicEventBulkResponseEntry\x12\x10\n\x08\x65ntry_id\x18\x01 \x01(\t\x12R\n\x06status\x18\x02 \x01(\x0e\x32\x42.dapr.proto.runtime.v1.TopicEventResponse.TopicEventResponseStatus\"^\n\x16TopicEventBulkResponse\x12\x44\n\x08statuses\x18\x01 \x03(\x0b\x32\x32.dapr.proto.runtime.v1.TopicEventBulkResponseEntry\"\xae\x01\n\x13\x42indingEventRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12J\n\x08metadata\x18\x03 \x03(\x0b\x32\x38.dapr.proto.runtime.v1.BindingEventRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x88\x02\n\x14\x42indingEventResponse\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12/\n\x06states\x18\x02 \x03(\x0b\x32\x1f.dapr.proto.common.v1.StateItem\x12\n\n\x02to\x18\x03 \x03(\t\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x12X\n\x0b\x63oncurrency\x18\x05 \x01(\x0e\x32\x43.dapr.proto.runtime.v1.BindingEventResponse.BindingEventConcurrency\"7\n\x17\x42indingEventConcurrency\x12\x0e\n\nSEQUENTIAL\x10\x00\x12\x0c\n\x08PARALLEL\x10\x01\"a\n\x1eListTopicSubscriptionsResponse\x12?\n\rsubscriptions\x18\x01 \x03(\x0b\x32(.dapr.proto.runtime.v1.TopicSubscription\"\xc5\x02\n\x11TopicSubscription\x12\x13\n\x0bpubsub_name\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\x12H\n\x08metadata\x18\x03 \x03(\x0b\x32\x36.dapr.proto.runtime.v1.TopicSubscription.MetadataEntry\x12\x32\n\x06routes\x18\x05 \x01(\x0b\x32\".dapr.proto.runtime.v1.TopicRoutes\x12\x19\n\x11\x64\x65\x61\x64_letter_topic\x18\x06 \x01(\t\x12\x42\n\x0e\x62ulk_subscribe\x18\x07 \x01(\x0b\x32*.dapr.proto.runtime.v1.BulkSubscribeConfig\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"O\n\x0bTopicRoutes\x12/\n\x05rules\x18\x01 \x03(\x0b\x32 .dapr.proto.runtime.v1.TopicRule\x12\x0f\n\x07\x64\x65\x66\x61ult\x18\x02 \x01(\t\"(\n\tTopicRule\x12\r\n\x05match\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\"a\n\x13\x42ulkSubscribeConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1a\n\x12max_messages_count\x18\x02 \x01(\x05\x12\x1d\n\x15max_await_duration_ms\x18\x03 \x01(\x05\"-\n\x19ListInputBindingsResponse\x12\x10\n\x08\x62indings\x18\x01 \x03(\t\"\x15\n\x13HealthCheckResponse2\x86\x04\n\x0b\x41ppCallback\x12W\n\x08OnInvoke\x12#.dapr.proto.common.v1.InvokeRequest\x1a$.dapr.proto.common.v1.InvokeResponse\"\x00\x12i\n\x16ListTopicSubscriptions\x12\x16.google.protobuf.Empty\x1a\x35.dapr.proto.runtime.v1.ListTopicSubscriptionsResponse\"\x00\x12\x65\n\x0cOnTopicEvent\x12(.dapr.proto.runtime.v1.TopicEventRequest\x1a).dapr.proto.runtime.v1.TopicEventResponse\"\x00\x12_\n\x11ListInputBindings\x12\x16.google.protobuf.Empty\x1a\x30.dapr.proto.runtime.v1.ListInputBindingsResponse\"\x00\x12k\n\x0eOnBindingEvent\x12*.dapr.proto.runtime.v1.BindingEventRequest\x1a+.dapr.proto.runtime.v1.BindingEventResponse\"\x00\x32m\n\x16\x41ppCallbackHealthCheck\x12S\n\x0bHealthCheck\x12\x16.google.protobuf.Empty\x1a*.dapr.proto.runtime.v1.HealthCheckResponse\"\x00\x32\xf0\x01\n\x10\x41ppCallbackAlpha\x12w\n\x16OnBulkTopicEventAlpha1\x12,.dapr.proto.runtime.v1.TopicEventBulkRequest\x1a-.dapr.proto.runtime.v1.TopicEventBulkResponse\"\x00\x12\x63\n\x10OnJobEventAlpha1\x12&.dapr.proto.runtime.v1.JobEventRequest\x1a\'.dapr.proto.runtime.v1.JobEventResponseBy\n\nio.dapr.v1B\x15\x44\x61prAppCallbackProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02 Dapr.AppCallback.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'dapr/proto/runtime/v1/appcallback.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\x19google/protobuf/any.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a!dapr/proto/common/v1/common.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xa6\x01\n\x0fJobEventRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\"\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x14\n\x0c\x63ontent_type\x18\x04 \x01(\t\x12;\n\x0ehttp_extension\x18\x05 \x01(\x0b\x32#.dapr.proto.common.v1.HTTPExtension\"\x12\n\x10JobEventResponse\"\xdb\x01\n\x11TopicEventRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x14\n\x0cspec_version\x18\x04 \x01(\t\x12\x19\n\x11\x64\x61ta_content_type\x18\x05 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x07 \x01(\x0c\x12\r\n\x05topic\x18\x06 \x01(\t\x12\x13\n\x0bpubsub_name\x18\x08 \x01(\t\x12\x0c\n\x04path\x18\t \x01(\t\x12+\n\nextensions\x18\n \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa6\x01\n\x12TopicEventResponse\x12R\n\x06status\x18\x01 \x01(\x0e\x32\x42.dapr.proto.runtime.v1.TopicEventResponse.TopicEventResponseStatus\"<\n\x18TopicEventResponseStatus\x12\x0b\n\x07SUCCESS\x10\x00\x12\t\n\x05RETRY\x10\x01\x12\x08\n\x04\x44ROP\x10\x02\"\xab\x01\n\x13TopicEventCERequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x14\n\x0cspec_version\x18\x04 \x01(\t\x12\x19\n\x11\x64\x61ta_content_type\x18\x05 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x06 \x01(\x0c\x12+\n\nextensions\x18\x07 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa5\x02\n\x1aTopicEventBulkRequestEntry\x12\x10\n\x08\x65ntry_id\x18\x01 \x01(\t\x12\x0f\n\x05\x62ytes\x18\x02 \x01(\x0cH\x00\x12\x41\n\x0b\x63loud_event\x18\x03 \x01(\x0b\x32*.dapr.proto.runtime.v1.TopicEventCERequestH\x00\x12\x14\n\x0c\x63ontent_type\x18\x04 \x01(\t\x12Q\n\x08metadata\x18\x05 \x03(\x0b\x32?.dapr.proto.runtime.v1.TopicEventBulkRequestEntry.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x07\n\x05\x65vent\"\xa6\x02\n\x15TopicEventBulkRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x42\n\x07\x65ntries\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.TopicEventBulkRequestEntry\x12L\n\x08metadata\x18\x03 \x03(\x0b\x32:.dapr.proto.runtime.v1.TopicEventBulkRequest.MetadataEntry\x12\r\n\x05topic\x18\x04 \x01(\t\x12\x13\n\x0bpubsub_name\x18\x05 \x01(\t\x12\x0c\n\x04type\x18\x06 \x01(\t\x12\x0c\n\x04path\x18\x07 \x01(\t\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x83\x01\n\x1bTopicEventBulkResponseEntry\x12\x10\n\x08\x65ntry_id\x18\x01 \x01(\t\x12R\n\x06status\x18\x02 \x01(\x0e\x32\x42.dapr.proto.runtime.v1.TopicEventResponse.TopicEventResponseStatus\"^\n\x16TopicEventBulkResponse\x12\x44\n\x08statuses\x18\x01 \x03(\x0b\x32\x32.dapr.proto.runtime.v1.TopicEventBulkResponseEntry\"\xae\x01\n\x13\x42indingEventRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12J\n\x08metadata\x18\x03 \x03(\x0b\x32\x38.dapr.proto.runtime.v1.BindingEventRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x88\x02\n\x14\x42indingEventResponse\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12/\n\x06states\x18\x02 \x03(\x0b\x32\x1f.dapr.proto.common.v1.StateItem\x12\n\n\x02to\x18\x03 \x03(\t\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x12X\n\x0b\x63oncurrency\x18\x05 \x01(\x0e\x32\x43.dapr.proto.runtime.v1.BindingEventResponse.BindingEventConcurrency\"7\n\x17\x42indingEventConcurrency\x12\x0e\n\nSEQUENTIAL\x10\x00\x12\x0c\n\x08PARALLEL\x10\x01\"a\n\x1eListTopicSubscriptionsResponse\x12?\n\rsubscriptions\x18\x01 \x03(\x0b\x32(.dapr.proto.runtime.v1.TopicSubscription\"\xc5\x02\n\x11TopicSubscription\x12\x13\n\x0bpubsub_name\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\x12H\n\x08metadata\x18\x03 \x03(\x0b\x32\x36.dapr.proto.runtime.v1.TopicSubscription.MetadataEntry\x12\x32\n\x06routes\x18\x05 \x01(\x0b\x32\".dapr.proto.runtime.v1.TopicRoutes\x12\x19\n\x11\x64\x65\x61\x64_letter_topic\x18\x06 \x01(\t\x12\x42\n\x0e\x62ulk_subscribe\x18\x07 \x01(\x0b\x32*.dapr.proto.runtime.v1.BulkSubscribeConfig\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"O\n\x0bTopicRoutes\x12/\n\x05rules\x18\x01 \x03(\x0b\x32 .dapr.proto.runtime.v1.TopicRule\x12\x0f\n\x07\x64\x65\x66\x61ult\x18\x02 \x01(\t\"(\n\tTopicRule\x12\r\n\x05match\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\"a\n\x13\x42ulkSubscribeConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1a\n\x12max_messages_count\x18\x02 \x01(\x05\x12\x1d\n\x15max_await_duration_ms\x18\x03 \x01(\x05\"-\n\x19ListInputBindingsResponse\x12\x10\n\x08\x62indings\x18\x01 \x03(\t\"\x15\n\x13HealthCheckResponse2\xf9\x04\n\x0b\x41ppCallback\x12W\n\x08OnInvoke\x12#.dapr.proto.common.v1.InvokeRequest\x1a$.dapr.proto.common.v1.InvokeResponse\"\x00\x12i\n\x16ListTopicSubscriptions\x12\x16.google.protobuf.Empty\x1a\x35.dapr.proto.runtime.v1.ListTopicSubscriptionsResponse\"\x00\x12\x65\n\x0cOnTopicEvent\x12(.dapr.proto.runtime.v1.TopicEventRequest\x1a).dapr.proto.runtime.v1.TopicEventResponse\"\x00\x12_\n\x11ListInputBindings\x12\x16.google.protobuf.Empty\x1a\x30.dapr.proto.runtime.v1.ListInputBindingsResponse\"\x00\x12k\n\x0eOnBindingEvent\x12*.dapr.proto.runtime.v1.BindingEventRequest\x1a+.dapr.proto.runtime.v1.BindingEventResponse\"\x00\x12q\n\x10OnBulkTopicEvent\x12,.dapr.proto.runtime.v1.TopicEventBulkRequest\x1a-.dapr.proto.runtime.v1.TopicEventBulkResponse\"\x00\x32m\n\x16\x41ppCallbackHealthCheck\x12S\n\x0bHealthCheck\x12\x16.google.protobuf.Empty\x1a*.dapr.proto.runtime.v1.HealthCheckResponse\"\x00\x32\xf3\x01\n\x10\x41ppCallbackAlpha\x12z\n\x16OnBulkTopicEventAlpha1\x12,.dapr.proto.runtime.v1.TopicEventBulkRequest\x1a-.dapr.proto.runtime.v1.TopicEventBulkResponse\"\x03\x88\x02\x01\x12\x63\n\x10OnJobEventAlpha1\x12&.dapr.proto.runtime.v1.JobEventRequest\x1a\'.dapr.proto.runtime.v1.JobEventResponseBy\n\nio.dapr.v1B\x15\x44\x61prAppCallbackProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02 Dapr.AppCallback.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -44,6 +44,8 @@ _globals['_BINDINGEVENTREQUEST_METADATAENTRY']._serialized_options = b'8\001' _globals['_TOPICSUBSCRIPTION_METADATAENTRY']._loaded_options = None _globals['_TOPICSUBSCRIPTION_METADATAENTRY']._serialized_options = b'8\001' + _globals['_APPCALLBACKALPHA'].methods_by_name['OnBulkTopicEventAlpha1']._loaded_options = None + _globals['_APPCALLBACKALPHA'].methods_by_name['OnBulkTopicEventAlpha1']._serialized_options = b'\210\002\001' _globals['_JOBEVENTREQUEST']._serialized_start=188 _globals['_JOBEVENTREQUEST']._serialized_end=354 _globals['_JOBEVENTRESPONSE']._serialized_start=356 @@ -93,9 +95,9 @@ _globals['_HEALTHCHECKRESPONSE']._serialized_start=2904 _globals['_HEALTHCHECKRESPONSE']._serialized_end=2925 _globals['_APPCALLBACK']._serialized_start=2928 - _globals['_APPCALLBACK']._serialized_end=3446 - _globals['_APPCALLBACKHEALTHCHECK']._serialized_start=3448 - _globals['_APPCALLBACKHEALTHCHECK']._serialized_end=3557 - _globals['_APPCALLBACKALPHA']._serialized_start=3560 - _globals['_APPCALLBACKALPHA']._serialized_end=3800 + _globals['_APPCALLBACK']._serialized_end=3561 + _globals['_APPCALLBACKHEALTHCHECK']._serialized_start=3563 + _globals['_APPCALLBACKHEALTHCHECK']._serialized_end=3672 + _globals['_APPCALLBACKALPHA']._serialized_start=3675 + _globals['_APPCALLBACKALPHA']._serialized_end=3918 # @@protoc_insertion_point(module_scope) diff --git a/dapr/proto/runtime/v1/appcallback_pb2_grpc.py b/dapr/proto/runtime/v1/appcallback_pb2_grpc.py index d7bfe94b3..26c586cbc 100644 --- a/dapr/proto/runtime/v1/appcallback_pb2_grpc.py +++ b/dapr/proto/runtime/v1/appcallback_pb2_grpc.py @@ -64,6 +64,11 @@ def __init__(self, channel): request_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_appcallback__pb2.BindingEventRequest.SerializeToString, response_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_appcallback__pb2.BindingEventResponse.FromString, _registered_method=True) + self.OnBulkTopicEvent = channel.unary_unary( + '/dapr.proto.runtime.v1.AppCallback/OnBulkTopicEvent', + request_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_appcallback__pb2.TopicEventBulkRequest.SerializeToString, + response_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_appcallback__pb2.TopicEventBulkResponse.FromString, + _registered_method=True) class AppCallbackServicer(object): @@ -110,6 +115,13 @@ def OnBindingEvent(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def OnBulkTopicEvent(self, request, context): + """Subscribes bulk events from Pubsub + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_AppCallbackServicer_to_server(servicer, server): rpc_method_handlers = { @@ -138,6 +150,11 @@ def add_AppCallbackServicer_to_server(servicer, server): request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_appcallback__pb2.BindingEventRequest.FromString, response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_appcallback__pb2.BindingEventResponse.SerializeToString, ), + 'OnBulkTopicEvent': grpc.unary_unary_rpc_method_handler( + servicer.OnBulkTopicEvent, + request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_appcallback__pb2.TopicEventBulkRequest.FromString, + response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_appcallback__pb2.TopicEventBulkResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'dapr.proto.runtime.v1.AppCallback', rpc_method_handlers) @@ -287,6 +304,33 @@ def OnBindingEvent(request, metadata, _registered_method=True) + @staticmethod + def OnBulkTopicEvent(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/dapr.proto.runtime.v1.AppCallback/OnBulkTopicEvent', + dapr_dot_proto_dot_runtime_dot_v1_dot_appcallback__pb2.TopicEventBulkRequest.SerializeToString, + dapr_dot_proto_dot_runtime_dot_v1_dot_appcallback__pb2.TopicEventBulkResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + class AppCallbackHealthCheckStub(object): """AppCallbackHealthCheck V1 is an optional extension to AppCallback V1 to implement diff --git a/dapr/proto/runtime/v1/dapr_pb2.py b/dapr/proto/runtime/v1/dapr_pb2.py index 1b790f38c..642ced434 100644 --- a/dapr/proto/runtime/v1/dapr_pb2.py +++ b/dapr/proto/runtime/v1/dapr_pb2.py @@ -39,7 +39,7 @@ from dapr.proto.runtime.v1 import ai_pb2 as dapr_dot_proto_dot_runtime_dot_v1_dot_ai__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n dapr/proto/runtime/v1/dapr.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a!dapr/proto/common/v1/common.proto\x1a\"dapr/proto/runtime/v1/actors.proto\x1a\"dapr/proto/runtime/v1/pubsub.proto\x1a\"dapr/proto/runtime/v1/invoke.proto\x1a!dapr/proto/runtime/v1/state.proto\x1a#dapr/proto/runtime/v1/binding.proto\x1a\"dapr/proto/runtime/v1/secret.proto\x1a$dapr/proto/runtime/v1/metadata.proto\x1a)dapr/proto/runtime/v1/configuration.proto\x1a dapr/proto/runtime/v1/lock.proto\x1a\"dapr/proto/runtime/v1/crypto.proto\x1a$dapr/proto/runtime/v1/workflow.proto\x1a dapr/proto/runtime/v1/jobs.proto\x1a\x1e\x64\x61pr/proto/runtime/v1/ai.proto\"\x11\n\x0fShutdownRequest2\xce\x37\n\x04\x44\x61pr\x12\x64\n\rInvokeService\x12+.dapr.proto.runtime.v1.InvokeServiceRequest\x1a$.dapr.proto.common.v1.InvokeResponse\"\x00\x12]\n\x08GetState\x12&.dapr.proto.runtime.v1.GetStateRequest\x1a\'.dapr.proto.runtime.v1.GetStateResponse\"\x00\x12i\n\x0cGetBulkState\x12*.dapr.proto.runtime.v1.GetBulkStateRequest\x1a+.dapr.proto.runtime.v1.GetBulkStateResponse\"\x00\x12N\n\tSaveState\x12\'.dapr.proto.runtime.v1.SaveStateRequest\x1a\x16.google.protobuf.Empty\"\x00\x12i\n\x10QueryStateAlpha1\x12(.dapr.proto.runtime.v1.QueryStateRequest\x1a).dapr.proto.runtime.v1.QueryStateResponse\"\x00\x12R\n\x0b\x44\x65leteState\x12).dapr.proto.runtime.v1.DeleteStateRequest\x1a\x16.google.protobuf.Empty\"\x00\x12Z\n\x0f\x44\x65leteBulkState\x12-.dapr.proto.runtime.v1.DeleteBulkStateRequest\x1a\x16.google.protobuf.Empty\"\x00\x12j\n\x17\x45xecuteStateTransaction\x12\x35.dapr.proto.runtime.v1.ExecuteStateTransactionRequest\x1a\x16.google.protobuf.Empty\"\x00\x12T\n\x0cPublishEvent\x12*.dapr.proto.runtime.v1.PublishEventRequest\x1a\x16.google.protobuf.Empty\"\x00\x12q\n\x16\x42ulkPublishEventAlpha1\x12).dapr.proto.runtime.v1.BulkPublishRequest\x1a*.dapr.proto.runtime.v1.BulkPublishResponse\"\x00\x12\x97\x01\n\x1aSubscribeTopicEventsAlpha1\x12\x38.dapr.proto.runtime.v1.SubscribeTopicEventsRequestAlpha1\x1a\x39.dapr.proto.runtime.v1.SubscribeTopicEventsResponseAlpha1\"\x00(\x01\x30\x01\x12l\n\rInvokeBinding\x12+.dapr.proto.runtime.v1.InvokeBindingRequest\x1a,.dapr.proto.runtime.v1.InvokeBindingResponse\"\x00\x12`\n\tGetSecret\x12\'.dapr.proto.runtime.v1.GetSecretRequest\x1a(.dapr.proto.runtime.v1.GetSecretResponse\"\x00\x12l\n\rGetBulkSecret\x12+.dapr.proto.runtime.v1.GetBulkSecretRequest\x1a,.dapr.proto.runtime.v1.GetBulkSecretResponse\"\x00\x12`\n\x12RegisterActorTimer\x12\x30.dapr.proto.runtime.v1.RegisterActorTimerRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x64\n\x14UnregisterActorTimer\x12\x32.dapr.proto.runtime.v1.UnregisterActorTimerRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x66\n\x15RegisterActorReminder\x12\x33.dapr.proto.runtime.v1.RegisterActorReminderRequest\x1a\x16.google.protobuf.Empty\"\x00\x12j\n\x17UnregisterActorReminder\x12\x35.dapr.proto.runtime.v1.UnregisterActorReminderRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x9f\x01\n\x1eUnregisterActorRemindersByType\x12<.dapr.proto.runtime.v1.UnregisterActorRemindersByTypeRequest\x1a=.dapr.proto.runtime.v1.UnregisterActorRemindersByTypeResponse\"\x00\x12{\n\x12ListActorReminders\x12\x30.dapr.proto.runtime.v1.ListActorRemindersRequest\x1a\x31.dapr.proto.runtime.v1.ListActorRemindersResponse\"\x00\x12l\n\rGetActorState\x12+.dapr.proto.runtime.v1.GetActorStateRequest\x1a,.dapr.proto.runtime.v1.GetActorStateResponse\"\x00\x12u\n\x10GetActorReminder\x12..dapr.proto.runtime.v1.GetActorReminderRequest\x1a/.dapr.proto.runtime.v1.GetActorReminderResponse\"\x00\x12t\n\x1c\x45xecuteActorStateTransaction\x12:.dapr.proto.runtime.v1.ExecuteActorStateTransactionRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x66\n\x0bInvokeActor\x12).dapr.proto.runtime.v1.InvokeActorRequest\x1a*.dapr.proto.runtime.v1.InvokeActorResponse\"\x00\x12{\n\x16GetConfigurationAlpha1\x12..dapr.proto.runtime.v1.GetConfigurationRequest\x1a/.dapr.proto.runtime.v1.GetConfigurationResponse\"\x00\x12u\n\x10GetConfiguration\x12..dapr.proto.runtime.v1.GetConfigurationRequest\x1a/.dapr.proto.runtime.v1.GetConfigurationResponse\"\x00\x12\x8f\x01\n\x1cSubscribeConfigurationAlpha1\x12\x34.dapr.proto.runtime.v1.SubscribeConfigurationRequest\x1a\x35.dapr.proto.runtime.v1.SubscribeConfigurationResponse\"\x00\x30\x01\x12\x89\x01\n\x16SubscribeConfiguration\x12\x34.dapr.proto.runtime.v1.SubscribeConfigurationRequest\x1a\x35.dapr.proto.runtime.v1.SubscribeConfigurationResponse\"\x00\x30\x01\x12\x93\x01\n\x1eUnsubscribeConfigurationAlpha1\x12\x36.dapr.proto.runtime.v1.UnsubscribeConfigurationRequest\x1a\x37.dapr.proto.runtime.v1.UnsubscribeConfigurationResponse\"\x00\x12\x8d\x01\n\x18UnsubscribeConfiguration\x12\x36.dapr.proto.runtime.v1.UnsubscribeConfigurationRequest\x1a\x37.dapr.proto.runtime.v1.UnsubscribeConfigurationResponse\"\x00\x12`\n\rTryLockAlpha1\x12%.dapr.proto.runtime.v1.TryLockRequest\x1a&.dapr.proto.runtime.v1.TryLockResponse\"\x00\x12]\n\x0cUnlockAlpha1\x12$.dapr.proto.runtime.v1.UnlockRequest\x1a%.dapr.proto.runtime.v1.UnlockResponse\"\x00\x12\x62\n\rEncryptAlpha1\x12%.dapr.proto.runtime.v1.EncryptRequest\x1a&.dapr.proto.runtime.v1.EncryptResponse(\x01\x30\x01\x12\x62\n\rDecryptAlpha1\x12%.dapr.proto.runtime.v1.DecryptRequest\x1a&.dapr.proto.runtime.v1.DecryptResponse(\x01\x30\x01\x12\x66\n\x0bGetMetadata\x12).dapr.proto.runtime.v1.GetMetadataRequest\x1a*.dapr.proto.runtime.v1.GetMetadataResponse\"\x00\x12R\n\x0bSetMetadata\x12).dapr.proto.runtime.v1.SetMetadataRequest\x1a\x16.google.protobuf.Empty\"\x00\x12m\n\x12SubtleGetKeyAlpha1\x12*.dapr.proto.runtime.v1.SubtleGetKeyRequest\x1a+.dapr.proto.runtime.v1.SubtleGetKeyResponse\x12p\n\x13SubtleEncryptAlpha1\x12+.dapr.proto.runtime.v1.SubtleEncryptRequest\x1a,.dapr.proto.runtime.v1.SubtleEncryptResponse\x12p\n\x13SubtleDecryptAlpha1\x12+.dapr.proto.runtime.v1.SubtleDecryptRequest\x1a,.dapr.proto.runtime.v1.SubtleDecryptResponse\x12p\n\x13SubtleWrapKeyAlpha1\x12+.dapr.proto.runtime.v1.SubtleWrapKeyRequest\x1a,.dapr.proto.runtime.v1.SubtleWrapKeyResponse\x12v\n\x15SubtleUnwrapKeyAlpha1\x12-.dapr.proto.runtime.v1.SubtleUnwrapKeyRequest\x1a..dapr.proto.runtime.v1.SubtleUnwrapKeyResponse\x12g\n\x10SubtleSignAlpha1\x12(.dapr.proto.runtime.v1.SubtleSignRequest\x1a).dapr.proto.runtime.v1.SubtleSignResponse\x12m\n\x12SubtleVerifyAlpha1\x12*.dapr.proto.runtime.v1.SubtleVerifyRequest\x1a+.dapr.proto.runtime.v1.SubtleVerifyResponse\x12u\n\x13StartWorkflowAlpha1\x12+.dapr.proto.runtime.v1.StartWorkflowRequest\x1a,.dapr.proto.runtime.v1.StartWorkflowResponse\"\x03\x88\x02\x01\x12o\n\x11GetWorkflowAlpha1\x12).dapr.proto.runtime.v1.GetWorkflowRequest\x1a*.dapr.proto.runtime.v1.GetWorkflowResponse\"\x03\x88\x02\x01\x12_\n\x13PurgeWorkflowAlpha1\x12+.dapr.proto.runtime.v1.PurgeWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x03\x88\x02\x01\x12g\n\x17TerminateWorkflowAlpha1\x12/.dapr.proto.runtime.v1.TerminateWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x03\x88\x02\x01\x12_\n\x13PauseWorkflowAlpha1\x12+.dapr.proto.runtime.v1.PauseWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x03\x88\x02\x01\x12\x61\n\x14ResumeWorkflowAlpha1\x12,.dapr.proto.runtime.v1.ResumeWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x03\x88\x02\x01\x12i\n\x18RaiseEventWorkflowAlpha1\x12\x30.dapr.proto.runtime.v1.RaiseEventWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x03\x88\x02\x01\x12q\n\x12StartWorkflowBeta1\x12+.dapr.proto.runtime.v1.StartWorkflowRequest\x1a,.dapr.proto.runtime.v1.StartWorkflowResponse\"\x00\x12k\n\x10GetWorkflowBeta1\x12).dapr.proto.runtime.v1.GetWorkflowRequest\x1a*.dapr.proto.runtime.v1.GetWorkflowResponse\"\x00\x12[\n\x12PurgeWorkflowBeta1\x12+.dapr.proto.runtime.v1.PurgeWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x63\n\x16TerminateWorkflowBeta1\x12/.dapr.proto.runtime.v1.TerminateWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x00\x12[\n\x12PauseWorkflowBeta1\x12+.dapr.proto.runtime.v1.PauseWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x00\x12]\n\x13ResumeWorkflowBeta1\x12,.dapr.proto.runtime.v1.ResumeWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x65\n\x17RaiseEventWorkflowBeta1\x12\x30.dapr.proto.runtime.v1.RaiseEventWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x00\x12L\n\x08Shutdown\x12&.dapr.proto.runtime.v1.ShutdownRequest\x1a\x16.google.protobuf.Empty\"\x00\x12l\n\x11ScheduleJobAlpha1\x12).dapr.proto.runtime.v1.ScheduleJobRequest\x1a*.dapr.proto.runtime.v1.ScheduleJobResponse\"\x00\x12]\n\x0cGetJobAlpha1\x12$.dapr.proto.runtime.v1.GetJobRequest\x1a%.dapr.proto.runtime.v1.GetJobResponse\"\x00\x12\x66\n\x0f\x44\x65leteJobAlpha1\x12\'.dapr.proto.runtime.v1.DeleteJobRequest\x1a(.dapr.proto.runtime.v1.DeleteJobResponse\"\x00\x12\x8d\x01\n\x18\x44\x65leteJobsByPrefixAlpha1\x12\x36.dapr.proto.runtime.v1.DeleteJobsByPrefixRequestAlpha1\x1a\x37.dapr.proto.runtime.v1.DeleteJobsByPrefixResponseAlpha1\"\x00\x12o\n\x0eListJobsAlpha1\x12,.dapr.proto.runtime.v1.ListJobsRequestAlpha1\x1a-.dapr.proto.runtime.v1.ListJobsResponseAlpha1\"\x00\x12k\n\x0e\x43onverseAlpha1\x12*.dapr.proto.runtime.v1.ConversationRequest\x1a+.dapr.proto.runtime.v1.ConversationResponse\"\x00\x12w\n\x0e\x43onverseAlpha2\x12\x30.dapr.proto.runtime.v1.ConversationRequestAlpha2\x1a\x31.dapr.proto.runtime.v1.ConversationResponseAlpha2\"\x00\x42i\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n dapr/proto/runtime/v1/dapr.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a!dapr/proto/common/v1/common.proto\x1a\"dapr/proto/runtime/v1/actors.proto\x1a\"dapr/proto/runtime/v1/pubsub.proto\x1a\"dapr/proto/runtime/v1/invoke.proto\x1a!dapr/proto/runtime/v1/state.proto\x1a#dapr/proto/runtime/v1/binding.proto\x1a\"dapr/proto/runtime/v1/secret.proto\x1a$dapr/proto/runtime/v1/metadata.proto\x1a)dapr/proto/runtime/v1/configuration.proto\x1a dapr/proto/runtime/v1/lock.proto\x1a\"dapr/proto/runtime/v1/crypto.proto\x1a$dapr/proto/runtime/v1/workflow.proto\x1a dapr/proto/runtime/v1/jobs.proto\x1a\x1e\x64\x61pr/proto/runtime/v1/ai.proto\"\x11\n\x0fShutdownRequest2\xbe\x38\n\x04\x44\x61pr\x12\x64\n\rInvokeService\x12+.dapr.proto.runtime.v1.InvokeServiceRequest\x1a$.dapr.proto.common.v1.InvokeResponse\"\x00\x12]\n\x08GetState\x12&.dapr.proto.runtime.v1.GetStateRequest\x1a\'.dapr.proto.runtime.v1.GetStateResponse\"\x00\x12i\n\x0cGetBulkState\x12*.dapr.proto.runtime.v1.GetBulkStateRequest\x1a+.dapr.proto.runtime.v1.GetBulkStateResponse\"\x00\x12N\n\tSaveState\x12\'.dapr.proto.runtime.v1.SaveStateRequest\x1a\x16.google.protobuf.Empty\"\x00\x12i\n\x10QueryStateAlpha1\x12(.dapr.proto.runtime.v1.QueryStateRequest\x1a).dapr.proto.runtime.v1.QueryStateResponse\"\x00\x12R\n\x0b\x44\x65leteState\x12).dapr.proto.runtime.v1.DeleteStateRequest\x1a\x16.google.protobuf.Empty\"\x00\x12Z\n\x0f\x44\x65leteBulkState\x12-.dapr.proto.runtime.v1.DeleteBulkStateRequest\x1a\x16.google.protobuf.Empty\"\x00\x12j\n\x17\x45xecuteStateTransaction\x12\x35.dapr.proto.runtime.v1.ExecuteStateTransactionRequest\x1a\x16.google.protobuf.Empty\"\x00\x12T\n\x0cPublishEvent\x12*.dapr.proto.runtime.v1.PublishEventRequest\x1a\x16.google.protobuf.Empty\"\x00\x12t\n\x16\x42ulkPublishEventAlpha1\x12).dapr.proto.runtime.v1.BulkPublishRequest\x1a*.dapr.proto.runtime.v1.BulkPublishResponse\"\x03\x88\x02\x01\x12k\n\x10\x42ulkPublishEvent\x12).dapr.proto.runtime.v1.BulkPublishRequest\x1a*.dapr.proto.runtime.v1.BulkPublishResponse\"\x00\x12\x97\x01\n\x1aSubscribeTopicEventsAlpha1\x12\x38.dapr.proto.runtime.v1.SubscribeTopicEventsRequestAlpha1\x1a\x39.dapr.proto.runtime.v1.SubscribeTopicEventsResponseAlpha1\"\x00(\x01\x30\x01\x12l\n\rInvokeBinding\x12+.dapr.proto.runtime.v1.InvokeBindingRequest\x1a,.dapr.proto.runtime.v1.InvokeBindingResponse\"\x00\x12`\n\tGetSecret\x12\'.dapr.proto.runtime.v1.GetSecretRequest\x1a(.dapr.proto.runtime.v1.GetSecretResponse\"\x00\x12l\n\rGetBulkSecret\x12+.dapr.proto.runtime.v1.GetBulkSecretRequest\x1a,.dapr.proto.runtime.v1.GetBulkSecretResponse\"\x00\x12`\n\x12RegisterActorTimer\x12\x30.dapr.proto.runtime.v1.RegisterActorTimerRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x64\n\x14UnregisterActorTimer\x12\x32.dapr.proto.runtime.v1.UnregisterActorTimerRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x66\n\x15RegisterActorReminder\x12\x33.dapr.proto.runtime.v1.RegisterActorReminderRequest\x1a\x16.google.protobuf.Empty\"\x00\x12j\n\x17UnregisterActorReminder\x12\x35.dapr.proto.runtime.v1.UnregisterActorReminderRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x9f\x01\n\x1eUnregisterActorRemindersByType\x12<.dapr.proto.runtime.v1.UnregisterActorRemindersByTypeRequest\x1a=.dapr.proto.runtime.v1.UnregisterActorRemindersByTypeResponse\"\x00\x12{\n\x12ListActorReminders\x12\x30.dapr.proto.runtime.v1.ListActorRemindersRequest\x1a\x31.dapr.proto.runtime.v1.ListActorRemindersResponse\"\x00\x12l\n\rGetActorState\x12+.dapr.proto.runtime.v1.GetActorStateRequest\x1a,.dapr.proto.runtime.v1.GetActorStateResponse\"\x00\x12u\n\x10GetActorReminder\x12..dapr.proto.runtime.v1.GetActorReminderRequest\x1a/.dapr.proto.runtime.v1.GetActorReminderResponse\"\x00\x12t\n\x1c\x45xecuteActorStateTransaction\x12:.dapr.proto.runtime.v1.ExecuteActorStateTransactionRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x66\n\x0bInvokeActor\x12).dapr.proto.runtime.v1.InvokeActorRequest\x1a*.dapr.proto.runtime.v1.InvokeActorResponse\"\x00\x12{\n\x16GetConfigurationAlpha1\x12..dapr.proto.runtime.v1.GetConfigurationRequest\x1a/.dapr.proto.runtime.v1.GetConfigurationResponse\"\x00\x12u\n\x10GetConfiguration\x12..dapr.proto.runtime.v1.GetConfigurationRequest\x1a/.dapr.proto.runtime.v1.GetConfigurationResponse\"\x00\x12\x8f\x01\n\x1cSubscribeConfigurationAlpha1\x12\x34.dapr.proto.runtime.v1.SubscribeConfigurationRequest\x1a\x35.dapr.proto.runtime.v1.SubscribeConfigurationResponse\"\x00\x30\x01\x12\x89\x01\n\x16SubscribeConfiguration\x12\x34.dapr.proto.runtime.v1.SubscribeConfigurationRequest\x1a\x35.dapr.proto.runtime.v1.SubscribeConfigurationResponse\"\x00\x30\x01\x12\x93\x01\n\x1eUnsubscribeConfigurationAlpha1\x12\x36.dapr.proto.runtime.v1.UnsubscribeConfigurationRequest\x1a\x37.dapr.proto.runtime.v1.UnsubscribeConfigurationResponse\"\x00\x12\x8d\x01\n\x18UnsubscribeConfiguration\x12\x36.dapr.proto.runtime.v1.UnsubscribeConfigurationRequest\x1a\x37.dapr.proto.runtime.v1.UnsubscribeConfigurationResponse\"\x00\x12`\n\rTryLockAlpha1\x12%.dapr.proto.runtime.v1.TryLockRequest\x1a&.dapr.proto.runtime.v1.TryLockResponse\"\x00\x12]\n\x0cUnlockAlpha1\x12$.dapr.proto.runtime.v1.UnlockRequest\x1a%.dapr.proto.runtime.v1.UnlockResponse\"\x00\x12\x62\n\rEncryptAlpha1\x12%.dapr.proto.runtime.v1.EncryptRequest\x1a&.dapr.proto.runtime.v1.EncryptResponse(\x01\x30\x01\x12\x62\n\rDecryptAlpha1\x12%.dapr.proto.runtime.v1.DecryptRequest\x1a&.dapr.proto.runtime.v1.DecryptResponse(\x01\x30\x01\x12\x66\n\x0bGetMetadata\x12).dapr.proto.runtime.v1.GetMetadataRequest\x1a*.dapr.proto.runtime.v1.GetMetadataResponse\"\x00\x12R\n\x0bSetMetadata\x12).dapr.proto.runtime.v1.SetMetadataRequest\x1a\x16.google.protobuf.Empty\"\x00\x12m\n\x12SubtleGetKeyAlpha1\x12*.dapr.proto.runtime.v1.SubtleGetKeyRequest\x1a+.dapr.proto.runtime.v1.SubtleGetKeyResponse\x12p\n\x13SubtleEncryptAlpha1\x12+.dapr.proto.runtime.v1.SubtleEncryptRequest\x1a,.dapr.proto.runtime.v1.SubtleEncryptResponse\x12p\n\x13SubtleDecryptAlpha1\x12+.dapr.proto.runtime.v1.SubtleDecryptRequest\x1a,.dapr.proto.runtime.v1.SubtleDecryptResponse\x12p\n\x13SubtleWrapKeyAlpha1\x12+.dapr.proto.runtime.v1.SubtleWrapKeyRequest\x1a,.dapr.proto.runtime.v1.SubtleWrapKeyResponse\x12v\n\x15SubtleUnwrapKeyAlpha1\x12-.dapr.proto.runtime.v1.SubtleUnwrapKeyRequest\x1a..dapr.proto.runtime.v1.SubtleUnwrapKeyResponse\x12g\n\x10SubtleSignAlpha1\x12(.dapr.proto.runtime.v1.SubtleSignRequest\x1a).dapr.proto.runtime.v1.SubtleSignResponse\x12m\n\x12SubtleVerifyAlpha1\x12*.dapr.proto.runtime.v1.SubtleVerifyRequest\x1a+.dapr.proto.runtime.v1.SubtleVerifyResponse\x12u\n\x13StartWorkflowAlpha1\x12+.dapr.proto.runtime.v1.StartWorkflowRequest\x1a,.dapr.proto.runtime.v1.StartWorkflowResponse\"\x03\x88\x02\x01\x12o\n\x11GetWorkflowAlpha1\x12).dapr.proto.runtime.v1.GetWorkflowRequest\x1a*.dapr.proto.runtime.v1.GetWorkflowResponse\"\x03\x88\x02\x01\x12_\n\x13PurgeWorkflowAlpha1\x12+.dapr.proto.runtime.v1.PurgeWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x03\x88\x02\x01\x12g\n\x17TerminateWorkflowAlpha1\x12/.dapr.proto.runtime.v1.TerminateWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x03\x88\x02\x01\x12_\n\x13PauseWorkflowAlpha1\x12+.dapr.proto.runtime.v1.PauseWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x03\x88\x02\x01\x12\x61\n\x14ResumeWorkflowAlpha1\x12,.dapr.proto.runtime.v1.ResumeWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x03\x88\x02\x01\x12i\n\x18RaiseEventWorkflowAlpha1\x12\x30.dapr.proto.runtime.v1.RaiseEventWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x03\x88\x02\x01\x12q\n\x12StartWorkflowBeta1\x12+.dapr.proto.runtime.v1.StartWorkflowRequest\x1a,.dapr.proto.runtime.v1.StartWorkflowResponse\"\x00\x12k\n\x10GetWorkflowBeta1\x12).dapr.proto.runtime.v1.GetWorkflowRequest\x1a*.dapr.proto.runtime.v1.GetWorkflowResponse\"\x00\x12[\n\x12PurgeWorkflowBeta1\x12+.dapr.proto.runtime.v1.PurgeWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x63\n\x16TerminateWorkflowBeta1\x12/.dapr.proto.runtime.v1.TerminateWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x00\x12[\n\x12PauseWorkflowBeta1\x12+.dapr.proto.runtime.v1.PauseWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x00\x12]\n\x13ResumeWorkflowBeta1\x12,.dapr.proto.runtime.v1.ResumeWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x65\n\x17RaiseEventWorkflowBeta1\x12\x30.dapr.proto.runtime.v1.RaiseEventWorkflowRequest\x1a\x16.google.protobuf.Empty\"\x00\x12L\n\x08Shutdown\x12&.dapr.proto.runtime.v1.ShutdownRequest\x1a\x16.google.protobuf.Empty\"\x00\x12l\n\x11ScheduleJobAlpha1\x12).dapr.proto.runtime.v1.ScheduleJobRequest\x1a*.dapr.proto.runtime.v1.ScheduleJobResponse\"\x00\x12]\n\x0cGetJobAlpha1\x12$.dapr.proto.runtime.v1.GetJobRequest\x1a%.dapr.proto.runtime.v1.GetJobResponse\"\x00\x12\x66\n\x0f\x44\x65leteJobAlpha1\x12\'.dapr.proto.runtime.v1.DeleteJobRequest\x1a(.dapr.proto.runtime.v1.DeleteJobResponse\"\x00\x12\x8d\x01\n\x18\x44\x65leteJobsByPrefixAlpha1\x12\x36.dapr.proto.runtime.v1.DeleteJobsByPrefixRequestAlpha1\x1a\x37.dapr.proto.runtime.v1.DeleteJobsByPrefixResponseAlpha1\"\x00\x12o\n\x0eListJobsAlpha1\x12,.dapr.proto.runtime.v1.ListJobsRequestAlpha1\x1a-.dapr.proto.runtime.v1.ListJobsResponseAlpha1\"\x00\x12k\n\x0e\x43onverseAlpha1\x12*.dapr.proto.runtime.v1.ConversationRequest\x1a+.dapr.proto.runtime.v1.ConversationResponse\"\x00\x12w\n\x0e\x43onverseAlpha2\x12\x30.dapr.proto.runtime.v1.ConversationRequestAlpha2\x1a\x31.dapr.proto.runtime.v1.ConversationResponseAlpha2\"\x00\x42i\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -47,6 +47,8 @@ if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' + _globals['_DAPR'].methods_by_name['BulkPublishEventAlpha1']._loaded_options = None + _globals['_DAPR'].methods_by_name['BulkPublishEventAlpha1']._serialized_options = b'\210\002\001' _globals['_DAPR'].methods_by_name['StartWorkflowAlpha1']._loaded_options = None _globals['_DAPR'].methods_by_name['StartWorkflowAlpha1']._serialized_options = b'\210\002\001' _globals['_DAPR'].methods_by_name['GetWorkflowAlpha1']._loaded_options = None @@ -64,5 +66,5 @@ _globals['_SHUTDOWNREQUEST']._serialized_start=594 _globals['_SHUTDOWNREQUEST']._serialized_end=611 _globals['_DAPR']._serialized_start=614 - _globals['_DAPR']._serialized_end=7732 + _globals['_DAPR']._serialized_end=7844 # @@protoc_insertion_point(module_scope) diff --git a/dapr/proto/runtime/v1/dapr_pb2_grpc.py b/dapr/proto/runtime/v1/dapr_pb2_grpc.py index 5d9cc0c95..803556190 100644 --- a/dapr/proto/runtime/v1/dapr_pb2_grpc.py +++ b/dapr/proto/runtime/v1/dapr_pb2_grpc.py @@ -100,6 +100,11 @@ def __init__(self, channel): request_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_pubsub__pb2.BulkPublishRequest.SerializeToString, response_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_pubsub__pb2.BulkPublishResponse.FromString, _registered_method=True) + self.BulkPublishEvent = channel.unary_unary( + '/dapr.proto.runtime.v1.Dapr/BulkPublishEvent', + request_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_pubsub__pb2.BulkPublishRequest.SerializeToString, + response_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_pubsub__pb2.BulkPublishResponse.FromString, + _registered_method=True) self.SubscribeTopicEventsAlpha1 = channel.stream_stream( '/dapr.proto.runtime.v1.Dapr/SubscribeTopicEventsAlpha1', request_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_pubsub__pb2.SubscribeTopicEventsRequestAlpha1.SerializeToString, @@ -446,6 +451,13 @@ def PublishEvent(self, request, context): raise NotImplementedError('Method not implemented!') def BulkPublishEventAlpha1(self, request, context): + """Deprecated: Bulk Publishes multiple events to the specified topic. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def BulkPublishEvent(self, request, context): """Bulk Publishes multiple events to the specified topic. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -887,6 +899,11 @@ def add_DaprServicer_to_server(servicer, server): request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_pubsub__pb2.BulkPublishRequest.FromString, response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_pubsub__pb2.BulkPublishResponse.SerializeToString, ), + 'BulkPublishEvent': grpc.unary_unary_rpc_method_handler( + servicer.BulkPublishEvent, + request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_pubsub__pb2.BulkPublishRequest.FromString, + response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_pubsub__pb2.BulkPublishResponse.SerializeToString, + ), 'SubscribeTopicEventsAlpha1': grpc.stream_stream_rpc_method_handler( servicer.SubscribeTopicEventsAlpha1, request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_pubsub__pb2.SubscribeTopicEventsRequestAlpha1.FromString, @@ -1444,6 +1461,33 @@ def BulkPublishEventAlpha1(request, metadata, _registered_method=True) + @staticmethod + def BulkPublishEvent(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/dapr.proto.runtime.v1.Dapr/BulkPublishEvent', + dapr_dot_proto_dot_runtime_dot_v1_dot_pubsub__pb2.BulkPublishRequest.SerializeToString, + dapr_dot_proto_dot_runtime_dot_v1_dot_pubsub__pb2.BulkPublishResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + @staticmethod def SubscribeTopicEventsAlpha1(request_iterator, target, diff --git a/tests/clients/fake_dapr_server.py b/tests/clients/fake_dapr_server.py index 73cd22fd9..742b96763 100644 --- a/tests/clients/fake_dapr_server.py +++ b/tests/clients/fake_dapr_server.py @@ -582,6 +582,20 @@ def ConverseAlpha2(self, request, context): # Create result for this input result = api_v1.ConversationResultAlpha2(choices=choices) + if hasattr(result, 'model'): + result.model = 'test-llm' + if hasattr(result, 'usage'): + try: + usage_cls = getattr(api_v1, 'ConversationResultAlpha2CompletionUsage', None) + if usage_cls is not None: + u = usage_cls( + completion_tokens=10, + prompt_tokens=5, + total_tokens=15, + ) + result.usage.CopyFrom(u) + except Exception: + pass outputs.append(result) return api_v1.ConversationResponseAlpha2( diff --git a/tests/clients/test_conversation.py b/tests/clients/test_conversation.py index 50daebc64..105c7b291 100644 --- a/tests/clients/test_conversation.py +++ b/tests/clients/test_conversation.py @@ -17,7 +17,9 @@ import json import unittest import uuid +from unittest.mock import Mock, patch +from google.protobuf.struct_pb2 import Struct from google.rpc import code_pb2, status_pb2 from dapr.aio.clients import DaprClient as AsyncDaprClient @@ -37,12 +39,16 @@ ConversationResponseAlpha2, ConversationResultAlpha2, ConversationResultAlpha2Choices, + ConversationResultAlpha2CompletionUsage, + ConversationResultAlpha2CompletionUsageCompletionTokensDetails, + ConversationResultAlpha2CompletionUsagePromptTokensDetails, ConversationResultAlpha2Message, ConversationToolCalls, ConversationToolCallsOfFunction, ConversationTools, ConversationToolsFunction, FunctionBackend, + _get_outputs_from_grpc_response, create_assistant_message, create_system_message, create_tool_message, @@ -248,6 +254,14 @@ def test_basic_conversation_alpha2(self): self.assertEqual(choice.finish_reason, 'stop') self.assertIn('Hello Alpha2!', choice.message.content) + out = response.outputs[0] + if out.model is not None: + self.assertEqual(out.model, 'test-llm') + if out.usage is not None: + self.assertGreaterEqual(out.usage.total_tokens, 15) + self.assertGreaterEqual(out.usage.prompt_tokens, 5) + self.assertGreaterEqual(out.usage.completion_tokens, 10) + def test_conversation_alpha2_with_system_message(self): """Test Alpha2 conversation with system message.""" system_message = create_system_message('You are a helpful assistant.') @@ -1107,6 +1121,186 @@ def test_empty_and_none_outputs(self): self.assertEqual(response_none.to_assistant_messages(), []) +class TestConversationResultAlpha2ModelAndUsage(unittest.TestCase): + """Tests for model and usage fields on ConversationResultAlpha2 and related types.""" + + def test_result_alpha2_has_model_and_usage_attributes(self): + """ConversationResultAlpha2 accepts and exposes model and usage.""" + msg = ConversationResultAlpha2Message(content='Hi', tool_calls=[]) + choice = ConversationResultAlpha2Choices(finish_reason='stop', index=0, message=msg) + usage = ConversationResultAlpha2CompletionUsage( + completion_tokens=10, + prompt_tokens=5, + total_tokens=15, + ) + result = ConversationResultAlpha2( + choices=[choice], + model='test-model-1', + usage=usage, + ) + self.assertEqual(result.model, 'test-model-1') + self.assertIsNotNone(result.usage) + self.assertEqual(result.usage.completion_tokens, 10) + self.assertEqual(result.usage.prompt_tokens, 5) + self.assertEqual(result.usage.total_tokens, 15) + + def test_result_alpha2_model_and_usage_default_none(self): + """ConversationResultAlpha2 optional fields default to None when not provided. + + When the API returns a response, model and usage are set from the conversation + component. This test only checks that the dataclass defaults are None when + constructing with choices only. + """ + msg = ConversationResultAlpha2Message(content='Hi', tool_calls=[]) + choice = ConversationResultAlpha2Choices(finish_reason='stop', index=0, message=msg) + result = ConversationResultAlpha2(choices=[choice]) + self.assertIsNone(result.model) + self.assertIsNone(result.usage) + + def test_usage_completion_and_prompt_details(self): + """ConversationResultAlpha2CompletionUsage supports details.""" + completion_details = ConversationResultAlpha2CompletionUsageCompletionTokensDetails( + accepted_prediction_tokens=1, + audio_tokens=2, + reasoning_tokens=3, + rejected_prediction_tokens=0, + ) + prompt_details = ConversationResultAlpha2CompletionUsagePromptTokensDetails( + audio_tokens=0, + cached_tokens=4, + ) + usage = ConversationResultAlpha2CompletionUsage( + completion_tokens=10, + prompt_tokens=5, + total_tokens=15, + completion_tokens_details=completion_details, + prompt_tokens_details=prompt_details, + ) + self.assertEqual(usage.completion_tokens_details.accepted_prediction_tokens, 1) + self.assertEqual(usage.completion_tokens_details.audio_tokens, 2) + self.assertEqual(usage.completion_tokens_details.reasoning_tokens, 3) + self.assertEqual(usage.completion_tokens_details.rejected_prediction_tokens, 0) + self.assertEqual(usage.prompt_tokens_details.audio_tokens, 0) + self.assertEqual(usage.prompt_tokens_details.cached_tokens, 4) + self.assertEqual(usage.total_tokens, 15) + self.assertEqual(usage.completion_tokens, 10) + self.assertEqual(usage.prompt_tokens, 5) + + def test_get_outputs_from_grpc_response_populates_model_and_usage(self): + """_get_outputs_from_grpc_response sets model and usage when present on proto.""" + from unittest import mock + + # Build a mock proto response with one output that has model and usage + mock_usage = mock.Mock() + mock_usage.completion_tokens = 20 + mock_usage.prompt_tokens = 8 + mock_usage.total_tokens = 28 + mock_usage.completion_tokens_details = None + mock_usage.prompt_tokens_details = None + + mock_choice_msg = mock.Mock() + mock_choice_msg.content = 'Hello' + mock_choice_msg.tool_calls = [] + + mock_choice = mock.Mock() + mock_choice.finish_reason = 'stop' + mock_choice.index = 0 + mock_choice.message = mock_choice_msg + + mock_output = mock.Mock() + mock_output.model = 'gpt-4o-mini' + mock_output.usage = mock_usage + mock_output.choices = [mock_choice] + + mock_response = mock.Mock() + mock_response.outputs = [mock_output] + + outputs = _get_outputs_from_grpc_response(mock_response) + self.assertEqual(len(outputs), 1) + out = outputs[0] + self.assertEqual(out.model, 'gpt-4o-mini') + self.assertIsNotNone(out.usage) + self.assertEqual(out.usage.completion_tokens, 20) + self.assertEqual(out.usage.prompt_tokens, 8) + self.assertEqual(out.usage.total_tokens, 28) + self.assertEqual(len(out.choices), 1) + self.assertEqual(out.choices[0].message.content, 'Hello') + + def test_get_outputs_from_grpc_response_without_model_usage(self): + """_get_outputs_from_grpc_response leaves model and usage None when absent.""" + from unittest import mock + + mock_choice_msg = mock.Mock() + mock_choice_msg.content = 'Echo' + mock_choice_msg.tool_calls = [] + + mock_choice = mock.Mock() + mock_choice.finish_reason = 'stop' + mock_choice.index = 0 + mock_choice.message = mock_choice_msg + + mock_output = mock.Mock(spec=['choices']) + mock_output.choices = [mock_choice] + # No model or usage attributes + + mock_response = mock.Mock() + mock_response.outputs = [mock_output] + + outputs = _get_outputs_from_grpc_response(mock_response) + self.assertEqual(len(outputs), 1) + out = outputs[0] + self.assertIsNone(out.model) + self.assertIsNone(out.usage) + self.assertEqual(out.choices[0].message.content, 'Echo') + + +class ConverseAlpha2ResponseFormatTests(unittest.TestCase): + """Unit tests for converse_alpha2 response_format parameter.""" + + def test_converse_alpha2_passes_response_format_on_request(self): + """converse_alpha2 sets response_format on the gRPC request when provided.""" + user_message = create_user_message('Structured output please') + input_alpha2 = ConversationInputAlpha2(messages=[user_message]) + response_format = Struct() + response_format.update( + {'type': 'json_schema', 'json_schema': {'name': 'test', 'schema': {}}} + ) + + captured_requests = [] + mock_choice_msg = Mock() + mock_choice_msg.content = 'ok' + mock_choice_msg.tool_calls = [] + mock_choice = Mock() + mock_choice.finish_reason = 'stop' + mock_choice.index = 0 + mock_choice.message = mock_choice_msg + mock_output = Mock() + mock_output.choices = [mock_choice] + mock_response = Mock() + mock_response.outputs = [mock_output] + mock_response.context_id = '' + mock_call = Mock() + + def capture_run_rpc(rpc, request, *args, **kwargs): + captured_requests.append(request) + return (mock_response, mock_call) + + with patch('dapr.clients.health.DaprHealth.wait_for_sidecar'): + client = DaprClient('localhost:50011') + with patch.object(client.retry_policy, 'run_rpc', side_effect=capture_run_rpc): + client.converse_alpha2( + name='test-llm', + inputs=[input_alpha2], + response_format=response_format, + ) + + self.assertEqual(len(captured_requests), 1) + req = captured_requests[0] + self.assertTrue(hasattr(req, 'response_format')) + self.assertEqual(req.response_format['type'], 'json_schema') + self.assertEqual(req.response_format['json_schema']['name'], 'test') + + class ExecuteRegisteredToolSyncTests(unittest.TestCase): def tearDown(self): # Cleanup all tools we may have registered by name prefix From 83926063b4a2025cf4a95d282b153906809b389c Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 6 Feb 2026 14:42:46 -0600 Subject: [PATCH 07/22] fix: signal when dt reader stream is ready within wf client start call (#901) * fix: signal when dt reader stream is ready within wf client start call Signed-off-by: Samantha Coyle * style: appease linter Signed-off-by: Samantha Coyle * fix: enable configurability + lint fixes Signed-off-by: Samantha Coyle * fix(build): add tests and fix bug Signed-off-by: Samantha Coyle * fix(build): add more tests Signed-off-by: Samantha Coyle * style: appease linter Signed-off-by: Samantha Coyle * fix(build): add another test Signed-off-by: Samantha Coyle * test: add even more tests for build to pass lol Signed-off-by: Samantha Coyle --------- Signed-off-by: Samantha Coyle --- .../dapr/ext/workflow/logger/logger.py | 3 + .../dapr/ext/workflow/workflow_runtime.py | 110 +++++++++++++-- .../tests/test_workflow_runtime.py | 127 ++++++++++++++++++ 3 files changed, 229 insertions(+), 11 deletions(-) diff --git a/ext/dapr-ext-workflow/dapr/ext/workflow/logger/logger.py b/ext/dapr-ext-workflow/dapr/ext/workflow/logger/logger.py index b93e7074f..dd33cab86 100644 --- a/ext/dapr-ext-workflow/dapr/ext/workflow/logger/logger.py +++ b/ext/dapr-ext-workflow/dapr/ext/workflow/logger/logger.py @@ -32,5 +32,8 @@ def warning(self, msg, *args, **kwargs): def error(self, msg, *args, **kwargs): self._logger.error(msg, *args, **kwargs) + def exception(self, msg, *args, **kwargs): + self._logger.exception(msg, *args, **kwargs) + def critical(self, msg, *args, **kwargs): self._logger.critical(msg, *args, **kwargs) diff --git a/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_runtime.py b/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_runtime.py index 58b0912a0..9f5edb2b4 100644 --- a/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_runtime.py +++ b/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_runtime.py @@ -14,6 +14,7 @@ """ import inspect +import time from functools import wraps from typing import Optional, Sequence, TypeVar, Union @@ -54,8 +55,11 @@ def __init__( maximum_concurrent_activity_work_items: Optional[int] = None, maximum_concurrent_orchestration_work_items: Optional[int] = None, maximum_thread_pool_workers: Optional[int] = None, + worker_ready_timeout: Optional[float] = None, ): self._logger = Logger('WorkflowRuntime', logger_options) + self._worker_ready_timeout = 30.0 if worker_ready_timeout is None else worker_ready_timeout + metadata = tuple() if settings.DAPR_API_TOKEN: metadata = ((DAPR_API_TOKEN_HEADER, settings.DAPR_API_TOKEN),) @@ -86,10 +90,20 @@ def register_workflow(self, fn: Workflow, *, name: Optional[str] = None): def orchestrationWrapper(ctx: task.OrchestrationContext, inp: Optional[TInput] = None): """Responsible to call Workflow function in orchestrationWrapper""" - daprWfContext = DaprWorkflowContext(ctx, self._logger.get_options()) - if inp is None: - return fn(daprWfContext) - return fn(daprWfContext, inp) + instance_id = getattr(ctx, 'instance_id', 'unknown') + + try: + daprWfContext = DaprWorkflowContext(ctx, self._logger.get_options()) + if inp is None: + result = fn(daprWfContext) + else: + result = fn(daprWfContext, inp) + return result + except Exception as e: + self._logger.exception( + f'Workflow execution failed - instance_id: {instance_id}, error: {e}' + ) + raise if hasattr(fn, '_workflow_registered'): # whenever a workflow is registered, it has a _dapr_alternate_name attribute @@ -152,10 +166,20 @@ def register_activity(self, fn: Activity, *, name: Optional[str] = None): def activityWrapper(ctx: task.ActivityContext, inp: Optional[TInput] = None): """Responsible to call Activity function in activityWrapper""" - wfActivityContext = WorkflowActivityContext(ctx) - if inp is None: - return fn(wfActivityContext) - return fn(wfActivityContext, inp) + activity_id = getattr(ctx, 'task_id', 'unknown') + + try: + wfActivityContext = WorkflowActivityContext(ctx) + if inp is None: + result = fn(wfActivityContext) + else: + result = fn(wfActivityContext, inp) + return result + except Exception as e: + self._logger.exception( + f'Activity execution failed - task_id: {activity_id}, error: {e}' + ) + raise if hasattr(fn, '_activity_registered'): # whenever an activity is registered, it has a _dapr_alternate_name attribute @@ -174,13 +198,77 @@ def activityWrapper(ctx: task.ActivityContext, inp: Optional[TInput] = None): ) fn.__dict__['_activity_registered'] = True + def wait_for_worker_ready(self, timeout: float = 30.0) -> bool: + """ + Wait for the worker's gRPC stream to become ready to receive work items. + This method polls the worker's is_worker_ready() method until it returns True + or the timeout is reached. + + Args: + timeout: Maximum time in seconds to wait for the worker to be ready. + Defaults to 30 seconds. + + Returns: + True if the worker's gRPC stream is ready to receive work items, False if timeout. + """ + if not hasattr(self.__worker, 'is_worker_ready'): + return False + + elapsed = 0.0 + poll_interval = 0.1 # 100ms + + while elapsed < timeout: + if self.__worker.is_worker_ready(): + return True + time.sleep(poll_interval) + elapsed += poll_interval + + self._logger.warning( + f'WorkflowRuntime worker readiness check timed out after {timeout} seconds' + ) + return False + def start(self): - """Starts the listening for work items on a background thread.""" - self.__worker.start() + """Starts the listening for work items on a background thread. + This method waits for the worker's gRPC stream to be fully initialized + before returning, ensuring that workflows can be scheduled immediately + after start() completes. + """ + try: + try: + self.__worker.start() + except Exception as start_error: + self._logger.exception(f'WorkflowRuntime worker did not start: {start_error}') + raise + + # Verify the worker and its stream reader are ready + if hasattr(self.__worker, 'is_worker_ready'): + try: + is_ready = self.wait_for_worker_ready(timeout=self._worker_ready_timeout) + if not is_ready: + raise RuntimeError('WorkflowRuntime worker and its stream are not ready') + else: + self._logger.debug( + 'WorkflowRuntime worker is ready and its stream can receive work items' + ) + except Exception as ready_error: + self._logger.exception( + f'WorkflowRuntime wait_for_worker_ready() raised exception: {ready_error}' + ) + raise ready_error + else: + self._logger.warning( + 'Unable to verify stream readiness. Workflows scheduled immediately may not be received.' + ) + except Exception: + raise def shutdown(self): """Stops the listening for work items on a background thread.""" - self.__worker.stop() + try: + self.__worker.stop() + except Exception: + raise def versioned_workflow( self, diff --git a/ext/dapr-ext-workflow/tests/test_workflow_runtime.py b/ext/dapr-ext-workflow/tests/test_workflow_runtime.py index bf18cd689..16eb4946f 100644 --- a/ext/dapr-ext-workflow/tests/test_workflow_runtime.py +++ b/ext/dapr-ext-workflow/tests/test_workflow_runtime.py @@ -26,11 +26,17 @@ class FakeTaskHubGrpcWorker: + def __init__(self): + self._orchestrator_fns = {} + self._activity_fns = {} + def add_named_orchestrator(self, name: str, fn): listOrchestrators.append(name) + self._orchestrator_fns[name] = fn def add_named_activity(self, name: str, fn): listActivities.append(name) + self._activity_fns[name] = fn class WorkflowRuntimeTest(unittest.TestCase): @@ -171,3 +177,124 @@ def test_decorator_register_optinal_name(self): wanted_activity = ['test_act'] assert listActivities == wanted_activity assert client_act._dapr_alternate_name == 'test_act' + + +class WorkflowRuntimeWorkerReadyTest(unittest.TestCase): + """Tests for wait_for_worker_ready() and start() stream readiness.""" + + def setUp(self): + listActivities.clear() + listOrchestrators.clear() + mock.patch('durabletask.worker._Registry', return_value=FakeTaskHubGrpcWorker()).start() + self.runtime = WorkflowRuntime() + + def test_wait_for_worker_ready_returns_false_when_no_is_worker_ready(self): + mock_worker = mock.MagicMock(spec=['start', 'stop', '_registry']) + del mock_worker.is_worker_ready + self.runtime._WorkflowRuntime__worker = mock_worker + self.assertFalse(self.runtime.wait_for_worker_ready(timeout=0.1)) + + def test_wait_for_worker_ready_returns_true_when_ready(self): + mock_worker = mock.MagicMock() + mock_worker.is_worker_ready.return_value = True + self.runtime._WorkflowRuntime__worker = mock_worker + self.assertTrue(self.runtime.wait_for_worker_ready(timeout=1.0)) + mock_worker.is_worker_ready.assert_called() + + def test_wait_for_worker_ready_returns_true_after_poll(self): + """Worker becomes ready on second poll.""" + mock_worker = mock.MagicMock() + mock_worker.is_worker_ready.side_effect = [False, True] + self.runtime._WorkflowRuntime__worker = mock_worker + self.assertTrue(self.runtime.wait_for_worker_ready(timeout=1.0)) + self.assertEqual(mock_worker.is_worker_ready.call_count, 2) + + def test_wait_for_worker_ready_returns_false_on_timeout(self): + mock_worker = mock.MagicMock() + mock_worker.is_worker_ready.return_value = False + self.runtime._WorkflowRuntime__worker = mock_worker + self.assertFalse(self.runtime.wait_for_worker_ready(timeout=0.2)) + + def test_start_succeeds_when_worker_ready(self): + mock_worker = mock.MagicMock() + mock_worker.is_worker_ready.return_value = True + self.runtime._WorkflowRuntime__worker = mock_worker + self.runtime.start() + mock_worker.start.assert_called_once() + mock_worker.is_worker_ready.assert_called() + + def test_start_logs_debug_when_worker_stream_ready(self): + """start() logs at debug when worker and stream are ready.""" + mock_worker = mock.MagicMock() + mock_worker.is_worker_ready.return_value = True + self.runtime._WorkflowRuntime__worker = mock_worker + with mock.patch.object(self.runtime._logger, 'debug') as mock_debug: + self.runtime.start() + mock_debug.assert_called_once() + call_args = mock_debug.call_args[0][0] + self.assertIn('ready', call_args) + self.assertIn('stream', call_args) + + def test_start_logs_exception_when_worker_start_fails(self): + """start() logs exception when worker.start() raises.""" + mock_worker = mock.MagicMock() + mock_worker.start.side_effect = RuntimeError('start failed') + self.runtime._WorkflowRuntime__worker = mock_worker + with mock.patch.object(self.runtime._logger, 'exception') as mock_exception: + with self.assertRaises(RuntimeError): + self.runtime.start() + mock_exception.assert_called_once() + self.assertIn('did not start', mock_exception.call_args[0][0]) + + def test_start_raises_when_worker_not_ready(self): + listActivities.clear() + listOrchestrators.clear() + mock.patch('durabletask.worker._Registry', return_value=FakeTaskHubGrpcWorker()).start() + runtime = WorkflowRuntime(worker_ready_timeout=0.2) + mock_worker = mock.MagicMock() + mock_worker.is_worker_ready.return_value = False + runtime._WorkflowRuntime__worker = mock_worker + with self.assertRaises(RuntimeError) as ctx: + runtime.start() + self.assertIn('not ready', str(ctx.exception)) + + def test_start_logs_warning_when_no_is_worker_ready(self): + mock_worker = mock.MagicMock(spec=['start', 'stop', '_registry']) + del mock_worker.is_worker_ready + self.runtime._WorkflowRuntime__worker = mock_worker + self.runtime.start() + mock_worker.start.assert_called_once() + + def test_worker_ready_timeout_init(self): + listActivities.clear() + listOrchestrators.clear() + mock.patch('durabletask.worker._Registry', return_value=FakeTaskHubGrpcWorker()).start() + rt = WorkflowRuntime(worker_ready_timeout=15.0) + self.assertEqual(rt._worker_ready_timeout, 15.0) + + def test_start_raises_when_worker_start_fails(self): + mock_worker = mock.MagicMock() + mock_worker.is_worker_ready.return_value = True + mock_worker.start.side_effect = RuntimeError('start failed') + self.runtime._WorkflowRuntime__worker = mock_worker + with self.assertRaises(RuntimeError) as ctx: + self.runtime.start() + self.assertIn('start failed', str(ctx.exception)) + mock_worker.start.assert_called_once() + + def test_start_raises_when_wait_for_worker_ready_raises(self): + mock_worker = mock.MagicMock() + mock_worker.start.return_value = None + mock_worker.is_worker_ready.side_effect = ValueError('ready check failed') + self.runtime._WorkflowRuntime__worker = mock_worker + with self.assertRaises(ValueError) as ctx: + self.runtime.start() + self.assertIn('ready check failed', str(ctx.exception)) + + def test_shutdown_raises_when_worker_stop_fails(self): + mock_worker = mock.MagicMock() + mock_worker.stop.side_effect = RuntimeError('stop failed') + self.runtime._WorkflowRuntime__worker = mock_worker + with self.assertRaises(RuntimeError) as ctx: + self.runtime.shutdown() + self.assertIn('stop failed', str(ctx.exception)) From 9b2c64154504b8f8a94e92462dd0b59a1d8769e7 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 9 Feb 2026 14:28:29 -0600 Subject: [PATCH 08/22] fix(build): capture latest + rereleases for dapr runtime + cli (#906) Signed-off-by: Samantha Coyle --- .github/workflows/validate_examples.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate_examples.yaml b/.github/workflows/validate_examples.yaml index cece4ea5a..a003bb025 100644 --- a/.github/workflows/validate_examples.yaml +++ b/.github/workflows/validate_examples.yaml @@ -65,14 +65,14 @@ jobs: repository: ${{ env.CHECKOUT_REPO }} ref: ${{ env.CHECKOUT_REF }} - uses: azure/setup-helm@v4 - - name: Determine latest Dapr Runtime version + - name: Determine latest Dapr Runtime version (including prerelease) run: | - helm repo add dapr https://dapr.github.io/helm-charts/ && helm repo update && export RUNTIME_VERSION=$(helm search repo dapr/dapr --devel --versions | awk '/dapr\/dapr/ {print $3; exit}' ) + RUNTIME_VERSION=$(curl -s "https://api.github.com/repos/dapr/dapr/releases" | grep '"tag_name"' | head -n 1 | cut -d ':' -f2 | tr -d '",v ') echo "DAPR_RUNTIME_VER=$RUNTIME_VERSION" >> $GITHUB_ENV echo "Found $RUNTIME_VERSION" - - name: Determine latest Dapr Cli version + - name: Determine latest Dapr Cli version (including prerelease) run: | - export CLI_VERSION=$(curl "https://api.github.com/repos/dapr/cli/releases/latest" --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | jq '.tag_name'| tr -d '",v') + CLI_VERSION=$(curl -s "https://api.github.com/repos/dapr/cli/releases" | grep '"tag_name"' | head -n 1 | cut -d ':' -f2 | tr -d '",v ') echo "DAPR_CLI_VER=$CLI_VERSION" >> $GITHUB_ENV echo "Found $CLI_VERSION" - name: Set up Python ${{ matrix.python_ver }} From 1662e5e276c3252c24d3ef1dc6c9c4e230ab565e Mon Sep 17 00:00:00 2001 From: Casper Nielsen Date: Mon, 9 Feb 2026 21:58:10 +0100 Subject: [PATCH 09/22] chore(deps): bump durabletask-dapr (#905) * chore(deps): bump durabletask-dapr Signed-off-by: Casper Nielsen * chore: bump again to see if fixes build Signed-off-by: Samantha Coyle --------- Signed-off-by: Casper Nielsen Signed-off-by: Samantha Coyle Co-authored-by: Samantha Coyle --- dev-requirements.txt | 2 +- ext/dapr-ext-workflow/setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index a0e45d61e..6a888c838 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -14,7 +14,7 @@ Flask>=1.1 # needed for auto fix ruff===0.14.1 # needed for dapr-ext-workflow -durabletask-dapr >= 0.2.0a16 +durabletask-dapr >= 0.2.0a18 # needed for .env file loading in examples python-dotenv>=1.0.0 # needed for enhanced schema generation from function features diff --git a/ext/dapr-ext-workflow/setup.cfg b/ext/dapr-ext-workflow/setup.cfg index 897a8116c..18aa85ab6 100644 --- a/ext/dapr-ext-workflow/setup.cfg +++ b/ext/dapr-ext-workflow/setup.cfg @@ -25,7 +25,7 @@ packages = find_namespace: include_package_data = True install_requires = dapr >= 1.17.0.dev - durabletask-dapr >= 0.2.0a16 + durabletask-dapr >= 0.2.0a18 [options.packages.find] include = From 9d9d6ec3d9ad4321fc46e1cbef06bb940adc405d Mon Sep 17 00:00:00 2001 From: Albert Callarisa Date: Wed, 11 Feb 2026 11:16:57 +0100 Subject: [PATCH 10/22] Update durabletask (#908) Signed-off-by: Albert Callarisa --- dev-requirements.txt | 2 +- ext/dapr-ext-workflow/setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 6a888c838..acf05f8bd 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -14,7 +14,7 @@ Flask>=1.1 # needed for auto fix ruff===0.14.1 # needed for dapr-ext-workflow -durabletask-dapr >= 0.2.0a18 +durabletask-dapr >= 0.2.0a19 # needed for .env file loading in examples python-dotenv>=1.0.0 # needed for enhanced schema generation from function features diff --git a/ext/dapr-ext-workflow/setup.cfg b/ext/dapr-ext-workflow/setup.cfg index 18aa85ab6..0c5c46624 100644 --- a/ext/dapr-ext-workflow/setup.cfg +++ b/ext/dapr-ext-workflow/setup.cfg @@ -25,7 +25,7 @@ packages = find_namespace: include_package_data = True install_requires = dapr >= 1.17.0.dev - durabletask-dapr >= 0.2.0a18 + durabletask-dapr >= 0.2.0a19 [options.packages.find] include = From a91c026c92e2377823c08f4f7ee0a642f1628651 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 12:17:49 +0100 Subject: [PATCH 11/22] Bump fossas/fossa-action from 1.7.0 to 1.8.0 (#904) Bumps [fossas/fossa-action](https://github.com/fossas/fossa-action) from 1.7.0 to 1.8.0. - [Release notes](https://github.com/fossas/fossa-action/releases) - [Commits](https://github.com/fossas/fossa-action/compare/v1.7.0...v1.8.0) --- updated-dependencies: - dependency-name: fossas/fossa-action dependency-version: 1.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yaron Schneider Co-authored-by: Albert Callarisa --- .github/workflows/fossa.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fossa.yaml b/.github/workflows/fossa.yaml index fda00b65c..3138c3818 100644 --- a/.github/workflows/fossa.yaml +++ b/.github/workflows/fossa.yaml @@ -45,12 +45,12 @@ jobs: uses: actions/checkout@v6 - name: "Run FOSSA Scan" - uses: fossas/fossa-action@v1.7.0 # Use a specific version if locking is preferred + uses: fossas/fossa-action@v1.8.0 # Use a specific version if locking is preferred with: api-key: ${{ env.FOSSA_API_KEY }} - name: "Run FOSSA Test" - uses: fossas/fossa-action@v1.7.0 # Use a specific version if locking is preferred + uses: fossas/fossa-action@v1.8.0 # Use a specific version if locking is preferred with: api-key: ${{ env.FOSSA_API_KEY }} run-tests: true From 903652746bebdd821a277432b9cd926ece6739d8 Mon Sep 17 00:00:00 2001 From: Albert Callarisa Date: Wed, 11 Feb 2026 14:28:14 +0100 Subject: [PATCH 12/22] Use backport github action (#911) Signed-off-by: Albert Callarisa --- .github/workflows/backport.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/backport.yaml diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml new file mode 100644 index 000000000..325c36378 --- /dev/null +++ b/.github/workflows/backport.yaml @@ -0,0 +1,24 @@ +name: Backport +on: + pull_request_target: + types: + - closed + - labeled + +jobs: + backport: + name: Backport + runs-on: ubuntu-latest + if: > + github.event.pull_request.merged + && ( + github.event.action == 'closed' + || ( + github.event.action == 'labeled' + && contains(github.event.label.name, 'backport') + ) + ) + steps: + - uses: tibdex/backport@v2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} From 8ac6070f89fa929a5f9029f77dd3277c7fb2ad51 Mon Sep 17 00:00:00 2001 From: Albert Callarisa Date: Wed, 11 Feb 2026 15:09:55 +0100 Subject: [PATCH 13/22] Add license to the backport action --- .github/workflows/backport.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml index 325c36378..17bebf47b 100644 --- a/.github/workflows/backport.yaml +++ b/.github/workflows/backport.yaml @@ -1,3 +1,16 @@ +# +# Copyright 2026 The Dapr Authors +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + name: Backport on: pull_request_target: From 4f5709a687dd62194026aefecda12d4b613ee627 Mon Sep 17 00:00:00 2001 From: Albert Callarisa Date: Thu, 12 Feb 2026 09:16:54 +0100 Subject: [PATCH 14/22] Update mypy_protobuf (#910) * Updated mypy-protobuf Signed-off-by: Albert Callarisa * ran `DAPR_BRANCH=release-1.17 ./tools/regen_grpcclient.sh` Signed-off-by: Albert Callarisa --------- Signed-off-by: Albert Callarisa --- dapr/proto/common/v1/common_pb2.pyi | 362 +++---- dapr/proto/runtime/v1/actors_pb2.py | 4 +- dapr/proto/runtime/v1/actors_pb2.pyi | 748 ++++++------- dapr/proto/runtime/v1/ai_pb2.py | 4 +- dapr/proto/runtime/v1/ai_pb2.pyi | 1078 +++++++++---------- dapr/proto/runtime/v1/appcallback_pb2.pyi | 702 ++++++------ dapr/proto/runtime/v1/binding_pb2.py | 4 +- dapr/proto/runtime/v1/binding_pb2.pyi | 118 +- dapr/proto/runtime/v1/configuration_pb2.py | 4 +- dapr/proto/runtime/v1/configuration_pb2.pyi | 262 ++--- dapr/proto/runtime/v1/crypto_pb2.py | 4 +- dapr/proto/runtime/v1/crypto_pb2.pyi | 614 +++++------ dapr/proto/runtime/v1/dapr_pb2.pyi | 20 +- dapr/proto/runtime/v1/invoke_pb2.py | 4 +- dapr/proto/runtime/v1/invoke_pb2.pyi | 44 +- dapr/proto/runtime/v1/jobs_pb2.py | 4 +- dapr/proto/runtime/v1/jobs_pb2.pyi | 260 ++--- dapr/proto/runtime/v1/lock_pb2.py | 4 +- dapr/proto/runtime/v1/lock_pb2.pyi | 114 +- dapr/proto/runtime/v1/metadata_pb2.py | 4 +- dapr/proto/runtime/v1/metadata_pb2.pyi | 526 ++++----- dapr/proto/runtime/v1/pubsub_pb2.py | 4 +- dapr/proto/runtime/v1/pubsub_pb2.pyi | 392 +++---- dapr/proto/runtime/v1/secret_pb2.py | 4 +- dapr/proto/runtime/v1/secret_pb2.pyi | 228 ++-- dapr/proto/runtime/v1/state_pb2.py | 4 +- dapr/proto/runtime/v1/state_pb2.pyi | 598 +++++----- dapr/proto/runtime/v1/workflow_pb2.py | 4 +- dapr/proto/runtime/v1/workflow_pb2.pyi | 318 +++--- tools/requirements.txt | 2 +- 30 files changed, 3222 insertions(+), 3216 deletions(-) diff --git a/dapr/proto/common/v1/common_pb2.pyi b/dapr/proto/common/v1/common_pb2.pyi index 8ddf0049e..1a610f022 100644 --- a/dapr/proto/common/v1/common_pb2.pyi +++ b/dapr/proto/common/v1/common_pb2.pyi @@ -14,26 +14,26 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import google.protobuf.any_pb2 -import google.protobuf.descriptor -import google.protobuf.duration_pb2 -import google.protobuf.internal.containers -import google.protobuf.internal.enum_type_wrapper -import google.protobuf.message +from collections import abc as _abc +from google.protobuf import any_pb2 as _any_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import duration_pb2 as _duration_pb2 +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class HTTPExtension(google.protobuf.message.Message): +@_typing.final +class HTTPExtension(_message.Message): """HTTPExtension includes HTTP verb and querystring when Dapr runtime delivers HTTP content. @@ -43,14 +43,14 @@ class HTTPExtension(google.protobuf.message.Message): Dapr runtime will parse POST as a verb and extract querystring to quersytring map. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor class _Verb: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _VerbEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[HTTPExtension._Verb.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _VerbEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[HTTPExtension._Verb.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor NONE: HTTPExtension._Verb.ValueType # 0 GET: HTTPExtension._Verb.ValueType # 1 HEAD: HTTPExtension._Verb.ValueType # 2 @@ -79,51 +79,51 @@ class HTTPExtension(google.protobuf.message.Message): TRACE: HTTPExtension.Verb.ValueType # 8 PATCH: HTTPExtension.Verb.ValueType # 9 - VERB_FIELD_NUMBER: builtins.int - QUERYSTRING_FIELD_NUMBER: builtins.int + VERB_FIELD_NUMBER: _builtins.int + QUERYSTRING_FIELD_NUMBER: _builtins.int verb: Global___HTTPExtension.Verb.ValueType """Required. HTTP verb.""" - querystring: builtins.str + querystring: _builtins.str """Optional. querystring represents an encoded HTTP url query string in the following format: name=value&name2=value2""" def __init__( self, *, verb: Global___HTTPExtension.Verb.ValueType = ..., - querystring: builtins.str = ..., + querystring: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["querystring", b"querystring", "verb", b"verb"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["querystring", b"querystring", "verb", b"verb"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___HTTPExtension: typing_extensions.TypeAlias = HTTPExtension +Global___HTTPExtension: _TypeAlias = HTTPExtension # noqa: Y015 -@typing.final -class InvokeRequest(google.protobuf.message.Message): +@_typing.final +class InvokeRequest(_message.Message): """InvokeRequest is the message to invoke a method with the data. This message is used in InvokeService of Dapr gRPC Service and OnInvoke of AppCallback gRPC service. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - METHOD_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - CONTENT_TYPE_FIELD_NUMBER: builtins.int - HTTP_EXTENSION_FIELD_NUMBER: builtins.int - method: builtins.str + METHOD_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + CONTENT_TYPE_FIELD_NUMBER: _builtins.int + HTTP_EXTENSION_FIELD_NUMBER: _builtins.int + method: _builtins.str """Required. method is a method name which will be invoked by caller.""" - content_type: builtins.str + content_type: _builtins.str """The type of data content. This field is required if data delivers http request body Otherwise, this is optional. """ - @property - def data(self) -> google.protobuf.any_pb2.Any: + @_builtins.property + def data(self) -> _any_pb2.Any: """Required in unary RPCs. Bytes value or Protobuf message which caller sent. Dapr treats Any.value as bytes type if Any.type_url is unset. """ - @property + @_builtins.property def http_extension(self) -> Global___HTTPExtension: """HTTP specific fields if request conveys http-compatible request. @@ -134,171 +134,171 @@ class InvokeRequest(google.protobuf.message.Message): def __init__( self, *, - method: builtins.str = ..., - data: google.protobuf.any_pb2.Any | None = ..., - content_type: builtins.str = ..., + method: _builtins.str = ..., + data: _any_pb2.Any | None = ..., + content_type: _builtins.str = ..., http_extension: Global___HTTPExtension | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data", "http_extension", b"http_extension"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["content_type", b"content_type", "data", b"data", "http_extension", b"http_extension", "method", b"method"] + _HasFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "http_extension", b"http_extension"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["content_type", b"content_type", "data", b"data", "http_extension", b"http_extension", "method", b"method"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___InvokeRequest: typing_extensions.TypeAlias = InvokeRequest +Global___InvokeRequest: _TypeAlias = InvokeRequest # noqa: Y015 -@typing.final -class InvokeResponse(google.protobuf.message.Message): +@_typing.final +class InvokeResponse(_message.Message): """InvokeResponse is the response message including data and its content type from app callback. This message is used in InvokeService of Dapr gRPC Service and OnInvoke of AppCallback gRPC service. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - DATA_FIELD_NUMBER: builtins.int - CONTENT_TYPE_FIELD_NUMBER: builtins.int - content_type: builtins.str + DATA_FIELD_NUMBER: _builtins.int + CONTENT_TYPE_FIELD_NUMBER: _builtins.int + content_type: _builtins.str """Required. The type of data content.""" - @property - def data(self) -> google.protobuf.any_pb2.Any: + @_builtins.property + def data(self) -> _any_pb2.Any: """Required in unary RPCs. The content body of InvokeService response.""" def __init__( self, *, - data: google.protobuf.any_pb2.Any | None = ..., - content_type: builtins.str = ..., + data: _any_pb2.Any | None = ..., + content_type: _builtins.str = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["content_type", b"content_type", "data", b"data"] + _HasFieldArgType: _TypeAlias = _typing.Literal["data", b"data"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["content_type", b"content_type", "data", b"data"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___InvokeResponse: typing_extensions.TypeAlias = InvokeResponse +Global___InvokeResponse: _TypeAlias = InvokeResponse # noqa: Y015 -@typing.final -class StreamPayload(google.protobuf.message.Message): +@_typing.final +class StreamPayload(_message.Message): """Chunk of data sent in a streaming request or response. This is used in requests including InternalInvokeRequestStream. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - DATA_FIELD_NUMBER: builtins.int - SEQ_FIELD_NUMBER: builtins.int - data: builtins.bytes + DATA_FIELD_NUMBER: _builtins.int + SEQ_FIELD_NUMBER: _builtins.int + data: _builtins.bytes """Data sent in the chunk. The amount of data included in each chunk is up to the discretion of the sender, and can be empty. Additionally, the amount of data doesn't need to be fixed and subsequent messages can send more, or less, data. Receivers must not make assumptions about the number of bytes they'll receive in each chunk. """ - seq: builtins.int + seq: _builtins.int """Sequence number. This is a counter that starts from 0 and increments by 1 on each chunk sent.""" def __init__( self, *, - data: builtins.bytes = ..., - seq: builtins.int = ..., + data: _builtins.bytes = ..., + seq: _builtins.int = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data", "seq", b"seq"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "seq", b"seq"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___StreamPayload: typing_extensions.TypeAlias = StreamPayload +Global___StreamPayload: _TypeAlias = StreamPayload # noqa: Y015 -@typing.final -class StateItem(google.protobuf.message.Message): +@_typing.final +class StateItem(_message.Message): """StateItem represents state key, value, and additional options to save state.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - ETAG_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - OPTIONS_FIELD_NUMBER: builtins.int - key: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + ETAG_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + OPTIONS_FIELD_NUMBER: _builtins.int + key: _builtins.str """Required. The state key""" - value: builtins.bytes + value: _builtins.bytes """Required. The state data for key""" - @property + @_builtins.property def etag(self) -> Global___Etag: """The entity tag which represents the specific version of data. The exact ETag format is defined by the corresponding data store. """ - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata which will be passed to state store component.""" - @property + @_builtins.property def options(self) -> Global___StateOptions: """Options for concurrency and consistency to save the state.""" def __init__( self, *, - key: builtins.str = ..., - value: builtins.bytes = ..., + key: _builtins.str = ..., + value: _builtins.bytes = ..., etag: Global___Etag | None = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., options: Global___StateOptions | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["etag", b"etag", "options", b"options"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["etag", b"etag", "key", b"key", "metadata", b"metadata", "options", b"options", "value", b"value"] + _HasFieldArgType: _TypeAlias = _typing.Literal["etag", b"etag", "options", b"options"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["etag", b"etag", "key", b"key", "metadata", b"metadata", "options", b"options", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___StateItem: typing_extensions.TypeAlias = StateItem +Global___StateItem: _TypeAlias = StateItem # noqa: Y015 -@typing.final -class Etag(google.protobuf.message.Message): +@_typing.final +class Etag(_message.Message): """Etag represents a state item version""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - VALUE_FIELD_NUMBER: builtins.int - value: builtins.str + VALUE_FIELD_NUMBER: _builtins.int + value: _builtins.str """value sets the etag value""" def __init__( self, *, - value: builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___Etag: typing_extensions.TypeAlias = Etag +Global___Etag: _TypeAlias = Etag # noqa: Y015 -@typing.final -class StateOptions(google.protobuf.message.Message): +@_typing.final +class StateOptions(_message.Message): """StateOptions configures concurrency and consistency for state operations""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor class _StateConcurrency: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _StateConcurrencyEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[StateOptions._StateConcurrency.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _StateConcurrencyEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StateOptions._StateConcurrency.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor CONCURRENCY_UNSPECIFIED: StateOptions._StateConcurrency.ValueType # 0 CONCURRENCY_FIRST_WRITE: StateOptions._StateConcurrency.ValueType # 1 CONCURRENCY_LAST_WRITE: StateOptions._StateConcurrency.ValueType # 2 @@ -311,11 +311,11 @@ class StateOptions(google.protobuf.message.Message): CONCURRENCY_LAST_WRITE: StateOptions.StateConcurrency.ValueType # 2 class _StateConsistency: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _StateConsistencyEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[StateOptions._StateConsistency.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _StateConsistencyEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StateOptions._StateConsistency.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor CONSISTENCY_UNSPECIFIED: StateOptions._StateConsistency.ValueType # 0 CONSISTENCY_EVENTUAL: StateOptions._StateConsistency.ValueType # 1 CONSISTENCY_STRONG: StateOptions._StateConsistency.ValueType # 2 @@ -327,8 +327,8 @@ class StateOptions(google.protobuf.message.Message): CONSISTENCY_EVENTUAL: StateOptions.StateConsistency.ValueType # 1 CONSISTENCY_STRONG: StateOptions.StateConsistency.ValueType # 2 - CONCURRENCY_FIELD_NUMBER: builtins.int - CONSISTENCY_FIELD_NUMBER: builtins.int + CONCURRENCY_FIELD_NUMBER: _builtins.int + CONSISTENCY_FIELD_NUMBER: _builtins.int concurrency: Global___StateOptions.StateConcurrency.ValueType consistency: Global___StateOptions.StateConsistency.ValueType def __init__( @@ -337,68 +337,68 @@ class StateOptions(google.protobuf.message.Message): concurrency: Global___StateOptions.StateConcurrency.ValueType = ..., consistency: Global___StateOptions.StateConsistency.ValueType = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["concurrency", b"concurrency", "consistency", b"consistency"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["concurrency", b"concurrency", "consistency", b"consistency"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___StateOptions: typing_extensions.TypeAlias = StateOptions +Global___StateOptions: _TypeAlias = StateOptions # noqa: Y015 -@typing.final -class ConfigurationItem(google.protobuf.message.Message): +@_typing.final +class ConfigurationItem(_message.Message): """ConfigurationItem represents all the configuration with its name(key).""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - VALUE_FIELD_NUMBER: builtins.int - VERSION_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - value: builtins.str + VALUE_FIELD_NUMBER: _builtins.int + VERSION_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + value: _builtins.str """Required. The value of configuration item.""" - version: builtins.str + version: _builtins.str """Version is response only and cannot be fetched. Store is not expected to keep all versions available""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """the metadata which will be passed to/from configuration store component.""" def __init__( self, *, - value: builtins.str = ..., - version: builtins.str = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + value: _builtins.str = ..., + version: _builtins.str = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["metadata", b"metadata", "value", b"value", "version", b"version"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["metadata", b"metadata", "value", b"value", "version", b"version"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ConfigurationItem: typing_extensions.TypeAlias = ConfigurationItem +Global___ConfigurationItem: _TypeAlias = ConfigurationItem # noqa: Y015 -@typing.final -class JobFailurePolicy(google.protobuf.message.Message): +@_typing.final +class JobFailurePolicy(_message.Message): """JobFailurePolicy defines the policy to apply when a job fails to trigger.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - DROP_FIELD_NUMBER: builtins.int - CONSTANT_FIELD_NUMBER: builtins.int - @property + DROP_FIELD_NUMBER: _builtins.int + CONSTANT_FIELD_NUMBER: _builtins.int + @_builtins.property def drop(self) -> Global___JobFailurePolicyDrop: ... - @property + @_builtins.property def constant(self) -> Global___JobFailurePolicyConstant: ... def __init__( self, @@ -406,56 +406,56 @@ class JobFailurePolicy(google.protobuf.message.Message): drop: Global___JobFailurePolicyDrop | None = ..., constant: Global___JobFailurePolicyConstant | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["constant", b"constant", "drop", b"drop", "policy", b"policy"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["constant", b"constant", "drop", b"drop", "policy", b"policy"] + _HasFieldArgType: _TypeAlias = _typing.Literal["constant", b"constant", "drop", b"drop", "policy", b"policy"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["constant", b"constant", "drop", b"drop", "policy", b"policy"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType_policy: typing_extensions.TypeAlias = typing.Literal["drop", "constant"] - _WhichOneofArgType_policy: typing_extensions.TypeAlias = typing.Literal["policy", b"policy"] + _WhichOneofReturnType_policy: _TypeAlias = _typing.Literal["drop", "constant"] # noqa: Y015 + _WhichOneofArgType_policy: _TypeAlias = _typing.Literal["policy", b"policy"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType_policy) -> _WhichOneofReturnType_policy | None: ... -Global___JobFailurePolicy: typing_extensions.TypeAlias = JobFailurePolicy +Global___JobFailurePolicy: _TypeAlias = JobFailurePolicy # noqa: Y015 -@typing.final -class JobFailurePolicyDrop(google.protobuf.message.Message): +@_typing.final +class JobFailurePolicyDrop(_message.Message): """JobFailurePolicyDrop is a policy which drops the job tick when the job fails to trigger.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor def __init__( self, ) -> None: ... -Global___JobFailurePolicyDrop: typing_extensions.TypeAlias = JobFailurePolicyDrop +Global___JobFailurePolicyDrop: _TypeAlias = JobFailurePolicyDrop # noqa: Y015 -@typing.final -class JobFailurePolicyConstant(google.protobuf.message.Message): +@_typing.final +class JobFailurePolicyConstant(_message.Message): """JobFailurePolicyConstant is a policy which retries the job at a consistent interval when the job fails to trigger.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - INTERVAL_FIELD_NUMBER: builtins.int - MAX_RETRIES_FIELD_NUMBER: builtins.int - max_retries: builtins.int + INTERVAL_FIELD_NUMBER: _builtins.int + MAX_RETRIES_FIELD_NUMBER: _builtins.int + max_retries: _builtins.int """max_retries is the optional maximum number of retries to attempt before giving up. If unset, the Job will be retried indefinitely. """ - @property - def interval(self) -> google.protobuf.duration_pb2.Duration: + @_builtins.property + def interval(self) -> _duration_pb2.Duration: """interval is the constant delay to wait before retrying the job.""" def __init__( self, *, - interval: google.protobuf.duration_pb2.Duration | None = ..., - max_retries: builtins.int | None = ..., + interval: _duration_pb2.Duration | None = ..., + max_retries: _builtins.int | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_max_retries", b"_max_retries", "interval", b"interval", "max_retries", b"max_retries"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_max_retries", b"_max_retries", "interval", b"interval", "max_retries", b"max_retries"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_max_retries", b"_max_retries", "interval", b"interval", "max_retries", b"max_retries"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_max_retries", b"_max_retries", "interval", b"interval", "max_retries", b"max_retries"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__max_retries: typing_extensions.TypeAlias = typing.Literal["max_retries"] - _WhichOneofArgType__max_retries: typing_extensions.TypeAlias = typing.Literal["_max_retries", b"_max_retries"] + _WhichOneofReturnType__max_retries: _TypeAlias = _typing.Literal["max_retries"] # noqa: Y015 + _WhichOneofArgType__max_retries: _TypeAlias = _typing.Literal["_max_retries", b"_max_retries"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType__max_retries) -> _WhichOneofReturnType__max_retries | None: ... -Global___JobFailurePolicyConstant: typing_extensions.TypeAlias = JobFailurePolicyConstant +Global___JobFailurePolicyConstant: _TypeAlias = JobFailurePolicyConstant # noqa: Y015 diff --git a/dapr/proto/runtime/v1/actors_pb2.py b/dapr/proto/runtime/v1/actors_pb2.py index 9a99221fb..28fa79df0 100644 --- a/dapr/proto/runtime/v1/actors_pb2.py +++ b/dapr/proto/runtime/v1/actors_pb2.py @@ -26,14 +26,14 @@ from dapr.proto.common.v1 import common_pb2 as dapr_dot_proto_dot_common_dot_v1_dot_common__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"dapr/proto/runtime/v1/actors.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\x19google/protobuf/any.proto\x1a!dapr/proto/common/v1/common.proto\"\xbb\x01\n\x19RegisterActorTimerRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torId\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x19\n\x08\x64ue_time\x18\x04 \x01(\tR\x07\x64ueTime\x12\x0e\n\x06period\x18\x05 \x01(\t\x12\x10\n\x08\x63\x61llback\x18\x06 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x07 \x01(\x0c\x12\x0b\n\x03ttl\x18\x08 \x01(\t\"e\n\x1bUnregisterActorTimerRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torId\x12\x0c\n\x04name\x18\x03 \x01(\t\"\xba\x02\n\x1cRegisterActorReminderRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torId\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x19\n\x08\x64ue_time\x18\x04 \x01(\tR\x07\x64ueTime\x12\x0e\n\x06period\x18\x05 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x06 \x01(\x0c\x12\x0b\n\x03ttl\x18\x07 \x01(\t\x12\x16\n\toverwrite\x18\x08 \x01(\x08H\x00\x88\x01\x01\x12S\n\x0e\x66\x61ilure_policy\x18\t \x01(\x0b\x32&.dapr.proto.common.v1.JobFailurePolicyH\x01R\x0e\x66\x61ilure_policy\x88\x01\x01\x42\x0c\n\n_overwriteB\x11\n\x0f_failure_policy\"h\n\x1eUnregisterActorReminderRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torId\x12\x0c\n\x04name\x18\x03 \x01(\t\"]\n\x14GetActorStateRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torId\x12\x0b\n\x03key\x18\x03 \x01(\t\"\xa4\x01\n\x15GetActorStateResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12L\n\x08metadata\x18\x02 \x03(\x0b\x32:.dapr.proto.runtime.v1.GetActorStateResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xac\x01\n#ExecuteActorStateTransactionRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torId\x12K\n\noperations\x18\x03 \x03(\x0b\x32\x37.dapr.proto.runtime.v1.TransactionalActorStateOperation\"\xf5\x01\n TransactionalActorStateOperation\x12\x15\n\roperationType\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.google.protobuf.Any\x12W\n\x08metadata\x18\x04 \x03(\x0b\x32\x45.dapr.proto.runtime.v1.TransactionalActorStateOperation.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xe8\x01\n\x12InvokeActorRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torId\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x12I\n\x08metadata\x18\x05 \x03(\x0b\x32\x37.dapr.proto.runtime.v1.InvokeActorRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"#\n\x13InvokeActorResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"a\n\x17GetActorReminderRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torID\x12\x0c\n\x04name\x18\x03 \x01(\t\"\xdf\x01\n\x18GetActorReminderResponse\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torID\x12\x1e\n\x08\x64ue_time\x18\x04 \x01(\tH\x00R\x07\x64ueTime\x88\x01\x01\x12\x13\n\x06period\x18\x05 \x01(\tH\x01\x88\x01\x01\x12\"\n\x04\x64\x61ta\x18\x06 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x10\n\x03ttl\x18\x07 \x01(\tH\x02\x88\x01\x01\x42\x0b\n\t_due_timeB\t\n\x07_periodB\x06\n\x04_ttl\"g\n\x19ListActorRemindersRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x1e\n\x08\x61\x63tor_id\x18\x02 \x01(\tH\x00R\x07\x61\x63torId\x88\x01\x01\x42\x0b\n\t_actor_id\"Z\n\x1aListActorRemindersResponse\x12<\n\treminders\x18\x01 \x03(\x0b\x32).dapr.proto.runtime.v1.NamedActorReminder\"Z\n\x12NamedActorReminder\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x36\n\x08reminder\x18\x02 \x01(\x0b\x32$.dapr.proto.runtime.v1.ActorReminder\"\xd4\x01\n\rActorReminder\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torID\x12\x1e\n\x08\x64ue_time\x18\x04 \x01(\tH\x00R\x07\x64ueTime\x88\x01\x01\x12\x13\n\x06period\x18\x05 \x01(\tH\x01\x88\x01\x01\x12\"\n\x04\x64\x61ta\x18\x06 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x10\n\x03ttl\x18\x07 \x01(\tH\x02\x88\x01\x01\x42\x0b\n\t_due_timeB\t\n\x07_periodB\x06\n\x04_ttl\"s\n%UnregisterActorRemindersByTypeRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x1e\n\x08\x61\x63tor_id\x18\x02 \x01(\tH\x00R\x07\x61\x63torId\x88\x01\x01\x42\x0b\n\t_actor_id\"(\n&UnregisterActorRemindersByTypeResponseBi\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"dapr/proto/runtime/v1/actors.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\x19google/protobuf/any.proto\x1a!dapr/proto/common/v1/common.proto\"\xbb\x01\n\x19RegisterActorTimerRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torId\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x19\n\x08\x64ue_time\x18\x04 \x01(\tR\x07\x64ueTime\x12\x0e\n\x06period\x18\x05 \x01(\t\x12\x10\n\x08\x63\x61llback\x18\x06 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x07 \x01(\x0c\x12\x0b\n\x03ttl\x18\x08 \x01(\t\"e\n\x1bUnregisterActorTimerRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torId\x12\x0c\n\x04name\x18\x03 \x01(\t\"\xba\x02\n\x1cRegisterActorReminderRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torId\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x19\n\x08\x64ue_time\x18\x04 \x01(\tR\x07\x64ueTime\x12\x0e\n\x06period\x18\x05 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x06 \x01(\x0c\x12\x0b\n\x03ttl\x18\x07 \x01(\t\x12\x16\n\toverwrite\x18\x08 \x01(\x08H\x00\x88\x01\x01\x12S\n\x0e\x66\x61ilure_policy\x18\t \x01(\x0b\x32&.dapr.proto.common.v1.JobFailurePolicyH\x01R\x0e\x66\x61ilure_policy\x88\x01\x01\x42\x0c\n\n_overwriteB\x11\n\x0f_failure_policy\"h\n\x1eUnregisterActorReminderRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torId\x12\x0c\n\x04name\x18\x03 \x01(\t\"]\n\x14GetActorStateRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torId\x12\x0b\n\x03key\x18\x03 \x01(\t\"\xa4\x01\n\x15GetActorStateResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12L\n\x08metadata\x18\x02 \x03(\x0b\x32:.dapr.proto.runtime.v1.GetActorStateResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xac\x01\n#ExecuteActorStateTransactionRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torId\x12K\n\noperations\x18\x03 \x03(\x0b\x32\x37.dapr.proto.runtime.v1.TransactionalActorStateOperation\"\xf5\x01\n TransactionalActorStateOperation\x12\x15\n\roperationType\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\x12#\n\x05value\x18\x03 \x01(\x0b\x32\x14.google.protobuf.Any\x12W\n\x08metadata\x18\x04 \x03(\x0b\x32\x45.dapr.proto.runtime.v1.TransactionalActorStateOperation.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xe8\x01\n\x12InvokeActorRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torId\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x12I\n\x08metadata\x18\x05 \x03(\x0b\x32\x37.dapr.proto.runtime.v1.InvokeActorRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"#\n\x13InvokeActorResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"a\n\x17GetActorReminderRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torID\x12\x0c\n\x04name\x18\x03 \x01(\t\"\xdf\x01\n\x18GetActorReminderResponse\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torID\x12\x1e\n\x08\x64ue_time\x18\x04 \x01(\tH\x00R\x07\x64ueTime\x88\x01\x01\x12\x13\n\x06period\x18\x05 \x01(\tH\x01\x88\x01\x01\x12\"\n\x04\x64\x61ta\x18\x06 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x10\n\x03ttl\x18\x07 \x01(\tH\x02\x88\x01\x01\x42\x0b\n\t_due_timeB\t\n\x07_periodB\x06\n\x04_ttl\"g\n\x19ListActorRemindersRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x1e\n\x08\x61\x63tor_id\x18\x02 \x01(\tH\x00R\x07\x61\x63torId\x88\x01\x01\x42\x0b\n\t_actor_id\"Z\n\x1aListActorRemindersResponse\x12<\n\treminders\x18\x01 \x03(\x0b\x32).dapr.proto.runtime.v1.NamedActorReminder\"Z\n\x12NamedActorReminder\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x36\n\x08reminder\x18\x02 \x01(\x0b\x32$.dapr.proto.runtime.v1.ActorReminder\"\xd4\x01\n\rActorReminder\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\tR\x07\x61\x63torID\x12\x1e\n\x08\x64ue_time\x18\x04 \x01(\tH\x00R\x07\x64ueTime\x88\x01\x01\x12\x13\n\x06period\x18\x05 \x01(\tH\x01\x88\x01\x01\x12\"\n\x04\x64\x61ta\x18\x06 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x10\n\x03ttl\x18\x07 \x01(\tH\x02\x88\x01\x01\x42\x0b\n\t_due_timeB\t\n\x07_periodB\x06\n\x04_ttl\"s\n%UnregisterActorRemindersByTypeRequest\x12\x1d\n\nactor_type\x18\x01 \x01(\tR\tactorType\x12\x1e\n\x08\x61\x63tor_id\x18\x02 \x01(\tH\x00R\x07\x61\x63torId\x88\x01\x01\x42\x0b\n\t_actor_id\"(\n&UnregisterActorRemindersByTypeResponseBo\n\nio.dapr.v1B\x10\x44\x61prActorsProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dapr.proto.runtime.v1.actors_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' + _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\020DaprActorsProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' _globals['_GETACTORSTATERESPONSE_METADATAENTRY']._loaded_options = None _globals['_GETACTORSTATERESPONSE_METADATAENTRY']._serialized_options = b'8\001' _globals['_TRANSACTIONALACTORSTATEOPERATION_METADATAENTRY']._loaded_options = None diff --git a/dapr/proto/runtime/v1/actors_pb2.pyi b/dapr/proto/runtime/v1/actors_pb2.pyi index 327a984fd..735def561 100644 --- a/dapr/proto/runtime/v1/actors_pb2.pyi +++ b/dapr/proto/runtime/v1/actors_pb2.pyi @@ -14,114 +14,114 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import dapr.proto.common.v1.common_pb2 -import google.protobuf.any_pb2 -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.message +from collections import abc as _abc +from dapr.proto.common.v1 import common_pb2 as _common_pb2 +from google.protobuf import any_pb2 as _any_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class RegisterActorTimerRequest(google.protobuf.message.Message): +@_typing.final +class RegisterActorTimerRequest(_message.Message): """RegisterActorTimerRequest is the message to register a timer for an actor of a given type and id.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - ACTOR_TYPE_FIELD_NUMBER: builtins.int - ACTOR_ID_FIELD_NUMBER: builtins.int - NAME_FIELD_NUMBER: builtins.int - DUE_TIME_FIELD_NUMBER: builtins.int - PERIOD_FIELD_NUMBER: builtins.int - CALLBACK_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - TTL_FIELD_NUMBER: builtins.int - actor_type: builtins.str - actor_id: builtins.str - name: builtins.str - due_time: builtins.str - period: builtins.str - callback: builtins.str - data: builtins.bytes - ttl: builtins.str + DESCRIPTOR: _descriptor.Descriptor + + ACTOR_TYPE_FIELD_NUMBER: _builtins.int + ACTOR_ID_FIELD_NUMBER: _builtins.int + NAME_FIELD_NUMBER: _builtins.int + DUE_TIME_FIELD_NUMBER: _builtins.int + PERIOD_FIELD_NUMBER: _builtins.int + CALLBACK_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + TTL_FIELD_NUMBER: _builtins.int + actor_type: _builtins.str + actor_id: _builtins.str + name: _builtins.str + due_time: _builtins.str + period: _builtins.str + callback: _builtins.str + data: _builtins.bytes + ttl: _builtins.str def __init__( self, *, - actor_type: builtins.str = ..., - actor_id: builtins.str = ..., - name: builtins.str = ..., - due_time: builtins.str = ..., - period: builtins.str = ..., - callback: builtins.str = ..., - data: builtins.bytes = ..., - ttl: builtins.str = ..., + actor_type: _builtins.str = ..., + actor_id: _builtins.str = ..., + name: _builtins.str = ..., + due_time: _builtins.str = ..., + period: _builtins.str = ..., + callback: _builtins.str = ..., + data: _builtins.bytes = ..., + ttl: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["actor_id", b"actor_id", "actor_type", b"actor_type", "callback", b"callback", "data", b"data", "due_time", b"due_time", "name", b"name", "period", b"period", "ttl", b"ttl"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["actor_id", b"actor_id", "actor_type", b"actor_type", "callback", b"callback", "data", b"data", "due_time", b"due_time", "name", b"name", "period", b"period", "ttl", b"ttl"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___RegisterActorTimerRequest: typing_extensions.TypeAlias = RegisterActorTimerRequest +Global___RegisterActorTimerRequest: _TypeAlias = RegisterActorTimerRequest # noqa: Y015 -@typing.final -class UnregisterActorTimerRequest(google.protobuf.message.Message): +@_typing.final +class UnregisterActorTimerRequest(_message.Message): """UnregisterActorTimerRequest is the message to unregister an actor timer""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ACTOR_TYPE_FIELD_NUMBER: builtins.int - ACTOR_ID_FIELD_NUMBER: builtins.int - NAME_FIELD_NUMBER: builtins.int - actor_type: builtins.str - actor_id: builtins.str - name: builtins.str + ACTOR_TYPE_FIELD_NUMBER: _builtins.int + ACTOR_ID_FIELD_NUMBER: _builtins.int + NAME_FIELD_NUMBER: _builtins.int + actor_type: _builtins.str + actor_id: _builtins.str + name: _builtins.str def __init__( self, *, - actor_type: builtins.str = ..., - actor_id: builtins.str = ..., - name: builtins.str = ..., + actor_type: _builtins.str = ..., + actor_id: _builtins.str = ..., + name: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["actor_id", b"actor_id", "actor_type", b"actor_type", "name", b"name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["actor_id", b"actor_id", "actor_type", b"actor_type", "name", b"name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___UnregisterActorTimerRequest: typing_extensions.TypeAlias = UnregisterActorTimerRequest +Global___UnregisterActorTimerRequest: _TypeAlias = UnregisterActorTimerRequest # noqa: Y015 -@typing.final -class RegisterActorReminderRequest(google.protobuf.message.Message): +@_typing.final +class RegisterActorReminderRequest(_message.Message): """RegisterActorReminderRequest is the message to register a reminder for an actor of a given type and id.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - ACTOR_TYPE_FIELD_NUMBER: builtins.int - ACTOR_ID_FIELD_NUMBER: builtins.int - NAME_FIELD_NUMBER: builtins.int - DUE_TIME_FIELD_NUMBER: builtins.int - PERIOD_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - TTL_FIELD_NUMBER: builtins.int - OVERWRITE_FIELD_NUMBER: builtins.int - FAILURE_POLICY_FIELD_NUMBER: builtins.int - actor_type: builtins.str - actor_id: builtins.str - name: builtins.str - due_time: builtins.str - period: builtins.str - data: builtins.bytes - ttl: builtins.str - overwrite: builtins.bool + DESCRIPTOR: _descriptor.Descriptor + + ACTOR_TYPE_FIELD_NUMBER: _builtins.int + ACTOR_ID_FIELD_NUMBER: _builtins.int + NAME_FIELD_NUMBER: _builtins.int + DUE_TIME_FIELD_NUMBER: _builtins.int + PERIOD_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + TTL_FIELD_NUMBER: _builtins.int + OVERWRITE_FIELD_NUMBER: _builtins.int + FAILURE_POLICY_FIELD_NUMBER: _builtins.int + actor_type: _builtins.str + actor_id: _builtins.str + name: _builtins.str + due_time: _builtins.str + period: _builtins.str + data: _builtins.bytes + ttl: _builtins.str + overwrite: _builtins.bool """If true, allows this reminder to overwrite an existing reminder with the same name. If not set, defaults to true. """ - @property - def failure_policy(self) -> dapr.proto.common.v1.common_pb2.JobFailurePolicy: + @_builtins.property + def failure_policy(self) -> _common_pb2.JobFailurePolicy: """failure_policy is the optional policy for handling job failures. If not set, the reminder will have the failure policy of trying 3 times on a single tick before giving up. @@ -130,178 +130,178 @@ class RegisterActorReminderRequest(google.protobuf.message.Message): def __init__( self, *, - actor_type: builtins.str = ..., - actor_id: builtins.str = ..., - name: builtins.str = ..., - due_time: builtins.str = ..., - period: builtins.str = ..., - data: builtins.bytes = ..., - ttl: builtins.str = ..., - overwrite: builtins.bool | None = ..., - failure_policy: dapr.proto.common.v1.common_pb2.JobFailurePolicy | None = ..., + actor_type: _builtins.str = ..., + actor_id: _builtins.str = ..., + name: _builtins.str = ..., + due_time: _builtins.str = ..., + period: _builtins.str = ..., + data: _builtins.bytes = ..., + ttl: _builtins.str = ..., + overwrite: _builtins.bool | None = ..., + failure_policy: _common_pb2.JobFailurePolicy | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_failure_policy", b"_failure_policy", "_overwrite", b"_overwrite", "failure_policy", b"failure_policy", "overwrite", b"overwrite"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_failure_policy", b"_failure_policy", "_overwrite", b"_overwrite", "actor_id", b"actor_id", "actor_type", b"actor_type", "data", b"data", "due_time", b"due_time", "failure_policy", b"failure_policy", "name", b"name", "overwrite", b"overwrite", "period", b"period", "ttl", b"ttl"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_failure_policy", b"_failure_policy", "_overwrite", b"_overwrite", "failure_policy", b"failure_policy", "overwrite", b"overwrite"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_failure_policy", b"_failure_policy", "_overwrite", b"_overwrite", "actor_id", b"actor_id", "actor_type", b"actor_type", "data", b"data", "due_time", b"due_time", "failure_policy", b"failure_policy", "name", b"name", "overwrite", b"overwrite", "period", b"period", "ttl", b"ttl"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__failure_policy: typing_extensions.TypeAlias = typing.Literal["failure_policy"] - _WhichOneofArgType__failure_policy: typing_extensions.TypeAlias = typing.Literal["_failure_policy", b"_failure_policy"] - _WhichOneofReturnType__overwrite: typing_extensions.TypeAlias = typing.Literal["overwrite"] - _WhichOneofArgType__overwrite: typing_extensions.TypeAlias = typing.Literal["_overwrite", b"_overwrite"] - @typing.overload + _WhichOneofReturnType__failure_policy: _TypeAlias = _typing.Literal["failure_policy"] # noqa: Y015 + _WhichOneofArgType__failure_policy: _TypeAlias = _typing.Literal["_failure_policy", b"_failure_policy"] # noqa: Y015 + _WhichOneofReturnType__overwrite: _TypeAlias = _typing.Literal["overwrite"] # noqa: Y015 + _WhichOneofArgType__overwrite: _TypeAlias = _typing.Literal["_overwrite", b"_overwrite"] # noqa: Y015 + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__failure_policy) -> _WhichOneofReturnType__failure_policy | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__overwrite) -> _WhichOneofReturnType__overwrite | None: ... -Global___RegisterActorReminderRequest: typing_extensions.TypeAlias = RegisterActorReminderRequest +Global___RegisterActorReminderRequest: _TypeAlias = RegisterActorReminderRequest # noqa: Y015 -@typing.final -class UnregisterActorReminderRequest(google.protobuf.message.Message): +@_typing.final +class UnregisterActorReminderRequest(_message.Message): """UnregisterActorReminderRequest is the message to unregister an actor reminder.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ACTOR_TYPE_FIELD_NUMBER: builtins.int - ACTOR_ID_FIELD_NUMBER: builtins.int - NAME_FIELD_NUMBER: builtins.int - actor_type: builtins.str - actor_id: builtins.str - name: builtins.str + ACTOR_TYPE_FIELD_NUMBER: _builtins.int + ACTOR_ID_FIELD_NUMBER: _builtins.int + NAME_FIELD_NUMBER: _builtins.int + actor_type: _builtins.str + actor_id: _builtins.str + name: _builtins.str def __init__( self, *, - actor_type: builtins.str = ..., - actor_id: builtins.str = ..., - name: builtins.str = ..., + actor_type: _builtins.str = ..., + actor_id: _builtins.str = ..., + name: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["actor_id", b"actor_id", "actor_type", b"actor_type", "name", b"name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["actor_id", b"actor_id", "actor_type", b"actor_type", "name", b"name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___UnregisterActorReminderRequest: typing_extensions.TypeAlias = UnregisterActorReminderRequest +Global___UnregisterActorReminderRequest: _TypeAlias = UnregisterActorReminderRequest # noqa: Y015 -@typing.final -class GetActorStateRequest(google.protobuf.message.Message): +@_typing.final +class GetActorStateRequest(_message.Message): """GetActorStateRequest is the message to get key-value states from specific actor.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ACTOR_TYPE_FIELD_NUMBER: builtins.int - ACTOR_ID_FIELD_NUMBER: builtins.int - KEY_FIELD_NUMBER: builtins.int - actor_type: builtins.str - actor_id: builtins.str - key: builtins.str + ACTOR_TYPE_FIELD_NUMBER: _builtins.int + ACTOR_ID_FIELD_NUMBER: _builtins.int + KEY_FIELD_NUMBER: _builtins.int + actor_type: _builtins.str + actor_id: _builtins.str + key: _builtins.str def __init__( self, *, - actor_type: builtins.str = ..., - actor_id: builtins.str = ..., - key: builtins.str = ..., + actor_type: _builtins.str = ..., + actor_id: _builtins.str = ..., + key: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["actor_id", b"actor_id", "actor_type", b"actor_type", "key", b"key"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["actor_id", b"actor_id", "actor_type", b"actor_type", "key", b"key"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetActorStateRequest: typing_extensions.TypeAlias = GetActorStateRequest +Global___GetActorStateRequest: _TypeAlias = GetActorStateRequest # noqa: Y015 -@typing.final -class GetActorStateResponse(google.protobuf.message.Message): +@_typing.final +class GetActorStateResponse(_message.Message): """GetActorStateResponse is the response conveying the actor's state value.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - DATA_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - data: builtins.bytes - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + DATA_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + data: _builtins.bytes + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata which will be sent to app.""" def __init__( self, *, - data: builtins.bytes = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + data: _builtins.bytes = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data", "metadata", b"metadata"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "metadata", b"metadata"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetActorStateResponse: typing_extensions.TypeAlias = GetActorStateResponse +Global___GetActorStateResponse: _TypeAlias = GetActorStateResponse # noqa: Y015 -@typing.final -class ExecuteActorStateTransactionRequest(google.protobuf.message.Message): +@_typing.final +class ExecuteActorStateTransactionRequest(_message.Message): """ExecuteActorStateTransactionRequest is the message to execute multiple operations on a specified actor.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ACTOR_TYPE_FIELD_NUMBER: builtins.int - ACTOR_ID_FIELD_NUMBER: builtins.int - OPERATIONS_FIELD_NUMBER: builtins.int - actor_type: builtins.str - actor_id: builtins.str - @property - def operations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___TransactionalActorStateOperation]: ... + ACTOR_TYPE_FIELD_NUMBER: _builtins.int + ACTOR_ID_FIELD_NUMBER: _builtins.int + OPERATIONS_FIELD_NUMBER: _builtins.int + actor_type: _builtins.str + actor_id: _builtins.str + @_builtins.property + def operations(self) -> _containers.RepeatedCompositeFieldContainer[Global___TransactionalActorStateOperation]: ... def __init__( self, *, - actor_type: builtins.str = ..., - actor_id: builtins.str = ..., - operations: collections.abc.Iterable[Global___TransactionalActorStateOperation] | None = ..., + actor_type: _builtins.str = ..., + actor_id: _builtins.str = ..., + operations: _abc.Iterable[Global___TransactionalActorStateOperation] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["actor_id", b"actor_id", "actor_type", b"actor_type", "operations", b"operations"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["actor_id", b"actor_id", "actor_type", b"actor_type", "operations", b"operations"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ExecuteActorStateTransactionRequest: typing_extensions.TypeAlias = ExecuteActorStateTransactionRequest +Global___ExecuteActorStateTransactionRequest: _TypeAlias = ExecuteActorStateTransactionRequest # noqa: Y015 -@typing.final -class TransactionalActorStateOperation(google.protobuf.message.Message): +@_typing.final +class TransactionalActorStateOperation(_message.Message): """TransactionalActorStateOperation is the message to execute a specified operation with a key-value pair.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - OPERATIONTYPE_FIELD_NUMBER: builtins.int - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - operationType: builtins.str - key: builtins.str - @property - def value(self) -> google.protobuf.any_pb2.Any: ... - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + OPERATIONTYPE_FIELD_NUMBER: _builtins.int + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + operationType: _builtins.str + key: _builtins.str + @_builtins.property + def value(self) -> _any_pb2.Any: ... + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata used for transactional operations. Common metadata property: @@ -311,300 +311,300 @@ class TransactionalActorStateOperation(google.protobuf.message.Message): def __init__( self, *, - operationType: builtins.str = ..., - key: builtins.str = ..., - value: google.protobuf.any_pb2.Any | None = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + operationType: _builtins.str = ..., + key: _builtins.str = ..., + value: _any_pb2.Any | None = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["value", b"value"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "metadata", b"metadata", "operationType", b"operationType", "value", b"value"] + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "metadata", b"metadata", "operationType", b"operationType", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___TransactionalActorStateOperation: typing_extensions.TypeAlias = TransactionalActorStateOperation +Global___TransactionalActorStateOperation: _TypeAlias = TransactionalActorStateOperation # noqa: Y015 -@typing.final -class InvokeActorRequest(google.protobuf.message.Message): +@_typing.final +class InvokeActorRequest(_message.Message): """InvokeActorRequest is the message to call an actor.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - ACTOR_TYPE_FIELD_NUMBER: builtins.int - ACTOR_ID_FIELD_NUMBER: builtins.int - METHOD_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - actor_type: builtins.str - actor_id: builtins.str - method: builtins.str - data: builtins.bytes - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: ... + ACTOR_TYPE_FIELD_NUMBER: _builtins.int + ACTOR_ID_FIELD_NUMBER: _builtins.int + METHOD_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + actor_type: _builtins.str + actor_id: _builtins.str + method: _builtins.str + data: _builtins.bytes + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: ... def __init__( self, *, - actor_type: builtins.str = ..., - actor_id: builtins.str = ..., - method: builtins.str = ..., - data: builtins.bytes = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + actor_type: _builtins.str = ..., + actor_id: _builtins.str = ..., + method: _builtins.str = ..., + data: _builtins.bytes = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["actor_id", b"actor_id", "actor_type", b"actor_type", "data", b"data", "metadata", b"metadata", "method", b"method"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["actor_id", b"actor_id", "actor_type", b"actor_type", "data", b"data", "metadata", b"metadata", "method", b"method"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___InvokeActorRequest: typing_extensions.TypeAlias = InvokeActorRequest +Global___InvokeActorRequest: _TypeAlias = InvokeActorRequest # noqa: Y015 -@typing.final -class InvokeActorResponse(google.protobuf.message.Message): +@_typing.final +class InvokeActorResponse(_message.Message): """InvokeActorResponse is the method that returns an actor invocation response.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - DATA_FIELD_NUMBER: builtins.int - data: builtins.bytes + DATA_FIELD_NUMBER: _builtins.int + data: _builtins.bytes def __init__( self, *, - data: builtins.bytes = ..., + data: _builtins.bytes = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___InvokeActorResponse: typing_extensions.TypeAlias = InvokeActorResponse +Global___InvokeActorResponse: _TypeAlias = InvokeActorResponse # noqa: Y015 -@typing.final -class GetActorReminderRequest(google.protobuf.message.Message): +@_typing.final +class GetActorReminderRequest(_message.Message): """GetActorReminderRequest is the message to get an already-registered actor reminder""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ACTOR_TYPE_FIELD_NUMBER: builtins.int - ACTOR_ID_FIELD_NUMBER: builtins.int - NAME_FIELD_NUMBER: builtins.int - actor_type: builtins.str - actor_id: builtins.str - name: builtins.str + ACTOR_TYPE_FIELD_NUMBER: _builtins.int + ACTOR_ID_FIELD_NUMBER: _builtins.int + NAME_FIELD_NUMBER: _builtins.int + actor_type: _builtins.str + actor_id: _builtins.str + name: _builtins.str def __init__( self, *, - actor_type: builtins.str = ..., - actor_id: builtins.str = ..., - name: builtins.str = ..., + actor_type: _builtins.str = ..., + actor_id: _builtins.str = ..., + name: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["actor_id", b"actor_id", "actor_type", b"actor_type", "name", b"name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["actor_id", b"actor_id", "actor_type", b"actor_type", "name", b"name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetActorReminderRequest: typing_extensions.TypeAlias = GetActorReminderRequest +Global___GetActorReminderRequest: _TypeAlias = GetActorReminderRequest # noqa: Y015 -@typing.final -class GetActorReminderResponse(google.protobuf.message.Message): +@_typing.final +class GetActorReminderResponse(_message.Message): """GetActorReminderResponse is the response conveying an actor's reminder.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - ACTOR_TYPE_FIELD_NUMBER: builtins.int - ACTOR_ID_FIELD_NUMBER: builtins.int - DUE_TIME_FIELD_NUMBER: builtins.int - PERIOD_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - TTL_FIELD_NUMBER: builtins.int - actor_type: builtins.str - actor_id: builtins.str - due_time: builtins.str - period: builtins.str - ttl: builtins.str - @property - def data(self) -> google.protobuf.any_pb2.Any: ... + DESCRIPTOR: _descriptor.Descriptor + + ACTOR_TYPE_FIELD_NUMBER: _builtins.int + ACTOR_ID_FIELD_NUMBER: _builtins.int + DUE_TIME_FIELD_NUMBER: _builtins.int + PERIOD_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + TTL_FIELD_NUMBER: _builtins.int + actor_type: _builtins.str + actor_id: _builtins.str + due_time: _builtins.str + period: _builtins.str + ttl: _builtins.str + @_builtins.property + def data(self) -> _any_pb2.Any: ... def __init__( self, *, - actor_type: builtins.str = ..., - actor_id: builtins.str = ..., - due_time: builtins.str | None = ..., - period: builtins.str | None = ..., - data: google.protobuf.any_pb2.Any | None = ..., - ttl: builtins.str | None = ..., + actor_type: _builtins.str = ..., + actor_id: _builtins.str = ..., + due_time: _builtins.str | None = ..., + period: _builtins.str | None = ..., + data: _any_pb2.Any | None = ..., + ttl: _builtins.str | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_due_time", b"_due_time", "_period", b"_period", "_ttl", b"_ttl", "data", b"data", "due_time", b"due_time", "period", b"period", "ttl", b"ttl"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_due_time", b"_due_time", "_period", b"_period", "_ttl", b"_ttl", "actor_id", b"actor_id", "actor_type", b"actor_type", "data", b"data", "due_time", b"due_time", "period", b"period", "ttl", b"ttl"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_due_time", b"_due_time", "_period", b"_period", "_ttl", b"_ttl", "data", b"data", "due_time", b"due_time", "period", b"period", "ttl", b"ttl"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_due_time", b"_due_time", "_period", b"_period", "_ttl", b"_ttl", "actor_id", b"actor_id", "actor_type", b"actor_type", "data", b"data", "due_time", b"due_time", "period", b"period", "ttl", b"ttl"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__due_time: typing_extensions.TypeAlias = typing.Literal["due_time"] - _WhichOneofArgType__due_time: typing_extensions.TypeAlias = typing.Literal["_due_time", b"_due_time"] - _WhichOneofReturnType__period: typing_extensions.TypeAlias = typing.Literal["period"] - _WhichOneofArgType__period: typing_extensions.TypeAlias = typing.Literal["_period", b"_period"] - _WhichOneofReturnType__ttl: typing_extensions.TypeAlias = typing.Literal["ttl"] - _WhichOneofArgType__ttl: typing_extensions.TypeAlias = typing.Literal["_ttl", b"_ttl"] - @typing.overload + _WhichOneofReturnType__due_time: _TypeAlias = _typing.Literal["due_time"] # noqa: Y015 + _WhichOneofArgType__due_time: _TypeAlias = _typing.Literal["_due_time", b"_due_time"] # noqa: Y015 + _WhichOneofReturnType__period: _TypeAlias = _typing.Literal["period"] # noqa: Y015 + _WhichOneofArgType__period: _TypeAlias = _typing.Literal["_period", b"_period"] # noqa: Y015 + _WhichOneofReturnType__ttl: _TypeAlias = _typing.Literal["ttl"] # noqa: Y015 + _WhichOneofArgType__ttl: _TypeAlias = _typing.Literal["_ttl", b"_ttl"] # noqa: Y015 + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__due_time) -> _WhichOneofReturnType__due_time | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__period) -> _WhichOneofReturnType__period | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__ttl) -> _WhichOneofReturnType__ttl | None: ... -Global___GetActorReminderResponse: typing_extensions.TypeAlias = GetActorReminderResponse +Global___GetActorReminderResponse: _TypeAlias = GetActorReminderResponse # noqa: Y015 -@typing.final -class ListActorRemindersRequest(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class ListActorRemindersRequest(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - ACTOR_TYPE_FIELD_NUMBER: builtins.int - ACTOR_ID_FIELD_NUMBER: builtins.int - actor_type: builtins.str - actor_id: builtins.str + ACTOR_TYPE_FIELD_NUMBER: _builtins.int + ACTOR_ID_FIELD_NUMBER: _builtins.int + actor_type: _builtins.str + actor_id: _builtins.str def __init__( self, *, - actor_type: builtins.str = ..., - actor_id: builtins.str | None = ..., + actor_type: _builtins.str = ..., + actor_id: _builtins.str | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_actor_id", b"_actor_id", "actor_id", b"actor_id"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_actor_id", b"_actor_id", "actor_id", b"actor_id", "actor_type", b"actor_type"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_actor_id", b"_actor_id", "actor_id", b"actor_id"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_actor_id", b"_actor_id", "actor_id", b"actor_id", "actor_type", b"actor_type"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__actor_id: typing_extensions.TypeAlias = typing.Literal["actor_id"] - _WhichOneofArgType__actor_id: typing_extensions.TypeAlias = typing.Literal["_actor_id", b"_actor_id"] + _WhichOneofReturnType__actor_id: _TypeAlias = _typing.Literal["actor_id"] # noqa: Y015 + _WhichOneofArgType__actor_id: _TypeAlias = _typing.Literal["_actor_id", b"_actor_id"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType__actor_id) -> _WhichOneofReturnType__actor_id | None: ... -Global___ListActorRemindersRequest: typing_extensions.TypeAlias = ListActorRemindersRequest +Global___ListActorRemindersRequest: _TypeAlias = ListActorRemindersRequest # noqa: Y015 -@typing.final -class ListActorRemindersResponse(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class ListActorRemindersResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - REMINDERS_FIELD_NUMBER: builtins.int - @property - def reminders(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___NamedActorReminder]: ... + REMINDERS_FIELD_NUMBER: _builtins.int + @_builtins.property + def reminders(self) -> _containers.RepeatedCompositeFieldContainer[Global___NamedActorReminder]: ... def __init__( self, *, - reminders: collections.abc.Iterable[Global___NamedActorReminder] | None = ..., + reminders: _abc.Iterable[Global___NamedActorReminder] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["reminders", b"reminders"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["reminders", b"reminders"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ListActorRemindersResponse: typing_extensions.TypeAlias = ListActorRemindersResponse +Global___ListActorRemindersResponse: _TypeAlias = ListActorRemindersResponse # noqa: Y015 -@typing.final -class NamedActorReminder(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class NamedActorReminder(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - REMINDER_FIELD_NUMBER: builtins.int - name: builtins.str - @property + NAME_FIELD_NUMBER: _builtins.int + REMINDER_FIELD_NUMBER: _builtins.int + name: _builtins.str + @_builtins.property def reminder(self) -> Global___ActorReminder: ... def __init__( self, *, - name: builtins.str = ..., + name: _builtins.str = ..., reminder: Global___ActorReminder | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["reminder", b"reminder"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["name", b"name", "reminder", b"reminder"] + _HasFieldArgType: _TypeAlias = _typing.Literal["reminder", b"reminder"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["name", b"name", "reminder", b"reminder"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___NamedActorReminder: typing_extensions.TypeAlias = NamedActorReminder - -@typing.final -class ActorReminder(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - ACTOR_TYPE_FIELD_NUMBER: builtins.int - ACTOR_ID_FIELD_NUMBER: builtins.int - DUE_TIME_FIELD_NUMBER: builtins.int - PERIOD_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - TTL_FIELD_NUMBER: builtins.int - actor_type: builtins.str - actor_id: builtins.str - due_time: builtins.str - period: builtins.str - ttl: builtins.str - @property - def data(self) -> google.protobuf.any_pb2.Any: ... +Global___NamedActorReminder: _TypeAlias = NamedActorReminder # noqa: Y015 + +@_typing.final +class ActorReminder(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ACTOR_TYPE_FIELD_NUMBER: _builtins.int + ACTOR_ID_FIELD_NUMBER: _builtins.int + DUE_TIME_FIELD_NUMBER: _builtins.int + PERIOD_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + TTL_FIELD_NUMBER: _builtins.int + actor_type: _builtins.str + actor_id: _builtins.str + due_time: _builtins.str + period: _builtins.str + ttl: _builtins.str + @_builtins.property + def data(self) -> _any_pb2.Any: ... def __init__( self, *, - actor_type: builtins.str = ..., - actor_id: builtins.str = ..., - due_time: builtins.str | None = ..., - period: builtins.str | None = ..., - data: google.protobuf.any_pb2.Any | None = ..., - ttl: builtins.str | None = ..., + actor_type: _builtins.str = ..., + actor_id: _builtins.str = ..., + due_time: _builtins.str | None = ..., + period: _builtins.str | None = ..., + data: _any_pb2.Any | None = ..., + ttl: _builtins.str | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_due_time", b"_due_time", "_period", b"_period", "_ttl", b"_ttl", "data", b"data", "due_time", b"due_time", "period", b"period", "ttl", b"ttl"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_due_time", b"_due_time", "_period", b"_period", "_ttl", b"_ttl", "actor_id", b"actor_id", "actor_type", b"actor_type", "data", b"data", "due_time", b"due_time", "period", b"period", "ttl", b"ttl"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_due_time", b"_due_time", "_period", b"_period", "_ttl", b"_ttl", "data", b"data", "due_time", b"due_time", "period", b"period", "ttl", b"ttl"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_due_time", b"_due_time", "_period", b"_period", "_ttl", b"_ttl", "actor_id", b"actor_id", "actor_type", b"actor_type", "data", b"data", "due_time", b"due_time", "period", b"period", "ttl", b"ttl"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__due_time: typing_extensions.TypeAlias = typing.Literal["due_time"] - _WhichOneofArgType__due_time: typing_extensions.TypeAlias = typing.Literal["_due_time", b"_due_time"] - _WhichOneofReturnType__period: typing_extensions.TypeAlias = typing.Literal["period"] - _WhichOneofArgType__period: typing_extensions.TypeAlias = typing.Literal["_period", b"_period"] - _WhichOneofReturnType__ttl: typing_extensions.TypeAlias = typing.Literal["ttl"] - _WhichOneofArgType__ttl: typing_extensions.TypeAlias = typing.Literal["_ttl", b"_ttl"] - @typing.overload + _WhichOneofReturnType__due_time: _TypeAlias = _typing.Literal["due_time"] # noqa: Y015 + _WhichOneofArgType__due_time: _TypeAlias = _typing.Literal["_due_time", b"_due_time"] # noqa: Y015 + _WhichOneofReturnType__period: _TypeAlias = _typing.Literal["period"] # noqa: Y015 + _WhichOneofArgType__period: _TypeAlias = _typing.Literal["_period", b"_period"] # noqa: Y015 + _WhichOneofReturnType__ttl: _TypeAlias = _typing.Literal["ttl"] # noqa: Y015 + _WhichOneofArgType__ttl: _TypeAlias = _typing.Literal["_ttl", b"_ttl"] # noqa: Y015 + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__due_time) -> _WhichOneofReturnType__due_time | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__period) -> _WhichOneofReturnType__period | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__ttl) -> _WhichOneofReturnType__ttl | None: ... -Global___ActorReminder: typing_extensions.TypeAlias = ActorReminder +Global___ActorReminder: _TypeAlias = ActorReminder # noqa: Y015 -@typing.final -class UnregisterActorRemindersByTypeRequest(google.protobuf.message.Message): +@_typing.final +class UnregisterActorRemindersByTypeRequest(_message.Message): """UnregisterActorRemindersByTypeRequest is the message to unregister an actor reminders by the given type. Optional actor_id can be provided to limit the scope of the operation to a specific actor instance. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ACTOR_TYPE_FIELD_NUMBER: builtins.int - ACTOR_ID_FIELD_NUMBER: builtins.int - actor_type: builtins.str - actor_id: builtins.str + ACTOR_TYPE_FIELD_NUMBER: _builtins.int + ACTOR_ID_FIELD_NUMBER: _builtins.int + actor_type: _builtins.str + actor_id: _builtins.str def __init__( self, *, - actor_type: builtins.str = ..., - actor_id: builtins.str | None = ..., + actor_type: _builtins.str = ..., + actor_id: _builtins.str | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_actor_id", b"_actor_id", "actor_id", b"actor_id"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_actor_id", b"_actor_id", "actor_id", b"actor_id", "actor_type", b"actor_type"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_actor_id", b"_actor_id", "actor_id", b"actor_id"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_actor_id", b"_actor_id", "actor_id", b"actor_id", "actor_type", b"actor_type"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__actor_id: typing_extensions.TypeAlias = typing.Literal["actor_id"] - _WhichOneofArgType__actor_id: typing_extensions.TypeAlias = typing.Literal["_actor_id", b"_actor_id"] + _WhichOneofReturnType__actor_id: _TypeAlias = _typing.Literal["actor_id"] # noqa: Y015 + _WhichOneofArgType__actor_id: _TypeAlias = _typing.Literal["_actor_id", b"_actor_id"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType__actor_id) -> _WhichOneofReturnType__actor_id | None: ... -Global___UnregisterActorRemindersByTypeRequest: typing_extensions.TypeAlias = UnregisterActorRemindersByTypeRequest +Global___UnregisterActorRemindersByTypeRequest: _TypeAlias = UnregisterActorRemindersByTypeRequest # noqa: Y015 -@typing.final -class UnregisterActorRemindersByTypeResponse(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class UnregisterActorRemindersByTypeResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor def __init__( self, ) -> None: ... -Global___UnregisterActorRemindersByTypeResponse: typing_extensions.TypeAlias = UnregisterActorRemindersByTypeResponse +Global___UnregisterActorRemindersByTypeResponse: _TypeAlias = UnregisterActorRemindersByTypeResponse # noqa: Y015 diff --git a/dapr/proto/runtime/v1/ai_pb2.py b/dapr/proto/runtime/v1/ai_pb2.py index 574eb7a4e..e72b197cd 100644 --- a/dapr/proto/runtime/v1/ai_pb2.py +++ b/dapr/proto/runtime/v1/ai_pb2.py @@ -27,14 +27,14 @@ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x64\x61pr/proto/runtime/v1/ai.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1egoogle/protobuf/duration.proto\"\xeb\x03\n\x13\x43onversationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\tcontextID\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x38\n\x06inputs\x18\x03 \x03(\x0b\x32(.dapr.proto.runtime.v1.ConversationInput\x12N\n\nparameters\x18\x04 \x03(\x0b\x32:.dapr.proto.runtime.v1.ConversationRequest.ParametersEntry\x12J\n\x08metadata\x18\x05 \x03(\x0b\x32\x38.dapr.proto.runtime.v1.ConversationRequest.MetadataEntry\x12\x15\n\x08scrubPII\x18\x06 \x01(\x08H\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x07 \x01(\x01H\x02\x88\x01\x01\x1aG\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x02\x18\x01\x42\x0c\n\n_contextIDB\x0b\n\t_scrubPIIB\x0e\n\x0c_temperature\"\x8c\x06\n\x19\x43onversationRequestAlpha2\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\ncontext_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x12>\n\x06inputs\x18\x03 \x03(\x0b\x32..dapr.proto.runtime.v1.ConversationInputAlpha2\x12T\n\nparameters\x18\x04 \x03(\x0b\x32@.dapr.proto.runtime.v1.ConversationRequestAlpha2.ParametersEntry\x12P\n\x08metadata\x18\x05 \x03(\x0b\x32>.dapr.proto.runtime.v1.ConversationRequestAlpha2.MetadataEntry\x12\x16\n\tscrub_pii\x18\x06 \x01(\x08H\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x07 \x01(\x01H\x02\x88\x01\x01\x12\x37\n\x05tools\x18\x08 \x03(\x0b\x32(.dapr.proto.runtime.v1.ConversationTools\x12\x18\n\x0btool_choice\x18\t \x01(\tH\x03\x88\x01\x01\x12\x35\n\x0fresponse_format\x18\n \x01(\x0b\x32\x17.google.protobuf.StructH\x04\x88\x01\x01\x12>\n\x16prompt_cache_retention\x18\x0b \x01(\x0b\x32\x19.google.protobuf.DurationH\x05\x88\x01\x01\x1aG\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b_context_idB\x0c\n\n_scrub_piiB\x0e\n\x0c_temperatureB\x0e\n\x0c_tool_choiceB\x12\n\x10_response_formatB\x19\n\x17_prompt_cache_retention\"h\n\x11\x43onversationInput\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\x04role\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08scrubPII\x18\x03 \x01(\x08H\x01\x88\x01\x01:\x02\x18\x01\x42\x07\n\x05_roleB\x0b\n\t_scrubPII\"}\n\x17\x43onversationInputAlpha2\x12<\n\x08messages\x18\x01 \x03(\x0b\x32*.dapr.proto.runtime.v1.ConversationMessage\x12\x16\n\tscrub_pii\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\x0c\n\n_scrub_pii\"\x97\x03\n\x13\x43onversationMessage\x12M\n\x0cof_developer\x18\x01 \x01(\x0b\x32\x35.dapr.proto.runtime.v1.ConversationMessageOfDeveloperH\x00\x12G\n\tof_system\x18\x02 \x01(\x0b\x32\x32.dapr.proto.runtime.v1.ConversationMessageOfSystemH\x00\x12\x43\n\x07of_user\x18\x03 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationMessageOfUserH\x00\x12M\n\x0cof_assistant\x18\x04 \x01(\x0b\x32\x35.dapr.proto.runtime.v1.ConversationMessageOfAssistantH\x00\x12\x43\n\x07of_tool\x18\x05 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationMessageOfToolH\x00\x42\x0f\n\rmessage_types\"\x80\x01\n\x1e\x43onversationMessageOfDeveloper\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\x07\n\x05_name\"}\n\x1b\x43onversationMessageOfSystem\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\x07\n\x05_name\"{\n\x19\x43onversationMessageOfUser\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\x07\n\x05_name\"\xc2\x01\n\x1e\x43onversationMessageOfAssistant\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContent\x12@\n\ntool_calls\x18\x03 \x03(\x0b\x32,.dapr.proto.runtime.v1.ConversationToolCallsB\x07\n\x05_name\"\x8f\x01\n\x19\x43onversationMessageOfTool\x12\x14\n\x07tool_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x42\n\x07\x63ontent\x18\x03 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\n\n\x08_tool_id\"\x89\x01\n\x15\x43onversationToolCalls\x12\x0f\n\x02id\x18\x01 \x01(\tH\x01\x88\x01\x01\x12J\n\x08\x66unction\x18\x02 \x01(\x0b\x32\x36.dapr.proto.runtime.v1.ConversationToolCallsOfFunctionH\x00\x42\x0c\n\ntool_typesB\x05\n\x03_id\"B\n\x1f\x43onversationToolCallsOfFunction\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\targuments\x18\x02 \x01(\t\"*\n\x1a\x43onversationMessageContent\x12\x0c\n\x04text\x18\x01 \x01(\t\"\xc0\x01\n\x12\x43onversationResult\x12\x0e\n\x06result\x18\x01 \x01(\t\x12M\n\nparameters\x18\x02 \x03(\x0b\x32\x39.dapr.proto.runtime.v1.ConversationResult.ParametersEntry\x1aG\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01:\x02\x18\x01\"\xd9\x01\n\x18\x43onversationResultAlpha2\x12\x41\n\x07\x63hoices\x18\x01 \x03(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationResultChoices\x12\x12\n\x05model\x18\x02 \x01(\tH\x00\x88\x01\x01\x12R\n\x05usage\x18\x03 \x01(\x0b\x32>.dapr.proto.runtime.v1.ConversationResultAlpha2CompletionUsageH\x01\x88\x01\x01\x42\x08\n\x06_modelB\x08\n\x06_usage\"\x9f\x03\n\'ConversationResultAlpha2CompletionUsage\x12\x19\n\x11\x63ompletion_tokens\x18\x01 \x01(\x04\x12\x15\n\rprompt_tokens\x18\x02 \x01(\x04\x12\x14\n\x0ctotal_tokens\x18\x03 \x01(\x04\x12}\n\x19\x63ompletion_tokens_details\x18\x04 \x01(\x0b\x32U.dapr.proto.runtime.v1.ConversationResultAlpha2CompletionUsageCompletionTokensDetailsH\x00\x88\x01\x01\x12u\n\x15prompt_tokens_details\x18\x05 \x01(\x0b\x32Q.dapr.proto.runtime.v1.ConversationResultAlpha2CompletionUsagePromptTokensDetailsH\x01\x88\x01\x01\x42\x1c\n\x1a_completion_tokens_detailsB\x18\n\x16_prompt_tokens_details\"\xb8\x01\n>ConversationResultAlpha2CompletionUsageCompletionTokensDetails\x12\"\n\x1a\x61\x63\x63\x65pted_prediction_tokens\x18\x01 \x01(\x04\x12\x14\n\x0c\x61udio_tokens\x18\x02 \x01(\x04\x12\x18\n\x10reasoning_tokens\x18\x03 \x01(\x04\x12\"\n\x1arejected_prediction_tokens\x18\x04 \x01(\x04\"i\n:ConversationResultAlpha2CompletionUsagePromptTokensDetails\x12\x14\n\x0c\x61udio_tokens\x18\x01 \x01(\x04\x12\x15\n\rcached_tokens\x18\x02 \x01(\x04\"\x84\x01\n\x19\x43onversationResultChoices\x12\x15\n\rfinish_reason\x18\x01 \x01(\t\x12\r\n\x05index\x18\x02 \x01(\x03\x12\x41\n\x07message\x18\x03 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationResultMessage\"n\n\x19\x43onversationResultMessage\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12@\n\ntool_calls\x18\x02 \x03(\x0b\x32,.dapr.proto.runtime.v1.ConversationToolCalls\"|\n\x14\x43onversationResponse\x12\x16\n\tcontextID\x18\x01 \x01(\tH\x00\x88\x01\x01\x12:\n\x07outputs\x18\x02 \x03(\x0b\x32).dapr.proto.runtime.v1.ConversationResult:\x02\x18\x01\x42\x0c\n\n_contextID\"\x86\x01\n\x1a\x43onversationResponseAlpha2\x12\x17\n\ncontext_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12@\n\x07outputs\x18\x02 \x03(\x0b\x32/.dapr.proto.runtime.v1.ConversationResultAlpha2B\r\n\x0b_context_id\"g\n\x11\x43onversationTools\x12\x44\n\x08\x66unction\x18\x01 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationToolsFunctionH\x00\x42\x0c\n\ntool_types\"\x80\x01\n\x19\x43onversationToolsFunction\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tH\x00\x88\x01\x01\x12+\n\nparameters\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x0e\n\x0c_descriptionBi\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x64\x61pr/proto/runtime/v1/ai.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1egoogle/protobuf/duration.proto\"\xeb\x03\n\x13\x43onversationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\tcontextID\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x38\n\x06inputs\x18\x03 \x03(\x0b\x32(.dapr.proto.runtime.v1.ConversationInput\x12N\n\nparameters\x18\x04 \x03(\x0b\x32:.dapr.proto.runtime.v1.ConversationRequest.ParametersEntry\x12J\n\x08metadata\x18\x05 \x03(\x0b\x32\x38.dapr.proto.runtime.v1.ConversationRequest.MetadataEntry\x12\x15\n\x08scrubPII\x18\x06 \x01(\x08H\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x07 \x01(\x01H\x02\x88\x01\x01\x1aG\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x02\x18\x01\x42\x0c\n\n_contextIDB\x0b\n\t_scrubPIIB\x0e\n\x0c_temperature\"\x8c\x06\n\x19\x43onversationRequestAlpha2\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\ncontext_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x12>\n\x06inputs\x18\x03 \x03(\x0b\x32..dapr.proto.runtime.v1.ConversationInputAlpha2\x12T\n\nparameters\x18\x04 \x03(\x0b\x32@.dapr.proto.runtime.v1.ConversationRequestAlpha2.ParametersEntry\x12P\n\x08metadata\x18\x05 \x03(\x0b\x32>.dapr.proto.runtime.v1.ConversationRequestAlpha2.MetadataEntry\x12\x16\n\tscrub_pii\x18\x06 \x01(\x08H\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x07 \x01(\x01H\x02\x88\x01\x01\x12\x37\n\x05tools\x18\x08 \x03(\x0b\x32(.dapr.proto.runtime.v1.ConversationTools\x12\x18\n\x0btool_choice\x18\t \x01(\tH\x03\x88\x01\x01\x12\x35\n\x0fresponse_format\x18\n \x01(\x0b\x32\x17.google.protobuf.StructH\x04\x88\x01\x01\x12>\n\x16prompt_cache_retention\x18\x0b \x01(\x0b\x32\x19.google.protobuf.DurationH\x05\x88\x01\x01\x1aG\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b_context_idB\x0c\n\n_scrub_piiB\x0e\n\x0c_temperatureB\x0e\n\x0c_tool_choiceB\x12\n\x10_response_formatB\x19\n\x17_prompt_cache_retention\"h\n\x11\x43onversationInput\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\x04role\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08scrubPII\x18\x03 \x01(\x08H\x01\x88\x01\x01:\x02\x18\x01\x42\x07\n\x05_roleB\x0b\n\t_scrubPII\"}\n\x17\x43onversationInputAlpha2\x12<\n\x08messages\x18\x01 \x03(\x0b\x32*.dapr.proto.runtime.v1.ConversationMessage\x12\x16\n\tscrub_pii\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\x0c\n\n_scrub_pii\"\x97\x03\n\x13\x43onversationMessage\x12M\n\x0cof_developer\x18\x01 \x01(\x0b\x32\x35.dapr.proto.runtime.v1.ConversationMessageOfDeveloperH\x00\x12G\n\tof_system\x18\x02 \x01(\x0b\x32\x32.dapr.proto.runtime.v1.ConversationMessageOfSystemH\x00\x12\x43\n\x07of_user\x18\x03 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationMessageOfUserH\x00\x12M\n\x0cof_assistant\x18\x04 \x01(\x0b\x32\x35.dapr.proto.runtime.v1.ConversationMessageOfAssistantH\x00\x12\x43\n\x07of_tool\x18\x05 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationMessageOfToolH\x00\x42\x0f\n\rmessage_types\"\x80\x01\n\x1e\x43onversationMessageOfDeveloper\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\x07\n\x05_name\"}\n\x1b\x43onversationMessageOfSystem\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\x07\n\x05_name\"{\n\x19\x43onversationMessageOfUser\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\x07\n\x05_name\"\xc2\x01\n\x1e\x43onversationMessageOfAssistant\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x42\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContent\x12@\n\ntool_calls\x18\x03 \x03(\x0b\x32,.dapr.proto.runtime.v1.ConversationToolCallsB\x07\n\x05_name\"\x8f\x01\n\x19\x43onversationMessageOfTool\x12\x14\n\x07tool_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x42\n\x07\x63ontent\x18\x03 \x03(\x0b\x32\x31.dapr.proto.runtime.v1.ConversationMessageContentB\n\n\x08_tool_id\"\x89\x01\n\x15\x43onversationToolCalls\x12\x0f\n\x02id\x18\x01 \x01(\tH\x01\x88\x01\x01\x12J\n\x08\x66unction\x18\x02 \x01(\x0b\x32\x36.dapr.proto.runtime.v1.ConversationToolCallsOfFunctionH\x00\x42\x0c\n\ntool_typesB\x05\n\x03_id\"B\n\x1f\x43onversationToolCallsOfFunction\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\targuments\x18\x02 \x01(\t\"*\n\x1a\x43onversationMessageContent\x12\x0c\n\x04text\x18\x01 \x01(\t\"\xc0\x01\n\x12\x43onversationResult\x12\x0e\n\x06result\x18\x01 \x01(\t\x12M\n\nparameters\x18\x02 \x03(\x0b\x32\x39.dapr.proto.runtime.v1.ConversationResult.ParametersEntry\x1aG\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01:\x02\x18\x01\"\xd9\x01\n\x18\x43onversationResultAlpha2\x12\x41\n\x07\x63hoices\x18\x01 \x03(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationResultChoices\x12\x12\n\x05model\x18\x02 \x01(\tH\x00\x88\x01\x01\x12R\n\x05usage\x18\x03 \x01(\x0b\x32>.dapr.proto.runtime.v1.ConversationResultAlpha2CompletionUsageH\x01\x88\x01\x01\x42\x08\n\x06_modelB\x08\n\x06_usage\"\x9f\x03\n\'ConversationResultAlpha2CompletionUsage\x12\x19\n\x11\x63ompletion_tokens\x18\x01 \x01(\x04\x12\x15\n\rprompt_tokens\x18\x02 \x01(\x04\x12\x14\n\x0ctotal_tokens\x18\x03 \x01(\x04\x12}\n\x19\x63ompletion_tokens_details\x18\x04 \x01(\x0b\x32U.dapr.proto.runtime.v1.ConversationResultAlpha2CompletionUsageCompletionTokensDetailsH\x00\x88\x01\x01\x12u\n\x15prompt_tokens_details\x18\x05 \x01(\x0b\x32Q.dapr.proto.runtime.v1.ConversationResultAlpha2CompletionUsagePromptTokensDetailsH\x01\x88\x01\x01\x42\x1c\n\x1a_completion_tokens_detailsB\x18\n\x16_prompt_tokens_details\"\xb8\x01\n>ConversationResultAlpha2CompletionUsageCompletionTokensDetails\x12\"\n\x1a\x61\x63\x63\x65pted_prediction_tokens\x18\x01 \x01(\x04\x12\x14\n\x0c\x61udio_tokens\x18\x02 \x01(\x04\x12\x18\n\x10reasoning_tokens\x18\x03 \x01(\x04\x12\"\n\x1arejected_prediction_tokens\x18\x04 \x01(\x04\"i\n:ConversationResultAlpha2CompletionUsagePromptTokensDetails\x12\x14\n\x0c\x61udio_tokens\x18\x01 \x01(\x04\x12\x15\n\rcached_tokens\x18\x02 \x01(\x04\"\x84\x01\n\x19\x43onversationResultChoices\x12\x15\n\rfinish_reason\x18\x01 \x01(\t\x12\r\n\x05index\x18\x02 \x01(\x03\x12\x41\n\x07message\x18\x03 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationResultMessage\"n\n\x19\x43onversationResultMessage\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12@\n\ntool_calls\x18\x02 \x03(\x0b\x32,.dapr.proto.runtime.v1.ConversationToolCalls\"|\n\x14\x43onversationResponse\x12\x16\n\tcontextID\x18\x01 \x01(\tH\x00\x88\x01\x01\x12:\n\x07outputs\x18\x02 \x03(\x0b\x32).dapr.proto.runtime.v1.ConversationResult:\x02\x18\x01\x42\x0c\n\n_contextID\"\x86\x01\n\x1a\x43onversationResponseAlpha2\x12\x17\n\ncontext_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12@\n\x07outputs\x18\x02 \x03(\x0b\x32/.dapr.proto.runtime.v1.ConversationResultAlpha2B\r\n\x0b_context_id\"g\n\x11\x43onversationTools\x12\x44\n\x08\x66unction\x18\x01 \x01(\x0b\x32\x30.dapr.proto.runtime.v1.ConversationToolsFunctionH\x00\x42\x0c\n\ntool_types\"\x80\x01\n\x19\x43onversationToolsFunction\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tH\x00\x88\x01\x01\x12+\n\nparameters\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x0e\n\x0c_descriptionBk\n\nio.dapr.v1B\x0c\x44\x61prAiProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dapr.proto.runtime.v1.ai_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' + _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\014DaprAiProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' _globals['_CONVERSATIONREQUEST_PARAMETERSENTRY']._loaded_options = None _globals['_CONVERSATIONREQUEST_PARAMETERSENTRY']._serialized_options = b'8\001' _globals['_CONVERSATIONREQUEST_METADATAENTRY']._loaded_options = None diff --git a/dapr/proto/runtime/v1/ai_pb2.pyi b/dapr/proto/runtime/v1/ai_pb2.pyi index 4689b847a..2aa85422b 100644 --- a/dapr/proto/runtime/v1/ai_pb2.pyi +++ b/dapr/proto/runtime/v1/ai_pb2.pyi @@ -14,32 +14,32 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import google.protobuf.any_pb2 -import google.protobuf.descriptor -import google.protobuf.duration_pb2 -import google.protobuf.internal.containers -import google.protobuf.message -import google.protobuf.struct_pb2 +from collections import abc as _abc +from google.protobuf import any_pb2 as _any_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import duration_pb2 as _duration_pb2 +from google.protobuf import message as _message +from google.protobuf import struct_pb2 as _struct_pb2 +from google.protobuf.internal import containers as _containers +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias if sys.version_info >= (3, 13): - from warnings import deprecated + from warnings import deprecated as _deprecated else: - from typing_extensions import deprecated + from typing_extensions import deprecated as _deprecated -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@deprecated("""This message has been marked as deprecated using proto message options.""") -@typing.final -class ConversationRequest(google.protobuf.message.Message): +@_deprecated("""This message has been marked as deprecated using proto message options.""") +@_typing.final +class ConversationRequest(_message.Message): """Note: in general for conversation api reference these links: https://platform.openai.com/docs/api-reference/chat/create https://github.com/openai/openai-go/blob/main/chatcompletion.go @@ -47,104 +47,104 @@ class ConversationRequest(google.protobuf.message.Message): ConversationRequest is the request object for Conversation. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class ParametersEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class ParametersEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - @property - def value(self) -> google.protobuf.any_pb2.Any: ... + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> _any_pb2.Any: ... def __init__( self, *, - key: builtins.str = ..., - value: google.protobuf.any_pb2.Any | None = ..., + key: _builtins.str = ..., + value: _any_pb2.Any | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["value", b"value"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - NAME_FIELD_NUMBER: builtins.int - CONTEXTID_FIELD_NUMBER: builtins.int - INPUTS_FIELD_NUMBER: builtins.int - PARAMETERS_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - SCRUBPII_FIELD_NUMBER: builtins.int - TEMPERATURE_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + CONTEXTID_FIELD_NUMBER: _builtins.int + INPUTS_FIELD_NUMBER: _builtins.int + PARAMETERS_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + SCRUBPII_FIELD_NUMBER: _builtins.int + TEMPERATURE_FIELD_NUMBER: _builtins.int + name: _builtins.str """The name of Conversation component""" - contextID: builtins.str + contextID: _builtins.str """The ID of an existing chat (like in ChatGPT)""" - scrubPII: builtins.bool + scrubPII: _builtins.bool """Scrub PII data that comes back from the LLM""" - temperature: builtins.float + temperature: _builtins.float """Temperature for the LLM to optimize for creativity or predictability""" - @property - def inputs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationInput]: + @_builtins.property + def inputs(self) -> _containers.RepeatedCompositeFieldContainer[Global___ConversationInput]: """Inputs for the conversation, support multiple input in one time.""" - @property - def parameters(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.any_pb2.Any]: + @_builtins.property + def parameters(self) -> _containers.MessageMap[_builtins.str, _any_pb2.Any]: """Parameters for all custom fields.""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata passing to conversation components.""" def __init__( self, *, - name: builtins.str = ..., - contextID: builtins.str | None = ..., - inputs: collections.abc.Iterable[Global___ConversationInput] | None = ..., - parameters: collections.abc.Mapping[builtins.str, google.protobuf.any_pb2.Any] | None = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., - scrubPII: builtins.bool | None = ..., - temperature: builtins.float | None = ..., + name: _builtins.str = ..., + contextID: _builtins.str | None = ..., + inputs: _abc.Iterable[Global___ConversationInput] | None = ..., + parameters: _abc.Mapping[_builtins.str, _any_pb2.Any] | None = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + scrubPII: _builtins.bool | None = ..., + temperature: _builtins.float | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_contextID", b"_contextID", "_scrubPII", b"_scrubPII", "_temperature", b"_temperature", "contextID", b"contextID", "scrubPII", b"scrubPII", "temperature", b"temperature"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_contextID", b"_contextID", "_scrubPII", b"_scrubPII", "_temperature", b"_temperature", "contextID", b"contextID", "inputs", b"inputs", "metadata", b"metadata", "name", b"name", "parameters", b"parameters", "scrubPII", b"scrubPII", "temperature", b"temperature"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_contextID", b"_contextID", "_scrubPII", b"_scrubPII", "_temperature", b"_temperature", "contextID", b"contextID", "scrubPII", b"scrubPII", "temperature", b"temperature"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_contextID", b"_contextID", "_scrubPII", b"_scrubPII", "_temperature", b"_temperature", "contextID", b"contextID", "inputs", b"inputs", "metadata", b"metadata", "name", b"name", "parameters", b"parameters", "scrubPII", b"scrubPII", "temperature", b"temperature"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__contextID: typing_extensions.TypeAlias = typing.Literal["contextID"] - _WhichOneofArgType__contextID: typing_extensions.TypeAlias = typing.Literal["_contextID", b"_contextID"] - _WhichOneofReturnType__scrubPII: typing_extensions.TypeAlias = typing.Literal["scrubPII"] - _WhichOneofArgType__scrubPII: typing_extensions.TypeAlias = typing.Literal["_scrubPII", b"_scrubPII"] - _WhichOneofReturnType__temperature: typing_extensions.TypeAlias = typing.Literal["temperature"] - _WhichOneofArgType__temperature: typing_extensions.TypeAlias = typing.Literal["_temperature", b"_temperature"] - @typing.overload + _WhichOneofReturnType__contextID: _TypeAlias = _typing.Literal["contextID"] # noqa: Y015 + _WhichOneofArgType__contextID: _TypeAlias = _typing.Literal["_contextID", b"_contextID"] # noqa: Y015 + _WhichOneofReturnType__scrubPII: _TypeAlias = _typing.Literal["scrubPII"] # noqa: Y015 + _WhichOneofArgType__scrubPII: _TypeAlias = _typing.Literal["_scrubPII", b"_scrubPII"] # noqa: Y015 + _WhichOneofReturnType__temperature: _TypeAlias = _typing.Literal["temperature"] # noqa: Y015 + _WhichOneofArgType__temperature: _TypeAlias = _typing.Literal["_temperature", b"_temperature"] # noqa: Y015 + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__contextID) -> _WhichOneofReturnType__contextID | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__scrubPII) -> _WhichOneofReturnType__scrubPII | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__temperature) -> _WhichOneofReturnType__temperature | None: ... -Global___ConversationRequest: typing_extensions.TypeAlias = ConversationRequest +Global___ConversationRequest: _TypeAlias = ConversationRequest # noqa: Y015 -@typing.final -class ConversationRequestAlpha2(google.protobuf.message.Message): +@_typing.final +class ConversationRequestAlpha2(_message.Message): """Also, when we go stable we need to remove context_id and parameters in ConversationRequestAlpha2 as these are not used. ConversationRequestAlpha2 is the new request object for Conversation. @@ -152,65 +152,65 @@ class ConversationRequestAlpha2(google.protobuf.message.Message): https://github.com/openai/openai-go/blob/main/chatcompletion.go#L2106 """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class ParametersEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class ParametersEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - @property - def value(self) -> google.protobuf.any_pb2.Any: ... + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> _any_pb2.Any: ... def __init__( self, *, - key: builtins.str = ..., - value: google.protobuf.any_pb2.Any | None = ..., + key: _builtins.str = ..., + value: _any_pb2.Any | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["value", b"value"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - NAME_FIELD_NUMBER: builtins.int - CONTEXT_ID_FIELD_NUMBER: builtins.int - INPUTS_FIELD_NUMBER: builtins.int - PARAMETERS_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - SCRUB_PII_FIELD_NUMBER: builtins.int - TEMPERATURE_FIELD_NUMBER: builtins.int - TOOLS_FIELD_NUMBER: builtins.int - TOOL_CHOICE_FIELD_NUMBER: builtins.int - RESPONSE_FORMAT_FIELD_NUMBER: builtins.int - PROMPT_CACHE_RETENTION_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + CONTEXT_ID_FIELD_NUMBER: _builtins.int + INPUTS_FIELD_NUMBER: _builtins.int + PARAMETERS_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + SCRUB_PII_FIELD_NUMBER: _builtins.int + TEMPERATURE_FIELD_NUMBER: _builtins.int + TOOLS_FIELD_NUMBER: _builtins.int + TOOL_CHOICE_FIELD_NUMBER: _builtins.int + RESPONSE_FORMAT_FIELD_NUMBER: _builtins.int + PROMPT_CACHE_RETENTION_FIELD_NUMBER: _builtins.int + name: _builtins.str """The name of Conversation component""" - context_id: builtins.str + context_id: _builtins.str """The ID of an existing chat (like in ChatGPT)""" - scrub_pii: builtins.bool + scrub_pii: _builtins.bool """Scrub PII data that comes back from the LLM""" - temperature: builtins.float + temperature: _builtins.float """Temperature for the LLM to optimize for creativity or predictability""" - tool_choice: builtins.str + tool_choice: _builtins.str """Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. @@ -221,16 +221,16 @@ class ConversationRequestAlpha2(google.protobuf.message.Message): ref: https://github.com/openai/openai-go/blob/main/chatcompletion.go#L1976 ref: https://python.langchain.com/docs/how_to/tool_choice/ """ - @property - def inputs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationInputAlpha2]: + @_builtins.property + def inputs(self) -> _containers.RepeatedCompositeFieldContainer[Global___ConversationInputAlpha2]: """Inputs for the conversation.""" - @property - def parameters(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.any_pb2.Any]: + @_builtins.property + def parameters(self) -> _containers.MessageMap[_builtins.str, _any_pb2.Any]: """Parameters for all custom fields.""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """Set of 16 key-value pairs that can be attached to the conversation. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. @@ -239,16 +239,16 @@ class ConversationRequestAlpha2(google.protobuf.message.Message): NOTE: In the next iteration of this API, this will be within the HTTP/gRPC headers instead. """ - @property - def tools(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationTools]: + @_builtins.property + def tools(self) -> _containers.RepeatedCompositeFieldContainer[Global___ConversationTools]: """Tools register the tools available to be used by the LLM during the conversation. These are sent on a per request basis. The tools available during the first round of the conversation may be different than tools specified later on. """ - @property - def response_format(self) -> google.protobuf.struct_pb2.Struct: + @_builtins.property + def response_format(self) -> _struct_pb2.Struct: """Structured outputs described using a JSON Schema object. Use this when you want strict, typed structured output. This corresponds to OpenAI's: @@ -261,8 +261,8 @@ class ConversationRequestAlpha2(google.protobuf.message.Message): ref: https://github.com/openai/openai-go/blob/main/chatcompletion.go#L3111 """ - @property - def prompt_cache_retention(self) -> google.protobuf.duration_pb2.Duration: + @_builtins.property + def prompt_cache_retention(self) -> _duration_pb2.Duration: """Retention policy for the prompt cache. If using OpenAI with this value set to `24h` it enables extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. @@ -274,145 +274,145 @@ class ConversationRequestAlpha2(google.protobuf.message.Message): def __init__( self, *, - name: builtins.str = ..., - context_id: builtins.str | None = ..., - inputs: collections.abc.Iterable[Global___ConversationInputAlpha2] | None = ..., - parameters: collections.abc.Mapping[builtins.str, google.protobuf.any_pb2.Any] | None = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., - scrub_pii: builtins.bool | None = ..., - temperature: builtins.float | None = ..., - tools: collections.abc.Iterable[Global___ConversationTools] | None = ..., - tool_choice: builtins.str | None = ..., - response_format: google.protobuf.struct_pb2.Struct | None = ..., - prompt_cache_retention: google.protobuf.duration_pb2.Duration | None = ..., + name: _builtins.str = ..., + context_id: _builtins.str | None = ..., + inputs: _abc.Iterable[Global___ConversationInputAlpha2] | None = ..., + parameters: _abc.Mapping[_builtins.str, _any_pb2.Any] | None = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + scrub_pii: _builtins.bool | None = ..., + temperature: _builtins.float | None = ..., + tools: _abc.Iterable[Global___ConversationTools] | None = ..., + tool_choice: _builtins.str | None = ..., + response_format: _struct_pb2.Struct | None = ..., + prompt_cache_retention: _duration_pb2.Duration | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_context_id", b"_context_id", "_prompt_cache_retention", b"_prompt_cache_retention", "_response_format", b"_response_format", "_scrub_pii", b"_scrub_pii", "_temperature", b"_temperature", "_tool_choice", b"_tool_choice", "context_id", b"context_id", "prompt_cache_retention", b"prompt_cache_retention", "response_format", b"response_format", "scrub_pii", b"scrub_pii", "temperature", b"temperature", "tool_choice", b"tool_choice"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_context_id", b"_context_id", "_prompt_cache_retention", b"_prompt_cache_retention", "_response_format", b"_response_format", "_scrub_pii", b"_scrub_pii", "_temperature", b"_temperature", "_tool_choice", b"_tool_choice", "context_id", b"context_id", "inputs", b"inputs", "metadata", b"metadata", "name", b"name", "parameters", b"parameters", "prompt_cache_retention", b"prompt_cache_retention", "response_format", b"response_format", "scrub_pii", b"scrub_pii", "temperature", b"temperature", "tool_choice", b"tool_choice", "tools", b"tools"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_context_id", b"_context_id", "_prompt_cache_retention", b"_prompt_cache_retention", "_response_format", b"_response_format", "_scrub_pii", b"_scrub_pii", "_temperature", b"_temperature", "_tool_choice", b"_tool_choice", "context_id", b"context_id", "prompt_cache_retention", b"prompt_cache_retention", "response_format", b"response_format", "scrub_pii", b"scrub_pii", "temperature", b"temperature", "tool_choice", b"tool_choice"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_context_id", b"_context_id", "_prompt_cache_retention", b"_prompt_cache_retention", "_response_format", b"_response_format", "_scrub_pii", b"_scrub_pii", "_temperature", b"_temperature", "_tool_choice", b"_tool_choice", "context_id", b"context_id", "inputs", b"inputs", "metadata", b"metadata", "name", b"name", "parameters", b"parameters", "prompt_cache_retention", b"prompt_cache_retention", "response_format", b"response_format", "scrub_pii", b"scrub_pii", "temperature", b"temperature", "tool_choice", b"tool_choice", "tools", b"tools"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__context_id: typing_extensions.TypeAlias = typing.Literal["context_id"] - _WhichOneofArgType__context_id: typing_extensions.TypeAlias = typing.Literal["_context_id", b"_context_id"] - _WhichOneofReturnType__prompt_cache_retention: typing_extensions.TypeAlias = typing.Literal["prompt_cache_retention"] - _WhichOneofArgType__prompt_cache_retention: typing_extensions.TypeAlias = typing.Literal["_prompt_cache_retention", b"_prompt_cache_retention"] - _WhichOneofReturnType__response_format: typing_extensions.TypeAlias = typing.Literal["response_format"] - _WhichOneofArgType__response_format: typing_extensions.TypeAlias = typing.Literal["_response_format", b"_response_format"] - _WhichOneofReturnType__scrub_pii: typing_extensions.TypeAlias = typing.Literal["scrub_pii"] - _WhichOneofArgType__scrub_pii: typing_extensions.TypeAlias = typing.Literal["_scrub_pii", b"_scrub_pii"] - _WhichOneofReturnType__temperature: typing_extensions.TypeAlias = typing.Literal["temperature"] - _WhichOneofArgType__temperature: typing_extensions.TypeAlias = typing.Literal["_temperature", b"_temperature"] - _WhichOneofReturnType__tool_choice: typing_extensions.TypeAlias = typing.Literal["tool_choice"] - _WhichOneofArgType__tool_choice: typing_extensions.TypeAlias = typing.Literal["_tool_choice", b"_tool_choice"] - @typing.overload + _WhichOneofReturnType__context_id: _TypeAlias = _typing.Literal["context_id"] # noqa: Y015 + _WhichOneofArgType__context_id: _TypeAlias = _typing.Literal["_context_id", b"_context_id"] # noqa: Y015 + _WhichOneofReturnType__prompt_cache_retention: _TypeAlias = _typing.Literal["prompt_cache_retention"] # noqa: Y015 + _WhichOneofArgType__prompt_cache_retention: _TypeAlias = _typing.Literal["_prompt_cache_retention", b"_prompt_cache_retention"] # noqa: Y015 + _WhichOneofReturnType__response_format: _TypeAlias = _typing.Literal["response_format"] # noqa: Y015 + _WhichOneofArgType__response_format: _TypeAlias = _typing.Literal["_response_format", b"_response_format"] # noqa: Y015 + _WhichOneofReturnType__scrub_pii: _TypeAlias = _typing.Literal["scrub_pii"] # noqa: Y015 + _WhichOneofArgType__scrub_pii: _TypeAlias = _typing.Literal["_scrub_pii", b"_scrub_pii"] # noqa: Y015 + _WhichOneofReturnType__temperature: _TypeAlias = _typing.Literal["temperature"] # noqa: Y015 + _WhichOneofArgType__temperature: _TypeAlias = _typing.Literal["_temperature", b"_temperature"] # noqa: Y015 + _WhichOneofReturnType__tool_choice: _TypeAlias = _typing.Literal["tool_choice"] # noqa: Y015 + _WhichOneofArgType__tool_choice: _TypeAlias = _typing.Literal["_tool_choice", b"_tool_choice"] # noqa: Y015 + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__context_id) -> _WhichOneofReturnType__context_id | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__prompt_cache_retention) -> _WhichOneofReturnType__prompt_cache_retention | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__response_format) -> _WhichOneofReturnType__response_format | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__scrub_pii) -> _WhichOneofReturnType__scrub_pii | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__temperature) -> _WhichOneofReturnType__temperature | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__tool_choice) -> _WhichOneofReturnType__tool_choice | None: ... -Global___ConversationRequestAlpha2: typing_extensions.TypeAlias = ConversationRequestAlpha2 +Global___ConversationRequestAlpha2: _TypeAlias = ConversationRequestAlpha2 # noqa: Y015 -@deprecated("""This message has been marked as deprecated using proto message options.""") -@typing.final -class ConversationInput(google.protobuf.message.Message): +@_deprecated("""This message has been marked as deprecated using proto message options.""") +@_typing.final +class ConversationInput(_message.Message): """maintained for backwards compatibility""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - CONTENT_FIELD_NUMBER: builtins.int - ROLE_FIELD_NUMBER: builtins.int - SCRUBPII_FIELD_NUMBER: builtins.int - content: builtins.str + CONTENT_FIELD_NUMBER: _builtins.int + ROLE_FIELD_NUMBER: _builtins.int + SCRUBPII_FIELD_NUMBER: _builtins.int + content: _builtins.str """The content to send to the llm""" - role: builtins.str + role: _builtins.str """The role to set for the message""" - scrubPII: builtins.bool + scrubPII: _builtins.bool """Scrub PII data that goes into the LLM""" def __init__( self, *, - content: builtins.str = ..., - role: builtins.str | None = ..., - scrubPII: builtins.bool | None = ..., + content: _builtins.str = ..., + role: _builtins.str | None = ..., + scrubPII: _builtins.bool | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_role", b"_role", "_scrubPII", b"_scrubPII", "role", b"role", "scrubPII", b"scrubPII"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_role", b"_role", "_scrubPII", b"_scrubPII", "content", b"content", "role", b"role", "scrubPII", b"scrubPII"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_role", b"_role", "_scrubPII", b"_scrubPII", "role", b"role", "scrubPII", b"scrubPII"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_role", b"_role", "_scrubPII", b"_scrubPII", "content", b"content", "role", b"role", "scrubPII", b"scrubPII"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__role: typing_extensions.TypeAlias = typing.Literal["role"] - _WhichOneofArgType__role: typing_extensions.TypeAlias = typing.Literal["_role", b"_role"] - _WhichOneofReturnType__scrubPII: typing_extensions.TypeAlias = typing.Literal["scrubPII"] - _WhichOneofArgType__scrubPII: typing_extensions.TypeAlias = typing.Literal["_scrubPII", b"_scrubPII"] - @typing.overload + _WhichOneofReturnType__role: _TypeAlias = _typing.Literal["role"] # noqa: Y015 + _WhichOneofArgType__role: _TypeAlias = _typing.Literal["_role", b"_role"] # noqa: Y015 + _WhichOneofReturnType__scrubPII: _TypeAlias = _typing.Literal["scrubPII"] # noqa: Y015 + _WhichOneofArgType__scrubPII: _TypeAlias = _typing.Literal["_scrubPII", b"_scrubPII"] # noqa: Y015 + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__role) -> _WhichOneofReturnType__role | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__scrubPII) -> _WhichOneofReturnType__scrubPII | None: ... -Global___ConversationInput: typing_extensions.TypeAlias = ConversationInput +Global___ConversationInput: _TypeAlias = ConversationInput # noqa: Y015 -@typing.final -class ConversationInputAlpha2(google.protobuf.message.Message): +@_typing.final +class ConversationInputAlpha2(_message.Message): """TODO: when going stable just make these flat in the ConversationRequestAlpha2, or reevaluate the grouping of fields... directly inspired by openai.ChatCompletionNewParams https://github.com/openai/openai-go/blob/main/chatcompletion.go#L2106 """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - MESSAGES_FIELD_NUMBER: builtins.int - SCRUB_PII_FIELD_NUMBER: builtins.int - scrub_pii: builtins.bool + MESSAGES_FIELD_NUMBER: _builtins.int + SCRUB_PII_FIELD_NUMBER: _builtins.int + scrub_pii: _builtins.bool """Scrub PII data that goes into the LLM""" - @property - def messages(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationMessage]: + @_builtins.property + def messages(self) -> _containers.RepeatedCompositeFieldContainer[Global___ConversationMessage]: """The content to send to the llm""" def __init__( self, *, - messages: collections.abc.Iterable[Global___ConversationMessage] | None = ..., - scrub_pii: builtins.bool | None = ..., + messages: _abc.Iterable[Global___ConversationMessage] | None = ..., + scrub_pii: _builtins.bool | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_scrub_pii", b"_scrub_pii", "scrub_pii", b"scrub_pii"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_scrub_pii", b"_scrub_pii", "messages", b"messages", "scrub_pii", b"scrub_pii"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_scrub_pii", b"_scrub_pii", "scrub_pii", b"scrub_pii"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_scrub_pii", b"_scrub_pii", "messages", b"messages", "scrub_pii", b"scrub_pii"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__scrub_pii: typing_extensions.TypeAlias = typing.Literal["scrub_pii"] - _WhichOneofArgType__scrub_pii: typing_extensions.TypeAlias = typing.Literal["_scrub_pii", b"_scrub_pii"] + _WhichOneofReturnType__scrub_pii: _TypeAlias = _typing.Literal["scrub_pii"] # noqa: Y015 + _WhichOneofArgType__scrub_pii: _TypeAlias = _typing.Literal["_scrub_pii", b"_scrub_pii"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType__scrub_pii) -> _WhichOneofReturnType__scrub_pii | None: ... -Global___ConversationInputAlpha2: typing_extensions.TypeAlias = ConversationInputAlpha2 +Global___ConversationInputAlpha2: _TypeAlias = ConversationInputAlpha2 # noqa: Y015 -@typing.final -class ConversationMessage(google.protobuf.message.Message): +@_typing.final +class ConversationMessage(_message.Message): """inspired by openai.ChatCompletionMessageParamUnion https://github.com/openai/openai-go/blob/main/chatcompletion.go#L1449 The role field is inherent to the type of ConversationMessage, and is propagated in the backend according to the underlying LLM provider type. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - OF_DEVELOPER_FIELD_NUMBER: builtins.int - OF_SYSTEM_FIELD_NUMBER: builtins.int - OF_USER_FIELD_NUMBER: builtins.int - OF_ASSISTANT_FIELD_NUMBER: builtins.int - OF_TOOL_FIELD_NUMBER: builtins.int - @property + OF_DEVELOPER_FIELD_NUMBER: _builtins.int + OF_SYSTEM_FIELD_NUMBER: _builtins.int + OF_USER_FIELD_NUMBER: _builtins.int + OF_ASSISTANT_FIELD_NUMBER: _builtins.int + OF_TOOL_FIELD_NUMBER: _builtins.int + @_builtins.property def of_developer(self) -> Global___ConversationMessageOfDeveloper: ... - @property + @_builtins.property def of_system(self) -> Global___ConversationMessageOfSystem: ... - @property + @_builtins.property def of_user(self) -> Global___ConversationMessageOfUser: ... - @property + @_builtins.property def of_assistant(self) -> Global___ConversationMessageOfAssistant: ... - @property + @_builtins.property def of_tool(self) -> Global___ConversationMessageOfTool: """Note: there could be a ConversationMessageOfFunction type here too, but that is deprecated in openai, so we will not support this. @@ -427,112 +427,112 @@ class ConversationMessage(google.protobuf.message.Message): of_assistant: Global___ConversationMessageOfAssistant | None = ..., of_tool: Global___ConversationMessageOfTool | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["message_types", b"message_types", "of_assistant", b"of_assistant", "of_developer", b"of_developer", "of_system", b"of_system", "of_tool", b"of_tool", "of_user", b"of_user"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["message_types", b"message_types", "of_assistant", b"of_assistant", "of_developer", b"of_developer", "of_system", b"of_system", "of_tool", b"of_tool", "of_user", b"of_user"] + _HasFieldArgType: _TypeAlias = _typing.Literal["message_types", b"message_types", "of_assistant", b"of_assistant", "of_developer", b"of_developer", "of_system", b"of_system", "of_tool", b"of_tool", "of_user", b"of_user"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["message_types", b"message_types", "of_assistant", b"of_assistant", "of_developer", b"of_developer", "of_system", b"of_system", "of_tool", b"of_tool", "of_user", b"of_user"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType_message_types: typing_extensions.TypeAlias = typing.Literal["of_developer", "of_system", "of_user", "of_assistant", "of_tool"] - _WhichOneofArgType_message_types: typing_extensions.TypeAlias = typing.Literal["message_types", b"message_types"] + _WhichOneofReturnType_message_types: _TypeAlias = _typing.Literal["of_developer", "of_system", "of_user", "of_assistant", "of_tool"] # noqa: Y015 + _WhichOneofArgType_message_types: _TypeAlias = _typing.Literal["message_types", b"message_types"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType_message_types) -> _WhichOneofReturnType_message_types | None: ... -Global___ConversationMessage: typing_extensions.TypeAlias = ConversationMessage +Global___ConversationMessage: _TypeAlias = ConversationMessage # noqa: Y015 -@typing.final -class ConversationMessageOfDeveloper(google.protobuf.message.Message): +@_typing.final +class ConversationMessageOfDeveloper(_message.Message): """inspired by openai.ChatCompletionDeveloperMessageParam https://github.com/openai/openai-go/blob/main/chatcompletion.go#L1130 ConversationMessageOfDeveloper is intended to be the contents of a conversation message, as the role of a developer. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - CONTENT_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + CONTENT_FIELD_NUMBER: _builtins.int + name: _builtins.str """The name of the participant in the message.""" - @property - def content(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationMessageContent]: ... + @_builtins.property + def content(self) -> _containers.RepeatedCompositeFieldContainer[Global___ConversationMessageContent]: ... def __init__( self, *, - name: builtins.str | None = ..., - content: collections.abc.Iterable[Global___ConversationMessageContent] | None = ..., + name: _builtins.str | None = ..., + content: _abc.Iterable[Global___ConversationMessageContent] | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_name", b"_name", "name", b"name"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_name", b"_name", "content", b"content", "name", b"name"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_name", b"_name", "name", b"name"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_name", b"_name", "content", b"content", "name", b"name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__name: typing_extensions.TypeAlias = typing.Literal["name"] - _WhichOneofArgType__name: typing_extensions.TypeAlias = typing.Literal["_name", b"_name"] + _WhichOneofReturnType__name: _TypeAlias = _typing.Literal["name"] # noqa: Y015 + _WhichOneofArgType__name: _TypeAlias = _typing.Literal["_name", b"_name"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType__name) -> _WhichOneofReturnType__name | None: ... -Global___ConversationMessageOfDeveloper: typing_extensions.TypeAlias = ConversationMessageOfDeveloper +Global___ConversationMessageOfDeveloper: _TypeAlias = ConversationMessageOfDeveloper # noqa: Y015 -@typing.final -class ConversationMessageOfSystem(google.protobuf.message.Message): +@_typing.final +class ConversationMessageOfSystem(_message.Message): """inspired by openai.ChatCompletionSystemMessageParam https://github.com/openai/openai-go/blob/main/chatcompletion.go#L1842 ConversationMessageOfSystem is intended to be the contents of a conversation message, as the role of a system. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - CONTENT_FIELD_NUMBER: builtins.int - name: builtins.str - @property - def content(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationMessageContent]: ... + NAME_FIELD_NUMBER: _builtins.int + CONTENT_FIELD_NUMBER: _builtins.int + name: _builtins.str + @_builtins.property + def content(self) -> _containers.RepeatedCompositeFieldContainer[Global___ConversationMessageContent]: ... def __init__( self, *, - name: builtins.str | None = ..., - content: collections.abc.Iterable[Global___ConversationMessageContent] | None = ..., + name: _builtins.str | None = ..., + content: _abc.Iterable[Global___ConversationMessageContent] | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_name", b"_name", "name", b"name"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_name", b"_name", "content", b"content", "name", b"name"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_name", b"_name", "name", b"name"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_name", b"_name", "content", b"content", "name", b"name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__name: typing_extensions.TypeAlias = typing.Literal["name"] - _WhichOneofArgType__name: typing_extensions.TypeAlias = typing.Literal["_name", b"_name"] + _WhichOneofReturnType__name: _TypeAlias = _typing.Literal["name"] # noqa: Y015 + _WhichOneofArgType__name: _TypeAlias = _typing.Literal["_name", b"_name"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType__name) -> _WhichOneofReturnType__name | None: ... -Global___ConversationMessageOfSystem: typing_extensions.TypeAlias = ConversationMessageOfSystem +Global___ConversationMessageOfSystem: _TypeAlias = ConversationMessageOfSystem # noqa: Y015 -@typing.final -class ConversationMessageOfUser(google.protobuf.message.Message): +@_typing.final +class ConversationMessageOfUser(_message.Message): """inspired by openai.ChatCompletionUserMessageParam https://github.com/openai/openai-go/blob/main/chatcompletion.go#L2060C6-L2060C36 ConversationMessageOfUser is intended to be the contents of a conversation message, as the role of an end user. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - CONTENT_FIELD_NUMBER: builtins.int - name: builtins.str - @property - def content(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationMessageContent]: ... + NAME_FIELD_NUMBER: _builtins.int + CONTENT_FIELD_NUMBER: _builtins.int + name: _builtins.str + @_builtins.property + def content(self) -> _containers.RepeatedCompositeFieldContainer[Global___ConversationMessageContent]: ... def __init__( self, *, - name: builtins.str | None = ..., - content: collections.abc.Iterable[Global___ConversationMessageContent] | None = ..., + name: _builtins.str | None = ..., + content: _abc.Iterable[Global___ConversationMessageContent] | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_name", b"_name", "name", b"name"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_name", b"_name", "content", b"content", "name", b"name"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_name", b"_name", "name", b"name"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_name", b"_name", "content", b"content", "name", b"name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__name: typing_extensions.TypeAlias = typing.Literal["name"] - _WhichOneofArgType__name: typing_extensions.TypeAlias = typing.Literal["_name", b"_name"] + _WhichOneofReturnType__name: _TypeAlias = _typing.Literal["name"] # noqa: Y015 + _WhichOneofArgType__name: _TypeAlias = _typing.Literal["_name", b"_name"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType__name) -> _WhichOneofReturnType__name | None: ... -Global___ConversationMessageOfUser: typing_extensions.TypeAlias = ConversationMessageOfUser +Global___ConversationMessageOfUser: _TypeAlias = ConversationMessageOfUser # noqa: Y015 -@typing.final -class ConversationMessageOfAssistant(google.protobuf.message.Message): +@_typing.final +class ConversationMessageOfAssistant(_message.Message): """inspired by openai.ChatCompletionAssistantMessageParam https://github.com/openai/openai-go/blob/main/chatcompletion.go#L310 https://github.com/openai/openai-go/blob/main/chatcompletion.go#L2060C6-L2060C36 @@ -540,37 +540,37 @@ class ConversationMessageOfAssistant(google.protobuf.message.Message): as the role of an assistant. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - CONTENT_FIELD_NUMBER: builtins.int - TOOL_CALLS_FIELD_NUMBER: builtins.int - name: builtins.str - @property - def content(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationMessageContent]: ... - @property - def tool_calls(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationToolCalls]: + NAME_FIELD_NUMBER: _builtins.int + CONTENT_FIELD_NUMBER: _builtins.int + TOOL_CALLS_FIELD_NUMBER: _builtins.int + name: _builtins.str + @_builtins.property + def content(self) -> _containers.RepeatedCompositeFieldContainer[Global___ConversationMessageContent]: ... + @_builtins.property + def tool_calls(self) -> _containers.RepeatedCompositeFieldContainer[Global___ConversationToolCalls]: """Tool calls generated by the model, such as function calls for the client to then make.""" def __init__( self, *, - name: builtins.str | None = ..., - content: collections.abc.Iterable[Global___ConversationMessageContent] | None = ..., - tool_calls: collections.abc.Iterable[Global___ConversationToolCalls] | None = ..., + name: _builtins.str | None = ..., + content: _abc.Iterable[Global___ConversationMessageContent] | None = ..., + tool_calls: _abc.Iterable[Global___ConversationToolCalls] | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_name", b"_name", "name", b"name"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_name", b"_name", "content", b"content", "name", b"name", "tool_calls", b"tool_calls"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_name", b"_name", "name", b"name"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_name", b"_name", "content", b"content", "name", b"name", "tool_calls", b"tool_calls"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__name: typing_extensions.TypeAlias = typing.Literal["name"] - _WhichOneofArgType__name: typing_extensions.TypeAlias = typing.Literal["_name", b"_name"] + _WhichOneofReturnType__name: _TypeAlias = _typing.Literal["name"] # noqa: Y015 + _WhichOneofArgType__name: _TypeAlias = _typing.Literal["_name", b"_name"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType__name) -> _WhichOneofReturnType__name | None: ... -Global___ConversationMessageOfAssistant: typing_extensions.TypeAlias = ConversationMessageOfAssistant +Global___ConversationMessageOfAssistant: _TypeAlias = ConversationMessageOfAssistant # noqa: Y015 -@typing.final -class ConversationMessageOfTool(google.protobuf.message.Message): +@_typing.final +class ConversationMessageOfTool(_message.Message): """Note on ConversationMessageOfTool.tool_id: openai does have this as required; however, some llm providers (ie mistral) do not require this field, so we denote as optional. @@ -581,36 +581,36 @@ class ConversationMessageOfTool(google.protobuf.message.Message): as the role of a tool. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - TOOL_ID_FIELD_NUMBER: builtins.int - NAME_FIELD_NUMBER: builtins.int - CONTENT_FIELD_NUMBER: builtins.int - tool_id: builtins.str + TOOL_ID_FIELD_NUMBER: _builtins.int + NAME_FIELD_NUMBER: _builtins.int + CONTENT_FIELD_NUMBER: _builtins.int + tool_id: _builtins.str """Tool ID is helpful for tracking tool history""" - name: builtins.str + name: _builtins.str """Name of tool associated with the message""" - @property - def content(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationMessageContent]: ... + @_builtins.property + def content(self) -> _containers.RepeatedCompositeFieldContainer[Global___ConversationMessageContent]: ... def __init__( self, *, - tool_id: builtins.str | None = ..., - name: builtins.str = ..., - content: collections.abc.Iterable[Global___ConversationMessageContent] | None = ..., + tool_id: _builtins.str | None = ..., + name: _builtins.str = ..., + content: _abc.Iterable[Global___ConversationMessageContent] | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_tool_id", b"_tool_id", "tool_id", b"tool_id"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_tool_id", b"_tool_id", "content", b"content", "name", b"name", "tool_id", b"tool_id"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_tool_id", b"_tool_id", "tool_id", b"tool_id"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_tool_id", b"_tool_id", "content", b"content", "name", b"name", "tool_id", b"tool_id"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__tool_id: typing_extensions.TypeAlias = typing.Literal["tool_id"] - _WhichOneofArgType__tool_id: typing_extensions.TypeAlias = typing.Literal["_tool_id", b"_tool_id"] + _WhichOneofReturnType__tool_id: _TypeAlias = _typing.Literal["tool_id"] # noqa: Y015 + _WhichOneofArgType__tool_id: _TypeAlias = _typing.Literal["_tool_id", b"_tool_id"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType__tool_id) -> _WhichOneofReturnType__tool_id | None: ... -Global___ConversationMessageOfTool: typing_extensions.TypeAlias = ConversationMessageOfTool +Global___ConversationMessageOfTool: _TypeAlias = ConversationMessageOfTool # noqa: Y015 -@typing.final -class ConversationToolCalls(google.protobuf.message.Message): +@_typing.final +class ConversationToolCalls(_message.Message): """inspired by openai.ChatCompletionMessageToolCallParam and openai.ChatCompletionMessageToolCall https://github.com/openai/openai-go/blob/main/chatcompletion.go#L1669 https://github.com/openai/openai-go/blob/main/chatcompletion.go#L1611 @@ -619,48 +619,48 @@ class ConversationToolCalls(google.protobuf.message.Message): that this client can also have the tool handy itself to execute it. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ID_FIELD_NUMBER: builtins.int - FUNCTION_FIELD_NUMBER: builtins.int - id: builtins.str - @property + ID_FIELD_NUMBER: _builtins.int + FUNCTION_FIELD_NUMBER: _builtins.int + id: _builtins.str + @_builtins.property def function(self) -> Global___ConversationToolCallsOfFunction: """TODO: we are currently missing an OfCustom -> ConversationToolCallsOfFunction""" def __init__( self, *, - id: builtins.str | None = ..., + id: _builtins.str | None = ..., function: Global___ConversationToolCallsOfFunction | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_id", b"_id", "function", b"function", "id", b"id", "tool_types", b"tool_types"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_id", b"_id", "function", b"function", "id", b"id", "tool_types", b"tool_types"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_id", b"_id", "function", b"function", "id", b"id", "tool_types", b"tool_types"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_id", b"_id", "function", b"function", "id", b"id", "tool_types", b"tool_types"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__id: typing_extensions.TypeAlias = typing.Literal["id"] - _WhichOneofArgType__id: typing_extensions.TypeAlias = typing.Literal["_id", b"_id"] - _WhichOneofReturnType_tool_types: typing_extensions.TypeAlias = typing.Literal["function"] - _WhichOneofArgType_tool_types: typing_extensions.TypeAlias = typing.Literal["tool_types", b"tool_types"] - @typing.overload + _WhichOneofReturnType__id: _TypeAlias = _typing.Literal["id"] # noqa: Y015 + _WhichOneofArgType__id: _TypeAlias = _typing.Literal["_id", b"_id"] # noqa: Y015 + _WhichOneofReturnType_tool_types: _TypeAlias = _typing.Literal["function"] # noqa: Y015 + _WhichOneofArgType_tool_types: _TypeAlias = _typing.Literal["tool_types", b"tool_types"] # noqa: Y015 + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__id) -> _WhichOneofReturnType__id | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType_tool_types) -> _WhichOneofReturnType_tool_types | None: ... -Global___ConversationToolCalls: typing_extensions.TypeAlias = ConversationToolCalls +Global___ConversationToolCalls: _TypeAlias = ConversationToolCalls # noqa: Y015 -@typing.final -class ConversationToolCallsOfFunction(google.protobuf.message.Message): +@_typing.final +class ConversationToolCallsOfFunction(_message.Message): """inspired by openai.ChatCompletionMessageToolCallFunctionParam https://github.com/openai/openai-go/blob/main/chatcompletion.go#L1859 """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - ARGUMENTS_FIELD_NUMBER: builtins.int - name: builtins.str - arguments: builtins.str + NAME_FIELD_NUMBER: _builtins.int + ARGUMENTS_FIELD_NUMBER: _builtins.int + name: _builtins.str + arguments: _builtins.str """The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the @@ -669,16 +669,16 @@ class ConversationToolCallsOfFunction(google.protobuf.message.Message): def __init__( self, *, - name: builtins.str = ..., - arguments: builtins.str = ..., + name: _builtins.str = ..., + arguments: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["arguments", b"arguments", "name", b"name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["arguments", b"arguments", "name", b"name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ConversationToolCallsOfFunction: typing_extensions.TypeAlias = ConversationToolCallsOfFunction +Global___ConversationToolCallsOfFunction: _TypeAlias = ConversationToolCallsOfFunction # noqa: Y015 -@typing.final -class ConversationMessageContent(google.protobuf.message.Message): +@_typing.final +class ConversationMessageContent(_message.Message): """inspired by openai.ChatCompletionContentPartTextParam & openai.ChatCompletionDeveloperMessageParamContentUnion https://github.com/openai/openai-go/blob/main/chatcompletion.go#L1084 https://github.com/openai/openai-go/blob/main/chatcompletion.go#L1154C6-L1154C53 @@ -686,182 +686,182 @@ class ConversationMessageContent(google.protobuf.message.Message): so instead of this, we support that in one message type instead. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - TEXT_FIELD_NUMBER: builtins.int - text: builtins.str + TEXT_FIELD_NUMBER: _builtins.int + text: _builtins.str def __init__( self, *, - text: builtins.str = ..., + text: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["text", b"text"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["text", b"text"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ConversationMessageContent: typing_extensions.TypeAlias = ConversationMessageContent +Global___ConversationMessageContent: _TypeAlias = ConversationMessageContent # noqa: Y015 -@deprecated("""This message has been marked as deprecated using proto message options.""") -@typing.final -class ConversationResult(google.protobuf.message.Message): +@_deprecated("""This message has been marked as deprecated using proto message options.""") +@_typing.final +class ConversationResult(_message.Message): """ConversationResult is the result for one input.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class ParametersEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class ParametersEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - @property - def value(self) -> google.protobuf.any_pb2.Any: ... + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> _any_pb2.Any: ... def __init__( self, *, - key: builtins.str = ..., - value: google.protobuf.any_pb2.Any | None = ..., + key: _builtins.str = ..., + value: _any_pb2.Any | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["value", b"value"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - RESULT_FIELD_NUMBER: builtins.int - PARAMETERS_FIELD_NUMBER: builtins.int - result: builtins.str + RESULT_FIELD_NUMBER: _builtins.int + PARAMETERS_FIELD_NUMBER: _builtins.int + result: _builtins.str """Result for the one conversation input.""" - @property - def parameters(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.any_pb2.Any]: + @_builtins.property + def parameters(self) -> _containers.MessageMap[_builtins.str, _any_pb2.Any]: """Parameters for all custom fields.""" def __init__( self, *, - result: builtins.str = ..., - parameters: collections.abc.Mapping[builtins.str, google.protobuf.any_pb2.Any] | None = ..., + result: _builtins.str = ..., + parameters: _abc.Mapping[_builtins.str, _any_pb2.Any] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["parameters", b"parameters", "result", b"result"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["parameters", b"parameters", "result", b"result"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ConversationResult: typing_extensions.TypeAlias = ConversationResult +Global___ConversationResult: _TypeAlias = ConversationResult # noqa: Y015 -@typing.final -class ConversationResultAlpha2(google.protobuf.message.Message): +@_typing.final +class ConversationResultAlpha2(_message.Message): """inspired by openai.ChatCompletion ConversationResultAlpha2 is the result for one input. https://github.com/openai/openai-go/blob/main/chatcompletion.go#L167 """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - CHOICES_FIELD_NUMBER: builtins.int - MODEL_FIELD_NUMBER: builtins.int - USAGE_FIELD_NUMBER: builtins.int - model: builtins.str + CHOICES_FIELD_NUMBER: _builtins.int + MODEL_FIELD_NUMBER: _builtins.int + USAGE_FIELD_NUMBER: _builtins.int + model: _builtins.str """The model used for the conversation.""" - @property - def choices(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationResultChoices]: + @_builtins.property + def choices(self) -> _containers.RepeatedCompositeFieldContainer[Global___ConversationResultChoices]: """Result for the conversation input.""" - @property + @_builtins.property def usage(self) -> Global___ConversationResultAlpha2CompletionUsage: """Usage statistics for the completion request.""" def __init__( self, *, - choices: collections.abc.Iterable[Global___ConversationResultChoices] | None = ..., - model: builtins.str | None = ..., + choices: _abc.Iterable[Global___ConversationResultChoices] | None = ..., + model: _builtins.str | None = ..., usage: Global___ConversationResultAlpha2CompletionUsage | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_model", b"_model", "_usage", b"_usage", "model", b"model", "usage", b"usage"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_model", b"_model", "_usage", b"_usage", "choices", b"choices", "model", b"model", "usage", b"usage"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_model", b"_model", "_usage", b"_usage", "model", b"model", "usage", b"usage"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_model", b"_model", "_usage", b"_usage", "choices", b"choices", "model", b"model", "usage", b"usage"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__model: typing_extensions.TypeAlias = typing.Literal["model"] - _WhichOneofArgType__model: typing_extensions.TypeAlias = typing.Literal["_model", b"_model"] - _WhichOneofReturnType__usage: typing_extensions.TypeAlias = typing.Literal["usage"] - _WhichOneofArgType__usage: typing_extensions.TypeAlias = typing.Literal["_usage", b"_usage"] - @typing.overload + _WhichOneofReturnType__model: _TypeAlias = _typing.Literal["model"] # noqa: Y015 + _WhichOneofArgType__model: _TypeAlias = _typing.Literal["_model", b"_model"] # noqa: Y015 + _WhichOneofReturnType__usage: _TypeAlias = _typing.Literal["usage"] # noqa: Y015 + _WhichOneofArgType__usage: _TypeAlias = _typing.Literal["_usage", b"_usage"] # noqa: Y015 + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__model) -> _WhichOneofReturnType__model | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__usage) -> _WhichOneofReturnType__usage | None: ... -Global___ConversationResultAlpha2: typing_extensions.TypeAlias = ConversationResultAlpha2 +Global___ConversationResultAlpha2: _TypeAlias = ConversationResultAlpha2 # noqa: Y015 -@typing.final -class ConversationResultAlpha2CompletionUsage(google.protobuf.message.Message): +@_typing.final +class ConversationResultAlpha2CompletionUsage(_message.Message): """ref: https://github.com/openai/openai-go/blob/main/completion.go#L162 inspired by openai.ChatCompletion.Usage of type CompletionUsage """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - COMPLETION_TOKENS_FIELD_NUMBER: builtins.int - PROMPT_TOKENS_FIELD_NUMBER: builtins.int - TOTAL_TOKENS_FIELD_NUMBER: builtins.int - COMPLETION_TOKENS_DETAILS_FIELD_NUMBER: builtins.int - PROMPT_TOKENS_DETAILS_FIELD_NUMBER: builtins.int - completion_tokens: builtins.int + COMPLETION_TOKENS_FIELD_NUMBER: _builtins.int + PROMPT_TOKENS_FIELD_NUMBER: _builtins.int + TOTAL_TOKENS_FIELD_NUMBER: _builtins.int + COMPLETION_TOKENS_DETAILS_FIELD_NUMBER: _builtins.int + PROMPT_TOKENS_DETAILS_FIELD_NUMBER: _builtins.int + completion_tokens: _builtins.int """Number of tokens in the generated completion.""" - prompt_tokens: builtins.int + prompt_tokens: _builtins.int """Number of tokens in the prompt.""" - total_tokens: builtins.int + total_tokens: _builtins.int """Total number of tokens used in the request (prompt + completion).""" - @property + @_builtins.property def completion_tokens_details(self) -> Global___ConversationResultAlpha2CompletionUsageCompletionTokensDetails: """Breakdown of tokens used in completion.""" - @property + @_builtins.property def prompt_tokens_details(self) -> Global___ConversationResultAlpha2CompletionUsagePromptTokensDetails: """Breakdown of tokens used in the prompt.""" def __init__( self, *, - completion_tokens: builtins.int = ..., - prompt_tokens: builtins.int = ..., - total_tokens: builtins.int = ..., + completion_tokens: _builtins.int = ..., + prompt_tokens: _builtins.int = ..., + total_tokens: _builtins.int = ..., completion_tokens_details: Global___ConversationResultAlpha2CompletionUsageCompletionTokensDetails | None = ..., prompt_tokens_details: Global___ConversationResultAlpha2CompletionUsagePromptTokensDetails | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_completion_tokens_details", b"_completion_tokens_details", "_prompt_tokens_details", b"_prompt_tokens_details", "completion_tokens_details", b"completion_tokens_details", "prompt_tokens_details", b"prompt_tokens_details"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_completion_tokens_details", b"_completion_tokens_details", "_prompt_tokens_details", b"_prompt_tokens_details", "completion_tokens", b"completion_tokens", "completion_tokens_details", b"completion_tokens_details", "prompt_tokens", b"prompt_tokens", "prompt_tokens_details", b"prompt_tokens_details", "total_tokens", b"total_tokens"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_completion_tokens_details", b"_completion_tokens_details", "_prompt_tokens_details", b"_prompt_tokens_details", "completion_tokens_details", b"completion_tokens_details", "prompt_tokens_details", b"prompt_tokens_details"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_completion_tokens_details", b"_completion_tokens_details", "_prompt_tokens_details", b"_prompt_tokens_details", "completion_tokens", b"completion_tokens", "completion_tokens_details", b"completion_tokens_details", "prompt_tokens", b"prompt_tokens", "prompt_tokens_details", b"prompt_tokens_details", "total_tokens", b"total_tokens"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__completion_tokens_details: typing_extensions.TypeAlias = typing.Literal["completion_tokens_details"] - _WhichOneofArgType__completion_tokens_details: typing_extensions.TypeAlias = typing.Literal["_completion_tokens_details", b"_completion_tokens_details"] - _WhichOneofReturnType__prompt_tokens_details: typing_extensions.TypeAlias = typing.Literal["prompt_tokens_details"] - _WhichOneofArgType__prompt_tokens_details: typing_extensions.TypeAlias = typing.Literal["_prompt_tokens_details", b"_prompt_tokens_details"] - @typing.overload + _WhichOneofReturnType__completion_tokens_details: _TypeAlias = _typing.Literal["completion_tokens_details"] # noqa: Y015 + _WhichOneofArgType__completion_tokens_details: _TypeAlias = _typing.Literal["_completion_tokens_details", b"_completion_tokens_details"] # noqa: Y015 + _WhichOneofReturnType__prompt_tokens_details: _TypeAlias = _typing.Literal["prompt_tokens_details"] # noqa: Y015 + _WhichOneofArgType__prompt_tokens_details: _TypeAlias = _typing.Literal["_prompt_tokens_details", b"_prompt_tokens_details"] # noqa: Y015 + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__completion_tokens_details) -> _WhichOneofReturnType__completion_tokens_details | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__prompt_tokens_details) -> _WhichOneofReturnType__prompt_tokens_details | None: ... -Global___ConversationResultAlpha2CompletionUsage: typing_extensions.TypeAlias = ConversationResultAlpha2CompletionUsage +Global___ConversationResultAlpha2CompletionUsage: _TypeAlias = ConversationResultAlpha2CompletionUsage # noqa: Y015 -@typing.final -class ConversationResultAlpha2CompletionUsageCompletionTokensDetails(google.protobuf.message.Message): +@_typing.final +class ConversationResultAlpha2CompletionUsageCompletionTokensDetails(_message.Message): """inspired by openai.CompletionUsageCompletionTokensDetails ref: https://github.com/openai/openai-go/blob/main/completion.go#L192 """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ACCEPTED_PREDICTION_TOKENS_FIELD_NUMBER: builtins.int - AUDIO_TOKENS_FIELD_NUMBER: builtins.int - REASONING_TOKENS_FIELD_NUMBER: builtins.int - REJECTED_PREDICTION_TOKENS_FIELD_NUMBER: builtins.int - accepted_prediction_tokens: builtins.int + ACCEPTED_PREDICTION_TOKENS_FIELD_NUMBER: _builtins.int + AUDIO_TOKENS_FIELD_NUMBER: _builtins.int + REASONING_TOKENS_FIELD_NUMBER: _builtins.int + REJECTED_PREDICTION_TOKENS_FIELD_NUMBER: _builtins.int + accepted_prediction_tokens: _builtins.int """When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion. """ - audio_tokens: builtins.int + audio_tokens: _builtins.int """Audio input tokens generated by the model.""" - reasoning_tokens: builtins.int + reasoning_tokens: _builtins.int """Tokens generated by the model for reasoning.""" - rejected_prediction_tokens: builtins.int + rejected_prediction_tokens: _builtins.int """When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output, @@ -870,53 +870,53 @@ class ConversationResultAlpha2CompletionUsageCompletionTokensDetails(google.prot def __init__( self, *, - accepted_prediction_tokens: builtins.int = ..., - audio_tokens: builtins.int = ..., - reasoning_tokens: builtins.int = ..., - rejected_prediction_tokens: builtins.int = ..., + accepted_prediction_tokens: _builtins.int = ..., + audio_tokens: _builtins.int = ..., + reasoning_tokens: _builtins.int = ..., + rejected_prediction_tokens: _builtins.int = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["accepted_prediction_tokens", b"accepted_prediction_tokens", "audio_tokens", b"audio_tokens", "reasoning_tokens", b"reasoning_tokens", "rejected_prediction_tokens", b"rejected_prediction_tokens"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["accepted_prediction_tokens", b"accepted_prediction_tokens", "audio_tokens", b"audio_tokens", "reasoning_tokens", b"reasoning_tokens", "rejected_prediction_tokens", b"rejected_prediction_tokens"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ConversationResultAlpha2CompletionUsageCompletionTokensDetails: typing_extensions.TypeAlias = ConversationResultAlpha2CompletionUsageCompletionTokensDetails +Global___ConversationResultAlpha2CompletionUsageCompletionTokensDetails: _TypeAlias = ConversationResultAlpha2CompletionUsageCompletionTokensDetails # noqa: Y015 -@typing.final -class ConversationResultAlpha2CompletionUsagePromptTokensDetails(google.protobuf.message.Message): +@_typing.final +class ConversationResultAlpha2CompletionUsagePromptTokensDetails(_message.Message): """inspired by openai.CompletionUsagePromptTokensDetails ref: https://github.com/openai/openai-go/blob/main/completion.go#L223C6-L223C40 """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - AUDIO_TOKENS_FIELD_NUMBER: builtins.int - CACHED_TOKENS_FIELD_NUMBER: builtins.int - audio_tokens: builtins.int + AUDIO_TOKENS_FIELD_NUMBER: _builtins.int + CACHED_TOKENS_FIELD_NUMBER: _builtins.int + audio_tokens: _builtins.int """Audio input tokens present in the prompt.""" - cached_tokens: builtins.int + cached_tokens: _builtins.int """Cached tokens present in the prompt.""" def __init__( self, *, - audio_tokens: builtins.int = ..., - cached_tokens: builtins.int = ..., + audio_tokens: _builtins.int = ..., + cached_tokens: _builtins.int = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["audio_tokens", b"audio_tokens", "cached_tokens", b"cached_tokens"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["audio_tokens", b"audio_tokens", "cached_tokens", b"cached_tokens"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ConversationResultAlpha2CompletionUsagePromptTokensDetails: typing_extensions.TypeAlias = ConversationResultAlpha2CompletionUsagePromptTokensDetails +Global___ConversationResultAlpha2CompletionUsagePromptTokensDetails: _TypeAlias = ConversationResultAlpha2CompletionUsagePromptTokensDetails # noqa: Y015 -@typing.final -class ConversationResultChoices(google.protobuf.message.Message): +@_typing.final +class ConversationResultChoices(_message.Message): """inspired by openai.ChatCompletionChoice based on https://github.com/openai/openai-go/blob/main/chatcompletion.go#L226 """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - FINISH_REASON_FIELD_NUMBER: builtins.int - INDEX_FIELD_NUMBER: builtins.int - MESSAGE_FIELD_NUMBER: builtins.int - finish_reason: builtins.str + FINISH_REASON_FIELD_NUMBER: _builtins.int + INDEX_FIELD_NUMBER: _builtins.int + MESSAGE_FIELD_NUMBER: _builtins.int + finish_reason: _builtins.str """The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if @@ -924,161 +924,161 @@ class ConversationResultChoices(google.protobuf.message.Message): model called a tool. Any of "stop", "length", "tool_calls", "content_filter". """ - index: builtins.int + index: _builtins.int """The index of the choice in the list of choices.""" - @property + @_builtins.property def message(self) -> Global___ConversationResultMessage: """A chat completion message generated by the model.""" def __init__( self, *, - finish_reason: builtins.str = ..., - index: builtins.int = ..., + finish_reason: _builtins.str = ..., + index: _builtins.int = ..., message: Global___ConversationResultMessage | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["message", b"message"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["finish_reason", b"finish_reason", "index", b"index", "message", b"message"] + _HasFieldArgType: _TypeAlias = _typing.Literal["message", b"message"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["finish_reason", b"finish_reason", "index", b"index", "message", b"message"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ConversationResultChoices: typing_extensions.TypeAlias = ConversationResultChoices +Global___ConversationResultChoices: _TypeAlias = ConversationResultChoices # noqa: Y015 -@typing.final -class ConversationResultMessage(google.protobuf.message.Message): +@_typing.final +class ConversationResultMessage(_message.Message): """inspired by openai.ChatCompletionMessage based on https://github.com/openai/openai-go/blob/main/chatcompletion.go#L1218C6-L1218C27 """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - CONTENT_FIELD_NUMBER: builtins.int - TOOL_CALLS_FIELD_NUMBER: builtins.int - content: builtins.str + CONTENT_FIELD_NUMBER: _builtins.int + TOOL_CALLS_FIELD_NUMBER: _builtins.int + content: _builtins.str """The contents of the message.""" - @property - def tool_calls(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationToolCalls]: + @_builtins.property + def tool_calls(self) -> _containers.RepeatedCompositeFieldContainer[Global___ConversationToolCalls]: """The tool calls generated by the model.""" def __init__( self, *, - content: builtins.str = ..., - tool_calls: collections.abc.Iterable[Global___ConversationToolCalls] | None = ..., + content: _builtins.str = ..., + tool_calls: _abc.Iterable[Global___ConversationToolCalls] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["content", b"content", "tool_calls", b"tool_calls"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["content", b"content", "tool_calls", b"tool_calls"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ConversationResultMessage: typing_extensions.TypeAlias = ConversationResultMessage +Global___ConversationResultMessage: _TypeAlias = ConversationResultMessage # noqa: Y015 -@deprecated("""This message has been marked as deprecated using proto message options.""") -@typing.final -class ConversationResponse(google.protobuf.message.Message): +@_deprecated("""This message has been marked as deprecated using proto message options.""") +@_typing.final +class ConversationResponse(_message.Message): """ConversationResponse is the response for Conversation.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - CONTEXTID_FIELD_NUMBER: builtins.int - OUTPUTS_FIELD_NUMBER: builtins.int - contextID: builtins.str + CONTEXTID_FIELD_NUMBER: _builtins.int + OUTPUTS_FIELD_NUMBER: _builtins.int + contextID: _builtins.str """The ID of an existing chat (like in ChatGPT)""" - @property - def outputs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationResult]: + @_builtins.property + def outputs(self) -> _containers.RepeatedCompositeFieldContainer[Global___ConversationResult]: """An array of results.""" def __init__( self, *, - contextID: builtins.str | None = ..., - outputs: collections.abc.Iterable[Global___ConversationResult] | None = ..., + contextID: _builtins.str | None = ..., + outputs: _abc.Iterable[Global___ConversationResult] | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_contextID", b"_contextID", "contextID", b"contextID"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_contextID", b"_contextID", "contextID", b"contextID", "outputs", b"outputs"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_contextID", b"_contextID", "contextID", b"contextID"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_contextID", b"_contextID", "contextID", b"contextID", "outputs", b"outputs"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__contextID: typing_extensions.TypeAlias = typing.Literal["contextID"] - _WhichOneofArgType__contextID: typing_extensions.TypeAlias = typing.Literal["_contextID", b"_contextID"] + _WhichOneofReturnType__contextID: _TypeAlias = _typing.Literal["contextID"] # noqa: Y015 + _WhichOneofArgType__contextID: _TypeAlias = _typing.Literal["_contextID", b"_contextID"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType__contextID) -> _WhichOneofReturnType__contextID | None: ... -Global___ConversationResponse: typing_extensions.TypeAlias = ConversationResponse +Global___ConversationResponse: _TypeAlias = ConversationResponse # noqa: Y015 -@typing.final -class ConversationResponseAlpha2(google.protobuf.message.Message): +@_typing.final +class ConversationResponseAlpha2(_message.Message): """ConversationResponseAlpha2 is the Alpha2 response for Conversation.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - CONTEXT_ID_FIELD_NUMBER: builtins.int - OUTPUTS_FIELD_NUMBER: builtins.int - context_id: builtins.str + CONTEXT_ID_FIELD_NUMBER: _builtins.int + OUTPUTS_FIELD_NUMBER: _builtins.int + context_id: _builtins.str """The ID of an existing chat (like in ChatGPT)""" - @property - def outputs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ConversationResultAlpha2]: + @_builtins.property + def outputs(self) -> _containers.RepeatedCompositeFieldContainer[Global___ConversationResultAlpha2]: """An array of results.""" def __init__( self, *, - context_id: builtins.str | None = ..., - outputs: collections.abc.Iterable[Global___ConversationResultAlpha2] | None = ..., + context_id: _builtins.str | None = ..., + outputs: _abc.Iterable[Global___ConversationResultAlpha2] | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_context_id", b"_context_id", "context_id", b"context_id"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_context_id", b"_context_id", "context_id", b"context_id", "outputs", b"outputs"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_context_id", b"_context_id", "context_id", b"context_id"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_context_id", b"_context_id", "context_id", b"context_id", "outputs", b"outputs"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__context_id: typing_extensions.TypeAlias = typing.Literal["context_id"] - _WhichOneofArgType__context_id: typing_extensions.TypeAlias = typing.Literal["_context_id", b"_context_id"] + _WhichOneofReturnType__context_id: _TypeAlias = _typing.Literal["context_id"] # noqa: Y015 + _WhichOneofArgType__context_id: _TypeAlias = _typing.Literal["_context_id", b"_context_id"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType__context_id) -> _WhichOneofReturnType__context_id | None: ... -Global___ConversationResponseAlpha2: typing_extensions.TypeAlias = ConversationResponseAlpha2 +Global___ConversationResponseAlpha2: _TypeAlias = ConversationResponseAlpha2 # noqa: Y015 -@typing.final -class ConversationTools(google.protobuf.message.Message): +@_typing.final +class ConversationTools(_message.Message): """ConversationTools are the typed tools available to be called. inspired by openai.ChatCompletionToolParam https://github.com/openai/openai-go/blob/main/chatcompletion.go#L1950 """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - FUNCTION_FIELD_NUMBER: builtins.int - @property + FUNCTION_FIELD_NUMBER: _builtins.int + @_builtins.property def function(self) -> Global___ConversationToolsFunction: ... def __init__( self, *, function: Global___ConversationToolsFunction | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["function", b"function", "tool_types", b"tool_types"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["function", b"function", "tool_types", b"tool_types"] + _HasFieldArgType: _TypeAlias = _typing.Literal["function", b"function", "tool_types", b"tool_types"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["function", b"function", "tool_types", b"tool_types"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType_tool_types: typing_extensions.TypeAlias = typing.Literal["function"] - _WhichOneofArgType_tool_types: typing_extensions.TypeAlias = typing.Literal["tool_types", b"tool_types"] + _WhichOneofReturnType_tool_types: _TypeAlias = _typing.Literal["function"] # noqa: Y015 + _WhichOneofArgType_tool_types: _TypeAlias = _typing.Literal["tool_types", b"tool_types"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType_tool_types) -> _WhichOneofReturnType_tool_types | None: ... -Global___ConversationTools: typing_extensions.TypeAlias = ConversationTools +Global___ConversationTools: _TypeAlias = ConversationTools # noqa: Y015 -@typing.final -class ConversationToolsFunction(google.protobuf.message.Message): +@_typing.final +class ConversationToolsFunction(_message.Message): """ConversationToolsFunction is the main tool type to be used in a conversation. inspired by openai.FunctionDefinitionParam https://pkg.go.dev/github.com/openai/openai-go/shared#FunctionDefinitionParam """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - DESCRIPTION_FIELD_NUMBER: builtins.int - PARAMETERS_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + DESCRIPTION_FIELD_NUMBER: _builtins.int + PARAMETERS_FIELD_NUMBER: _builtins.int + name: _builtins.str """The name of the function to be called.""" - description: builtins.str + description: _builtins.str """A description of what the function does, used by the model to choose when and how to call the function. """ - @property - def parameters(self) -> google.protobuf.struct_pb2.Struct: + @_builtins.property + def parameters(self) -> _struct_pb2.Struct: """The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. @@ -1088,16 +1088,16 @@ class ConversationToolsFunction(google.protobuf.message.Message): def __init__( self, *, - name: builtins.str = ..., - description: builtins.str | None = ..., - parameters: google.protobuf.struct_pb2.Struct | None = ..., + name: _builtins.str = ..., + description: _builtins.str | None = ..., + parameters: _struct_pb2.Struct | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_description", b"_description", "description", b"description", "parameters", b"parameters"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_description", b"_description", "description", b"description", "name", b"name", "parameters", b"parameters"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_description", b"_description", "description", b"description", "parameters", b"parameters"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_description", b"_description", "description", b"description", "name", b"name", "parameters", b"parameters"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__description: typing_extensions.TypeAlias = typing.Literal["description"] - _WhichOneofArgType__description: typing_extensions.TypeAlias = typing.Literal["_description", b"_description"] + _WhichOneofReturnType__description: _TypeAlias = _typing.Literal["description"] # noqa: Y015 + _WhichOneofArgType__description: _TypeAlias = _typing.Literal["_description", b"_description"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType__description) -> _WhichOneofReturnType__description | None: ... -Global___ConversationToolsFunction: typing_extensions.TypeAlias = ConversationToolsFunction +Global___ConversationToolsFunction: _TypeAlias = ConversationToolsFunction # noqa: Y015 diff --git a/dapr/proto/runtime/v1/appcallback_pb2.pyi b/dapr/proto/runtime/v1/appcallback_pb2.pyi index a42db30bc..70b39f03b 100644 --- a/dapr/proto/runtime/v1/appcallback_pb2.pyi +++ b/dapr/proto/runtime/v1/appcallback_pb2.pyi @@ -14,50 +14,50 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import dapr.proto.common.v1.common_pb2 -import google.protobuf.any_pb2 -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.internal.enum_type_wrapper -import google.protobuf.message -import google.protobuf.struct_pb2 +from collections import abc as _abc +from dapr.proto.common.v1 import common_pb2 as _common_pb2 +from google.protobuf import any_pb2 as _any_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import struct_pb2 as _struct_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class JobEventRequest(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class JobEventRequest(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - METHOD_FIELD_NUMBER: builtins.int - CONTENT_TYPE_FIELD_NUMBER: builtins.int - HTTP_EXTENSION_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + METHOD_FIELD_NUMBER: _builtins.int + CONTENT_TYPE_FIELD_NUMBER: _builtins.int + HTTP_EXTENSION_FIELD_NUMBER: _builtins.int + name: _builtins.str """Job name.""" - method: builtins.str + method: _builtins.str """Required. method is a method name which will be invoked by caller.""" - content_type: builtins.str + content_type: _builtins.str """The type of data content. This field is required if data delivers http request body Otherwise, this is optional. """ - @property - def data(self) -> google.protobuf.any_pb2.Any: + @_builtins.property + def data(self) -> _any_pb2.Any: """Job data to be sent back to app.""" - @property - def http_extension(self) -> dapr.proto.common.v1.common_pb2.HTTPExtension: + @_builtins.property + def http_extension(self) -> _common_pb2.HTTPExtension: """HTTP specific fields if request conveys http-compatible request. This field is required for http-compatible request. Otherwise, @@ -67,114 +67,114 @@ class JobEventRequest(google.protobuf.message.Message): def __init__( self, *, - name: builtins.str = ..., - data: google.protobuf.any_pb2.Any | None = ..., - method: builtins.str = ..., - content_type: builtins.str = ..., - http_extension: dapr.proto.common.v1.common_pb2.HTTPExtension | None = ..., + name: _builtins.str = ..., + data: _any_pb2.Any | None = ..., + method: _builtins.str = ..., + content_type: _builtins.str = ..., + http_extension: _common_pb2.HTTPExtension | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data", "http_extension", b"http_extension"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["content_type", b"content_type", "data", b"data", "http_extension", b"http_extension", "method", b"method", "name", b"name"] + _HasFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "http_extension", b"http_extension"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["content_type", b"content_type", "data", b"data", "http_extension", b"http_extension", "method", b"method", "name", b"name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___JobEventRequest: typing_extensions.TypeAlias = JobEventRequest +Global___JobEventRequest: _TypeAlias = JobEventRequest # noqa: Y015 -@typing.final -class JobEventResponse(google.protobuf.message.Message): +@_typing.final +class JobEventResponse(_message.Message): """JobEventResponse is the response from the app when a job is triggered.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor def __init__( self, ) -> None: ... -Global___JobEventResponse: typing_extensions.TypeAlias = JobEventResponse +Global___JobEventResponse: _TypeAlias = JobEventResponse # noqa: Y015 -@typing.final -class TopicEventRequest(google.protobuf.message.Message): +@_typing.final +class TopicEventRequest(_message.Message): """TopicEventRequest message is compatible with CloudEvent spec v1.0 https://github.com/cloudevents/spec/blob/v1.0/spec.md """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - ID_FIELD_NUMBER: builtins.int - SOURCE_FIELD_NUMBER: builtins.int - TYPE_FIELD_NUMBER: builtins.int - SPEC_VERSION_FIELD_NUMBER: builtins.int - DATA_CONTENT_TYPE_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - TOPIC_FIELD_NUMBER: builtins.int - PUBSUB_NAME_FIELD_NUMBER: builtins.int - PATH_FIELD_NUMBER: builtins.int - EXTENSIONS_FIELD_NUMBER: builtins.int - id: builtins.str + DESCRIPTOR: _descriptor.Descriptor + + ID_FIELD_NUMBER: _builtins.int + SOURCE_FIELD_NUMBER: _builtins.int + TYPE_FIELD_NUMBER: _builtins.int + SPEC_VERSION_FIELD_NUMBER: _builtins.int + DATA_CONTENT_TYPE_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + TOPIC_FIELD_NUMBER: _builtins.int + PUBSUB_NAME_FIELD_NUMBER: _builtins.int + PATH_FIELD_NUMBER: _builtins.int + EXTENSIONS_FIELD_NUMBER: _builtins.int + id: _builtins.str """id identifies the event. Producers MUST ensure that source + id is unique for each distinct event. If a duplicate event is re-sent (e.g. due to a network error) it MAY have the same id. """ - source: builtins.str + source: _builtins.str """source identifies the context in which an event happened. Often this will include information such as the type of the event source, the organization publishing the event or the process that produced the event. The exact syntax and semantics behind the data encoded in the URI is defined by the event producer. """ - type: builtins.str + type: _builtins.str """The type of event related to the originating occurrence.""" - spec_version: builtins.str + spec_version: _builtins.str """The version of the CloudEvents specification.""" - data_content_type: builtins.str + data_content_type: _builtins.str """The content type of data value.""" - data: builtins.bytes + data: _builtins.bytes """The content of the event.""" - topic: builtins.str + topic: _builtins.str """The pubsub topic which publisher sent to.""" - pubsub_name: builtins.str + pubsub_name: _builtins.str """The name of the pubsub the publisher sent to.""" - path: builtins.str + path: _builtins.str """The matching path from TopicSubscription/routes (if specified) for this event. This value is used by OnTopicEvent to "switch" inside the handler. """ - @property - def extensions(self) -> google.protobuf.struct_pb2.Struct: + @_builtins.property + def extensions(self) -> _struct_pb2.Struct: """The map of additional custom properties to be sent to the app. These are considered to be cloud event extensions.""" def __init__( self, *, - id: builtins.str = ..., - source: builtins.str = ..., - type: builtins.str = ..., - spec_version: builtins.str = ..., - data_content_type: builtins.str = ..., - data: builtins.bytes = ..., - topic: builtins.str = ..., - pubsub_name: builtins.str = ..., - path: builtins.str = ..., - extensions: google.protobuf.struct_pb2.Struct | None = ..., + id: _builtins.str = ..., + source: _builtins.str = ..., + type: _builtins.str = ..., + spec_version: _builtins.str = ..., + data_content_type: _builtins.str = ..., + data: _builtins.bytes = ..., + topic: _builtins.str = ..., + pubsub_name: _builtins.str = ..., + path: _builtins.str = ..., + extensions: _struct_pb2.Struct | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["extensions", b"extensions"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data", "data_content_type", b"data_content_type", "extensions", b"extensions", "id", b"id", "path", b"path", "pubsub_name", b"pubsub_name", "source", b"source", "spec_version", b"spec_version", "topic", b"topic", "type", b"type"] + _HasFieldArgType: _TypeAlias = _typing.Literal["extensions", b"extensions"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "data_content_type", b"data_content_type", "extensions", b"extensions", "id", b"id", "path", b"path", "pubsub_name", b"pubsub_name", "source", b"source", "spec_version", b"spec_version", "topic", b"topic", "type", b"type"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___TopicEventRequest: typing_extensions.TypeAlias = TopicEventRequest +Global___TopicEventRequest: _TypeAlias = TopicEventRequest # noqa: Y015 -@typing.final -class TopicEventResponse(google.protobuf.message.Message): +@_typing.final +class TopicEventResponse(_message.Message): """TopicEventResponse is response from app on published message""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor class _TopicEventResponseStatus: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _TopicEventResponseStatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[TopicEventResponse._TopicEventResponseStatus.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _TopicEventResponseStatusEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[TopicEventResponse._TopicEventResponseStatus.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor SUCCESS: TopicEventResponse._TopicEventResponseStatus.ValueType # 0 """SUCCESS is the default behavior: message is acknowledged and not retried or logged.""" RETRY: TopicEventResponse._TopicEventResponseStatus.ValueType # 1 @@ -192,7 +192,7 @@ class TopicEventResponse(google.protobuf.message.Message): DROP: TopicEventResponse.TopicEventResponseStatus.ValueType # 2 """DROP status signals Dapr to drop the message as part of an unexpected scenario (warning is logged).""" - STATUS_FIELD_NUMBER: builtins.int + STATUS_FIELD_NUMBER: _builtins.int status: Global___TopicEventResponse.TopicEventResponseStatus.ValueType """The list of output bindings.""" def __init__( @@ -200,288 +200,288 @@ class TopicEventResponse(google.protobuf.message.Message): *, status: Global___TopicEventResponse.TopicEventResponseStatus.ValueType = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["status", b"status"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["status", b"status"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___TopicEventResponse: typing_extensions.TypeAlias = TopicEventResponse +Global___TopicEventResponse: _TypeAlias = TopicEventResponse # noqa: Y015 -@typing.final -class TopicEventCERequest(google.protobuf.message.Message): +@_typing.final +class TopicEventCERequest(_message.Message): """TopicEventCERequest message is compatible with CloudEvent spec v1.0""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ID_FIELD_NUMBER: builtins.int - SOURCE_FIELD_NUMBER: builtins.int - TYPE_FIELD_NUMBER: builtins.int - SPEC_VERSION_FIELD_NUMBER: builtins.int - DATA_CONTENT_TYPE_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - EXTENSIONS_FIELD_NUMBER: builtins.int - id: builtins.str + ID_FIELD_NUMBER: _builtins.int + SOURCE_FIELD_NUMBER: _builtins.int + TYPE_FIELD_NUMBER: _builtins.int + SPEC_VERSION_FIELD_NUMBER: _builtins.int + DATA_CONTENT_TYPE_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + EXTENSIONS_FIELD_NUMBER: _builtins.int + id: _builtins.str """The unique identifier of this cloud event.""" - source: builtins.str + source: _builtins.str """source identifies the context in which an event happened.""" - type: builtins.str + type: _builtins.str """The type of event related to the originating occurrence.""" - spec_version: builtins.str + spec_version: _builtins.str """The version of the CloudEvents specification.""" - data_content_type: builtins.str + data_content_type: _builtins.str """The content type of data value.""" - data: builtins.bytes + data: _builtins.bytes """The content of the event.""" - @property - def extensions(self) -> google.protobuf.struct_pb2.Struct: + @_builtins.property + def extensions(self) -> _struct_pb2.Struct: """Custom attributes which includes cloud event extensions.""" def __init__( self, *, - id: builtins.str = ..., - source: builtins.str = ..., - type: builtins.str = ..., - spec_version: builtins.str = ..., - data_content_type: builtins.str = ..., - data: builtins.bytes = ..., - extensions: google.protobuf.struct_pb2.Struct | None = ..., + id: _builtins.str = ..., + source: _builtins.str = ..., + type: _builtins.str = ..., + spec_version: _builtins.str = ..., + data_content_type: _builtins.str = ..., + data: _builtins.bytes = ..., + extensions: _struct_pb2.Struct | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["extensions", b"extensions"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data", "data_content_type", b"data_content_type", "extensions", b"extensions", "id", b"id", "source", b"source", "spec_version", b"spec_version", "type", b"type"] + _HasFieldArgType: _TypeAlias = _typing.Literal["extensions", b"extensions"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "data_content_type", b"data_content_type", "extensions", b"extensions", "id", b"id", "source", b"source", "spec_version", b"spec_version", "type", b"type"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___TopicEventCERequest: typing_extensions.TypeAlias = TopicEventCERequest +Global___TopicEventCERequest: _TypeAlias = TopicEventCERequest # noqa: Y015 -@typing.final -class TopicEventBulkRequestEntry(google.protobuf.message.Message): +@_typing.final +class TopicEventBulkRequestEntry(_message.Message): """TopicEventBulkRequestEntry represents a single message inside a bulk request""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - ENTRY_ID_FIELD_NUMBER: builtins.int - BYTES_FIELD_NUMBER: builtins.int - CLOUD_EVENT_FIELD_NUMBER: builtins.int - CONTENT_TYPE_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - entry_id: builtins.str + ENTRY_ID_FIELD_NUMBER: _builtins.int + BYTES_FIELD_NUMBER: _builtins.int + CLOUD_EVENT_FIELD_NUMBER: _builtins.int + CONTENT_TYPE_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + entry_id: _builtins.str """Unique identifier for the message.""" - bytes: builtins.bytes - content_type: builtins.str + bytes: _builtins.bytes + content_type: _builtins.str """content type of the event contained.""" - @property + @_builtins.property def cloud_event(self) -> Global___TopicEventCERequest: ... - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata associated with the event.""" def __init__( self, *, - entry_id: builtins.str = ..., - bytes: builtins.bytes = ..., + entry_id: _builtins.str = ..., + bytes: _builtins.bytes = ..., cloud_event: Global___TopicEventCERequest | None = ..., - content_type: builtins.str = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + content_type: _builtins.str = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["bytes", b"bytes", "cloud_event", b"cloud_event", "event", b"event"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["bytes", b"bytes", "cloud_event", b"cloud_event", "content_type", b"content_type", "entry_id", b"entry_id", "event", b"event", "metadata", b"metadata"] + _HasFieldArgType: _TypeAlias = _typing.Literal["bytes", b"bytes", "cloud_event", b"cloud_event", "event", b"event"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["bytes", b"bytes", "cloud_event", b"cloud_event", "content_type", b"content_type", "entry_id", b"entry_id", "event", b"event", "metadata", b"metadata"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType_event: typing_extensions.TypeAlias = typing.Literal["bytes", "cloud_event"] - _WhichOneofArgType_event: typing_extensions.TypeAlias = typing.Literal["event", b"event"] + _WhichOneofReturnType_event: _TypeAlias = _typing.Literal["bytes", "cloud_event"] # noqa: Y015 + _WhichOneofArgType_event: _TypeAlias = _typing.Literal["event", b"event"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType_event) -> _WhichOneofReturnType_event | None: ... -Global___TopicEventBulkRequestEntry: typing_extensions.TypeAlias = TopicEventBulkRequestEntry +Global___TopicEventBulkRequestEntry: _TypeAlias = TopicEventBulkRequestEntry # noqa: Y015 -@typing.final -class TopicEventBulkRequest(google.protobuf.message.Message): +@_typing.final +class TopicEventBulkRequest(_message.Message): """TopicEventBulkRequest represents request for bulk message""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - ID_FIELD_NUMBER: builtins.int - ENTRIES_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - TOPIC_FIELD_NUMBER: builtins.int - PUBSUB_NAME_FIELD_NUMBER: builtins.int - TYPE_FIELD_NUMBER: builtins.int - PATH_FIELD_NUMBER: builtins.int - id: builtins.str + ID_FIELD_NUMBER: _builtins.int + ENTRIES_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + TOPIC_FIELD_NUMBER: _builtins.int + PUBSUB_NAME_FIELD_NUMBER: _builtins.int + TYPE_FIELD_NUMBER: _builtins.int + PATH_FIELD_NUMBER: _builtins.int + id: _builtins.str """Unique identifier for the bulk request.""" - topic: builtins.str + topic: _builtins.str """The pubsub topic which publisher sent to.""" - pubsub_name: builtins.str + pubsub_name: _builtins.str """The name of the pubsub the publisher sent to.""" - type: builtins.str + type: _builtins.str """The type of event related to the originating occurrence.""" - path: builtins.str + path: _builtins.str """The matching path from TopicSubscription/routes (if specified) for this event. This value is used by OnTopicEvent to "switch" inside the handler. """ - @property - def entries(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___TopicEventBulkRequestEntry]: + @_builtins.property + def entries(self) -> _containers.RepeatedCompositeFieldContainer[Global___TopicEventBulkRequestEntry]: """The list of items inside this bulk request.""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata associated with the this bulk request.""" def __init__( self, *, - id: builtins.str = ..., - entries: collections.abc.Iterable[Global___TopicEventBulkRequestEntry] | None = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., - topic: builtins.str = ..., - pubsub_name: builtins.str = ..., - type: builtins.str = ..., - path: builtins.str = ..., + id: _builtins.str = ..., + entries: _abc.Iterable[Global___TopicEventBulkRequestEntry] | None = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + topic: _builtins.str = ..., + pubsub_name: _builtins.str = ..., + type: _builtins.str = ..., + path: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["entries", b"entries", "id", b"id", "metadata", b"metadata", "path", b"path", "pubsub_name", b"pubsub_name", "topic", b"topic", "type", b"type"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["entries", b"entries", "id", b"id", "metadata", b"metadata", "path", b"path", "pubsub_name", b"pubsub_name", "topic", b"topic", "type", b"type"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___TopicEventBulkRequest: typing_extensions.TypeAlias = TopicEventBulkRequest +Global___TopicEventBulkRequest: _TypeAlias = TopicEventBulkRequest # noqa: Y015 -@typing.final -class TopicEventBulkResponseEntry(google.protobuf.message.Message): +@_typing.final +class TopicEventBulkResponseEntry(_message.Message): """TopicEventBulkResponseEntry Represents single response, as part of TopicEventBulkResponse, to be sent by subscibed App for the corresponding single message during bulk subscribe """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ENTRY_ID_FIELD_NUMBER: builtins.int - STATUS_FIELD_NUMBER: builtins.int - entry_id: builtins.str + ENTRY_ID_FIELD_NUMBER: _builtins.int + STATUS_FIELD_NUMBER: _builtins.int + entry_id: _builtins.str """Unique identifier associated the message.""" status: Global___TopicEventResponse.TopicEventResponseStatus.ValueType """The status of the response.""" def __init__( self, *, - entry_id: builtins.str = ..., + entry_id: _builtins.str = ..., status: Global___TopicEventResponse.TopicEventResponseStatus.ValueType = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["entry_id", b"entry_id", "status", b"status"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["entry_id", b"entry_id", "status", b"status"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___TopicEventBulkResponseEntry: typing_extensions.TypeAlias = TopicEventBulkResponseEntry +Global___TopicEventBulkResponseEntry: _TypeAlias = TopicEventBulkResponseEntry # noqa: Y015 -@typing.final -class TopicEventBulkResponse(google.protobuf.message.Message): +@_typing.final +class TopicEventBulkResponse(_message.Message): """AppBulkResponse is response from app on published message""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - STATUSES_FIELD_NUMBER: builtins.int - @property - def statuses(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___TopicEventBulkResponseEntry]: + STATUSES_FIELD_NUMBER: _builtins.int + @_builtins.property + def statuses(self) -> _containers.RepeatedCompositeFieldContainer[Global___TopicEventBulkResponseEntry]: """The list of all responses for the bulk request.""" def __init__( self, *, - statuses: collections.abc.Iterable[Global___TopicEventBulkResponseEntry] | None = ..., + statuses: _abc.Iterable[Global___TopicEventBulkResponseEntry] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["statuses", b"statuses"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["statuses", b"statuses"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___TopicEventBulkResponse: typing_extensions.TypeAlias = TopicEventBulkResponse +Global___TopicEventBulkResponse: _TypeAlias = TopicEventBulkResponse # noqa: Y015 -@typing.final -class BindingEventRequest(google.protobuf.message.Message): +@_typing.final +class BindingEventRequest(_message.Message): """BindingEventRequest represents input bindings event.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - NAME_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + name: _builtins.str """Required. The name of the input binding component.""" - data: builtins.bytes + data: _builtins.bytes """Required. The payload that the input bindings sent""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata set by the input binging components.""" def __init__( self, *, - name: builtins.str = ..., - data: builtins.bytes = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + name: _builtins.str = ..., + data: _builtins.bytes = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data", "metadata", b"metadata", "name", b"name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "metadata", b"metadata", "name", b"name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___BindingEventRequest: typing_extensions.TypeAlias = BindingEventRequest +Global___BindingEventRequest: _TypeAlias = BindingEventRequest # noqa: Y015 -@typing.final -class BindingEventResponse(google.protobuf.message.Message): +@_typing.final +class BindingEventResponse(_message.Message): """BindingEventResponse includes operations to save state or send data to output bindings optionally. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor class _BindingEventConcurrency: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _BindingEventConcurrencyEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[BindingEventResponse._BindingEventConcurrency.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _BindingEventConcurrencyEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[BindingEventResponse._BindingEventConcurrency.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor SEQUENTIAL: BindingEventResponse._BindingEventConcurrency.ValueType # 0 """SEQUENTIAL sends data to output bindings specified in "to" sequentially.""" PARALLEL: BindingEventResponse._BindingEventConcurrency.ValueType # 1 @@ -495,163 +495,163 @@ class BindingEventResponse(google.protobuf.message.Message): PARALLEL: BindingEventResponse.BindingEventConcurrency.ValueType # 1 """PARALLEL sends data to output bindings specified in "to" in parallel.""" - STORE_NAME_FIELD_NUMBER: builtins.int - STATES_FIELD_NUMBER: builtins.int - TO_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - CONCURRENCY_FIELD_NUMBER: builtins.int - store_name: builtins.str + STORE_NAME_FIELD_NUMBER: _builtins.int + STATES_FIELD_NUMBER: _builtins.int + TO_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + CONCURRENCY_FIELD_NUMBER: _builtins.int + store_name: _builtins.str """The name of state store where states are saved.""" - data: builtins.bytes + data: _builtins.bytes """The content which will be sent to "to" output bindings.""" concurrency: Global___BindingEventResponse.BindingEventConcurrency.ValueType """The concurrency of output bindings to send data to "to" output bindings list. The default is SEQUENTIAL. """ - @property - def states(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[dapr.proto.common.v1.common_pb2.StateItem]: + @_builtins.property + def states(self) -> _containers.RepeatedCompositeFieldContainer[_common_pb2.StateItem]: """The state key values which will be stored in store_name.""" - @property - def to(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + @_builtins.property + def to(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """The list of output bindings.""" def __init__( self, *, - store_name: builtins.str = ..., - states: collections.abc.Iterable[dapr.proto.common.v1.common_pb2.StateItem] | None = ..., - to: collections.abc.Iterable[builtins.str] | None = ..., - data: builtins.bytes = ..., + store_name: _builtins.str = ..., + states: _abc.Iterable[_common_pb2.StateItem] | None = ..., + to: _abc.Iterable[_builtins.str] | None = ..., + data: _builtins.bytes = ..., concurrency: Global___BindingEventResponse.BindingEventConcurrency.ValueType = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["concurrency", b"concurrency", "data", b"data", "states", b"states", "store_name", b"store_name", "to", b"to"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["concurrency", b"concurrency", "data", b"data", "states", b"states", "store_name", b"store_name", "to", b"to"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___BindingEventResponse: typing_extensions.TypeAlias = BindingEventResponse +Global___BindingEventResponse: _TypeAlias = BindingEventResponse # noqa: Y015 -@typing.final -class ListTopicSubscriptionsResponse(google.protobuf.message.Message): +@_typing.final +class ListTopicSubscriptionsResponse(_message.Message): """ListTopicSubscriptionsResponse is the message including the list of the subscribing topics.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - SUBSCRIPTIONS_FIELD_NUMBER: builtins.int - @property - def subscriptions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___TopicSubscription]: + SUBSCRIPTIONS_FIELD_NUMBER: _builtins.int + @_builtins.property + def subscriptions(self) -> _containers.RepeatedCompositeFieldContainer[Global___TopicSubscription]: """The list of topics.""" def __init__( self, *, - subscriptions: collections.abc.Iterable[Global___TopicSubscription] | None = ..., + subscriptions: _abc.Iterable[Global___TopicSubscription] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["subscriptions", b"subscriptions"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["subscriptions", b"subscriptions"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ListTopicSubscriptionsResponse: typing_extensions.TypeAlias = ListTopicSubscriptionsResponse +Global___ListTopicSubscriptionsResponse: _TypeAlias = ListTopicSubscriptionsResponse # noqa: Y015 -@typing.final -class TopicSubscription(google.protobuf.message.Message): +@_typing.final +class TopicSubscription(_message.Message): """TopicSubscription represents topic and metadata.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - PUBSUB_NAME_FIELD_NUMBER: builtins.int - TOPIC_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - ROUTES_FIELD_NUMBER: builtins.int - DEAD_LETTER_TOPIC_FIELD_NUMBER: builtins.int - BULK_SUBSCRIBE_FIELD_NUMBER: builtins.int - pubsub_name: builtins.str + PUBSUB_NAME_FIELD_NUMBER: _builtins.int + TOPIC_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + ROUTES_FIELD_NUMBER: _builtins.int + DEAD_LETTER_TOPIC_FIELD_NUMBER: _builtins.int + BULK_SUBSCRIBE_FIELD_NUMBER: _builtins.int + pubsub_name: _builtins.str """Required. The name of the pubsub containing the topic below to subscribe to.""" - topic: builtins.str + topic: _builtins.str """Required. The name of topic which will be subscribed""" - dead_letter_topic: builtins.str + dead_letter_topic: _builtins.str """The optional dead letter queue for this topic to send events to.""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The optional properties used for this topic's subscription e.g. session id""" - @property + @_builtins.property def routes(self) -> Global___TopicRoutes: """The optional routing rules to match against. In the gRPC interface, OnTopicEvent is still invoked but the matching path is sent in the TopicEventRequest. """ - @property + @_builtins.property def bulk_subscribe(self) -> Global___BulkSubscribeConfig: """The optional bulk subscribe settings for this topic.""" def __init__( self, *, - pubsub_name: builtins.str = ..., - topic: builtins.str = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + pubsub_name: _builtins.str = ..., + topic: _builtins.str = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., routes: Global___TopicRoutes | None = ..., - dead_letter_topic: builtins.str = ..., + dead_letter_topic: _builtins.str = ..., bulk_subscribe: Global___BulkSubscribeConfig | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["bulk_subscribe", b"bulk_subscribe", "routes", b"routes"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["bulk_subscribe", b"bulk_subscribe", "dead_letter_topic", b"dead_letter_topic", "metadata", b"metadata", "pubsub_name", b"pubsub_name", "routes", b"routes", "topic", b"topic"] + _HasFieldArgType: _TypeAlias = _typing.Literal["bulk_subscribe", b"bulk_subscribe", "routes", b"routes"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["bulk_subscribe", b"bulk_subscribe", "dead_letter_topic", b"dead_letter_topic", "metadata", b"metadata", "pubsub_name", b"pubsub_name", "routes", b"routes", "topic", b"topic"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___TopicSubscription: typing_extensions.TypeAlias = TopicSubscription +Global___TopicSubscription: _TypeAlias = TopicSubscription # noqa: Y015 -@typing.final -class TopicRoutes(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class TopicRoutes(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - RULES_FIELD_NUMBER: builtins.int - DEFAULT_FIELD_NUMBER: builtins.int - default: builtins.str + RULES_FIELD_NUMBER: _builtins.int + DEFAULT_FIELD_NUMBER: _builtins.int + default: _builtins.str """The default path for this topic.""" - @property - def rules(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___TopicRule]: + @_builtins.property + def rules(self) -> _containers.RepeatedCompositeFieldContainer[Global___TopicRule]: """The list of rules for this topic.""" def __init__( self, *, - rules: collections.abc.Iterable[Global___TopicRule] | None = ..., - default: builtins.str = ..., + rules: _abc.Iterable[Global___TopicRule] | None = ..., + default: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["default", b"default", "rules", b"rules"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["default", b"default", "rules", b"rules"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___TopicRoutes: typing_extensions.TypeAlias = TopicRoutes +Global___TopicRoutes: _TypeAlias = TopicRoutes # noqa: Y015 -@typing.final -class TopicRule(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class TopicRule(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - MATCH_FIELD_NUMBER: builtins.int - PATH_FIELD_NUMBER: builtins.int - match: builtins.str + MATCH_FIELD_NUMBER: _builtins.int + PATH_FIELD_NUMBER: _builtins.int + match: _builtins.str """The optional CEL expression used to match the event. If the match is not specified, then the route is considered the default. """ - path: builtins.str + path: _builtins.str """The path used to identify matches for this subscription. This value is passed in TopicEventRequest and used by OnTopicEvent to "switch" inside the handler. @@ -659,72 +659,72 @@ class TopicRule(google.protobuf.message.Message): def __init__( self, *, - match: builtins.str = ..., - path: builtins.str = ..., + match: _builtins.str = ..., + path: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["match", b"match", "path", b"path"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["match", b"match", "path", b"path"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___TopicRule: typing_extensions.TypeAlias = TopicRule +Global___TopicRule: _TypeAlias = TopicRule # noqa: Y015 -@typing.final -class BulkSubscribeConfig(google.protobuf.message.Message): +@_typing.final +class BulkSubscribeConfig(_message.Message): """BulkSubscribeConfig is the message to pass settings for bulk subscribe""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ENABLED_FIELD_NUMBER: builtins.int - MAX_MESSAGES_COUNT_FIELD_NUMBER: builtins.int - MAX_AWAIT_DURATION_MS_FIELD_NUMBER: builtins.int - enabled: builtins.bool + ENABLED_FIELD_NUMBER: _builtins.int + MAX_MESSAGES_COUNT_FIELD_NUMBER: _builtins.int + MAX_AWAIT_DURATION_MS_FIELD_NUMBER: _builtins.int + enabled: _builtins.bool """Required. Flag to enable/disable bulk subscribe""" - max_messages_count: builtins.int + max_messages_count: _builtins.int """Optional. Max number of messages to be sent in a single bulk request""" - max_await_duration_ms: builtins.int + max_await_duration_ms: _builtins.int """Optional. Max duration to wait for messages to be sent in a single bulk request""" def __init__( self, *, - enabled: builtins.bool = ..., - max_messages_count: builtins.int = ..., - max_await_duration_ms: builtins.int = ..., + enabled: _builtins.bool = ..., + max_messages_count: _builtins.int = ..., + max_await_duration_ms: _builtins.int = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["enabled", b"enabled", "max_await_duration_ms", b"max_await_duration_ms", "max_messages_count", b"max_messages_count"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["enabled", b"enabled", "max_await_duration_ms", b"max_await_duration_ms", "max_messages_count", b"max_messages_count"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___BulkSubscribeConfig: typing_extensions.TypeAlias = BulkSubscribeConfig +Global___BulkSubscribeConfig: _TypeAlias = BulkSubscribeConfig # noqa: Y015 -@typing.final -class ListInputBindingsResponse(google.protobuf.message.Message): +@_typing.final +class ListInputBindingsResponse(_message.Message): """ListInputBindingsResponse is the message including the list of input bindings.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - BINDINGS_FIELD_NUMBER: builtins.int - @property - def bindings(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + BINDINGS_FIELD_NUMBER: _builtins.int + @_builtins.property + def bindings(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """The list of input bindings.""" def __init__( self, *, - bindings: collections.abc.Iterable[builtins.str] | None = ..., + bindings: _abc.Iterable[_builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["bindings", b"bindings"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["bindings", b"bindings"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ListInputBindingsResponse: typing_extensions.TypeAlias = ListInputBindingsResponse +Global___ListInputBindingsResponse: _TypeAlias = ListInputBindingsResponse # noqa: Y015 -@typing.final -class HealthCheckResponse(google.protobuf.message.Message): +@_typing.final +class HealthCheckResponse(_message.Message): """HealthCheckResponse is the message with the response to the health check. This message is currently empty as used as placeholder. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor def __init__( self, ) -> None: ... -Global___HealthCheckResponse: typing_extensions.TypeAlias = HealthCheckResponse +Global___HealthCheckResponse: _TypeAlias = HealthCheckResponse # noqa: Y015 diff --git a/dapr/proto/runtime/v1/binding_pb2.py b/dapr/proto/runtime/v1/binding_pb2.py index de643b43f..9d074cafb 100644 --- a/dapr/proto/runtime/v1/binding_pb2.py +++ b/dapr/proto/runtime/v1/binding_pb2.py @@ -24,14 +24,14 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#dapr/proto/runtime/v1/binding.proto\x12\x15\x64\x61pr.proto.runtime.v1\"\xc3\x01\n\x14InvokeBindingRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12K\n\x08metadata\x18\x03 \x03(\x0b\x32\x39.dapr.proto.runtime.v1.InvokeBindingRequest.MetadataEntry\x12\x11\n\toperation\x18\x04 \x01(\t\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa4\x01\n\x15InvokeBindingResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12L\n\x08metadata\x18\x02 \x03(\x0b\x32:.dapr.proto.runtime.v1.InvokeBindingResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42i\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#dapr/proto/runtime/v1/binding.proto\x12\x15\x64\x61pr.proto.runtime.v1\"\xc3\x01\n\x14InvokeBindingRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12K\n\x08metadata\x18\x03 \x03(\x0b\x32\x39.dapr.proto.runtime.v1.InvokeBindingRequest.MetadataEntry\x12\x11\n\toperation\x18\x04 \x01(\t\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa4\x01\n\x15InvokeBindingResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12L\n\x08metadata\x18\x02 \x03(\x0b\x32:.dapr.proto.runtime.v1.InvokeBindingResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42q\n\nio.dapr.v1B\x12\x44\x61prBindingsProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dapr.proto.runtime.v1.binding_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' + _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\022DaprBindingsProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' _globals['_INVOKEBINDINGREQUEST_METADATAENTRY']._loaded_options = None _globals['_INVOKEBINDINGREQUEST_METADATAENTRY']._serialized_options = b'8\001' _globals['_INVOKEBINDINGRESPONSE_METADATAENTRY']._loaded_options = None diff --git a/dapr/proto/runtime/v1/binding_pb2.pyi b/dapr/proto/runtime/v1/binding_pb2.pyi index 20b819afe..31ed08886 100644 --- a/dapr/proto/runtime/v1/binding_pb2.pyi +++ b/dapr/proto/runtime/v1/binding_pb2.pyi @@ -14,56 +14,56 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.message +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class InvokeBindingRequest(google.protobuf.message.Message): +@_typing.final +class InvokeBindingRequest(_message.Message): """InvokeBindingRequest is the message to send data to output bindings""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - NAME_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - OPERATION_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + OPERATION_FIELD_NUMBER: _builtins.int + name: _builtins.str """The name of the output binding to invoke.""" - data: builtins.bytes + data: _builtins.bytes """The data which will be sent to output binding.""" - operation: builtins.str + operation: _builtins.str """The name of the operation type for the binding to invoke""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata passing to output binding components Common metadata property: @@ -77,54 +77,54 @@ class InvokeBindingRequest(google.protobuf.message.Message): def __init__( self, *, - name: builtins.str = ..., - data: builtins.bytes = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., - operation: builtins.str = ..., + name: _builtins.str = ..., + data: _builtins.bytes = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + operation: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data", "metadata", b"metadata", "name", b"name", "operation", b"operation"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "metadata", b"metadata", "name", b"name", "operation", b"operation"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___InvokeBindingRequest: typing_extensions.TypeAlias = InvokeBindingRequest +Global___InvokeBindingRequest: _TypeAlias = InvokeBindingRequest # noqa: Y015 -@typing.final -class InvokeBindingResponse(google.protobuf.message.Message): +@_typing.final +class InvokeBindingResponse(_message.Message): """InvokeBindingResponse is the message returned from an output binding invocation""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - DATA_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - data: builtins.bytes + DATA_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + data: _builtins.bytes """The data which will be sent to output binding.""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata returned from an external system""" def __init__( self, *, - data: builtins.bytes = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + data: _builtins.bytes = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data", "metadata", b"metadata"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "metadata", b"metadata"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___InvokeBindingResponse: typing_extensions.TypeAlias = InvokeBindingResponse +Global___InvokeBindingResponse: _TypeAlias = InvokeBindingResponse # noqa: Y015 diff --git a/dapr/proto/runtime/v1/configuration_pb2.py b/dapr/proto/runtime/v1/configuration_pb2.py index 5ab10c73d..dbf164d73 100644 --- a/dapr/proto/runtime/v1/configuration_pb2.py +++ b/dapr/proto/runtime/v1/configuration_pb2.py @@ -25,14 +25,14 @@ from dapr.proto.common.v1 import common_pb2 as dapr_dot_proto_dot_common_dot_v1_dot_common__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)dapr/proto/runtime/v1/configuration.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a!dapr/proto/common/v1/common.proto\"\xbc\x01\n\x17GetConfigurationRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12\x0c\n\x04keys\x18\x02 \x03(\t\x12N\n\x08metadata\x18\x03 \x03(\x0b\x32<.dapr.proto.runtime.v1.GetConfigurationRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbc\x01\n\x18GetConfigurationResponse\x12I\n\x05items\x18\x01 \x03(\x0b\x32:.dapr.proto.runtime.v1.GetConfigurationResponse.ItemsEntry\x1aU\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.dapr.proto.common.v1.ConfigurationItem:\x02\x38\x01\"\xc8\x01\n\x1dSubscribeConfigurationRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12\x0c\n\x04keys\x18\x02 \x03(\t\x12T\n\x08metadata\x18\x03 \x03(\x0b\x32\x42.dapr.proto.runtime.v1.SubscribeConfigurationRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"A\n\x1fUnsubscribeConfigurationRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\"\xd4\x01\n\x1eSubscribeConfigurationResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12O\n\x05items\x18\x02 \x03(\x0b\x32@.dapr.proto.runtime.v1.SubscribeConfigurationResponse.ItemsEntry\x1aU\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.dapr.proto.common.v1.ConfigurationItem:\x02\x38\x01\"?\n UnsubscribeConfigurationResponse\x12\n\n\x02ok\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\tBi\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)dapr/proto/runtime/v1/configuration.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a!dapr/proto/common/v1/common.proto\"\xbc\x01\n\x17GetConfigurationRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12\x0c\n\x04keys\x18\x02 \x03(\t\x12N\n\x08metadata\x18\x03 \x03(\x0b\x32<.dapr.proto.runtime.v1.GetConfigurationRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbc\x01\n\x18GetConfigurationResponse\x12I\n\x05items\x18\x01 \x03(\x0b\x32:.dapr.proto.runtime.v1.GetConfigurationResponse.ItemsEntry\x1aU\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.dapr.proto.common.v1.ConfigurationItem:\x02\x38\x01\"\xc8\x01\n\x1dSubscribeConfigurationRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12\x0c\n\x04keys\x18\x02 \x03(\t\x12T\n\x08metadata\x18\x03 \x03(\x0b\x32\x42.dapr.proto.runtime.v1.SubscribeConfigurationRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"A\n\x1fUnsubscribeConfigurationRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\"\xd4\x01\n\x1eSubscribeConfigurationResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12O\n\x05items\x18\x02 \x03(\x0b\x32@.dapr.proto.runtime.v1.SubscribeConfigurationResponse.ItemsEntry\x1aU\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.dapr.proto.common.v1.ConfigurationItem:\x02\x38\x01\"?\n UnsubscribeConfigurationResponse\x12\n\n\x02ok\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\tBv\n\nio.dapr.v1B\x17\x44\x61prConfigurationProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dapr.proto.runtime.v1.configuration_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' + _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\027DaprConfigurationProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' _globals['_GETCONFIGURATIONREQUEST_METADATAENTRY']._loaded_options = None _globals['_GETCONFIGURATIONREQUEST_METADATAENTRY']._serialized_options = b'8\001' _globals['_GETCONFIGURATIONRESPONSE_ITEMSENTRY']._loaded_options = None diff --git a/dapr/proto/runtime/v1/configuration_pb2.pyi b/dapr/proto/runtime/v1/configuration_pb2.pyi index 6523275fa..3e14b5146 100644 --- a/dapr/proto/runtime/v1/configuration_pb2.pyi +++ b/dapr/proto/runtime/v1/configuration_pb2.pyi @@ -14,246 +14,246 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import dapr.proto.common.v1.common_pb2 -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.message +from collections import abc as _abc +from dapr.proto.common.v1 import common_pb2 as _common_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class GetConfigurationRequest(google.protobuf.message.Message): +@_typing.final +class GetConfigurationRequest(_message.Message): """GetConfigurationRequest is the message to get a list of key-value configuration from specified configuration store.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - STORE_NAME_FIELD_NUMBER: builtins.int - KEYS_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - store_name: builtins.str + STORE_NAME_FIELD_NUMBER: _builtins.int + KEYS_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + store_name: _builtins.str """Required. The name of configuration store.""" - @property - def keys(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + @_builtins.property + def keys(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """Optional. The key of the configuration item to fetch. If set, only query for the specified configuration items. Empty list means fetch all. """ - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """Optional. The metadata which will be sent to configuration store components.""" def __init__( self, *, - store_name: builtins.str = ..., - keys: collections.abc.Iterable[builtins.str] | None = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + store_name: _builtins.str = ..., + keys: _abc.Iterable[_builtins.str] | None = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["keys", b"keys", "metadata", b"metadata", "store_name", b"store_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["keys", b"keys", "metadata", b"metadata", "store_name", b"store_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetConfigurationRequest: typing_extensions.TypeAlias = GetConfigurationRequest +Global___GetConfigurationRequest: _TypeAlias = GetConfigurationRequest # noqa: Y015 -@typing.final -class GetConfigurationResponse(google.protobuf.message.Message): +@_typing.final +class GetConfigurationResponse(_message.Message): """GetConfigurationResponse is the response conveying the list of configuration values. It should be the FULL configuration of specified application which contains all of its configuration items. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class ItemsEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class ItemsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - @property - def value(self) -> dapr.proto.common.v1.common_pb2.ConfigurationItem: ... + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> _common_pb2.ConfigurationItem: ... def __init__( self, *, - key: builtins.str = ..., - value: dapr.proto.common.v1.common_pb2.ConfigurationItem | None = ..., + key: _builtins.str = ..., + value: _common_pb2.ConfigurationItem | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["value", b"value"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - ITEMS_FIELD_NUMBER: builtins.int - @property - def items(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, dapr.proto.common.v1.common_pb2.ConfigurationItem]: ... + ITEMS_FIELD_NUMBER: _builtins.int + @_builtins.property + def items(self) -> _containers.MessageMap[_builtins.str, _common_pb2.ConfigurationItem]: ... def __init__( self, *, - items: collections.abc.Mapping[builtins.str, dapr.proto.common.v1.common_pb2.ConfigurationItem] | None = ..., + items: _abc.Mapping[_builtins.str, _common_pb2.ConfigurationItem] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["items", b"items"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["items", b"items"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetConfigurationResponse: typing_extensions.TypeAlias = GetConfigurationResponse +Global___GetConfigurationResponse: _TypeAlias = GetConfigurationResponse # noqa: Y015 -@typing.final -class SubscribeConfigurationRequest(google.protobuf.message.Message): +@_typing.final +class SubscribeConfigurationRequest(_message.Message): """SubscribeConfigurationRequest is the message to get a list of key-value configuration from specified configuration store.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - STORE_NAME_FIELD_NUMBER: builtins.int - KEYS_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - store_name: builtins.str + STORE_NAME_FIELD_NUMBER: _builtins.int + KEYS_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + store_name: _builtins.str """The name of configuration store.""" - @property - def keys(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + @_builtins.property + def keys(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """Optional. The key of the configuration item to fetch. If set, only query for the specified configuration items. Empty list means fetch all. """ - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata which will be sent to configuration store components.""" def __init__( self, *, - store_name: builtins.str = ..., - keys: collections.abc.Iterable[builtins.str] | None = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + store_name: _builtins.str = ..., + keys: _abc.Iterable[_builtins.str] | None = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["keys", b"keys", "metadata", b"metadata", "store_name", b"store_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["keys", b"keys", "metadata", b"metadata", "store_name", b"store_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubscribeConfigurationRequest: typing_extensions.TypeAlias = SubscribeConfigurationRequest +Global___SubscribeConfigurationRequest: _TypeAlias = SubscribeConfigurationRequest # noqa: Y015 -@typing.final -class UnsubscribeConfigurationRequest(google.protobuf.message.Message): +@_typing.final +class UnsubscribeConfigurationRequest(_message.Message): """UnSubscribeConfigurationRequest is the message to stop watching the key-value configuration.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - STORE_NAME_FIELD_NUMBER: builtins.int - ID_FIELD_NUMBER: builtins.int - store_name: builtins.str + STORE_NAME_FIELD_NUMBER: _builtins.int + ID_FIELD_NUMBER: _builtins.int + store_name: _builtins.str """The name of configuration store.""" - id: builtins.str + id: _builtins.str """The id to unsubscribe.""" def __init__( self, *, - store_name: builtins.str = ..., - id: builtins.str = ..., + store_name: _builtins.str = ..., + id: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["id", b"id", "store_name", b"store_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["id", b"id", "store_name", b"store_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___UnsubscribeConfigurationRequest: typing_extensions.TypeAlias = UnsubscribeConfigurationRequest +Global___UnsubscribeConfigurationRequest: _TypeAlias = UnsubscribeConfigurationRequest # noqa: Y015 -@typing.final -class SubscribeConfigurationResponse(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class SubscribeConfigurationResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class ItemsEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class ItemsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - @property - def value(self) -> dapr.proto.common.v1.common_pb2.ConfigurationItem: ... + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> _common_pb2.ConfigurationItem: ... def __init__( self, *, - key: builtins.str = ..., - value: dapr.proto.common.v1.common_pb2.ConfigurationItem | None = ..., + key: _builtins.str = ..., + value: _common_pb2.ConfigurationItem | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["value", b"value"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - ID_FIELD_NUMBER: builtins.int - ITEMS_FIELD_NUMBER: builtins.int - id: builtins.str + ID_FIELD_NUMBER: _builtins.int + ITEMS_FIELD_NUMBER: _builtins.int + id: _builtins.str """Subscribe id, used to stop subscription.""" - @property - def items(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, dapr.proto.common.v1.common_pb2.ConfigurationItem]: + @_builtins.property + def items(self) -> _containers.MessageMap[_builtins.str, _common_pb2.ConfigurationItem]: """The list of items containing configuration values""" def __init__( self, *, - id: builtins.str = ..., - items: collections.abc.Mapping[builtins.str, dapr.proto.common.v1.common_pb2.ConfigurationItem] | None = ..., + id: _builtins.str = ..., + items: _abc.Mapping[_builtins.str, _common_pb2.ConfigurationItem] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["id", b"id", "items", b"items"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["id", b"id", "items", b"items"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubscribeConfigurationResponse: typing_extensions.TypeAlias = SubscribeConfigurationResponse +Global___SubscribeConfigurationResponse: _TypeAlias = SubscribeConfigurationResponse # noqa: Y015 -@typing.final -class UnsubscribeConfigurationResponse(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class UnsubscribeConfigurationResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - OK_FIELD_NUMBER: builtins.int - MESSAGE_FIELD_NUMBER: builtins.int - ok: builtins.bool - message: builtins.str + OK_FIELD_NUMBER: _builtins.int + MESSAGE_FIELD_NUMBER: _builtins.int + ok: _builtins.bool + message: _builtins.str def __init__( self, *, - ok: builtins.bool = ..., - message: builtins.str = ..., + ok: _builtins.bool = ..., + message: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["message", b"message", "ok", b"ok"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["message", b"message", "ok", b"ok"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___UnsubscribeConfigurationResponse: typing_extensions.TypeAlias = UnsubscribeConfigurationResponse +Global___UnsubscribeConfigurationResponse: _TypeAlias = UnsubscribeConfigurationResponse # noqa: Y015 diff --git a/dapr/proto/runtime/v1/crypto_pb2.py b/dapr/proto/runtime/v1/crypto_pb2.py index 0420f5b1a..73514af07 100644 --- a/dapr/proto/runtime/v1/crypto_pb2.py +++ b/dapr/proto/runtime/v1/crypto_pb2.py @@ -25,14 +25,14 @@ from dapr.proto.common.v1 import common_pb2 as dapr_dot_proto_dot_common_dot_v1_dot_common__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"dapr/proto/runtime/v1/crypto.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a!dapr/proto/common/v1/common.proto\"\xb0\x01\n\x13SubtleGetKeyRequest\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x44\n\x06\x66ormat\x18\x03 \x01(\x0e\x32\x34.dapr.proto.runtime.v1.SubtleGetKeyRequest.KeyFormat\"\x1e\n\tKeyFormat\x12\x07\n\x03PEM\x10\x00\x12\x08\n\x04JSON\x10\x01\"C\n\x14SubtleGetKeyResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1d\n\npublic_key\x18\x02 \x01(\tR\tpublicKey\"\xb6\x01\n\x14SubtleEncryptRequest\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x11\n\tplaintext\x18\x02 \x01(\x0c\x12\x11\n\talgorithm\x18\x03 \x01(\t\x12\x19\n\x08key_name\x18\x04 \x01(\tR\x07keyName\x12\r\n\x05nonce\x18\x05 \x01(\x0c\x12\'\n\x0f\x61ssociated_data\x18\x06 \x01(\x0cR\x0e\x61ssociatedData\"8\n\x15SubtleEncryptResponse\x12\x12\n\nciphertext\x18\x01 \x01(\x0c\x12\x0b\n\x03tag\x18\x02 \x01(\x0c\"\xc4\x01\n\x14SubtleDecryptRequest\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x12\n\nciphertext\x18\x02 \x01(\x0c\x12\x11\n\talgorithm\x18\x03 \x01(\t\x12\x19\n\x08key_name\x18\x04 \x01(\tR\x07keyName\x12\r\n\x05nonce\x18\x05 \x01(\x0c\x12\x0b\n\x03tag\x18\x06 \x01(\x0c\x12\'\n\x0f\x61ssociated_data\x18\x07 \x01(\x0cR\x0e\x61ssociatedData\"*\n\x15SubtleDecryptResponse\x12\x11\n\tplaintext\x18\x01 \x01(\x0c\"\xc8\x01\n\x14SubtleWrapKeyRequest\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12#\n\rplaintext_key\x18\x02 \x01(\x0cR\x0cplaintextKey\x12\x11\n\talgorithm\x18\x03 \x01(\t\x12\x19\n\x08key_name\x18\x04 \x01(\tR\x07keyName\x12\r\n\x05nonce\x18\x05 \x01(\x0c\x12\'\n\x0f\x61ssociated_data\x18\x06 \x01(\x0cR\x0e\x61ssociatedData\"E\n\x15SubtleWrapKeyResponse\x12\x1f\n\x0bwrapped_key\x18\x01 \x01(\x0cR\nwrappedKey\x12\x0b\n\x03tag\x18\x02 \x01(\x0c\"\xd3\x01\n\x16SubtleUnwrapKeyRequest\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x1f\n\x0bwrapped_key\x18\x02 \x01(\x0cR\nwrappedKey\x12\x11\n\talgorithm\x18\x03 \x01(\t\x12\x19\n\x08key_name\x18\x04 \x01(\tR\x07keyName\x12\r\n\x05nonce\x18\x05 \x01(\x0c\x12\x0b\n\x03tag\x18\x06 \x01(\x0c\x12\'\n\x0f\x61ssociated_data\x18\x07 \x01(\x0cR\x0e\x61ssociatedData\">\n\x17SubtleUnwrapKeyResponse\x12#\n\rplaintext_key\x18\x01 \x01(\x0cR\x0cplaintextKey\"x\n\x11SubtleSignRequest\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x0e\n\x06\x64igest\x18\x02 \x01(\x0c\x12\x11\n\talgorithm\x18\x03 \x01(\t\x12\x19\n\x08key_name\x18\x04 \x01(\tR\x07keyName\"\'\n\x12SubtleSignResponse\x12\x11\n\tsignature\x18\x01 \x01(\x0c\"\x8d\x01\n\x13SubtleVerifyRequest\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x0e\n\x06\x64igest\x18\x02 \x01(\x0c\x12\x11\n\talgorithm\x18\x03 \x01(\t\x12\x19\n\x08key_name\x18\x04 \x01(\tR\x07keyName\x12\x11\n\tsignature\x18\x05 \x01(\x0c\"%\n\x14SubtleVerifyResponse\x12\r\n\x05valid\x18\x01 \x01(\x08\"\x85\x01\n\x0e\x45ncryptRequest\x12=\n\x07options\x18\x01 \x01(\x0b\x32,.dapr.proto.runtime.v1.EncryptRequestOptions\x12\x34\n\x07payload\x18\x02 \x01(\x0b\x32#.dapr.proto.common.v1.StreamPayload\"\xfe\x01\n\x15\x45ncryptRequestOptions\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x19\n\x08key_name\x18\x02 \x01(\tR\x07keyName\x12\x1a\n\x12key_wrap_algorithm\x18\x03 \x01(\t\x12\x1e\n\x16\x64\x61ta_encryption_cipher\x18\n \x01(\t\x12\x37\n\x18omit_decryption_key_name\x18\x0b \x01(\x08R\x15omitDecryptionKeyName\x12.\n\x13\x64\x65\x63ryption_key_name\x18\x0c \x01(\tR\x11\x64\x65\x63ryptionKeyName\"G\n\x0f\x45ncryptResponse\x12\x34\n\x07payload\x18\x01 \x01(\x0b\x32#.dapr.proto.common.v1.StreamPayload\"\x85\x01\n\x0e\x44\x65\x63ryptRequest\x12=\n\x07options\x18\x01 \x01(\x0b\x32,.dapr.proto.runtime.v1.DecryptRequestOptions\x12\x34\n\x07payload\x18\x02 \x01(\x0b\x32#.dapr.proto.common.v1.StreamPayload\"Y\n\x15\x44\x65\x63ryptRequestOptions\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x19\n\x08key_name\x18\x0c \x01(\tR\x07keyName\"G\n\x0f\x44\x65\x63ryptResponse\x12\x34\n\x07payload\x18\x01 \x01(\x0b\x32#.dapr.proto.common.v1.StreamPayloadBi\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"dapr/proto/runtime/v1/crypto.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a!dapr/proto/common/v1/common.proto\"\xb0\x01\n\x13SubtleGetKeyRequest\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x44\n\x06\x66ormat\x18\x03 \x01(\x0e\x32\x34.dapr.proto.runtime.v1.SubtleGetKeyRequest.KeyFormat\"\x1e\n\tKeyFormat\x12\x07\n\x03PEM\x10\x00\x12\x08\n\x04JSON\x10\x01\"C\n\x14SubtleGetKeyResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1d\n\npublic_key\x18\x02 \x01(\tR\tpublicKey\"\xb6\x01\n\x14SubtleEncryptRequest\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x11\n\tplaintext\x18\x02 \x01(\x0c\x12\x11\n\talgorithm\x18\x03 \x01(\t\x12\x19\n\x08key_name\x18\x04 \x01(\tR\x07keyName\x12\r\n\x05nonce\x18\x05 \x01(\x0c\x12\'\n\x0f\x61ssociated_data\x18\x06 \x01(\x0cR\x0e\x61ssociatedData\"8\n\x15SubtleEncryptResponse\x12\x12\n\nciphertext\x18\x01 \x01(\x0c\x12\x0b\n\x03tag\x18\x02 \x01(\x0c\"\xc4\x01\n\x14SubtleDecryptRequest\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x12\n\nciphertext\x18\x02 \x01(\x0c\x12\x11\n\talgorithm\x18\x03 \x01(\t\x12\x19\n\x08key_name\x18\x04 \x01(\tR\x07keyName\x12\r\n\x05nonce\x18\x05 \x01(\x0c\x12\x0b\n\x03tag\x18\x06 \x01(\x0c\x12\'\n\x0f\x61ssociated_data\x18\x07 \x01(\x0cR\x0e\x61ssociatedData\"*\n\x15SubtleDecryptResponse\x12\x11\n\tplaintext\x18\x01 \x01(\x0c\"\xc8\x01\n\x14SubtleWrapKeyRequest\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12#\n\rplaintext_key\x18\x02 \x01(\x0cR\x0cplaintextKey\x12\x11\n\talgorithm\x18\x03 \x01(\t\x12\x19\n\x08key_name\x18\x04 \x01(\tR\x07keyName\x12\r\n\x05nonce\x18\x05 \x01(\x0c\x12\'\n\x0f\x61ssociated_data\x18\x06 \x01(\x0cR\x0e\x61ssociatedData\"E\n\x15SubtleWrapKeyResponse\x12\x1f\n\x0bwrapped_key\x18\x01 \x01(\x0cR\nwrappedKey\x12\x0b\n\x03tag\x18\x02 \x01(\x0c\"\xd3\x01\n\x16SubtleUnwrapKeyRequest\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x1f\n\x0bwrapped_key\x18\x02 \x01(\x0cR\nwrappedKey\x12\x11\n\talgorithm\x18\x03 \x01(\t\x12\x19\n\x08key_name\x18\x04 \x01(\tR\x07keyName\x12\r\n\x05nonce\x18\x05 \x01(\x0c\x12\x0b\n\x03tag\x18\x06 \x01(\x0c\x12\'\n\x0f\x61ssociated_data\x18\x07 \x01(\x0cR\x0e\x61ssociatedData\">\n\x17SubtleUnwrapKeyResponse\x12#\n\rplaintext_key\x18\x01 \x01(\x0cR\x0cplaintextKey\"x\n\x11SubtleSignRequest\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x0e\n\x06\x64igest\x18\x02 \x01(\x0c\x12\x11\n\talgorithm\x18\x03 \x01(\t\x12\x19\n\x08key_name\x18\x04 \x01(\tR\x07keyName\"\'\n\x12SubtleSignResponse\x12\x11\n\tsignature\x18\x01 \x01(\x0c\"\x8d\x01\n\x13SubtleVerifyRequest\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x0e\n\x06\x64igest\x18\x02 \x01(\x0c\x12\x11\n\talgorithm\x18\x03 \x01(\t\x12\x19\n\x08key_name\x18\x04 \x01(\tR\x07keyName\x12\x11\n\tsignature\x18\x05 \x01(\x0c\"%\n\x14SubtleVerifyResponse\x12\r\n\x05valid\x18\x01 \x01(\x08\"\x85\x01\n\x0e\x45ncryptRequest\x12=\n\x07options\x18\x01 \x01(\x0b\x32,.dapr.proto.runtime.v1.EncryptRequestOptions\x12\x34\n\x07payload\x18\x02 \x01(\x0b\x32#.dapr.proto.common.v1.StreamPayload\"\xfe\x01\n\x15\x45ncryptRequestOptions\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x19\n\x08key_name\x18\x02 \x01(\tR\x07keyName\x12\x1a\n\x12key_wrap_algorithm\x18\x03 \x01(\t\x12\x1e\n\x16\x64\x61ta_encryption_cipher\x18\n \x01(\t\x12\x37\n\x18omit_decryption_key_name\x18\x0b \x01(\x08R\x15omitDecryptionKeyName\x12.\n\x13\x64\x65\x63ryption_key_name\x18\x0c \x01(\tR\x11\x64\x65\x63ryptionKeyName\"G\n\x0f\x45ncryptResponse\x12\x34\n\x07payload\x18\x01 \x01(\x0b\x32#.dapr.proto.common.v1.StreamPayload\"\x85\x01\n\x0e\x44\x65\x63ryptRequest\x12=\n\x07options\x18\x01 \x01(\x0b\x32,.dapr.proto.runtime.v1.DecryptRequestOptions\x12\x34\n\x07payload\x18\x02 \x01(\x0b\x32#.dapr.proto.common.v1.StreamPayload\"Y\n\x15\x44\x65\x63ryptRequestOptions\x12%\n\x0e\x63omponent_name\x18\x01 \x01(\tR\rcomponentName\x12\x19\n\x08key_name\x18\x0c \x01(\tR\x07keyName\"G\n\x0f\x44\x65\x63ryptResponse\x12\x34\n\x07payload\x18\x01 \x01(\x0b\x32#.dapr.proto.common.v1.StreamPayloadBo\n\nio.dapr.v1B\x10\x44\x61prCryptoProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dapr.proto.runtime.v1.crypto_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' + _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\020DaprCryptoProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' _globals['_SUBTLEGETKEYREQUEST']._serialized_start=97 _globals['_SUBTLEGETKEYREQUEST']._serialized_end=273 _globals['_SUBTLEGETKEYREQUEST_KEYFORMAT']._serialized_start=243 diff --git a/dapr/proto/runtime/v1/crypto_pb2.pyi b/dapr/proto/runtime/v1/crypto_pb2.pyi index 9c0f1b387..424e4e7fa 100644 --- a/dapr/proto/runtime/v1/crypto_pb2.pyi +++ b/dapr/proto/runtime/v1/crypto_pb2.pyi @@ -14,33 +14,33 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import dapr.proto.common.v1.common_pb2 -import google.protobuf.descriptor -import google.protobuf.internal.enum_type_wrapper -import google.protobuf.message +from dapr.proto.common.v1 import common_pb2 as _common_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class SubtleGetKeyRequest(google.protobuf.message.Message): +@_typing.final +class SubtleGetKeyRequest(_message.Message): """SubtleGetKeyRequest is the request object for SubtleGetKeyAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor class _KeyFormat: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _KeyFormatEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[SubtleGetKeyRequest._KeyFormat.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _KeyFormatEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[SubtleGetKeyRequest._KeyFormat.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor PEM: SubtleGetKeyRequest._KeyFormat.ValueType # 0 """PEM (PKIX) (default)""" JSON: SubtleGetKeyRequest._KeyFormat.ValueType # 1 @@ -52,477 +52,477 @@ class SubtleGetKeyRequest(google.protobuf.message.Message): JSON: SubtleGetKeyRequest.KeyFormat.ValueType # 1 """JSON (JSON Web Key) as string""" - COMPONENT_NAME_FIELD_NUMBER: builtins.int - NAME_FIELD_NUMBER: builtins.int - FORMAT_FIELD_NUMBER: builtins.int - component_name: builtins.str + COMPONENT_NAME_FIELD_NUMBER: _builtins.int + NAME_FIELD_NUMBER: _builtins.int + FORMAT_FIELD_NUMBER: _builtins.int + component_name: _builtins.str """Name of the component""" - name: builtins.str + name: _builtins.str """Name (or name/version) of the key to use in the key vault""" format: Global___SubtleGetKeyRequest.KeyFormat.ValueType """Response format""" def __init__( self, *, - component_name: builtins.str = ..., - name: builtins.str = ..., + component_name: _builtins.str = ..., + name: _builtins.str = ..., format: Global___SubtleGetKeyRequest.KeyFormat.ValueType = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["component_name", b"component_name", "format", b"format", "name", b"name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["component_name", b"component_name", "format", b"format", "name", b"name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubtleGetKeyRequest: typing_extensions.TypeAlias = SubtleGetKeyRequest +Global___SubtleGetKeyRequest: _TypeAlias = SubtleGetKeyRequest # noqa: Y015 -@typing.final -class SubtleGetKeyResponse(google.protobuf.message.Message): +@_typing.final +class SubtleGetKeyResponse(_message.Message): """SubtleGetKeyResponse is the response for SubtleGetKeyAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - PUBLIC_KEY_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + PUBLIC_KEY_FIELD_NUMBER: _builtins.int + name: _builtins.str """Name (or name/version) of the key. This is returned as response too in case there is a version. """ - public_key: builtins.str + public_key: _builtins.str """Public key, encoded in the requested format""" def __init__( self, *, - name: builtins.str = ..., - public_key: builtins.str = ..., + name: _builtins.str = ..., + public_key: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["name", b"name", "public_key", b"public_key"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["name", b"name", "public_key", b"public_key"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubtleGetKeyResponse: typing_extensions.TypeAlias = SubtleGetKeyResponse +Global___SubtleGetKeyResponse: _TypeAlias = SubtleGetKeyResponse # noqa: Y015 -@typing.final -class SubtleEncryptRequest(google.protobuf.message.Message): +@_typing.final +class SubtleEncryptRequest(_message.Message): """SubtleEncryptRequest is the request for SubtleEncryptAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - COMPONENT_NAME_FIELD_NUMBER: builtins.int - PLAINTEXT_FIELD_NUMBER: builtins.int - ALGORITHM_FIELD_NUMBER: builtins.int - KEY_NAME_FIELD_NUMBER: builtins.int - NONCE_FIELD_NUMBER: builtins.int - ASSOCIATED_DATA_FIELD_NUMBER: builtins.int - component_name: builtins.str + COMPONENT_NAME_FIELD_NUMBER: _builtins.int + PLAINTEXT_FIELD_NUMBER: _builtins.int + ALGORITHM_FIELD_NUMBER: _builtins.int + KEY_NAME_FIELD_NUMBER: _builtins.int + NONCE_FIELD_NUMBER: _builtins.int + ASSOCIATED_DATA_FIELD_NUMBER: _builtins.int + component_name: _builtins.str """Name of the component""" - plaintext: builtins.bytes + plaintext: _builtins.bytes """Message to encrypt.""" - algorithm: builtins.str + algorithm: _builtins.str """Algorithm to use, as in the JWA standard.""" - key_name: builtins.str + key_name: _builtins.str """Name (or name/version) of the key.""" - nonce: builtins.bytes + nonce: _builtins.bytes """Nonce / initialization vector. Ignored with asymmetric ciphers. """ - associated_data: builtins.bytes + associated_data: _builtins.bytes """Associated Data when using AEAD ciphers (optional).""" def __init__( self, *, - component_name: builtins.str = ..., - plaintext: builtins.bytes = ..., - algorithm: builtins.str = ..., - key_name: builtins.str = ..., - nonce: builtins.bytes = ..., - associated_data: builtins.bytes = ..., + component_name: _builtins.str = ..., + plaintext: _builtins.bytes = ..., + algorithm: _builtins.str = ..., + key_name: _builtins.str = ..., + nonce: _builtins.bytes = ..., + associated_data: _builtins.bytes = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["algorithm", b"algorithm", "associated_data", b"associated_data", "component_name", b"component_name", "key_name", b"key_name", "nonce", b"nonce", "plaintext", b"plaintext"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["algorithm", b"algorithm", "associated_data", b"associated_data", "component_name", b"component_name", "key_name", b"key_name", "nonce", b"nonce", "plaintext", b"plaintext"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubtleEncryptRequest: typing_extensions.TypeAlias = SubtleEncryptRequest +Global___SubtleEncryptRequest: _TypeAlias = SubtleEncryptRequest # noqa: Y015 -@typing.final -class SubtleEncryptResponse(google.protobuf.message.Message): +@_typing.final +class SubtleEncryptResponse(_message.Message): """SubtleEncryptResponse is the response for SubtleEncryptAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - CIPHERTEXT_FIELD_NUMBER: builtins.int - TAG_FIELD_NUMBER: builtins.int - ciphertext: builtins.bytes + CIPHERTEXT_FIELD_NUMBER: _builtins.int + TAG_FIELD_NUMBER: _builtins.int + ciphertext: _builtins.bytes """Encrypted ciphertext.""" - tag: builtins.bytes + tag: _builtins.bytes """Authentication tag. This is nil when not using an authenticated cipher. """ def __init__( self, *, - ciphertext: builtins.bytes = ..., - tag: builtins.bytes = ..., + ciphertext: _builtins.bytes = ..., + tag: _builtins.bytes = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["ciphertext", b"ciphertext", "tag", b"tag"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["ciphertext", b"ciphertext", "tag", b"tag"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubtleEncryptResponse: typing_extensions.TypeAlias = SubtleEncryptResponse +Global___SubtleEncryptResponse: _TypeAlias = SubtleEncryptResponse # noqa: Y015 -@typing.final -class SubtleDecryptRequest(google.protobuf.message.Message): +@_typing.final +class SubtleDecryptRequest(_message.Message): """SubtleDecryptRequest is the request for SubtleDecryptAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - COMPONENT_NAME_FIELD_NUMBER: builtins.int - CIPHERTEXT_FIELD_NUMBER: builtins.int - ALGORITHM_FIELD_NUMBER: builtins.int - KEY_NAME_FIELD_NUMBER: builtins.int - NONCE_FIELD_NUMBER: builtins.int - TAG_FIELD_NUMBER: builtins.int - ASSOCIATED_DATA_FIELD_NUMBER: builtins.int - component_name: builtins.str + COMPONENT_NAME_FIELD_NUMBER: _builtins.int + CIPHERTEXT_FIELD_NUMBER: _builtins.int + ALGORITHM_FIELD_NUMBER: _builtins.int + KEY_NAME_FIELD_NUMBER: _builtins.int + NONCE_FIELD_NUMBER: _builtins.int + TAG_FIELD_NUMBER: _builtins.int + ASSOCIATED_DATA_FIELD_NUMBER: _builtins.int + component_name: _builtins.str """Name of the component""" - ciphertext: builtins.bytes + ciphertext: _builtins.bytes """Message to decrypt.""" - algorithm: builtins.str + algorithm: _builtins.str """Algorithm to use, as in the JWA standard.""" - key_name: builtins.str + key_name: _builtins.str """Name (or name/version) of the key.""" - nonce: builtins.bytes + nonce: _builtins.bytes """Nonce / initialization vector. Ignored with asymmetric ciphers. """ - tag: builtins.bytes + tag: _builtins.bytes """Authentication tag. This is nil when not using an authenticated cipher. """ - associated_data: builtins.bytes + associated_data: _builtins.bytes """Associated Data when using AEAD ciphers (optional).""" def __init__( self, *, - component_name: builtins.str = ..., - ciphertext: builtins.bytes = ..., - algorithm: builtins.str = ..., - key_name: builtins.str = ..., - nonce: builtins.bytes = ..., - tag: builtins.bytes = ..., - associated_data: builtins.bytes = ..., + component_name: _builtins.str = ..., + ciphertext: _builtins.bytes = ..., + algorithm: _builtins.str = ..., + key_name: _builtins.str = ..., + nonce: _builtins.bytes = ..., + tag: _builtins.bytes = ..., + associated_data: _builtins.bytes = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["algorithm", b"algorithm", "associated_data", b"associated_data", "ciphertext", b"ciphertext", "component_name", b"component_name", "key_name", b"key_name", "nonce", b"nonce", "tag", b"tag"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["algorithm", b"algorithm", "associated_data", b"associated_data", "ciphertext", b"ciphertext", "component_name", b"component_name", "key_name", b"key_name", "nonce", b"nonce", "tag", b"tag"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubtleDecryptRequest: typing_extensions.TypeAlias = SubtleDecryptRequest +Global___SubtleDecryptRequest: _TypeAlias = SubtleDecryptRequest # noqa: Y015 -@typing.final -class SubtleDecryptResponse(google.protobuf.message.Message): +@_typing.final +class SubtleDecryptResponse(_message.Message): """SubtleDecryptResponse is the response for SubtleDecryptAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - PLAINTEXT_FIELD_NUMBER: builtins.int - plaintext: builtins.bytes + PLAINTEXT_FIELD_NUMBER: _builtins.int + plaintext: _builtins.bytes """Decrypted plaintext.""" def __init__( self, *, - plaintext: builtins.bytes = ..., + plaintext: _builtins.bytes = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["plaintext", b"plaintext"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["plaintext", b"plaintext"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubtleDecryptResponse: typing_extensions.TypeAlias = SubtleDecryptResponse +Global___SubtleDecryptResponse: _TypeAlias = SubtleDecryptResponse # noqa: Y015 -@typing.final -class SubtleWrapKeyRequest(google.protobuf.message.Message): +@_typing.final +class SubtleWrapKeyRequest(_message.Message): """SubtleWrapKeyRequest is the request for SubtleWrapKeyAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - COMPONENT_NAME_FIELD_NUMBER: builtins.int - PLAINTEXT_KEY_FIELD_NUMBER: builtins.int - ALGORITHM_FIELD_NUMBER: builtins.int - KEY_NAME_FIELD_NUMBER: builtins.int - NONCE_FIELD_NUMBER: builtins.int - ASSOCIATED_DATA_FIELD_NUMBER: builtins.int - component_name: builtins.str + COMPONENT_NAME_FIELD_NUMBER: _builtins.int + PLAINTEXT_KEY_FIELD_NUMBER: _builtins.int + ALGORITHM_FIELD_NUMBER: _builtins.int + KEY_NAME_FIELD_NUMBER: _builtins.int + NONCE_FIELD_NUMBER: _builtins.int + ASSOCIATED_DATA_FIELD_NUMBER: _builtins.int + component_name: _builtins.str """Name of the component""" - plaintext_key: builtins.bytes + plaintext_key: _builtins.bytes """Key to wrap""" - algorithm: builtins.str + algorithm: _builtins.str """Algorithm to use, as in the JWA standard.""" - key_name: builtins.str + key_name: _builtins.str """Name (or name/version) of the key.""" - nonce: builtins.bytes + nonce: _builtins.bytes """Nonce / initialization vector. Ignored with asymmetric ciphers. """ - associated_data: builtins.bytes + associated_data: _builtins.bytes """Associated Data when using AEAD ciphers (optional).""" def __init__( self, *, - component_name: builtins.str = ..., - plaintext_key: builtins.bytes = ..., - algorithm: builtins.str = ..., - key_name: builtins.str = ..., - nonce: builtins.bytes = ..., - associated_data: builtins.bytes = ..., + component_name: _builtins.str = ..., + plaintext_key: _builtins.bytes = ..., + algorithm: _builtins.str = ..., + key_name: _builtins.str = ..., + nonce: _builtins.bytes = ..., + associated_data: _builtins.bytes = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["algorithm", b"algorithm", "associated_data", b"associated_data", "component_name", b"component_name", "key_name", b"key_name", "nonce", b"nonce", "plaintext_key", b"plaintext_key"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["algorithm", b"algorithm", "associated_data", b"associated_data", "component_name", b"component_name", "key_name", b"key_name", "nonce", b"nonce", "plaintext_key", b"plaintext_key"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubtleWrapKeyRequest: typing_extensions.TypeAlias = SubtleWrapKeyRequest +Global___SubtleWrapKeyRequest: _TypeAlias = SubtleWrapKeyRequest # noqa: Y015 -@typing.final -class SubtleWrapKeyResponse(google.protobuf.message.Message): +@_typing.final +class SubtleWrapKeyResponse(_message.Message): """SubtleWrapKeyResponse is the response for SubtleWrapKeyAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - WRAPPED_KEY_FIELD_NUMBER: builtins.int - TAG_FIELD_NUMBER: builtins.int - wrapped_key: builtins.bytes + WRAPPED_KEY_FIELD_NUMBER: _builtins.int + TAG_FIELD_NUMBER: _builtins.int + wrapped_key: _builtins.bytes """Wrapped key.""" - tag: builtins.bytes + tag: _builtins.bytes """Authentication tag. This is nil when not using an authenticated cipher. """ def __init__( self, *, - wrapped_key: builtins.bytes = ..., - tag: builtins.bytes = ..., + wrapped_key: _builtins.bytes = ..., + tag: _builtins.bytes = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["tag", b"tag", "wrapped_key", b"wrapped_key"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["tag", b"tag", "wrapped_key", b"wrapped_key"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubtleWrapKeyResponse: typing_extensions.TypeAlias = SubtleWrapKeyResponse +Global___SubtleWrapKeyResponse: _TypeAlias = SubtleWrapKeyResponse # noqa: Y015 -@typing.final -class SubtleUnwrapKeyRequest(google.protobuf.message.Message): +@_typing.final +class SubtleUnwrapKeyRequest(_message.Message): """SubtleUnwrapKeyRequest is the request for SubtleUnwrapKeyAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - COMPONENT_NAME_FIELD_NUMBER: builtins.int - WRAPPED_KEY_FIELD_NUMBER: builtins.int - ALGORITHM_FIELD_NUMBER: builtins.int - KEY_NAME_FIELD_NUMBER: builtins.int - NONCE_FIELD_NUMBER: builtins.int - TAG_FIELD_NUMBER: builtins.int - ASSOCIATED_DATA_FIELD_NUMBER: builtins.int - component_name: builtins.str + COMPONENT_NAME_FIELD_NUMBER: _builtins.int + WRAPPED_KEY_FIELD_NUMBER: _builtins.int + ALGORITHM_FIELD_NUMBER: _builtins.int + KEY_NAME_FIELD_NUMBER: _builtins.int + NONCE_FIELD_NUMBER: _builtins.int + TAG_FIELD_NUMBER: _builtins.int + ASSOCIATED_DATA_FIELD_NUMBER: _builtins.int + component_name: _builtins.str """Name of the component""" - wrapped_key: builtins.bytes + wrapped_key: _builtins.bytes """Wrapped key.""" - algorithm: builtins.str + algorithm: _builtins.str """Algorithm to use, as in the JWA standard.""" - key_name: builtins.str + key_name: _builtins.str """Name (or name/version) of the key.""" - nonce: builtins.bytes + nonce: _builtins.bytes """Nonce / initialization vector. Ignored with asymmetric ciphers. """ - tag: builtins.bytes + tag: _builtins.bytes """Authentication tag. This is nil when not using an authenticated cipher. """ - associated_data: builtins.bytes + associated_data: _builtins.bytes """Associated Data when using AEAD ciphers (optional).""" def __init__( self, *, - component_name: builtins.str = ..., - wrapped_key: builtins.bytes = ..., - algorithm: builtins.str = ..., - key_name: builtins.str = ..., - nonce: builtins.bytes = ..., - tag: builtins.bytes = ..., - associated_data: builtins.bytes = ..., + component_name: _builtins.str = ..., + wrapped_key: _builtins.bytes = ..., + algorithm: _builtins.str = ..., + key_name: _builtins.str = ..., + nonce: _builtins.bytes = ..., + tag: _builtins.bytes = ..., + associated_data: _builtins.bytes = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["algorithm", b"algorithm", "associated_data", b"associated_data", "component_name", b"component_name", "key_name", b"key_name", "nonce", b"nonce", "tag", b"tag", "wrapped_key", b"wrapped_key"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["algorithm", b"algorithm", "associated_data", b"associated_data", "component_name", b"component_name", "key_name", b"key_name", "nonce", b"nonce", "tag", b"tag", "wrapped_key", b"wrapped_key"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubtleUnwrapKeyRequest: typing_extensions.TypeAlias = SubtleUnwrapKeyRequest +Global___SubtleUnwrapKeyRequest: _TypeAlias = SubtleUnwrapKeyRequest # noqa: Y015 -@typing.final -class SubtleUnwrapKeyResponse(google.protobuf.message.Message): +@_typing.final +class SubtleUnwrapKeyResponse(_message.Message): """SubtleUnwrapKeyResponse is the response for SubtleUnwrapKeyAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - PLAINTEXT_KEY_FIELD_NUMBER: builtins.int - plaintext_key: builtins.bytes + PLAINTEXT_KEY_FIELD_NUMBER: _builtins.int + plaintext_key: _builtins.bytes """Key in plaintext""" def __init__( self, *, - plaintext_key: builtins.bytes = ..., + plaintext_key: _builtins.bytes = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["plaintext_key", b"plaintext_key"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["plaintext_key", b"plaintext_key"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubtleUnwrapKeyResponse: typing_extensions.TypeAlias = SubtleUnwrapKeyResponse +Global___SubtleUnwrapKeyResponse: _TypeAlias = SubtleUnwrapKeyResponse # noqa: Y015 -@typing.final -class SubtleSignRequest(google.protobuf.message.Message): +@_typing.final +class SubtleSignRequest(_message.Message): """SubtleSignRequest is the request for SubtleSignAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - COMPONENT_NAME_FIELD_NUMBER: builtins.int - DIGEST_FIELD_NUMBER: builtins.int - ALGORITHM_FIELD_NUMBER: builtins.int - KEY_NAME_FIELD_NUMBER: builtins.int - component_name: builtins.str + COMPONENT_NAME_FIELD_NUMBER: _builtins.int + DIGEST_FIELD_NUMBER: _builtins.int + ALGORITHM_FIELD_NUMBER: _builtins.int + KEY_NAME_FIELD_NUMBER: _builtins.int + component_name: _builtins.str """Name of the component""" - digest: builtins.bytes + digest: _builtins.bytes """Digest to sign.""" - algorithm: builtins.str + algorithm: _builtins.str """Algorithm to use, as in the JWA standard.""" - key_name: builtins.str + key_name: _builtins.str """Name (or name/version) of the key.""" def __init__( self, *, - component_name: builtins.str = ..., - digest: builtins.bytes = ..., - algorithm: builtins.str = ..., - key_name: builtins.str = ..., + component_name: _builtins.str = ..., + digest: _builtins.bytes = ..., + algorithm: _builtins.str = ..., + key_name: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["algorithm", b"algorithm", "component_name", b"component_name", "digest", b"digest", "key_name", b"key_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["algorithm", b"algorithm", "component_name", b"component_name", "digest", b"digest", "key_name", b"key_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubtleSignRequest: typing_extensions.TypeAlias = SubtleSignRequest +Global___SubtleSignRequest: _TypeAlias = SubtleSignRequest # noqa: Y015 -@typing.final -class SubtleSignResponse(google.protobuf.message.Message): +@_typing.final +class SubtleSignResponse(_message.Message): """SubtleSignResponse is the response for SubtleSignAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - SIGNATURE_FIELD_NUMBER: builtins.int - signature: builtins.bytes + SIGNATURE_FIELD_NUMBER: _builtins.int + signature: _builtins.bytes """The signature that was computed""" def __init__( self, *, - signature: builtins.bytes = ..., + signature: _builtins.bytes = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["signature", b"signature"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["signature", b"signature"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubtleSignResponse: typing_extensions.TypeAlias = SubtleSignResponse +Global___SubtleSignResponse: _TypeAlias = SubtleSignResponse # noqa: Y015 -@typing.final -class SubtleVerifyRequest(google.protobuf.message.Message): +@_typing.final +class SubtleVerifyRequest(_message.Message): """SubtleVerifyRequest is the request for SubtleVerifyAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - COMPONENT_NAME_FIELD_NUMBER: builtins.int - DIGEST_FIELD_NUMBER: builtins.int - ALGORITHM_FIELD_NUMBER: builtins.int - KEY_NAME_FIELD_NUMBER: builtins.int - SIGNATURE_FIELD_NUMBER: builtins.int - component_name: builtins.str + COMPONENT_NAME_FIELD_NUMBER: _builtins.int + DIGEST_FIELD_NUMBER: _builtins.int + ALGORITHM_FIELD_NUMBER: _builtins.int + KEY_NAME_FIELD_NUMBER: _builtins.int + SIGNATURE_FIELD_NUMBER: _builtins.int + component_name: _builtins.str """Name of the component""" - digest: builtins.bytes + digest: _builtins.bytes """Digest of the message.""" - algorithm: builtins.str + algorithm: _builtins.str """Algorithm to use, as in the JWA standard.""" - key_name: builtins.str + key_name: _builtins.str """Name (or name/version) of the key.""" - signature: builtins.bytes + signature: _builtins.bytes """Signature to verify.""" def __init__( self, *, - component_name: builtins.str = ..., - digest: builtins.bytes = ..., - algorithm: builtins.str = ..., - key_name: builtins.str = ..., - signature: builtins.bytes = ..., + component_name: _builtins.str = ..., + digest: _builtins.bytes = ..., + algorithm: _builtins.str = ..., + key_name: _builtins.str = ..., + signature: _builtins.bytes = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["algorithm", b"algorithm", "component_name", b"component_name", "digest", b"digest", "key_name", b"key_name", "signature", b"signature"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["algorithm", b"algorithm", "component_name", b"component_name", "digest", b"digest", "key_name", b"key_name", "signature", b"signature"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubtleVerifyRequest: typing_extensions.TypeAlias = SubtleVerifyRequest +Global___SubtleVerifyRequest: _TypeAlias = SubtleVerifyRequest # noqa: Y015 -@typing.final -class SubtleVerifyResponse(google.protobuf.message.Message): +@_typing.final +class SubtleVerifyResponse(_message.Message): """SubtleVerifyResponse is the response for SubtleVerifyAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - VALID_FIELD_NUMBER: builtins.int - valid: builtins.bool + VALID_FIELD_NUMBER: _builtins.int + valid: _builtins.bool """True if the signature is valid.""" def __init__( self, *, - valid: builtins.bool = ..., + valid: _builtins.bool = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["valid", b"valid"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["valid", b"valid"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubtleVerifyResponse: typing_extensions.TypeAlias = SubtleVerifyResponse +Global___SubtleVerifyResponse: _TypeAlias = SubtleVerifyResponse # noqa: Y015 -@typing.final -class EncryptRequest(google.protobuf.message.Message): +@_typing.final +class EncryptRequest(_message.Message): """EncryptRequest is the request for EncryptAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - OPTIONS_FIELD_NUMBER: builtins.int - PAYLOAD_FIELD_NUMBER: builtins.int - @property + OPTIONS_FIELD_NUMBER: _builtins.int + PAYLOAD_FIELD_NUMBER: _builtins.int + @_builtins.property def options(self) -> Global___EncryptRequestOptions: """Request details. Must be present in the first message only.""" - @property - def payload(self) -> dapr.proto.common.v1.common_pb2.StreamPayload: + @_builtins.property + def payload(self) -> _common_pb2.StreamPayload: """Chunk of data of arbitrary size.""" def __init__( self, *, options: Global___EncryptRequestOptions | None = ..., - payload: dapr.proto.common.v1.common_pb2.StreamPayload | None = ..., + payload: _common_pb2.StreamPayload | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["options", b"options", "payload", b"payload"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["options", b"options", "payload", b"payload"] + _HasFieldArgType: _TypeAlias = _typing.Literal["options", b"options", "payload", b"payload"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["options", b"options", "payload", b"payload"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___EncryptRequest: typing_extensions.TypeAlias = EncryptRequest +Global___EncryptRequest: _TypeAlias = EncryptRequest # noqa: Y015 -@typing.final -class EncryptRequestOptions(google.protobuf.message.Message): +@_typing.final +class EncryptRequestOptions(_message.Message): """EncryptRequestOptions contains options for the first message in the EncryptAlpha1 request.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - COMPONENT_NAME_FIELD_NUMBER: builtins.int - KEY_NAME_FIELD_NUMBER: builtins.int - KEY_WRAP_ALGORITHM_FIELD_NUMBER: builtins.int - DATA_ENCRYPTION_CIPHER_FIELD_NUMBER: builtins.int - OMIT_DECRYPTION_KEY_NAME_FIELD_NUMBER: builtins.int - DECRYPTION_KEY_NAME_FIELD_NUMBER: builtins.int - component_name: builtins.str + COMPONENT_NAME_FIELD_NUMBER: _builtins.int + KEY_NAME_FIELD_NUMBER: _builtins.int + KEY_WRAP_ALGORITHM_FIELD_NUMBER: _builtins.int + DATA_ENCRYPTION_CIPHER_FIELD_NUMBER: _builtins.int + OMIT_DECRYPTION_KEY_NAME_FIELD_NUMBER: _builtins.int + DECRYPTION_KEY_NAME_FIELD_NUMBER: _builtins.int + component_name: _builtins.str """Name of the component. Required.""" - key_name: builtins.str + key_name: _builtins.str """Name (or name/version) of the key. Required.""" - key_wrap_algorithm: builtins.str + key_wrap_algorithm: _builtins.str """Key wrapping algorithm to use. Required. Supported options include: A256KW (alias: AES), A128CBC, A192CBC, A256CBC, RSA-OAEP-256 (alias: RSA). """ - data_encryption_cipher: builtins.str + data_encryption_cipher: _builtins.str """Cipher used to encrypt data (optional): "aes-gcm" (default) or "chacha20-poly1305" """ - omit_decryption_key_name: builtins.bool + omit_decryption_key_name: _builtins.bool """If true, the encrypted document does not contain a key reference. In that case, calls to the Decrypt method must provide a key reference (name or name/version). Defaults to false. """ - decryption_key_name: builtins.str + decryption_key_name: _builtins.str """Key reference to embed in the encrypted document (name or name/version). This is helpful if the reference of the key used to decrypt the document is different from the one used to encrypt it. If unset, uses the reference of the key used to encrypt the document (this is the default behavior). @@ -531,81 +531,81 @@ class EncryptRequestOptions(google.protobuf.message.Message): def __init__( self, *, - component_name: builtins.str = ..., - key_name: builtins.str = ..., - key_wrap_algorithm: builtins.str = ..., - data_encryption_cipher: builtins.str = ..., - omit_decryption_key_name: builtins.bool = ..., - decryption_key_name: builtins.str = ..., + component_name: _builtins.str = ..., + key_name: _builtins.str = ..., + key_wrap_algorithm: _builtins.str = ..., + data_encryption_cipher: _builtins.str = ..., + omit_decryption_key_name: _builtins.bool = ..., + decryption_key_name: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["component_name", b"component_name", "data_encryption_cipher", b"data_encryption_cipher", "decryption_key_name", b"decryption_key_name", "key_name", b"key_name", "key_wrap_algorithm", b"key_wrap_algorithm", "omit_decryption_key_name", b"omit_decryption_key_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["component_name", b"component_name", "data_encryption_cipher", b"data_encryption_cipher", "decryption_key_name", b"decryption_key_name", "key_name", b"key_name", "key_wrap_algorithm", b"key_wrap_algorithm", "omit_decryption_key_name", b"omit_decryption_key_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___EncryptRequestOptions: typing_extensions.TypeAlias = EncryptRequestOptions +Global___EncryptRequestOptions: _TypeAlias = EncryptRequestOptions # noqa: Y015 -@typing.final -class EncryptResponse(google.protobuf.message.Message): +@_typing.final +class EncryptResponse(_message.Message): """EncryptResponse is the response for EncryptAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - PAYLOAD_FIELD_NUMBER: builtins.int - @property - def payload(self) -> dapr.proto.common.v1.common_pb2.StreamPayload: + PAYLOAD_FIELD_NUMBER: _builtins.int + @_builtins.property + def payload(self) -> _common_pb2.StreamPayload: """Chunk of data.""" def __init__( self, *, - payload: dapr.proto.common.v1.common_pb2.StreamPayload | None = ..., + payload: _common_pb2.StreamPayload | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["payload", b"payload"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["payload", b"payload"] + _HasFieldArgType: _TypeAlias = _typing.Literal["payload", b"payload"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["payload", b"payload"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___EncryptResponse: typing_extensions.TypeAlias = EncryptResponse +Global___EncryptResponse: _TypeAlias = EncryptResponse # noqa: Y015 -@typing.final -class DecryptRequest(google.protobuf.message.Message): +@_typing.final +class DecryptRequest(_message.Message): """DecryptRequest is the request for DecryptAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - OPTIONS_FIELD_NUMBER: builtins.int - PAYLOAD_FIELD_NUMBER: builtins.int - @property + OPTIONS_FIELD_NUMBER: _builtins.int + PAYLOAD_FIELD_NUMBER: _builtins.int + @_builtins.property def options(self) -> Global___DecryptRequestOptions: """Request details. Must be present in the first message only.""" - @property - def payload(self) -> dapr.proto.common.v1.common_pb2.StreamPayload: + @_builtins.property + def payload(self) -> _common_pb2.StreamPayload: """Chunk of data of arbitrary size.""" def __init__( self, *, options: Global___DecryptRequestOptions | None = ..., - payload: dapr.proto.common.v1.common_pb2.StreamPayload | None = ..., + payload: _common_pb2.StreamPayload | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["options", b"options", "payload", b"payload"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["options", b"options", "payload", b"payload"] + _HasFieldArgType: _TypeAlias = _typing.Literal["options", b"options", "payload", b"payload"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["options", b"options", "payload", b"payload"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___DecryptRequest: typing_extensions.TypeAlias = DecryptRequest +Global___DecryptRequest: _TypeAlias = DecryptRequest # noqa: Y015 -@typing.final -class DecryptRequestOptions(google.protobuf.message.Message): +@_typing.final +class DecryptRequestOptions(_message.Message): """DecryptRequestOptions contains options for the first message in the DecryptAlpha1 request.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - COMPONENT_NAME_FIELD_NUMBER: builtins.int - KEY_NAME_FIELD_NUMBER: builtins.int - component_name: builtins.str + COMPONENT_NAME_FIELD_NUMBER: _builtins.int + KEY_NAME_FIELD_NUMBER: _builtins.int + component_name: _builtins.str """Name of the component""" - key_name: builtins.str + key_name: _builtins.str """Name (or name/version) of the key to decrypt the message. Overrides any key reference included in the message if present. This is required if the message doesn't include a key reference (i.e. was created with omit_decryption_key_name set to true). @@ -613,33 +613,33 @@ class DecryptRequestOptions(google.protobuf.message.Message): def __init__( self, *, - component_name: builtins.str = ..., - key_name: builtins.str = ..., + component_name: _builtins.str = ..., + key_name: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["component_name", b"component_name", "key_name", b"key_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["component_name", b"component_name", "key_name", b"key_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___DecryptRequestOptions: typing_extensions.TypeAlias = DecryptRequestOptions +Global___DecryptRequestOptions: _TypeAlias = DecryptRequestOptions # noqa: Y015 -@typing.final -class DecryptResponse(google.protobuf.message.Message): +@_typing.final +class DecryptResponse(_message.Message): """DecryptResponse is the response for DecryptAlpha1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - PAYLOAD_FIELD_NUMBER: builtins.int - @property - def payload(self) -> dapr.proto.common.v1.common_pb2.StreamPayload: + PAYLOAD_FIELD_NUMBER: _builtins.int + @_builtins.property + def payload(self) -> _common_pb2.StreamPayload: """Chunk of data.""" def __init__( self, *, - payload: dapr.proto.common.v1.common_pb2.StreamPayload | None = ..., + payload: _common_pb2.StreamPayload | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["payload", b"payload"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["payload", b"payload"] + _HasFieldArgType: _TypeAlias = _typing.Literal["payload", b"payload"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["payload", b"payload"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___DecryptResponse: typing_extensions.TypeAlias = DecryptResponse +Global___DecryptResponse: _TypeAlias = DecryptResponse # noqa: Y015 diff --git a/dapr/proto/runtime/v1/dapr_pb2.pyi b/dapr/proto/runtime/v1/dapr_pb2.pyi index 7f4b953dd..1fb71704b 100644 --- a/dapr/proto/runtime/v1/dapr_pb2.pyi +++ b/dapr/proto/runtime/v1/dapr_pb2.pyi @@ -14,28 +14,28 @@ See the License for the specific language governing permissions and limitations under the License. """ -import google.protobuf.descriptor -import google.protobuf.message +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class ShutdownRequest(google.protobuf.message.Message): +@_typing.final +class ShutdownRequest(_message.Message): """ShutdownRequest is the request for Shutdown. Empty """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor def __init__( self, ) -> None: ... -Global___ShutdownRequest: typing_extensions.TypeAlias = ShutdownRequest +Global___ShutdownRequest: _TypeAlias = ShutdownRequest # noqa: Y015 diff --git a/dapr/proto/runtime/v1/invoke_pb2.py b/dapr/proto/runtime/v1/invoke_pb2.py index 56fc5c71f..c52d7c4ea 100644 --- a/dapr/proto/runtime/v1/invoke_pb2.py +++ b/dapr/proto/runtime/v1/invoke_pb2.py @@ -25,14 +25,14 @@ from dapr.proto.common.v1 import common_pb2 as dapr_dot_proto_dot_common_dot_v1_dot_common__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"dapr/proto/runtime/v1/invoke.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a!dapr/proto/common/v1/common.proto\"X\n\x14InvokeServiceRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x34\n\x07message\x18\x03 \x01(\x0b\x32#.dapr.proto.common.v1.InvokeRequestBi\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"dapr/proto/runtime/v1/invoke.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a!dapr/proto/common/v1/common.proto\"X\n\x14InvokeServiceRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x34\n\x07message\x18\x03 \x01(\x0b\x32#.dapr.proto.common.v1.InvokeRequestBo\n\nio.dapr.v1B\x10\x44\x61prInvokeProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dapr.proto.runtime.v1.invoke_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' + _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\020DaprInvokeProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' _globals['_INVOKESERVICEREQUEST']._serialized_start=96 _globals['_INVOKESERVICEREQUEST']._serialized_end=184 # @@protoc_insertion_point(module_scope) diff --git a/dapr/proto/runtime/v1/invoke_pb2.pyi b/dapr/proto/runtime/v1/invoke_pb2.pyi index 35da245f5..56533dbea 100644 --- a/dapr/proto/runtime/v1/invoke_pb2.pyi +++ b/dapr/proto/runtime/v1/invoke_pb2.pyi @@ -14,43 +14,43 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import dapr.proto.common.v1.common_pb2 -import google.protobuf.descriptor -import google.protobuf.message +from dapr.proto.common.v1 import common_pb2 as _common_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class InvokeServiceRequest(google.protobuf.message.Message): +@_typing.final +class InvokeServiceRequest(_message.Message): """InvokeServiceRequest represents the request message for Service invocation.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ID_FIELD_NUMBER: builtins.int - MESSAGE_FIELD_NUMBER: builtins.int - id: builtins.str + ID_FIELD_NUMBER: _builtins.int + MESSAGE_FIELD_NUMBER: _builtins.int + id: _builtins.str """Required. Callee's app id.""" - @property - def message(self) -> dapr.proto.common.v1.common_pb2.InvokeRequest: + @_builtins.property + def message(self) -> _common_pb2.InvokeRequest: """Required. message which will be delivered to callee.""" def __init__( self, *, - id: builtins.str = ..., - message: dapr.proto.common.v1.common_pb2.InvokeRequest | None = ..., + id: _builtins.str = ..., + message: _common_pb2.InvokeRequest | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["message", b"message"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["id", b"id", "message", b"message"] + _HasFieldArgType: _TypeAlias = _typing.Literal["message", b"message"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["id", b"id", "message", b"message"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___InvokeServiceRequest: typing_extensions.TypeAlias = InvokeServiceRequest +Global___InvokeServiceRequest: _TypeAlias = InvokeServiceRequest # noqa: Y015 diff --git a/dapr/proto/runtime/v1/jobs_pb2.py b/dapr/proto/runtime/v1/jobs_pb2.py index 04d358e74..0631950db 100644 --- a/dapr/proto/runtime/v1/jobs_pb2.py +++ b/dapr/proto/runtime/v1/jobs_pb2.py @@ -26,14 +26,14 @@ from dapr.proto.common.v1 import common_pb2 as dapr_dot_proto_dot_common_dot_v1_dot_common__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n dapr/proto/runtime/v1/jobs.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\x19google/protobuf/any.proto\x1a!dapr/proto/common/v1/common.proto\"\xcf\x02\n\x03Job\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1f\n\x08schedule\x18\x02 \x01(\tH\x00R\x08schedule\x88\x01\x01\x12\x1d\n\x07repeats\x18\x03 \x01(\rH\x01R\x07repeats\x88\x01\x01\x12\x1e\n\x08\x64ue_time\x18\x04 \x01(\tH\x02R\x07\x64ueTime\x88\x01\x01\x12\x15\n\x03ttl\x18\x05 \x01(\tH\x03R\x03ttl\x88\x01\x01\x12(\n\x04\x64\x61ta\x18\x06 \x01(\x0b\x32\x14.google.protobuf.AnyR\x04\x64\x61ta\x12R\n\x0e\x66\x61ilure_policy\x18\x07 \x01(\x0b\x32&.dapr.proto.common.v1.JobFailurePolicyH\x04R\rfailurePolicy\x88\x01\x01\x42\x0b\n\t_scheduleB\n\n\x08_repeatsB\x0b\n\t_due_timeB\x06\n\x04_ttlB\x11\n\x0f_failure_policy\"[\n\x12ScheduleJobRequest\x12\'\n\x03job\x18\x01 \x01(\x0b\x32\x1a.dapr.proto.runtime.v1.Job\x12\x1c\n\toverwrite\x18\x02 \x01(\x08R\toverwrite\"\x15\n\x13ScheduleJobResponse\"\x1d\n\rGetJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"9\n\x0eGetJobResponse\x12\'\n\x03job\x18\x01 \x01(\x0b\x32\x1a.dapr.proto.runtime.v1.Job\" \n\x10\x44\x65leteJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x13\n\x11\x44\x65leteJobResponse\"K\n\x1f\x44\x65leteJobsByPrefixRequestAlpha1\x12\x18\n\x0bname_prefix\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_name_prefix\"\"\n DeleteJobsByPrefixResponseAlpha1\"\x17\n\x15ListJobsRequestAlpha1\"B\n\x16ListJobsResponseAlpha1\x12(\n\x04jobs\x18\x01 \x03(\x0b\x32\x1a.dapr.proto.runtime.v1.JobBi\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n dapr/proto/runtime/v1/jobs.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\x19google/protobuf/any.proto\x1a!dapr/proto/common/v1/common.proto\"\xcf\x02\n\x03Job\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1f\n\x08schedule\x18\x02 \x01(\tH\x00R\x08schedule\x88\x01\x01\x12\x1d\n\x07repeats\x18\x03 \x01(\rH\x01R\x07repeats\x88\x01\x01\x12\x1e\n\x08\x64ue_time\x18\x04 \x01(\tH\x02R\x07\x64ueTime\x88\x01\x01\x12\x15\n\x03ttl\x18\x05 \x01(\tH\x03R\x03ttl\x88\x01\x01\x12(\n\x04\x64\x61ta\x18\x06 \x01(\x0b\x32\x14.google.protobuf.AnyR\x04\x64\x61ta\x12R\n\x0e\x66\x61ilure_policy\x18\x07 \x01(\x0b\x32&.dapr.proto.common.v1.JobFailurePolicyH\x04R\rfailurePolicy\x88\x01\x01\x42\x0b\n\t_scheduleB\n\n\x08_repeatsB\x0b\n\t_due_timeB\x06\n\x04_ttlB\x11\n\x0f_failure_policy\"[\n\x12ScheduleJobRequest\x12\'\n\x03job\x18\x01 \x01(\x0b\x32\x1a.dapr.proto.runtime.v1.Job\x12\x1c\n\toverwrite\x18\x02 \x01(\x08R\toverwrite\"\x15\n\x13ScheduleJobResponse\"\x1d\n\rGetJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"9\n\x0eGetJobResponse\x12\'\n\x03job\x18\x01 \x01(\x0b\x32\x1a.dapr.proto.runtime.v1.Job\" \n\x10\x44\x65leteJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x13\n\x11\x44\x65leteJobResponse\"K\n\x1f\x44\x65leteJobsByPrefixRequestAlpha1\x12\x18\n\x0bname_prefix\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_name_prefix\"\"\n DeleteJobsByPrefixResponseAlpha1\"\x17\n\x15ListJobsRequestAlpha1\"B\n\x16ListJobsResponseAlpha1\x12(\n\x04jobs\x18\x01 \x03(\x0b\x32\x1a.dapr.proto.runtime.v1.JobBm\n\nio.dapr.v1B\x0e\x44\x61prJobsProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dapr.proto.runtime.v1.jobs_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' + _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\016DaprJobsProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' _globals['_JOB']._serialized_start=122 _globals['_JOB']._serialized_end=457 _globals['_SCHEDULEJOBREQUEST']._serialized_start=459 diff --git a/dapr/proto/runtime/v1/jobs_pb2.pyi b/dapr/proto/runtime/v1/jobs_pb2.pyi index 10a580460..20a7ab795 100644 --- a/dapr/proto/runtime/v1/jobs_pb2.pyi +++ b/dapr/proto/runtime/v1/jobs_pb2.pyi @@ -14,41 +14,41 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import dapr.proto.common.v1.common_pb2 -import google.protobuf.any_pb2 -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.message +from collections import abc as _abc +from dapr.proto.common.v1 import common_pb2 as _common_pb2 +from google.protobuf import any_pb2 as _any_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class Job(google.protobuf.message.Message): +@_typing.final +class Job(_message.Message): """Job is the definition of a job. At least one of schedule or due_time must be provided but can also be provided together. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - SCHEDULE_FIELD_NUMBER: builtins.int - REPEATS_FIELD_NUMBER: builtins.int - DUE_TIME_FIELD_NUMBER: builtins.int - TTL_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - FAILURE_POLICY_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + SCHEDULE_FIELD_NUMBER: _builtins.int + REPEATS_FIELD_NUMBER: _builtins.int + DUE_TIME_FIELD_NUMBER: _builtins.int + TTL_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + FAILURE_POLICY_FIELD_NUMBER: _builtins.int + name: _builtins.str """The unique name for the job.""" - schedule: builtins.str + schedule: _builtins.str """schedule is an optional schedule at which the job is to be run. Accepts both systemd timer style cron expressions, as well as human readable '@' prefixed period strings as defined below. @@ -70,80 +70,80 @@ class Job(google.protobuf.message.Message): @daily (or @midnight) | Run once a day, midnight | 0 0 0 * * * @hourly | Run once an hour, beginning of hour | 0 0 * * * * """ - repeats: builtins.int + repeats: _builtins.int """repeats is the optional number of times in which the job should be triggered. If not set, the job will run indefinitely or until expiration. """ - due_time: builtins.str + due_time: _builtins.str """due_time is the optional time at which the job should be active, or the "one shot" time if other scheduling type fields are not provided. Accepts a "point in time" string in the format of RFC3339, Go duration string (calculated from job creation time), or non-repeating ISO8601. """ - ttl: builtins.str + ttl: _builtins.str """ttl is the optional time to live or expiration of the job. Accepts a "point in time" string in the format of RFC3339, Go duration string (calculated from job creation time), or non-repeating ISO8601. """ - @property - def data(self) -> google.protobuf.any_pb2.Any: + @_builtins.property + def data(self) -> _any_pb2.Any: """payload is the serialized job payload that will be sent to the recipient when the job is triggered. """ - @property - def failure_policy(self) -> dapr.proto.common.v1.common_pb2.JobFailurePolicy: + @_builtins.property + def failure_policy(self) -> _common_pb2.JobFailurePolicy: """failure_policy is the optional policy for handling job failures.""" def __init__( self, *, - name: builtins.str = ..., - schedule: builtins.str | None = ..., - repeats: builtins.int | None = ..., - due_time: builtins.str | None = ..., - ttl: builtins.str | None = ..., - data: google.protobuf.any_pb2.Any | None = ..., - failure_policy: dapr.proto.common.v1.common_pb2.JobFailurePolicy | None = ..., + name: _builtins.str = ..., + schedule: _builtins.str | None = ..., + repeats: _builtins.int | None = ..., + due_time: _builtins.str | None = ..., + ttl: _builtins.str | None = ..., + data: _any_pb2.Any | None = ..., + failure_policy: _common_pb2.JobFailurePolicy | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_due_time", b"_due_time", "_failure_policy", b"_failure_policy", "_repeats", b"_repeats", "_schedule", b"_schedule", "_ttl", b"_ttl", "data", b"data", "due_time", b"due_time", "failure_policy", b"failure_policy", "repeats", b"repeats", "schedule", b"schedule", "ttl", b"ttl"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_due_time", b"_due_time", "_failure_policy", b"_failure_policy", "_repeats", b"_repeats", "_schedule", b"_schedule", "_ttl", b"_ttl", "data", b"data", "due_time", b"due_time", "failure_policy", b"failure_policy", "name", b"name", "repeats", b"repeats", "schedule", b"schedule", "ttl", b"ttl"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_due_time", b"_due_time", "_failure_policy", b"_failure_policy", "_repeats", b"_repeats", "_schedule", b"_schedule", "_ttl", b"_ttl", "data", b"data", "due_time", b"due_time", "failure_policy", b"failure_policy", "repeats", b"repeats", "schedule", b"schedule", "ttl", b"ttl"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_due_time", b"_due_time", "_failure_policy", b"_failure_policy", "_repeats", b"_repeats", "_schedule", b"_schedule", "_ttl", b"_ttl", "data", b"data", "due_time", b"due_time", "failure_policy", b"failure_policy", "name", b"name", "repeats", b"repeats", "schedule", b"schedule", "ttl", b"ttl"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__due_time: typing_extensions.TypeAlias = typing.Literal["due_time"] - _WhichOneofArgType__due_time: typing_extensions.TypeAlias = typing.Literal["_due_time", b"_due_time"] - _WhichOneofReturnType__failure_policy: typing_extensions.TypeAlias = typing.Literal["failure_policy"] - _WhichOneofArgType__failure_policy: typing_extensions.TypeAlias = typing.Literal["_failure_policy", b"_failure_policy"] - _WhichOneofReturnType__repeats: typing_extensions.TypeAlias = typing.Literal["repeats"] - _WhichOneofArgType__repeats: typing_extensions.TypeAlias = typing.Literal["_repeats", b"_repeats"] - _WhichOneofReturnType__schedule: typing_extensions.TypeAlias = typing.Literal["schedule"] - _WhichOneofArgType__schedule: typing_extensions.TypeAlias = typing.Literal["_schedule", b"_schedule"] - _WhichOneofReturnType__ttl: typing_extensions.TypeAlias = typing.Literal["ttl"] - _WhichOneofArgType__ttl: typing_extensions.TypeAlias = typing.Literal["_ttl", b"_ttl"] - @typing.overload + _WhichOneofReturnType__due_time: _TypeAlias = _typing.Literal["due_time"] # noqa: Y015 + _WhichOneofArgType__due_time: _TypeAlias = _typing.Literal["_due_time", b"_due_time"] # noqa: Y015 + _WhichOneofReturnType__failure_policy: _TypeAlias = _typing.Literal["failure_policy"] # noqa: Y015 + _WhichOneofArgType__failure_policy: _TypeAlias = _typing.Literal["_failure_policy", b"_failure_policy"] # noqa: Y015 + _WhichOneofReturnType__repeats: _TypeAlias = _typing.Literal["repeats"] # noqa: Y015 + _WhichOneofArgType__repeats: _TypeAlias = _typing.Literal["_repeats", b"_repeats"] # noqa: Y015 + _WhichOneofReturnType__schedule: _TypeAlias = _typing.Literal["schedule"] # noqa: Y015 + _WhichOneofArgType__schedule: _TypeAlias = _typing.Literal["_schedule", b"_schedule"] # noqa: Y015 + _WhichOneofReturnType__ttl: _TypeAlias = _typing.Literal["ttl"] # noqa: Y015 + _WhichOneofArgType__ttl: _TypeAlias = _typing.Literal["_ttl", b"_ttl"] # noqa: Y015 + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__due_time) -> _WhichOneofReturnType__due_time | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__failure_policy) -> _WhichOneofReturnType__failure_policy | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__repeats) -> _WhichOneofReturnType__repeats | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__schedule) -> _WhichOneofReturnType__schedule | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__ttl) -> _WhichOneofReturnType__ttl | None: ... -Global___Job: typing_extensions.TypeAlias = Job +Global___Job: _TypeAlias = Job # noqa: Y015 -@typing.final -class ScheduleJobRequest(google.protobuf.message.Message): +@_typing.final +class ScheduleJobRequest(_message.Message): """ScheduleJobRequest is the message to create/schedule the job.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - JOB_FIELD_NUMBER: builtins.int - OVERWRITE_FIELD_NUMBER: builtins.int - overwrite: builtins.bool + JOB_FIELD_NUMBER: _builtins.int + OVERWRITE_FIELD_NUMBER: _builtins.int + overwrite: _builtins.bool """If true, allows this job to overwrite an existing job with the same name.""" - @property + @_builtins.property def job(self) -> Global___Job: """The job details.""" @@ -151,56 +151,56 @@ class ScheduleJobRequest(google.protobuf.message.Message): self, *, job: Global___Job | None = ..., - overwrite: builtins.bool = ..., + overwrite: _builtins.bool = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["job", b"job"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["job", b"job", "overwrite", b"overwrite"] + _HasFieldArgType: _TypeAlias = _typing.Literal["job", b"job"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["job", b"job", "overwrite", b"overwrite"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ScheduleJobRequest: typing_extensions.TypeAlias = ScheduleJobRequest +Global___ScheduleJobRequest: _TypeAlias = ScheduleJobRequest # noqa: Y015 -@typing.final -class ScheduleJobResponse(google.protobuf.message.Message): +@_typing.final +class ScheduleJobResponse(_message.Message): """ScheduleJobResponse is the message response to create/schedule the job. Empty """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor def __init__( self, ) -> None: ... -Global___ScheduleJobResponse: typing_extensions.TypeAlias = ScheduleJobResponse +Global___ScheduleJobResponse: _TypeAlias = ScheduleJobResponse # noqa: Y015 -@typing.final -class GetJobRequest(google.protobuf.message.Message): +@_typing.final +class GetJobRequest(_message.Message): """GetJobRequest is the message to retrieve a job.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + name: _builtins.str """The name of the job.""" def __init__( self, *, - name: builtins.str = ..., + name: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["name", b"name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["name", b"name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetJobRequest: typing_extensions.TypeAlias = GetJobRequest +Global___GetJobRequest: _TypeAlias = GetJobRequest # noqa: Y015 -@typing.final -class GetJobResponse(google.protobuf.message.Message): +@_typing.final +class GetJobResponse(_message.Message): """GetJobResponse is the message's response for a job retrieved.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - JOB_FIELD_NUMBER: builtins.int - @property + JOB_FIELD_NUMBER: _builtins.int + @_builtins.property def job(self) -> Global___Job: """The job details.""" @@ -209,113 +209,113 @@ class GetJobResponse(google.protobuf.message.Message): *, job: Global___Job | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["job", b"job"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["job", b"job"] + _HasFieldArgType: _TypeAlias = _typing.Literal["job", b"job"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["job", b"job"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetJobResponse: typing_extensions.TypeAlias = GetJobResponse +Global___GetJobResponse: _TypeAlias = GetJobResponse # noqa: Y015 -@typing.final -class DeleteJobRequest(google.protobuf.message.Message): +@_typing.final +class DeleteJobRequest(_message.Message): """DeleteJobRequest is the message to delete the job by name.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + name: _builtins.str """The name of the job.""" def __init__( self, *, - name: builtins.str = ..., + name: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["name", b"name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["name", b"name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___DeleteJobRequest: typing_extensions.TypeAlias = DeleteJobRequest +Global___DeleteJobRequest: _TypeAlias = DeleteJobRequest # noqa: Y015 -@typing.final -class DeleteJobResponse(google.protobuf.message.Message): +@_typing.final +class DeleteJobResponse(_message.Message): """DeleteJobResponse is the message response to delete the job by name. Empty """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor def __init__( self, ) -> None: ... -Global___DeleteJobResponse: typing_extensions.TypeAlias = DeleteJobResponse +Global___DeleteJobResponse: _TypeAlias = DeleteJobResponse # noqa: Y015 -@typing.final -class DeleteJobsByPrefixRequestAlpha1(google.protobuf.message.Message): +@_typing.final +class DeleteJobsByPrefixRequestAlpha1(_message.Message): """DeleteJobsByPrefixRequest is the message to delete jobs by name prefix.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - NAME_PREFIX_FIELD_NUMBER: builtins.int - name_prefix: builtins.str + NAME_PREFIX_FIELD_NUMBER: _builtins.int + name_prefix: _builtins.str """name_prefix is the prefix of the job names to delete. If not provided, all jobs associated with this app ID will be deleted. """ def __init__( self, *, - name_prefix: builtins.str | None = ..., + name_prefix: _builtins.str | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_name_prefix", b"_name_prefix", "name_prefix", b"name_prefix"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_name_prefix", b"_name_prefix", "name_prefix", b"name_prefix"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_name_prefix", b"_name_prefix", "name_prefix", b"name_prefix"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_name_prefix", b"_name_prefix", "name_prefix", b"name_prefix"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__name_prefix: typing_extensions.TypeAlias = typing.Literal["name_prefix"] - _WhichOneofArgType__name_prefix: typing_extensions.TypeAlias = typing.Literal["_name_prefix", b"_name_prefix"] + _WhichOneofReturnType__name_prefix: _TypeAlias = _typing.Literal["name_prefix"] # noqa: Y015 + _WhichOneofArgType__name_prefix: _TypeAlias = _typing.Literal["_name_prefix", b"_name_prefix"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType__name_prefix) -> _WhichOneofReturnType__name_prefix | None: ... -Global___DeleteJobsByPrefixRequestAlpha1: typing_extensions.TypeAlias = DeleteJobsByPrefixRequestAlpha1 +Global___DeleteJobsByPrefixRequestAlpha1: _TypeAlias = DeleteJobsByPrefixRequestAlpha1 # noqa: Y015 -@typing.final -class DeleteJobsByPrefixResponseAlpha1(google.protobuf.message.Message): +@_typing.final +class DeleteJobsByPrefixResponseAlpha1(_message.Message): """Empty""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor def __init__( self, ) -> None: ... -Global___DeleteJobsByPrefixResponseAlpha1: typing_extensions.TypeAlias = DeleteJobsByPrefixResponseAlpha1 +Global___DeleteJobsByPrefixResponseAlpha1: _TypeAlias = DeleteJobsByPrefixResponseAlpha1 # noqa: Y015 -@typing.final -class ListJobsRequestAlpha1(google.protobuf.message.Message): +@_typing.final +class ListJobsRequestAlpha1(_message.Message): """Empty""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor def __init__( self, ) -> None: ... -Global___ListJobsRequestAlpha1: typing_extensions.TypeAlias = ListJobsRequestAlpha1 +Global___ListJobsRequestAlpha1: _TypeAlias = ListJobsRequestAlpha1 # noqa: Y015 -@typing.final -class ListJobsResponseAlpha1(google.protobuf.message.Message): +@_typing.final +class ListJobsResponseAlpha1(_message.Message): """ListJobsResponse is the message response containing the list of jobs.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - JOBS_FIELD_NUMBER: builtins.int - @property - def jobs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___Job]: + JOBS_FIELD_NUMBER: _builtins.int + @_builtins.property + def jobs(self) -> _containers.RepeatedCompositeFieldContainer[Global___Job]: """The list of jobs.""" def __init__( self, *, - jobs: collections.abc.Iterable[Global___Job] | None = ..., + jobs: _abc.Iterable[Global___Job] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["jobs", b"jobs"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["jobs", b"jobs"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ListJobsResponseAlpha1: typing_extensions.TypeAlias = ListJobsResponseAlpha1 +Global___ListJobsResponseAlpha1: _TypeAlias = ListJobsResponseAlpha1 # noqa: Y015 diff --git a/dapr/proto/runtime/v1/lock_pb2.py b/dapr/proto/runtime/v1/lock_pb2.py index c1b1c9a01..9dcba1065 100644 --- a/dapr/proto/runtime/v1/lock_pb2.py +++ b/dapr/proto/runtime/v1/lock_pb2.py @@ -24,14 +24,14 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n dapr/proto/runtime/v1/lock.proto\x12\x15\x64\x61pr.proto.runtime.v1\"\x9b\x01\n\x0eTryLockRequest\x12\x1d\n\nstore_name\x18\x01 \x01(\tR\tstoreName\x12\x1f\n\x0bresource_id\x18\x02 \x01(\tR\nresourceId\x12\x1d\n\nlock_owner\x18\x03 \x01(\tR\tlockOwner\x12*\n\x11\x65xpiry_in_seconds\x18\x04 \x01(\x05R\x0f\x65xpiryInSeconds\"\"\n\x0fTryLockResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"n\n\rUnlockRequest\x12\x1d\n\nstore_name\x18\x01 \x01(\tR\tstoreName\x12\x1f\n\x0bresource_id\x18\x02 \x01(\tR\nresourceId\x12\x1d\n\nlock_owner\x18\x03 \x01(\tR\tlockOwner\"\xae\x01\n\x0eUnlockResponse\x12<\n\x06status\x18\x01 \x01(\x0e\x32,.dapr.proto.runtime.v1.UnlockResponse.Status\"^\n\x06Status\x12\x0b\n\x07SUCCESS\x10\x00\x12\x17\n\x13LOCK_DOES_NOT_EXIST\x10\x01\x12\x1a\n\x16LOCK_BELONGS_TO_OTHERS\x10\x02\x12\x12\n\x0eINTERNAL_ERROR\x10\x03\x42i\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n dapr/proto/runtime/v1/lock.proto\x12\x15\x64\x61pr.proto.runtime.v1\"\x9b\x01\n\x0eTryLockRequest\x12\x1d\n\nstore_name\x18\x01 \x01(\tR\tstoreName\x12\x1f\n\x0bresource_id\x18\x02 \x01(\tR\nresourceId\x12\x1d\n\nlock_owner\x18\x03 \x01(\tR\tlockOwner\x12*\n\x11\x65xpiry_in_seconds\x18\x04 \x01(\x05R\x0f\x65xpiryInSeconds\"\"\n\x0fTryLockResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"n\n\rUnlockRequest\x12\x1d\n\nstore_name\x18\x01 \x01(\tR\tstoreName\x12\x1f\n\x0bresource_id\x18\x02 \x01(\tR\nresourceId\x12\x1d\n\nlock_owner\x18\x03 \x01(\tR\tlockOwner\"\xae\x01\n\x0eUnlockResponse\x12<\n\x06status\x18\x01 \x01(\x0e\x32,.dapr.proto.runtime.v1.UnlockResponse.Status\"^\n\x06Status\x12\x0b\n\x07SUCCESS\x10\x00\x12\x17\n\x13LOCK_DOES_NOT_EXIST\x10\x01\x12\x1a\n\x16LOCK_BELONGS_TO_OTHERS\x10\x02\x12\x12\n\x0eINTERNAL_ERROR\x10\x03\x42m\n\nio.dapr.v1B\x0e\x44\x61prLockProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dapr.proto.runtime.v1.lock_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' + _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\016DaprLockProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' _globals['_TRYLOCKREQUEST']._serialized_start=60 _globals['_TRYLOCKREQUEST']._serialized_end=215 _globals['_TRYLOCKRESPONSE']._serialized_start=217 diff --git a/dapr/proto/runtime/v1/lock_pb2.pyi b/dapr/proto/runtime/v1/lock_pb2.pyi index c85b78f08..c14392e2e 100644 --- a/dapr/proto/runtime/v1/lock_pb2.pyi +++ b/dapr/proto/runtime/v1/lock_pb2.pyi @@ -14,35 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import google.protobuf.descriptor -import google.protobuf.internal.enum_type_wrapper -import google.protobuf.message +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class TryLockRequest(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class TryLockRequest(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - STORE_NAME_FIELD_NUMBER: builtins.int - RESOURCE_ID_FIELD_NUMBER: builtins.int - LOCK_OWNER_FIELD_NUMBER: builtins.int - EXPIRY_IN_SECONDS_FIELD_NUMBER: builtins.int - store_name: builtins.str + STORE_NAME_FIELD_NUMBER: _builtins.int + RESOURCE_ID_FIELD_NUMBER: _builtins.int + LOCK_OWNER_FIELD_NUMBER: _builtins.int + EXPIRY_IN_SECONDS_FIELD_NUMBER: _builtins.int + store_name: _builtins.str """Required. The lock store name,e.g. `redis`.""" - resource_id: builtins.str + resource_id: _builtins.str """Required. resource_id is the lock key. e.g. `order_id_111` It stands for "which resource I want to protect" """ - lock_owner: builtins.str + lock_owner: _builtins.str """Required. lock_owner indicate the identifier of lock owner. You can generate a uuid as lock_owner.For example,in golang: @@ -59,70 +59,70 @@ class TryLockRequest(google.protobuf.message.Message): 3. When reentrant lock is needed,the existing lock_owner is required to identify client and check "whether this client can reenter this lock". So this field in the request shouldn't be removed. """ - expiry_in_seconds: builtins.int + expiry_in_seconds: _builtins.int """Required. The time before expiry.The time unit is second.""" def __init__( self, *, - store_name: builtins.str = ..., - resource_id: builtins.str = ..., - lock_owner: builtins.str = ..., - expiry_in_seconds: builtins.int = ..., + store_name: _builtins.str = ..., + resource_id: _builtins.str = ..., + lock_owner: _builtins.str = ..., + expiry_in_seconds: _builtins.int = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["expiry_in_seconds", b"expiry_in_seconds", "lock_owner", b"lock_owner", "resource_id", b"resource_id", "store_name", b"store_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["expiry_in_seconds", b"expiry_in_seconds", "lock_owner", b"lock_owner", "resource_id", b"resource_id", "store_name", b"store_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___TryLockRequest: typing_extensions.TypeAlias = TryLockRequest +Global___TryLockRequest: _TypeAlias = TryLockRequest # noqa: Y015 -@typing.final -class TryLockResponse(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class TryLockResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - SUCCESS_FIELD_NUMBER: builtins.int - success: builtins.bool + SUCCESS_FIELD_NUMBER: _builtins.int + success: _builtins.bool def __init__( self, *, - success: builtins.bool = ..., + success: _builtins.bool = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["success", b"success"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["success", b"success"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___TryLockResponse: typing_extensions.TypeAlias = TryLockResponse +Global___TryLockResponse: _TypeAlias = TryLockResponse # noqa: Y015 -@typing.final -class UnlockRequest(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class UnlockRequest(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - STORE_NAME_FIELD_NUMBER: builtins.int - RESOURCE_ID_FIELD_NUMBER: builtins.int - LOCK_OWNER_FIELD_NUMBER: builtins.int - store_name: builtins.str - resource_id: builtins.str + STORE_NAME_FIELD_NUMBER: _builtins.int + RESOURCE_ID_FIELD_NUMBER: _builtins.int + LOCK_OWNER_FIELD_NUMBER: _builtins.int + store_name: _builtins.str + resource_id: _builtins.str """resource_id is the lock key.""" - lock_owner: builtins.str + lock_owner: _builtins.str def __init__( self, *, - store_name: builtins.str = ..., - resource_id: builtins.str = ..., - lock_owner: builtins.str = ..., + store_name: _builtins.str = ..., + resource_id: _builtins.str = ..., + lock_owner: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["lock_owner", b"lock_owner", "resource_id", b"resource_id", "store_name", b"store_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["lock_owner", b"lock_owner", "resource_id", b"resource_id", "store_name", b"store_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___UnlockRequest: typing_extensions.TypeAlias = UnlockRequest +Global___UnlockRequest: _TypeAlias = UnlockRequest # noqa: Y015 -@typing.final -class UnlockResponse(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class UnlockResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor class _Status: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _StatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[UnlockResponse._Status.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _StatusEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[UnlockResponse._Status.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor SUCCESS: UnlockResponse._Status.ValueType # 0 LOCK_DOES_NOT_EXIST: UnlockResponse._Status.ValueType # 1 LOCK_BELONGS_TO_OTHERS: UnlockResponse._Status.ValueType # 2 @@ -134,14 +134,14 @@ class UnlockResponse(google.protobuf.message.Message): LOCK_BELONGS_TO_OTHERS: UnlockResponse.Status.ValueType # 2 INTERNAL_ERROR: UnlockResponse.Status.ValueType # 3 - STATUS_FIELD_NUMBER: builtins.int + STATUS_FIELD_NUMBER: _builtins.int status: Global___UnlockResponse.Status.ValueType def __init__( self, *, status: Global___UnlockResponse.Status.ValueType = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["status", b"status"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["status", b"status"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___UnlockResponse: typing_extensions.TypeAlias = UnlockResponse +Global___UnlockResponse: _TypeAlias = UnlockResponse # noqa: Y015 diff --git a/dapr/proto/runtime/v1/metadata_pb2.py b/dapr/proto/runtime/v1/metadata_pb2.py index ba80df30a..f19bea65d 100644 --- a/dapr/proto/runtime/v1/metadata_pb2.py +++ b/dapr/proto/runtime/v1/metadata_pb2.py @@ -24,14 +24,14 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$dapr/proto/runtime/v1/metadata.proto\x12\x15\x64\x61pr.proto.runtime.v1\"\x14\n\x12GetMetadataRequest\"\xd1\x07\n\x13GetMetadataResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12Q\n\x13\x61\x63tive_actors_count\x18\x02 \x03(\x0b\x32(.dapr.proto.runtime.v1.ActiveActorsCountB\x02\x18\x01R\x06\x61\x63tors\x12V\n\x15registered_components\x18\x03 \x03(\x0b\x32+.dapr.proto.runtime.v1.RegisteredComponentsR\ncomponents\x12\x65\n\x11\x65xtended_metadata\x18\x04 \x03(\x0b\x32@.dapr.proto.runtime.v1.GetMetadataResponse.ExtendedMetadataEntryR\x08\x65xtended\x12O\n\rsubscriptions\x18\x05 \x03(\x0b\x32).dapr.proto.runtime.v1.PubsubSubscriptionR\rsubscriptions\x12R\n\x0ehttp_endpoints\x18\x06 \x03(\x0b\x32+.dapr.proto.runtime.v1.MetadataHTTPEndpointR\rhttpEndpoints\x12j\n\x19\x61pp_connection_properties\x18\x07 \x01(\x0b\x32..dapr.proto.runtime.v1.AppConnectionPropertiesR\x17\x61ppConnectionProperties\x12\'\n\x0fruntime_version\x18\x08 \x01(\tR\x0eruntimeVersion\x12)\n\x10\x65nabled_features\x18\t \x03(\tR\x0f\x65nabledFeatures\x12H\n\ractor_runtime\x18\n \x01(\x0b\x32#.dapr.proto.runtime.v1.ActorRuntimeR\x0c\x61\x63torRuntime\x12K\n\tscheduler\x18\x0b \x01(\x0b\x32(.dapr.proto.runtime.v1.MetadataSchedulerH\x00R\tscheduler\x88\x01\x01\x12K\n\tworkflows\x18\x0c \x01(\x0b\x32(.dapr.proto.runtime.v1.MetadataWorkflowsH\x01R\tworkflows\x88\x01\x01\x1a\x37\n\x15\x45xtendedMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\n_schedulerB\x0c\n\n_workflows\"@\n\x11MetadataWorkflows\x12+\n\x11\x63onnected_workers\x18\x01 \x01(\x05R\x10\x63onnectedWorkers\"0\n\x11MetadataScheduler\x12\x1b\n\x13\x63onnected_addresses\x18\x01 \x03(\t\"\xbc\x02\n\x0c\x41\x63torRuntime\x12]\n\x0eruntime_status\x18\x01 \x01(\x0e\x32\x36.dapr.proto.runtime.v1.ActorRuntime.ActorRuntimeStatusR\rruntimeStatus\x12M\n\ractive_actors\x18\x02 \x03(\x0b\x32(.dapr.proto.runtime.v1.ActiveActorsCountR\x0c\x61\x63tiveActors\x12\x1d\n\nhost_ready\x18\x03 \x01(\x08R\thostReady\x12\x1c\n\tplacement\x18\x04 \x01(\tR\tplacement\"A\n\x12\x41\x63torRuntimeStatus\x12\x10\n\x0cINITIALIZING\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\"0\n\x11\x41\x63tiveActorsCount\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x05\"Y\n\x14RegisteredComponents\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x14\n\x0c\x63\x61pabilities\x18\x04 \x03(\t\"*\n\x14MetadataHTTPEndpoint\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"\xd1\x01\n\x17\x41ppConnectionProperties\x12\x0c\n\x04port\x18\x01 \x01(\x05\x12\x10\n\x08protocol\x18\x02 \x01(\t\x12\'\n\x0f\x63hannel_address\x18\x03 \x01(\tR\x0e\x63hannelAddress\x12\'\n\x0fmax_concurrency\x18\x04 \x01(\x05R\x0emaxConcurrency\x12\x44\n\x06health\x18\x05 \x01(\x0b\x32\x34.dapr.proto.runtime.v1.AppConnectionHealthProperties\"\xdc\x01\n\x1d\x41ppConnectionHealthProperties\x12*\n\x11health_check_path\x18\x01 \x01(\tR\x0fhealthCheckPath\x12\x32\n\x15health_probe_interval\x18\x02 \x01(\tR\x13healthProbeInterval\x12\x30\n\x14health_probe_timeout\x18\x03 \x01(\tR\x12healthProbeTimeout\x12)\n\x10health_threshold\x18\x04 \x01(\x05R\x0fhealthThreshold\"\x86\x03\n\x12PubsubSubscription\x12\x1f\n\x0bpubsub_name\x18\x01 \x01(\tR\npubsubname\x12\x14\n\x05topic\x18\x02 \x01(\tR\x05topic\x12S\n\x08metadata\x18\x03 \x03(\x0b\x32\x37.dapr.proto.runtime.v1.PubsubSubscription.MetadataEntryR\x08metadata\x12\x44\n\x05rules\x18\x04 \x01(\x0b\x32..dapr.proto.runtime.v1.PubsubSubscriptionRulesR\x05rules\x12*\n\x11\x64\x65\x61\x64_letter_topic\x18\x05 \x01(\tR\x0f\x64\x65\x61\x64LetterTopic\x12\x41\n\x04type\x18\x06 \x01(\x0e\x32-.dapr.proto.runtime.v1.PubsubSubscriptionTypeR\x04type\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"W\n\x17PubsubSubscriptionRules\x12<\n\x05rules\x18\x01 \x03(\x0b\x32-.dapr.proto.runtime.v1.PubsubSubscriptionRule\"5\n\x16PubsubSubscriptionRule\x12\r\n\x05match\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\"0\n\x12SetMetadataRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t*W\n\x16PubsubSubscriptionType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0f\n\x0b\x44\x45\x43LARATIVE\x10\x01\x12\x10\n\x0cPROGRAMMATIC\x10\x02\x12\r\n\tSTREAMING\x10\x03\x42i\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$dapr/proto/runtime/v1/metadata.proto\x12\x15\x64\x61pr.proto.runtime.v1\"\x14\n\x12GetMetadataRequest\"\xd1\x07\n\x13GetMetadataResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12Q\n\x13\x61\x63tive_actors_count\x18\x02 \x03(\x0b\x32(.dapr.proto.runtime.v1.ActiveActorsCountB\x02\x18\x01R\x06\x61\x63tors\x12V\n\x15registered_components\x18\x03 \x03(\x0b\x32+.dapr.proto.runtime.v1.RegisteredComponentsR\ncomponents\x12\x65\n\x11\x65xtended_metadata\x18\x04 \x03(\x0b\x32@.dapr.proto.runtime.v1.GetMetadataResponse.ExtendedMetadataEntryR\x08\x65xtended\x12O\n\rsubscriptions\x18\x05 \x03(\x0b\x32).dapr.proto.runtime.v1.PubsubSubscriptionR\rsubscriptions\x12R\n\x0ehttp_endpoints\x18\x06 \x03(\x0b\x32+.dapr.proto.runtime.v1.MetadataHTTPEndpointR\rhttpEndpoints\x12j\n\x19\x61pp_connection_properties\x18\x07 \x01(\x0b\x32..dapr.proto.runtime.v1.AppConnectionPropertiesR\x17\x61ppConnectionProperties\x12\'\n\x0fruntime_version\x18\x08 \x01(\tR\x0eruntimeVersion\x12)\n\x10\x65nabled_features\x18\t \x03(\tR\x0f\x65nabledFeatures\x12H\n\ractor_runtime\x18\n \x01(\x0b\x32#.dapr.proto.runtime.v1.ActorRuntimeR\x0c\x61\x63torRuntime\x12K\n\tscheduler\x18\x0b \x01(\x0b\x32(.dapr.proto.runtime.v1.MetadataSchedulerH\x00R\tscheduler\x88\x01\x01\x12K\n\tworkflows\x18\x0c \x01(\x0b\x32(.dapr.proto.runtime.v1.MetadataWorkflowsH\x01R\tworkflows\x88\x01\x01\x1a\x37\n\x15\x45xtendedMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\n_schedulerB\x0c\n\n_workflows\"@\n\x11MetadataWorkflows\x12+\n\x11\x63onnected_workers\x18\x01 \x01(\x05R\x10\x63onnectedWorkers\"0\n\x11MetadataScheduler\x12\x1b\n\x13\x63onnected_addresses\x18\x01 \x03(\t\"\xbc\x02\n\x0c\x41\x63torRuntime\x12]\n\x0eruntime_status\x18\x01 \x01(\x0e\x32\x36.dapr.proto.runtime.v1.ActorRuntime.ActorRuntimeStatusR\rruntimeStatus\x12M\n\ractive_actors\x18\x02 \x03(\x0b\x32(.dapr.proto.runtime.v1.ActiveActorsCountR\x0c\x61\x63tiveActors\x12\x1d\n\nhost_ready\x18\x03 \x01(\x08R\thostReady\x12\x1c\n\tplacement\x18\x04 \x01(\tR\tplacement\"A\n\x12\x41\x63torRuntimeStatus\x12\x10\n\x0cINITIALIZING\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\"0\n\x11\x41\x63tiveActorsCount\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x05\"Y\n\x14RegisteredComponents\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x14\n\x0c\x63\x61pabilities\x18\x04 \x03(\t\"*\n\x14MetadataHTTPEndpoint\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"\xd1\x01\n\x17\x41ppConnectionProperties\x12\x0c\n\x04port\x18\x01 \x01(\x05\x12\x10\n\x08protocol\x18\x02 \x01(\t\x12\'\n\x0f\x63hannel_address\x18\x03 \x01(\tR\x0e\x63hannelAddress\x12\'\n\x0fmax_concurrency\x18\x04 \x01(\x05R\x0emaxConcurrency\x12\x44\n\x06health\x18\x05 \x01(\x0b\x32\x34.dapr.proto.runtime.v1.AppConnectionHealthProperties\"\xdc\x01\n\x1d\x41ppConnectionHealthProperties\x12*\n\x11health_check_path\x18\x01 \x01(\tR\x0fhealthCheckPath\x12\x32\n\x15health_probe_interval\x18\x02 \x01(\tR\x13healthProbeInterval\x12\x30\n\x14health_probe_timeout\x18\x03 \x01(\tR\x12healthProbeTimeout\x12)\n\x10health_threshold\x18\x04 \x01(\x05R\x0fhealthThreshold\"\x86\x03\n\x12PubsubSubscription\x12\x1f\n\x0bpubsub_name\x18\x01 \x01(\tR\npubsubname\x12\x14\n\x05topic\x18\x02 \x01(\tR\x05topic\x12S\n\x08metadata\x18\x03 \x03(\x0b\x32\x37.dapr.proto.runtime.v1.PubsubSubscription.MetadataEntryR\x08metadata\x12\x44\n\x05rules\x18\x04 \x01(\x0b\x32..dapr.proto.runtime.v1.PubsubSubscriptionRulesR\x05rules\x12*\n\x11\x64\x65\x61\x64_letter_topic\x18\x05 \x01(\tR\x0f\x64\x65\x61\x64LetterTopic\x12\x41\n\x04type\x18\x06 \x01(\x0e\x32-.dapr.proto.runtime.v1.PubsubSubscriptionTypeR\x04type\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"W\n\x17PubsubSubscriptionRules\x12<\n\x05rules\x18\x01 \x03(\x0b\x32-.dapr.proto.runtime.v1.PubsubSubscriptionRule\"5\n\x16PubsubSubscriptionRule\x12\r\n\x05match\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\"0\n\x12SetMetadataRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t*W\n\x16PubsubSubscriptionType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0f\n\x0b\x44\x45\x43LARATIVE\x10\x01\x12\x10\n\x0cPROGRAMMATIC\x10\x02\x12\r\n\tSTREAMING\x10\x03\x42q\n\nio.dapr.v1B\x12\x44\x61prMetadataProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dapr.proto.runtime.v1.metadata_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' + _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\022DaprMetadataProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' _globals['_GETMETADATARESPONSE_EXTENDEDMETADATAENTRY']._loaded_options = None _globals['_GETMETADATARESPONSE_EXTENDEDMETADATAENTRY']._serialized_options = b'8\001' _globals['_GETMETADATARESPONSE'].fields_by_name['active_actors_count']._loaded_options = None diff --git a/dapr/proto/runtime/v1/metadata_pb2.pyi b/dapr/proto/runtime/v1/metadata_pb2.pyi index f9860726a..82ab0137f 100644 --- a/dapr/proto/runtime/v1/metadata_pb2.pyi +++ b/dapr/proto/runtime/v1/metadata_pb2.pyi @@ -14,28 +14,33 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.internal.enum_type_wrapper -import google.protobuf.message +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +if sys.version_info >= (3, 13): + from warnings import deprecated as _deprecated +else: + from typing_extensions import deprecated as _deprecated + +DESCRIPTOR: _descriptor.FileDescriptor class _PubsubSubscriptionType: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 -class _PubsubSubscriptionTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_PubsubSubscriptionType.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor +class _PubsubSubscriptionTypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[_PubsubSubscriptionType.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor UNKNOWN: _PubsubSubscriptionType.ValueType # 0 """UNKNOWN is the default value for the subscription type.""" DECLARATIVE: _PubsubSubscriptionType.ValueType # 1 @@ -56,161 +61,162 @@ PROGRAMMATIC: PubsubSubscriptionType.ValueType # 2 """Programmatically created subscription""" STREAMING: PubsubSubscriptionType.ValueType # 3 """Bidirectional Streaming subscription""" -Global___PubsubSubscriptionType: typing_extensions.TypeAlias = PubsubSubscriptionType +Global___PubsubSubscriptionType: _TypeAlias = PubsubSubscriptionType # noqa: Y015 -@typing.final -class GetMetadataRequest(google.protobuf.message.Message): +@_typing.final +class GetMetadataRequest(_message.Message): """GetMetadataRequest is the message for the GetMetadata request. Empty """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor def __init__( self, ) -> None: ... -Global___GetMetadataRequest: typing_extensions.TypeAlias = GetMetadataRequest +Global___GetMetadataRequest: _TypeAlias = GetMetadataRequest # noqa: Y015 -@typing.final -class GetMetadataResponse(google.protobuf.message.Message): +@_typing.final +class GetMetadataResponse(_message.Message): """GetMetadataResponse is a message that is returned on GetMetadata rpc call.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class ExtendedMetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class ExtendedMetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - ID_FIELD_NUMBER: builtins.int - ACTIVE_ACTORS_COUNT_FIELD_NUMBER: builtins.int - REGISTERED_COMPONENTS_FIELD_NUMBER: builtins.int - EXTENDED_METADATA_FIELD_NUMBER: builtins.int - SUBSCRIPTIONS_FIELD_NUMBER: builtins.int - HTTP_ENDPOINTS_FIELD_NUMBER: builtins.int - APP_CONNECTION_PROPERTIES_FIELD_NUMBER: builtins.int - RUNTIME_VERSION_FIELD_NUMBER: builtins.int - ENABLED_FEATURES_FIELD_NUMBER: builtins.int - ACTOR_RUNTIME_FIELD_NUMBER: builtins.int - SCHEDULER_FIELD_NUMBER: builtins.int - WORKFLOWS_FIELD_NUMBER: builtins.int - id: builtins.str - runtime_version: builtins.str - @property - def active_actors_count(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ActiveActorsCount]: + ID_FIELD_NUMBER: _builtins.int + ACTIVE_ACTORS_COUNT_FIELD_NUMBER: _builtins.int + REGISTERED_COMPONENTS_FIELD_NUMBER: _builtins.int + EXTENDED_METADATA_FIELD_NUMBER: _builtins.int + SUBSCRIPTIONS_FIELD_NUMBER: _builtins.int + HTTP_ENDPOINTS_FIELD_NUMBER: _builtins.int + APP_CONNECTION_PROPERTIES_FIELD_NUMBER: _builtins.int + RUNTIME_VERSION_FIELD_NUMBER: _builtins.int + ENABLED_FEATURES_FIELD_NUMBER: _builtins.int + ACTOR_RUNTIME_FIELD_NUMBER: _builtins.int + SCHEDULER_FIELD_NUMBER: _builtins.int + WORKFLOWS_FIELD_NUMBER: _builtins.int + id: _builtins.str + runtime_version: _builtins.str + @_builtins.property + @_deprecated("""This field has been marked as deprecated using proto field options.""") + def active_actors_count(self) -> _containers.RepeatedCompositeFieldContainer[Global___ActiveActorsCount]: """Deprecated alias for actor_runtime.active_actors.""" - @property - def registered_components(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___RegisteredComponents]: ... - @property - def extended_metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: ... - @property - def subscriptions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___PubsubSubscription]: ... - @property - def http_endpoints(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___MetadataHTTPEndpoint]: ... - @property + @_builtins.property + def registered_components(self) -> _containers.RepeatedCompositeFieldContainer[Global___RegisteredComponents]: ... + @_builtins.property + def extended_metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: ... + @_builtins.property + def subscriptions(self) -> _containers.RepeatedCompositeFieldContainer[Global___PubsubSubscription]: ... + @_builtins.property + def http_endpoints(self) -> _containers.RepeatedCompositeFieldContainer[Global___MetadataHTTPEndpoint]: ... + @_builtins.property def app_connection_properties(self) -> Global___AppConnectionProperties: ... - @property - def enabled_features(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... - @property + @_builtins.property + def enabled_features(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: ... + @_builtins.property def actor_runtime(self) -> Global___ActorRuntime: ... - @property + @_builtins.property def scheduler(self) -> Global___MetadataScheduler: ... - @property + @_builtins.property def workflows(self) -> Global___MetadataWorkflows: ... def __init__( self, *, - id: builtins.str = ..., - active_actors_count: collections.abc.Iterable[Global___ActiveActorsCount] | None = ..., - registered_components: collections.abc.Iterable[Global___RegisteredComponents] | None = ..., - extended_metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., - subscriptions: collections.abc.Iterable[Global___PubsubSubscription] | None = ..., - http_endpoints: collections.abc.Iterable[Global___MetadataHTTPEndpoint] | None = ..., + id: _builtins.str = ..., + active_actors_count: _abc.Iterable[Global___ActiveActorsCount] | None = ..., + registered_components: _abc.Iterable[Global___RegisteredComponents] | None = ..., + extended_metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + subscriptions: _abc.Iterable[Global___PubsubSubscription] | None = ..., + http_endpoints: _abc.Iterable[Global___MetadataHTTPEndpoint] | None = ..., app_connection_properties: Global___AppConnectionProperties | None = ..., - runtime_version: builtins.str = ..., - enabled_features: collections.abc.Iterable[builtins.str] | None = ..., + runtime_version: _builtins.str = ..., + enabled_features: _abc.Iterable[_builtins.str] | None = ..., actor_runtime: Global___ActorRuntime | None = ..., scheduler: Global___MetadataScheduler | None = ..., workflows: Global___MetadataWorkflows | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_scheduler", b"_scheduler", "_workflows", b"_workflows", "actor_runtime", b"actor_runtime", "app_connection_properties", b"app_connection_properties", "scheduler", b"scheduler", "workflows", b"workflows"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_scheduler", b"_scheduler", "_workflows", b"_workflows", "active_actors_count", b"active_actors_count", "actor_runtime", b"actor_runtime", "app_connection_properties", b"app_connection_properties", "enabled_features", b"enabled_features", "extended_metadata", b"extended_metadata", "http_endpoints", b"http_endpoints", "id", b"id", "registered_components", b"registered_components", "runtime_version", b"runtime_version", "scheduler", b"scheduler", "subscriptions", b"subscriptions", "workflows", b"workflows"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_scheduler", b"_scheduler", "_workflows", b"_workflows", "actor_runtime", b"actor_runtime", "app_connection_properties", b"app_connection_properties", "scheduler", b"scheduler", "workflows", b"workflows"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_scheduler", b"_scheduler", "_workflows", b"_workflows", "active_actors_count", b"active_actors_count", "actor_runtime", b"actor_runtime", "app_connection_properties", b"app_connection_properties", "enabled_features", b"enabled_features", "extended_metadata", b"extended_metadata", "http_endpoints", b"http_endpoints", "id", b"id", "registered_components", b"registered_components", "runtime_version", b"runtime_version", "scheduler", b"scheduler", "subscriptions", b"subscriptions", "workflows", b"workflows"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__scheduler: typing_extensions.TypeAlias = typing.Literal["scheduler"] - _WhichOneofArgType__scheduler: typing_extensions.TypeAlias = typing.Literal["_scheduler", b"_scheduler"] - _WhichOneofReturnType__workflows: typing_extensions.TypeAlias = typing.Literal["workflows"] - _WhichOneofArgType__workflows: typing_extensions.TypeAlias = typing.Literal["_workflows", b"_workflows"] - @typing.overload + _WhichOneofReturnType__scheduler: _TypeAlias = _typing.Literal["scheduler"] # noqa: Y015 + _WhichOneofArgType__scheduler: _TypeAlias = _typing.Literal["_scheduler", b"_scheduler"] # noqa: Y015 + _WhichOneofReturnType__workflows: _TypeAlias = _typing.Literal["workflows"] # noqa: Y015 + _WhichOneofArgType__workflows: _TypeAlias = _typing.Literal["_workflows", b"_workflows"] # noqa: Y015 + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__scheduler) -> _WhichOneofReturnType__scheduler | None: ... - @typing.overload + @_typing.overload def WhichOneof(self, oneof_group: _WhichOneofArgType__workflows) -> _WhichOneofReturnType__workflows | None: ... -Global___GetMetadataResponse: typing_extensions.TypeAlias = GetMetadataResponse +Global___GetMetadataResponse: _TypeAlias = GetMetadataResponse # noqa: Y015 -@typing.final -class MetadataWorkflows(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class MetadataWorkflows(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - CONNECTED_WORKERS_FIELD_NUMBER: builtins.int - connected_workers: builtins.int + CONNECTED_WORKERS_FIELD_NUMBER: _builtins.int + connected_workers: _builtins.int def __init__( self, *, - connected_workers: builtins.int = ..., + connected_workers: _builtins.int = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["connected_workers", b"connected_workers"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["connected_workers", b"connected_workers"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___MetadataWorkflows: typing_extensions.TypeAlias = MetadataWorkflows +Global___MetadataWorkflows: _TypeAlias = MetadataWorkflows # noqa: Y015 -@typing.final -class MetadataScheduler(google.protobuf.message.Message): +@_typing.final +class MetadataScheduler(_message.Message): """MetadataScheduler is a message that contains the list of addresses of the scheduler connections. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - CONNECTED_ADDRESSES_FIELD_NUMBER: builtins.int - @property - def connected_addresses(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + CONNECTED_ADDRESSES_FIELD_NUMBER: _builtins.int + @_builtins.property + def connected_addresses(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """connected_addresses the list of addresses of the scheduler connections.""" def __init__( self, *, - connected_addresses: collections.abc.Iterable[builtins.str] | None = ..., + connected_addresses: _abc.Iterable[_builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["connected_addresses", b"connected_addresses"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["connected_addresses", b"connected_addresses"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___MetadataScheduler: typing_extensions.TypeAlias = MetadataScheduler +Global___MetadataScheduler: _TypeAlias = MetadataScheduler # noqa: Y015 -@typing.final -class ActorRuntime(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class ActorRuntime(_message.Message): + DESCRIPTOR: _descriptor.Descriptor class _ActorRuntimeStatus: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _ActorRuntimeStatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActorRuntime._ActorRuntimeStatus.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _ActorRuntimeStatusEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[ActorRuntime._ActorRuntimeStatus.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor INITIALIZING: ActorRuntime._ActorRuntimeStatus.ValueType # 0 """Indicates that the actor runtime is still being initialized.""" DISABLED: ActorRuntime._ActorRuntimeStatus.ValueType # 1 @@ -230,253 +236,253 @@ class ActorRuntime(google.protobuf.message.Message): RUNNING: ActorRuntime.ActorRuntimeStatus.ValueType # 2 """Indicates the actor runtime is running, either as an actor host or client.""" - RUNTIME_STATUS_FIELD_NUMBER: builtins.int - ACTIVE_ACTORS_FIELD_NUMBER: builtins.int - HOST_READY_FIELD_NUMBER: builtins.int - PLACEMENT_FIELD_NUMBER: builtins.int + RUNTIME_STATUS_FIELD_NUMBER: _builtins.int + ACTIVE_ACTORS_FIELD_NUMBER: _builtins.int + HOST_READY_FIELD_NUMBER: _builtins.int + PLACEMENT_FIELD_NUMBER: _builtins.int runtime_status: Global___ActorRuntime.ActorRuntimeStatus.ValueType """Contains an enum indicating whether the actor runtime has been initialized.""" - host_ready: builtins.bool + host_ready: _builtins.bool """Indicates whether the actor runtime is ready to host actors.""" - placement: builtins.str + placement: _builtins.str """Custom message from the placement provider.""" - @property - def active_actors(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ActiveActorsCount]: + @_builtins.property + def active_actors(self) -> _containers.RepeatedCompositeFieldContainer[Global___ActiveActorsCount]: """Count of active actors per type.""" def __init__( self, *, runtime_status: Global___ActorRuntime.ActorRuntimeStatus.ValueType = ..., - active_actors: collections.abc.Iterable[Global___ActiveActorsCount] | None = ..., - host_ready: builtins.bool = ..., - placement: builtins.str = ..., + active_actors: _abc.Iterable[Global___ActiveActorsCount] | None = ..., + host_ready: _builtins.bool = ..., + placement: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["active_actors", b"active_actors", "host_ready", b"host_ready", "placement", b"placement", "runtime_status", b"runtime_status"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["active_actors", b"active_actors", "host_ready", b"host_ready", "placement", b"placement", "runtime_status", b"runtime_status"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ActorRuntime: typing_extensions.TypeAlias = ActorRuntime +Global___ActorRuntime: _TypeAlias = ActorRuntime # noqa: Y015 -@typing.final -class ActiveActorsCount(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class ActiveActorsCount(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - TYPE_FIELD_NUMBER: builtins.int - COUNT_FIELD_NUMBER: builtins.int - type: builtins.str - count: builtins.int + TYPE_FIELD_NUMBER: _builtins.int + COUNT_FIELD_NUMBER: _builtins.int + type: _builtins.str + count: _builtins.int def __init__( self, *, - type: builtins.str = ..., - count: builtins.int = ..., + type: _builtins.str = ..., + count: _builtins.int = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["count", b"count", "type", b"type"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["count", b"count", "type", b"type"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ActiveActorsCount: typing_extensions.TypeAlias = ActiveActorsCount - -@typing.final -class RegisteredComponents(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - NAME_FIELD_NUMBER: builtins.int - TYPE_FIELD_NUMBER: builtins.int - VERSION_FIELD_NUMBER: builtins.int - CAPABILITIES_FIELD_NUMBER: builtins.int - name: builtins.str - type: builtins.str - version: builtins.str - @property - def capabilities(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... +Global___ActiveActorsCount: _TypeAlias = ActiveActorsCount # noqa: Y015 + +@_typing.final +class RegisteredComponents(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + NAME_FIELD_NUMBER: _builtins.int + TYPE_FIELD_NUMBER: _builtins.int + VERSION_FIELD_NUMBER: _builtins.int + CAPABILITIES_FIELD_NUMBER: _builtins.int + name: _builtins.str + type: _builtins.str + version: _builtins.str + @_builtins.property + def capabilities(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: ... def __init__( self, *, - name: builtins.str = ..., - type: builtins.str = ..., - version: builtins.str = ..., - capabilities: collections.abc.Iterable[builtins.str] | None = ..., + name: _builtins.str = ..., + type: _builtins.str = ..., + version: _builtins.str = ..., + capabilities: _abc.Iterable[_builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["capabilities", b"capabilities", "name", b"name", "type", b"type", "version", b"version"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["capabilities", b"capabilities", "name", b"name", "type", b"type", "version", b"version"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___RegisteredComponents: typing_extensions.TypeAlias = RegisteredComponents +Global___RegisteredComponents: _TypeAlias = RegisteredComponents # noqa: Y015 -@typing.final -class MetadataHTTPEndpoint(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class MetadataHTTPEndpoint(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + name: _builtins.str def __init__( self, *, - name: builtins.str = ..., + name: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["name", b"name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["name", b"name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___MetadataHTTPEndpoint: typing_extensions.TypeAlias = MetadataHTTPEndpoint - -@typing.final -class AppConnectionProperties(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - PORT_FIELD_NUMBER: builtins.int - PROTOCOL_FIELD_NUMBER: builtins.int - CHANNEL_ADDRESS_FIELD_NUMBER: builtins.int - MAX_CONCURRENCY_FIELD_NUMBER: builtins.int - HEALTH_FIELD_NUMBER: builtins.int - port: builtins.int - protocol: builtins.str - channel_address: builtins.str - max_concurrency: builtins.int - @property +Global___MetadataHTTPEndpoint: _TypeAlias = MetadataHTTPEndpoint # noqa: Y015 + +@_typing.final +class AppConnectionProperties(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + PORT_FIELD_NUMBER: _builtins.int + PROTOCOL_FIELD_NUMBER: _builtins.int + CHANNEL_ADDRESS_FIELD_NUMBER: _builtins.int + MAX_CONCURRENCY_FIELD_NUMBER: _builtins.int + HEALTH_FIELD_NUMBER: _builtins.int + port: _builtins.int + protocol: _builtins.str + channel_address: _builtins.str + max_concurrency: _builtins.int + @_builtins.property def health(self) -> Global___AppConnectionHealthProperties: ... def __init__( self, *, - port: builtins.int = ..., - protocol: builtins.str = ..., - channel_address: builtins.str = ..., - max_concurrency: builtins.int = ..., + port: _builtins.int = ..., + protocol: _builtins.str = ..., + channel_address: _builtins.str = ..., + max_concurrency: _builtins.int = ..., health: Global___AppConnectionHealthProperties | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["health", b"health"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["channel_address", b"channel_address", "health", b"health", "max_concurrency", b"max_concurrency", "port", b"port", "protocol", b"protocol"] + _HasFieldArgType: _TypeAlias = _typing.Literal["health", b"health"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["channel_address", b"channel_address", "health", b"health", "max_concurrency", b"max_concurrency", "port", b"port", "protocol", b"protocol"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___AppConnectionProperties: typing_extensions.TypeAlias = AppConnectionProperties +Global___AppConnectionProperties: _TypeAlias = AppConnectionProperties # noqa: Y015 -@typing.final -class AppConnectionHealthProperties(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class AppConnectionHealthProperties(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - HEALTH_CHECK_PATH_FIELD_NUMBER: builtins.int - HEALTH_PROBE_INTERVAL_FIELD_NUMBER: builtins.int - HEALTH_PROBE_TIMEOUT_FIELD_NUMBER: builtins.int - HEALTH_THRESHOLD_FIELD_NUMBER: builtins.int - health_check_path: builtins.str - health_probe_interval: builtins.str - health_probe_timeout: builtins.str - health_threshold: builtins.int + HEALTH_CHECK_PATH_FIELD_NUMBER: _builtins.int + HEALTH_PROBE_INTERVAL_FIELD_NUMBER: _builtins.int + HEALTH_PROBE_TIMEOUT_FIELD_NUMBER: _builtins.int + HEALTH_THRESHOLD_FIELD_NUMBER: _builtins.int + health_check_path: _builtins.str + health_probe_interval: _builtins.str + health_probe_timeout: _builtins.str + health_threshold: _builtins.int def __init__( self, *, - health_check_path: builtins.str = ..., - health_probe_interval: builtins.str = ..., - health_probe_timeout: builtins.str = ..., - health_threshold: builtins.int = ..., + health_check_path: _builtins.str = ..., + health_probe_interval: _builtins.str = ..., + health_probe_timeout: _builtins.str = ..., + health_threshold: _builtins.int = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["health_check_path", b"health_check_path", "health_probe_interval", b"health_probe_interval", "health_probe_timeout", b"health_probe_timeout", "health_threshold", b"health_threshold"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["health_check_path", b"health_check_path", "health_probe_interval", b"health_probe_interval", "health_probe_timeout", b"health_probe_timeout", "health_threshold", b"health_threshold"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___AppConnectionHealthProperties: typing_extensions.TypeAlias = AppConnectionHealthProperties +Global___AppConnectionHealthProperties: _TypeAlias = AppConnectionHealthProperties # noqa: Y015 -@typing.final -class PubsubSubscription(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class PubsubSubscription(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - PUBSUB_NAME_FIELD_NUMBER: builtins.int - TOPIC_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - RULES_FIELD_NUMBER: builtins.int - DEAD_LETTER_TOPIC_FIELD_NUMBER: builtins.int - TYPE_FIELD_NUMBER: builtins.int - pubsub_name: builtins.str - topic: builtins.str - dead_letter_topic: builtins.str + PUBSUB_NAME_FIELD_NUMBER: _builtins.int + TOPIC_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + RULES_FIELD_NUMBER: _builtins.int + DEAD_LETTER_TOPIC_FIELD_NUMBER: _builtins.int + TYPE_FIELD_NUMBER: _builtins.int + pubsub_name: _builtins.str + topic: _builtins.str + dead_letter_topic: _builtins.str type: Global___PubsubSubscriptionType.ValueType - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: ... - @property + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: ... + @_builtins.property def rules(self) -> Global___PubsubSubscriptionRules: ... def __init__( self, *, - pubsub_name: builtins.str = ..., - topic: builtins.str = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + pubsub_name: _builtins.str = ..., + topic: _builtins.str = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., rules: Global___PubsubSubscriptionRules | None = ..., - dead_letter_topic: builtins.str = ..., + dead_letter_topic: _builtins.str = ..., type: Global___PubsubSubscriptionType.ValueType = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["rules", b"rules"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["dead_letter_topic", b"dead_letter_topic", "metadata", b"metadata", "pubsub_name", b"pubsub_name", "rules", b"rules", "topic", b"topic", "type", b"type"] + _HasFieldArgType: _TypeAlias = _typing.Literal["rules", b"rules"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["dead_letter_topic", b"dead_letter_topic", "metadata", b"metadata", "pubsub_name", b"pubsub_name", "rules", b"rules", "topic", b"topic", "type", b"type"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___PubsubSubscription: typing_extensions.TypeAlias = PubsubSubscription +Global___PubsubSubscription: _TypeAlias = PubsubSubscription # noqa: Y015 -@typing.final -class PubsubSubscriptionRules(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class PubsubSubscriptionRules(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - RULES_FIELD_NUMBER: builtins.int - @property - def rules(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___PubsubSubscriptionRule]: ... + RULES_FIELD_NUMBER: _builtins.int + @_builtins.property + def rules(self) -> _containers.RepeatedCompositeFieldContainer[Global___PubsubSubscriptionRule]: ... def __init__( self, *, - rules: collections.abc.Iterable[Global___PubsubSubscriptionRule] | None = ..., + rules: _abc.Iterable[Global___PubsubSubscriptionRule] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["rules", b"rules"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["rules", b"rules"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___PubsubSubscriptionRules: typing_extensions.TypeAlias = PubsubSubscriptionRules +Global___PubsubSubscriptionRules: _TypeAlias = PubsubSubscriptionRules # noqa: Y015 -@typing.final -class PubsubSubscriptionRule(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class PubsubSubscriptionRule(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - MATCH_FIELD_NUMBER: builtins.int - PATH_FIELD_NUMBER: builtins.int - match: builtins.str - path: builtins.str + MATCH_FIELD_NUMBER: _builtins.int + PATH_FIELD_NUMBER: _builtins.int + match: _builtins.str + path: _builtins.str def __init__( self, *, - match: builtins.str = ..., - path: builtins.str = ..., + match: _builtins.str = ..., + path: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["match", b"match", "path", b"path"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["match", b"match", "path", b"path"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___PubsubSubscriptionRule: typing_extensions.TypeAlias = PubsubSubscriptionRule +Global___PubsubSubscriptionRule: _TypeAlias = PubsubSubscriptionRule # noqa: Y015 -@typing.final -class SetMetadataRequest(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class SetMetadataRequest(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SetMetadataRequest: typing_extensions.TypeAlias = SetMetadataRequest +Global___SetMetadataRequest: _TypeAlias = SetMetadataRequest # noqa: Y015 diff --git a/dapr/proto/runtime/v1/pubsub_pb2.py b/dapr/proto/runtime/v1/pubsub_pb2.py index ecf6cd63a..e19ce2ed3 100644 --- a/dapr/proto/runtime/v1/pubsub_pb2.py +++ b/dapr/proto/runtime/v1/pubsub_pb2.py @@ -25,14 +25,14 @@ from dapr.proto.runtime.v1 import appcallback_pb2 as dapr_dot_proto_dot_runtime_dot_v1_dot_appcallback__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"dapr/proto/runtime/v1/pubsub.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\'dapr/proto/runtime/v1/appcallback.proto\"\xdf\x01\n\x13PublishEventRequest\x12\x13\n\x0bpubsub_name\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11\x64\x61ta_content_type\x18\x04 \x01(\t\x12J\n\x08metadata\x18\x05 \x03(\x0b\x32\x38.dapr.proto.runtime.v1.PublishEventRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf5\x01\n\x12\x42ulkPublishRequest\x12\x13\n\x0bpubsub_name\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\x12?\n\x07\x65ntries\x18\x03 \x03(\x0b\x32..dapr.proto.runtime.v1.BulkPublishRequestEntry\x12I\n\x08metadata\x18\x04 \x03(\x0b\x32\x37.dapr.proto.runtime.v1.BulkPublishRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xd1\x01\n\x17\x42ulkPublishRequestEntry\x12\x10\n\x08\x65ntry_id\x18\x01 \x01(\t\x12\r\n\x05\x65vent\x18\x02 \x01(\x0c\x12\x14\n\x0c\x63ontent_type\x18\x03 \x01(\t\x12N\n\x08metadata\x18\x04 \x03(\x0b\x32<.dapr.proto.runtime.v1.BulkPublishRequestEntry.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"c\n\x13\x42ulkPublishResponse\x12L\n\rfailedEntries\x18\x01 \x03(\x0b\x32\x35.dapr.proto.runtime.v1.BulkPublishResponseFailedEntry\"A\n\x1e\x42ulkPublishResponseFailedEntry\x12\x10\n\x08\x65ntry_id\x18\x01 \x01(\t\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"\x84\x02\n!SubscribeTopicEventsRequestAlpha1\x12Z\n\x0finitial_request\x18\x01 \x01(\x0b\x32?.dapr.proto.runtime.v1.SubscribeTopicEventsRequestInitialAlpha1H\x00\x12\\\n\x0f\x65vent_processed\x18\x02 \x01(\x0b\x32\x41.dapr.proto.runtime.v1.SubscribeTopicEventsRequestProcessedAlpha1H\x00\x42%\n#subscribe_topic_events_request_type\"\x96\x02\n(SubscribeTopicEventsRequestInitialAlpha1\x12\x13\n\x0bpubsub_name\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\x12_\n\x08metadata\x18\x03 \x03(\x0b\x32M.dapr.proto.runtime.v1.SubscribeTopicEventsRequestInitialAlpha1.MetadataEntry\x12\x1e\n\x11\x64\x65\x61\x64_letter_topic\x18\x04 \x01(\tH\x00\x88\x01\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x14\n\x12_dead_letter_topic\"s\n*SubscribeTopicEventsRequestProcessedAlpha1\x12\n\n\x02id\x18\x01 \x01(\t\x12\x39\n\x06status\x18\x02 \x01(\x0b\x32).dapr.proto.runtime.v1.TopicEventResponse\"\xed\x01\n\"SubscribeTopicEventsResponseAlpha1\x12\\\n\x10initial_response\x18\x01 \x01(\x0b\x32@.dapr.proto.runtime.v1.SubscribeTopicEventsResponseInitialAlpha1H\x00\x12\x41\n\revent_message\x18\x02 \x01(\x0b\x32(.dapr.proto.runtime.v1.TopicEventRequestH\x00\x42&\n$subscribe_topic_events_response_type\"+\n)SubscribeTopicEventsResponseInitialAlpha1Bi\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"dapr/proto/runtime/v1/pubsub.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\'dapr/proto/runtime/v1/appcallback.proto\"\xdf\x01\n\x13PublishEventRequest\x12\x13\n\x0bpubsub_name\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11\x64\x61ta_content_type\x18\x04 \x01(\t\x12J\n\x08metadata\x18\x05 \x03(\x0b\x32\x38.dapr.proto.runtime.v1.PublishEventRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf5\x01\n\x12\x42ulkPublishRequest\x12\x13\n\x0bpubsub_name\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\x12?\n\x07\x65ntries\x18\x03 \x03(\x0b\x32..dapr.proto.runtime.v1.BulkPublishRequestEntry\x12I\n\x08metadata\x18\x04 \x03(\x0b\x32\x37.dapr.proto.runtime.v1.BulkPublishRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xd1\x01\n\x17\x42ulkPublishRequestEntry\x12\x10\n\x08\x65ntry_id\x18\x01 \x01(\t\x12\r\n\x05\x65vent\x18\x02 \x01(\x0c\x12\x14\n\x0c\x63ontent_type\x18\x03 \x01(\t\x12N\n\x08metadata\x18\x04 \x03(\x0b\x32<.dapr.proto.runtime.v1.BulkPublishRequestEntry.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"c\n\x13\x42ulkPublishResponse\x12L\n\rfailedEntries\x18\x01 \x03(\x0b\x32\x35.dapr.proto.runtime.v1.BulkPublishResponseFailedEntry\"A\n\x1e\x42ulkPublishResponseFailedEntry\x12\x10\n\x08\x65ntry_id\x18\x01 \x01(\t\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"\x84\x02\n!SubscribeTopicEventsRequestAlpha1\x12Z\n\x0finitial_request\x18\x01 \x01(\x0b\x32?.dapr.proto.runtime.v1.SubscribeTopicEventsRequestInitialAlpha1H\x00\x12\\\n\x0f\x65vent_processed\x18\x02 \x01(\x0b\x32\x41.dapr.proto.runtime.v1.SubscribeTopicEventsRequestProcessedAlpha1H\x00\x42%\n#subscribe_topic_events_request_type\"\x96\x02\n(SubscribeTopicEventsRequestInitialAlpha1\x12\x13\n\x0bpubsub_name\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\x12_\n\x08metadata\x18\x03 \x03(\x0b\x32M.dapr.proto.runtime.v1.SubscribeTopicEventsRequestInitialAlpha1.MetadataEntry\x12\x1e\n\x11\x64\x65\x61\x64_letter_topic\x18\x04 \x01(\tH\x00\x88\x01\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x14\n\x12_dead_letter_topic\"s\n*SubscribeTopicEventsRequestProcessedAlpha1\x12\n\n\x02id\x18\x01 \x01(\t\x12\x39\n\x06status\x18\x02 \x01(\x0b\x32).dapr.proto.runtime.v1.TopicEventResponse\"\xed\x01\n\"SubscribeTopicEventsResponseAlpha1\x12\\\n\x10initial_response\x18\x01 \x01(\x0b\x32@.dapr.proto.runtime.v1.SubscribeTopicEventsResponseInitialAlpha1H\x00\x12\x41\n\revent_message\x18\x02 \x01(\x0b\x32(.dapr.proto.runtime.v1.TopicEventRequestH\x00\x42&\n$subscribe_topic_events_response_type\"+\n)SubscribeTopicEventsResponseInitialAlpha1Bo\n\nio.dapr.v1B\x10\x44\x61prPubsubProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dapr.proto.runtime.v1.pubsub_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' + _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\020DaprPubsubProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' _globals['_PUBLISHEVENTREQUEST_METADATAENTRY']._loaded_options = None _globals['_PUBLISHEVENTREQUEST_METADATAENTRY']._serialized_options = b'8\001' _globals['_BULKPUBLISHREQUEST_METADATAENTRY']._loaded_options = None diff --git a/dapr/proto/runtime/v1/pubsub_pb2.pyi b/dapr/proto/runtime/v1/pubsub_pb2.pyi index bdd03e6f5..d15676afd 100644 --- a/dapr/proto/runtime/v1/pubsub_pb2.pyi +++ b/dapr/proto/runtime/v1/pubsub_pb2.pyi @@ -14,60 +14,60 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import dapr.proto.runtime.v1.appcallback_pb2 -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.message +from collections import abc as _abc +from dapr.proto.runtime.v1 import appcallback_pb2 as _appcallback_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class PublishEventRequest(google.protobuf.message.Message): +@_typing.final +class PublishEventRequest(_message.Message): """PublishEventRequest is the message to publish event data to pubsub topic""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - PUBSUB_NAME_FIELD_NUMBER: builtins.int - TOPIC_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - DATA_CONTENT_TYPE_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - pubsub_name: builtins.str + PUBSUB_NAME_FIELD_NUMBER: _builtins.int + TOPIC_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + DATA_CONTENT_TYPE_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + pubsub_name: _builtins.str """The name of the pubsub component""" - topic: builtins.str + topic: _builtins.str """The pubsub topic""" - data: builtins.bytes + data: _builtins.bytes """The data which will be published to topic.""" - data_content_type: builtins.str + data_content_type: _builtins.str """The content type for the data (optional).""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata passing to pub components metadata property: @@ -77,178 +77,178 @@ class PublishEventRequest(google.protobuf.message.Message): def __init__( self, *, - pubsub_name: builtins.str = ..., - topic: builtins.str = ..., - data: builtins.bytes = ..., - data_content_type: builtins.str = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + pubsub_name: _builtins.str = ..., + topic: _builtins.str = ..., + data: _builtins.bytes = ..., + data_content_type: _builtins.str = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data", "data_content_type", b"data_content_type", "metadata", b"metadata", "pubsub_name", b"pubsub_name", "topic", b"topic"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "data_content_type", b"data_content_type", "metadata", b"metadata", "pubsub_name", b"pubsub_name", "topic", b"topic"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___PublishEventRequest: typing_extensions.TypeAlias = PublishEventRequest +Global___PublishEventRequest: _TypeAlias = PublishEventRequest # noqa: Y015 -@typing.final -class BulkPublishRequest(google.protobuf.message.Message): +@_typing.final +class BulkPublishRequest(_message.Message): """BulkPublishRequest is the message to bulk publish events to pubsub topic""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - PUBSUB_NAME_FIELD_NUMBER: builtins.int - TOPIC_FIELD_NUMBER: builtins.int - ENTRIES_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - pubsub_name: builtins.str + PUBSUB_NAME_FIELD_NUMBER: _builtins.int + TOPIC_FIELD_NUMBER: _builtins.int + ENTRIES_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + pubsub_name: _builtins.str """The name of the pubsub component""" - topic: builtins.str + topic: _builtins.str """The pubsub topic""" - @property - def entries(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___BulkPublishRequestEntry]: + @_builtins.property + def entries(self) -> _containers.RepeatedCompositeFieldContainer[Global___BulkPublishRequestEntry]: """The entries which contain the individual events and associated details to be published""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The request level metadata passing to to the pubsub components""" def __init__( self, *, - pubsub_name: builtins.str = ..., - topic: builtins.str = ..., - entries: collections.abc.Iterable[Global___BulkPublishRequestEntry] | None = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + pubsub_name: _builtins.str = ..., + topic: _builtins.str = ..., + entries: _abc.Iterable[Global___BulkPublishRequestEntry] | None = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["entries", b"entries", "metadata", b"metadata", "pubsub_name", b"pubsub_name", "topic", b"topic"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["entries", b"entries", "metadata", b"metadata", "pubsub_name", b"pubsub_name", "topic", b"topic"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___BulkPublishRequest: typing_extensions.TypeAlias = BulkPublishRequest +Global___BulkPublishRequest: _TypeAlias = BulkPublishRequest # noqa: Y015 -@typing.final -class BulkPublishRequestEntry(google.protobuf.message.Message): +@_typing.final +class BulkPublishRequestEntry(_message.Message): """BulkPublishRequestEntry is the message containing the event to be bulk published""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - ENTRY_ID_FIELD_NUMBER: builtins.int - EVENT_FIELD_NUMBER: builtins.int - CONTENT_TYPE_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - entry_id: builtins.str + ENTRY_ID_FIELD_NUMBER: _builtins.int + EVENT_FIELD_NUMBER: _builtins.int + CONTENT_TYPE_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + entry_id: _builtins.str """The request scoped unique ID referring to this message. Used to map status in response""" - event: builtins.bytes + event: _builtins.bytes """The event which will be pulished to the topic""" - content_type: builtins.str + content_type: _builtins.str """The content type for the event""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The event level metadata passing to the pubsub component""" def __init__( self, *, - entry_id: builtins.str = ..., - event: builtins.bytes = ..., - content_type: builtins.str = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + entry_id: _builtins.str = ..., + event: _builtins.bytes = ..., + content_type: _builtins.str = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["content_type", b"content_type", "entry_id", b"entry_id", "event", b"event", "metadata", b"metadata"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["content_type", b"content_type", "entry_id", b"entry_id", "event", b"event", "metadata", b"metadata"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___BulkPublishRequestEntry: typing_extensions.TypeAlias = BulkPublishRequestEntry +Global___BulkPublishRequestEntry: _TypeAlias = BulkPublishRequestEntry # noqa: Y015 -@typing.final -class BulkPublishResponse(google.protobuf.message.Message): +@_typing.final +class BulkPublishResponse(_message.Message): """BulkPublishResponse is the message returned from a BulkPublishEvent call""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - FAILEDENTRIES_FIELD_NUMBER: builtins.int - @property - def failedEntries(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___BulkPublishResponseFailedEntry]: + FAILEDENTRIES_FIELD_NUMBER: _builtins.int + @_builtins.property + def failedEntries(self) -> _containers.RepeatedCompositeFieldContainer[Global___BulkPublishResponseFailedEntry]: """The entries for different events that failed publish in the BulkPublishEvent call""" def __init__( self, *, - failedEntries: collections.abc.Iterable[Global___BulkPublishResponseFailedEntry] | None = ..., + failedEntries: _abc.Iterable[Global___BulkPublishResponseFailedEntry] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["failedEntries", b"failedEntries"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["failedEntries", b"failedEntries"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___BulkPublishResponse: typing_extensions.TypeAlias = BulkPublishResponse +Global___BulkPublishResponse: _TypeAlias = BulkPublishResponse # noqa: Y015 -@typing.final -class BulkPublishResponseFailedEntry(google.protobuf.message.Message): +@_typing.final +class BulkPublishResponseFailedEntry(_message.Message): """BulkPublishResponseFailedEntry is the message containing the entryID and error of a failed event in BulkPublishEvent call""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ENTRY_ID_FIELD_NUMBER: builtins.int - ERROR_FIELD_NUMBER: builtins.int - entry_id: builtins.str + ENTRY_ID_FIELD_NUMBER: _builtins.int + ERROR_FIELD_NUMBER: _builtins.int + entry_id: _builtins.str """The response scoped unique ID referring to this message""" - error: builtins.str + error: _builtins.str """The error message if any on failure""" def __init__( self, *, - entry_id: builtins.str = ..., - error: builtins.str = ..., + entry_id: _builtins.str = ..., + error: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["entry_id", b"entry_id", "error", b"error"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["entry_id", b"entry_id", "error", b"error"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___BulkPublishResponseFailedEntry: typing_extensions.TypeAlias = BulkPublishResponseFailedEntry +Global___BulkPublishResponseFailedEntry: _TypeAlias = BulkPublishResponseFailedEntry # noqa: Y015 -@typing.final -class SubscribeTopicEventsRequestAlpha1(google.protobuf.message.Message): +@_typing.final +class SubscribeTopicEventsRequestAlpha1(_message.Message): """SubscribeTopicEventsRequestAlpha1 is a message containing the details for subscribing to a topic via streaming. The first message must always be the initial request. All subsequent messages must be event processed responses. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - INITIAL_REQUEST_FIELD_NUMBER: builtins.int - EVENT_PROCESSED_FIELD_NUMBER: builtins.int - @property + INITIAL_REQUEST_FIELD_NUMBER: _builtins.int + EVENT_PROCESSED_FIELD_NUMBER: _builtins.int + @_builtins.property def initial_request(self) -> Global___SubscribeTopicEventsRequestInitialAlpha1: ... - @property + @_builtins.property def event_processed(self) -> Global___SubscribeTopicEventsRequestProcessedAlpha1: ... def __init__( self, @@ -256,55 +256,55 @@ class SubscribeTopicEventsRequestAlpha1(google.protobuf.message.Message): initial_request: Global___SubscribeTopicEventsRequestInitialAlpha1 | None = ..., event_processed: Global___SubscribeTopicEventsRequestProcessedAlpha1 | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["event_processed", b"event_processed", "initial_request", b"initial_request", "subscribe_topic_events_request_type", b"subscribe_topic_events_request_type"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["event_processed", b"event_processed", "initial_request", b"initial_request", "subscribe_topic_events_request_type", b"subscribe_topic_events_request_type"] + _HasFieldArgType: _TypeAlias = _typing.Literal["event_processed", b"event_processed", "initial_request", b"initial_request", "subscribe_topic_events_request_type", b"subscribe_topic_events_request_type"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["event_processed", b"event_processed", "initial_request", b"initial_request", "subscribe_topic_events_request_type", b"subscribe_topic_events_request_type"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType_subscribe_topic_events_request_type: typing_extensions.TypeAlias = typing.Literal["initial_request", "event_processed"] - _WhichOneofArgType_subscribe_topic_events_request_type: typing_extensions.TypeAlias = typing.Literal["subscribe_topic_events_request_type", b"subscribe_topic_events_request_type"] + _WhichOneofReturnType_subscribe_topic_events_request_type: _TypeAlias = _typing.Literal["initial_request", "event_processed"] # noqa: Y015 + _WhichOneofArgType_subscribe_topic_events_request_type: _TypeAlias = _typing.Literal["subscribe_topic_events_request_type", b"subscribe_topic_events_request_type"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType_subscribe_topic_events_request_type) -> _WhichOneofReturnType_subscribe_topic_events_request_type | None: ... -Global___SubscribeTopicEventsRequestAlpha1: typing_extensions.TypeAlias = SubscribeTopicEventsRequestAlpha1 +Global___SubscribeTopicEventsRequestAlpha1: _TypeAlias = SubscribeTopicEventsRequestAlpha1 # noqa: Y015 -@typing.final -class SubscribeTopicEventsRequestInitialAlpha1(google.protobuf.message.Message): +@_typing.final +class SubscribeTopicEventsRequestInitialAlpha1(_message.Message): """SubscribeTopicEventsRequestInitialAlpha1 is the initial message containing the details for subscribing to a topic via streaming. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - PUBSUB_NAME_FIELD_NUMBER: builtins.int - TOPIC_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - DEAD_LETTER_TOPIC_FIELD_NUMBER: builtins.int - pubsub_name: builtins.str + PUBSUB_NAME_FIELD_NUMBER: _builtins.int + TOPIC_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + DEAD_LETTER_TOPIC_FIELD_NUMBER: _builtins.int + pubsub_name: _builtins.str """The name of the pubsub component""" - topic: builtins.str + topic: _builtins.str """The pubsub topic""" - dead_letter_topic: builtins.str + dead_letter_topic: _builtins.str """dead_letter_topic is the topic to which messages that fail to be processed are sent. """ - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata passing to pub components metadata property: @@ -314,90 +314,90 @@ class SubscribeTopicEventsRequestInitialAlpha1(google.protobuf.message.Message): def __init__( self, *, - pubsub_name: builtins.str = ..., - topic: builtins.str = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., - dead_letter_topic: builtins.str | None = ..., + pubsub_name: _builtins.str = ..., + topic: _builtins.str = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + dead_letter_topic: _builtins.str | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_dead_letter_topic", b"_dead_letter_topic", "dead_letter_topic", b"dead_letter_topic"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_dead_letter_topic", b"_dead_letter_topic", "dead_letter_topic", b"dead_letter_topic", "metadata", b"metadata", "pubsub_name", b"pubsub_name", "topic", b"topic"] + _HasFieldArgType: _TypeAlias = _typing.Literal["_dead_letter_topic", b"_dead_letter_topic", "dead_letter_topic", b"dead_letter_topic"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_dead_letter_topic", b"_dead_letter_topic", "dead_letter_topic", b"dead_letter_topic", "metadata", b"metadata", "pubsub_name", b"pubsub_name", "topic", b"topic"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType__dead_letter_topic: typing_extensions.TypeAlias = typing.Literal["dead_letter_topic"] - _WhichOneofArgType__dead_letter_topic: typing_extensions.TypeAlias = typing.Literal["_dead_letter_topic", b"_dead_letter_topic"] + _WhichOneofReturnType__dead_letter_topic: _TypeAlias = _typing.Literal["dead_letter_topic"] # noqa: Y015 + _WhichOneofArgType__dead_letter_topic: _TypeAlias = _typing.Literal["_dead_letter_topic", b"_dead_letter_topic"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType__dead_letter_topic) -> _WhichOneofReturnType__dead_letter_topic | None: ... -Global___SubscribeTopicEventsRequestInitialAlpha1: typing_extensions.TypeAlias = SubscribeTopicEventsRequestInitialAlpha1 +Global___SubscribeTopicEventsRequestInitialAlpha1: _TypeAlias = SubscribeTopicEventsRequestInitialAlpha1 # noqa: Y015 -@typing.final -class SubscribeTopicEventsRequestProcessedAlpha1(google.protobuf.message.Message): +@_typing.final +class SubscribeTopicEventsRequestProcessedAlpha1(_message.Message): """SubscribeTopicEventsRequestProcessedAlpha1 is the message containing the subscription to a topic. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ID_FIELD_NUMBER: builtins.int - STATUS_FIELD_NUMBER: builtins.int - id: builtins.str + ID_FIELD_NUMBER: _builtins.int + STATUS_FIELD_NUMBER: _builtins.int + id: _builtins.str """id is the unique identifier for the subscription request.""" - @property - def status(self) -> dapr.proto.runtime.v1.appcallback_pb2.TopicEventResponse: + @_builtins.property + def status(self) -> _appcallback_pb2.TopicEventResponse: """status is the result of the subscription request.""" def __init__( self, *, - id: builtins.str = ..., - status: dapr.proto.runtime.v1.appcallback_pb2.TopicEventResponse | None = ..., + id: _builtins.str = ..., + status: _appcallback_pb2.TopicEventResponse | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["status", b"status"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["id", b"id", "status", b"status"] + _HasFieldArgType: _TypeAlias = _typing.Literal["status", b"status"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["id", b"id", "status", b"status"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SubscribeTopicEventsRequestProcessedAlpha1: typing_extensions.TypeAlias = SubscribeTopicEventsRequestProcessedAlpha1 +Global___SubscribeTopicEventsRequestProcessedAlpha1: _TypeAlias = SubscribeTopicEventsRequestProcessedAlpha1 # noqa: Y015 -@typing.final -class SubscribeTopicEventsResponseAlpha1(google.protobuf.message.Message): +@_typing.final +class SubscribeTopicEventsResponseAlpha1(_message.Message): """SubscribeTopicEventsResponseAlpha1 is a message returned from daprd when subscribing to a topic via streaming. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - INITIAL_RESPONSE_FIELD_NUMBER: builtins.int - EVENT_MESSAGE_FIELD_NUMBER: builtins.int - @property + INITIAL_RESPONSE_FIELD_NUMBER: _builtins.int + EVENT_MESSAGE_FIELD_NUMBER: _builtins.int + @_builtins.property def initial_response(self) -> Global___SubscribeTopicEventsResponseInitialAlpha1: ... - @property - def event_message(self) -> dapr.proto.runtime.v1.appcallback_pb2.TopicEventRequest: ... + @_builtins.property + def event_message(self) -> _appcallback_pb2.TopicEventRequest: ... def __init__( self, *, initial_response: Global___SubscribeTopicEventsResponseInitialAlpha1 | None = ..., - event_message: dapr.proto.runtime.v1.appcallback_pb2.TopicEventRequest | None = ..., + event_message: _appcallback_pb2.TopicEventRequest | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["event_message", b"event_message", "initial_response", b"initial_response", "subscribe_topic_events_response_type", b"subscribe_topic_events_response_type"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["event_message", b"event_message", "initial_response", b"initial_response", "subscribe_topic_events_response_type", b"subscribe_topic_events_response_type"] + _HasFieldArgType: _TypeAlias = _typing.Literal["event_message", b"event_message", "initial_response", b"initial_response", "subscribe_topic_events_response_type", b"subscribe_topic_events_response_type"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["event_message", b"event_message", "initial_response", b"initial_response", "subscribe_topic_events_response_type", b"subscribe_topic_events_response_type"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType_subscribe_topic_events_response_type: typing_extensions.TypeAlias = typing.Literal["initial_response", "event_message"] - _WhichOneofArgType_subscribe_topic_events_response_type: typing_extensions.TypeAlias = typing.Literal["subscribe_topic_events_response_type", b"subscribe_topic_events_response_type"] + _WhichOneofReturnType_subscribe_topic_events_response_type: _TypeAlias = _typing.Literal["initial_response", "event_message"] # noqa: Y015 + _WhichOneofArgType_subscribe_topic_events_response_type: _TypeAlias = _typing.Literal["subscribe_topic_events_response_type", b"subscribe_topic_events_response_type"] # noqa: Y015 def WhichOneof(self, oneof_group: _WhichOneofArgType_subscribe_topic_events_response_type) -> _WhichOneofReturnType_subscribe_topic_events_response_type | None: ... -Global___SubscribeTopicEventsResponseAlpha1: typing_extensions.TypeAlias = SubscribeTopicEventsResponseAlpha1 +Global___SubscribeTopicEventsResponseAlpha1: _TypeAlias = SubscribeTopicEventsResponseAlpha1 # noqa: Y015 -@typing.final -class SubscribeTopicEventsResponseInitialAlpha1(google.protobuf.message.Message): +@_typing.final +class SubscribeTopicEventsResponseInitialAlpha1(_message.Message): """SubscribeTopicEventsResponseInitialAlpha1 is the initial response from daprd when subscribing to a topic. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor def __init__( self, ) -> None: ... -Global___SubscribeTopicEventsResponseInitialAlpha1: typing_extensions.TypeAlias = SubscribeTopicEventsResponseInitialAlpha1 +Global___SubscribeTopicEventsResponseInitialAlpha1: _TypeAlias = SubscribeTopicEventsResponseInitialAlpha1 # noqa: Y015 diff --git a/dapr/proto/runtime/v1/secret_pb2.py b/dapr/proto/runtime/v1/secret_pb2.py index d54579ab3..052fa50e1 100644 --- a/dapr/proto/runtime/v1/secret_pb2.py +++ b/dapr/proto/runtime/v1/secret_pb2.py @@ -24,14 +24,14 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"dapr/proto/runtime/v1/secret.proto\x12\x15\x64\x61pr.proto.runtime.v1\"\xb8\x01\n\x10GetSecretRequest\x12\x1d\n\nstore_name\x18\x01 \x01(\tR\tstoreName\x12\x0b\n\x03key\x18\x02 \x01(\t\x12G\n\x08metadata\x18\x03 \x03(\x0b\x32\x35.dapr.proto.runtime.v1.GetSecretRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x82\x01\n\x11GetSecretResponse\x12@\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x32.dapr.proto.runtime.v1.GetSecretResponse.DataEntry\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb3\x01\n\x14GetBulkSecretRequest\x12\x1d\n\nstore_name\x18\x01 \x01(\tR\tstoreName\x12K\n\x08metadata\x18\x02 \x03(\x0b\x32\x39.dapr.proto.runtime.v1.GetBulkSecretRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x01\n\x0eSecretResponse\x12\x43\n\x07secrets\x18\x01 \x03(\x0b\x32\x32.dapr.proto.runtime.v1.SecretResponse.SecretsEntry\x1a.\n\x0cSecretsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb1\x01\n\x15GetBulkSecretResponse\x12\x44\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x36.dapr.proto.runtime.v1.GetBulkSecretResponse.DataEntry\x1aR\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x34\n\x05value\x18\x02 \x01(\x0b\x32%.dapr.proto.runtime.v1.SecretResponse:\x02\x38\x01\x42i\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"dapr/proto/runtime/v1/secret.proto\x12\x15\x64\x61pr.proto.runtime.v1\"\xb8\x01\n\x10GetSecretRequest\x12\x1d\n\nstore_name\x18\x01 \x01(\tR\tstoreName\x12\x0b\n\x03key\x18\x02 \x01(\t\x12G\n\x08metadata\x18\x03 \x03(\x0b\x32\x35.dapr.proto.runtime.v1.GetSecretRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x82\x01\n\x11GetSecretResponse\x12@\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x32.dapr.proto.runtime.v1.GetSecretResponse.DataEntry\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb3\x01\n\x14GetBulkSecretRequest\x12\x1d\n\nstore_name\x18\x01 \x01(\tR\tstoreName\x12K\n\x08metadata\x18\x02 \x03(\x0b\x32\x39.dapr.proto.runtime.v1.GetBulkSecretRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x01\n\x0eSecretResponse\x12\x43\n\x07secrets\x18\x01 \x03(\x0b\x32\x32.dapr.proto.runtime.v1.SecretResponse.SecretsEntry\x1a.\n\x0cSecretsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb1\x01\n\x15GetBulkSecretResponse\x12\x44\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x36.dapr.proto.runtime.v1.GetBulkSecretResponse.DataEntry\x1aR\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x34\n\x05value\x18\x02 \x01(\x0b\x32%.dapr.proto.runtime.v1.SecretResponse:\x02\x38\x01\x42o\n\nio.dapr.v1B\x10\x44\x61prSecretProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dapr.proto.runtime.v1.secret_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' + _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\020DaprSecretProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' _globals['_GETSECRETREQUEST_METADATAENTRY']._loaded_options = None _globals['_GETSECRETREQUEST_METADATAENTRY']._serialized_options = b'8\001' _globals['_GETSECRETRESPONSE_DATAENTRY']._loaded_options = None diff --git a/dapr/proto/runtime/v1/secret_pb2.pyi b/dapr/proto/runtime/v1/secret_pb2.pyi index 1698014ba..0b60323fa 100644 --- a/dapr/proto/runtime/v1/secret_pb2.pyi +++ b/dapr/proto/runtime/v1/secret_pb2.pyi @@ -14,93 +14,93 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.message +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class GetSecretRequest(google.protobuf.message.Message): +@_typing.final +class GetSecretRequest(_message.Message): """GetSecretRequest is the message to get secret from secret store.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - STORE_NAME_FIELD_NUMBER: builtins.int - KEY_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - store_name: builtins.str + STORE_NAME_FIELD_NUMBER: _builtins.int + KEY_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + store_name: _builtins.str """The name of secret store.""" - key: builtins.str + key: _builtins.str """The name of secret key.""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata which will be sent to secret store components.""" def __init__( self, *, - store_name: builtins.str = ..., - key: builtins.str = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + store_name: _builtins.str = ..., + key: _builtins.str = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "metadata", b"metadata", "store_name", b"store_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "metadata", b"metadata", "store_name", b"store_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetSecretRequest: typing_extensions.TypeAlias = GetSecretRequest +Global___GetSecretRequest: _TypeAlias = GetSecretRequest # noqa: Y015 -@typing.final -class GetSecretResponse(google.protobuf.message.Message): +@_typing.final +class GetSecretResponse(_message.Message): """GetSecretResponse is the response message to convey the requested secret.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class DataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class DataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - DATA_FIELD_NUMBER: builtins.int - @property - def data(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + DATA_FIELD_NUMBER: _builtins.int + @_builtins.property + def data(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """data is the secret value. Some secret store, such as kubernetes secret store, can save multiple secrets for single secret key. """ @@ -108,120 +108,120 @@ class GetSecretResponse(google.protobuf.message.Message): def __init__( self, *, - data: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + data: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetSecretResponse: typing_extensions.TypeAlias = GetSecretResponse +Global___GetSecretResponse: _TypeAlias = GetSecretResponse # noqa: Y015 -@typing.final -class GetBulkSecretRequest(google.protobuf.message.Message): +@_typing.final +class GetBulkSecretRequest(_message.Message): """GetBulkSecretRequest is the message to get the secrets from secret store.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - STORE_NAME_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - store_name: builtins.str + STORE_NAME_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + store_name: _builtins.str """The name of secret store.""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata which will be sent to secret store components.""" def __init__( self, *, - store_name: builtins.str = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + store_name: _builtins.str = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["metadata", b"metadata", "store_name", b"store_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["metadata", b"metadata", "store_name", b"store_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetBulkSecretRequest: typing_extensions.TypeAlias = GetBulkSecretRequest +Global___GetBulkSecretRequest: _TypeAlias = GetBulkSecretRequest # noqa: Y015 -@typing.final -class SecretResponse(google.protobuf.message.Message): +@_typing.final +class SecretResponse(_message.Message): """SecretResponse is a map of decrypted string/string values""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class SecretsEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class SecretsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - SECRETS_FIELD_NUMBER: builtins.int - @property - def secrets(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: ... + SECRETS_FIELD_NUMBER: _builtins.int + @_builtins.property + def secrets(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: ... def __init__( self, *, - secrets: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + secrets: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["secrets", b"secrets"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["secrets", b"secrets"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SecretResponse: typing_extensions.TypeAlias = SecretResponse +Global___SecretResponse: _TypeAlias = SecretResponse # noqa: Y015 -@typing.final -class GetBulkSecretResponse(google.protobuf.message.Message): +@_typing.final +class GetBulkSecretResponse(_message.Message): """GetBulkSecretResponse is the response message to convey the requested secrets.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class DataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class DataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - @property + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property def value(self) -> Global___SecretResponse: ... def __init__( self, *, - key: builtins.str = ..., + key: _builtins.str = ..., value: Global___SecretResponse | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["value", b"value"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - DATA_FIELD_NUMBER: builtins.int - @property - def data(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, Global___SecretResponse]: + DATA_FIELD_NUMBER: _builtins.int + @_builtins.property + def data(self) -> _containers.MessageMap[_builtins.str, Global___SecretResponse]: """data hold the secret values. Some secret store, such as kubernetes secret store, can save multiple secrets for single secret key. """ @@ -229,9 +229,9 @@ class GetBulkSecretResponse(google.protobuf.message.Message): def __init__( self, *, - data: collections.abc.Mapping[builtins.str, Global___SecretResponse] | None = ..., + data: _abc.Mapping[_builtins.str, Global___SecretResponse] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetBulkSecretResponse: typing_extensions.TypeAlias = GetBulkSecretResponse +Global___GetBulkSecretResponse: _TypeAlias = GetBulkSecretResponse # noqa: Y015 diff --git a/dapr/proto/runtime/v1/state_pb2.py b/dapr/proto/runtime/v1/state_pb2.py index d40e802c0..a2b14f6c9 100644 --- a/dapr/proto/runtime/v1/state_pb2.py +++ b/dapr/proto/runtime/v1/state_pb2.py @@ -25,14 +25,14 @@ from dapr.proto.common.v1 import common_pb2 as dapr_dot_proto_dot_common_dot_v1_dot_common__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!dapr/proto/runtime/v1/state.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a!dapr/proto/common/v1/common.proto\"\xf5\x01\n\x0fGetStateRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\x12H\n\x0b\x63onsistency\x18\x03 \x01(\x0e\x32\x33.dapr.proto.common.v1.StateOptions.StateConsistency\x12\x46\n\x08metadata\x18\x04 \x03(\x0b\x32\x34.dapr.proto.runtime.v1.GetStateRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc9\x01\n\x13GetBulkStateRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12\x0c\n\x04keys\x18\x02 \x03(\t\x12\x13\n\x0bparallelism\x18\x03 \x01(\x05\x12J\n\x08metadata\x18\x04 \x03(\x0b\x32\x38.dapr.proto.runtime.v1.GetBulkStateRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"K\n\x14GetBulkStateResponse\x12\x33\n\x05items\x18\x01 \x03(\x0b\x32$.dapr.proto.runtime.v1.BulkStateItem\"\xbe\x01\n\rBulkStateItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\x12\r\n\x05\x65rror\x18\x04 \x01(\t\x12\x44\n\x08metadata\x18\x05 \x03(\x0b\x32\x32.dapr.proto.runtime.v1.BulkStateItem.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa8\x01\n\x10GetStateResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\x12G\n\x08metadata\x18\x03 \x03(\x0b\x32\x35.dapr.proto.runtime.v1.GetStateResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x90\x02\n\x12\x44\x65leteStateRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\x12(\n\x04\x65tag\x18\x03 \x01(\x0b\x32\x1a.dapr.proto.common.v1.Etag\x12\x33\n\x07options\x18\x04 \x01(\x0b\x32\".dapr.proto.common.v1.StateOptions\x12I\n\x08metadata\x18\x05 \x03(\x0b\x32\x37.dapr.proto.runtime.v1.DeleteStateRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"]\n\x16\x44\x65leteBulkStateRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12/\n\x06states\x18\x02 \x03(\x0b\x32\x1f.dapr.proto.common.v1.StateItem\"W\n\x10SaveStateRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12/\n\x06states\x18\x02 \x03(\x0b\x32\x1f.dapr.proto.common.v1.StateItem\"\xbc\x01\n\x11QueryStateRequest\x12\x1d\n\nstore_name\x18\x01 \x01(\tR\tstoreName\x12\r\n\x05query\x18\x02 \x01(\t\x12H\n\x08metadata\x18\x03 \x03(\x0b\x32\x36.dapr.proto.runtime.v1.QueryStateRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"H\n\x0eQueryStateItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\x12\r\n\x05\x65rror\x18\x04 \x01(\t\"\xd7\x01\n\x12QueryStateResponse\x12\x36\n\x07results\x18\x01 \x03(\x0b\x32%.dapr.proto.runtime.v1.QueryStateItem\x12\r\n\x05token\x18\x02 \x01(\t\x12I\n\x08metadata\x18\x03 \x03(\x0b\x32\x37.dapr.proto.runtime.v1.QueryStateResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"f\n\x1bTransactionalStateOperation\x12\x15\n\roperationType\x18\x01 \x01(\t\x12\x30\n\x07request\x18\x02 \x01(\x0b\x32\x1f.dapr.proto.common.v1.StateItem\"\x83\x02\n\x1e\x45xecuteStateTransactionRequest\x12\x11\n\tstoreName\x18\x01 \x01(\t\x12\x46\n\noperations\x18\x02 \x03(\x0b\x32\x32.dapr.proto.runtime.v1.TransactionalStateOperation\x12U\n\x08metadata\x18\x03 \x03(\x0b\x32\x43.dapr.proto.runtime.v1.ExecuteStateTransactionRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42i\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!dapr/proto/runtime/v1/state.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a!dapr/proto/common/v1/common.proto\"\xf5\x01\n\x0fGetStateRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\x12H\n\x0b\x63onsistency\x18\x03 \x01(\x0e\x32\x33.dapr.proto.common.v1.StateOptions.StateConsistency\x12\x46\n\x08metadata\x18\x04 \x03(\x0b\x32\x34.dapr.proto.runtime.v1.GetStateRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc9\x01\n\x13GetBulkStateRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12\x0c\n\x04keys\x18\x02 \x03(\t\x12\x13\n\x0bparallelism\x18\x03 \x01(\x05\x12J\n\x08metadata\x18\x04 \x03(\x0b\x32\x38.dapr.proto.runtime.v1.GetBulkStateRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"K\n\x14GetBulkStateResponse\x12\x33\n\x05items\x18\x01 \x03(\x0b\x32$.dapr.proto.runtime.v1.BulkStateItem\"\xbe\x01\n\rBulkStateItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\x12\r\n\x05\x65rror\x18\x04 \x01(\t\x12\x44\n\x08metadata\x18\x05 \x03(\x0b\x32\x32.dapr.proto.runtime.v1.BulkStateItem.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa8\x01\n\x10GetStateResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\x12G\n\x08metadata\x18\x03 \x03(\x0b\x32\x35.dapr.proto.runtime.v1.GetStateResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x90\x02\n\x12\x44\x65leteStateRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\x12(\n\x04\x65tag\x18\x03 \x01(\x0b\x32\x1a.dapr.proto.common.v1.Etag\x12\x33\n\x07options\x18\x04 \x01(\x0b\x32\".dapr.proto.common.v1.StateOptions\x12I\n\x08metadata\x18\x05 \x03(\x0b\x32\x37.dapr.proto.runtime.v1.DeleteStateRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"]\n\x16\x44\x65leteBulkStateRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12/\n\x06states\x18\x02 \x03(\x0b\x32\x1f.dapr.proto.common.v1.StateItem\"W\n\x10SaveStateRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\x12/\n\x06states\x18\x02 \x03(\x0b\x32\x1f.dapr.proto.common.v1.StateItem\"\xbc\x01\n\x11QueryStateRequest\x12\x1d\n\nstore_name\x18\x01 \x01(\tR\tstoreName\x12\r\n\x05query\x18\x02 \x01(\t\x12H\n\x08metadata\x18\x03 \x03(\x0b\x32\x36.dapr.proto.runtime.v1.QueryStateRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"H\n\x0eQueryStateItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\x12\r\n\x05\x65rror\x18\x04 \x01(\t\"\xd7\x01\n\x12QueryStateResponse\x12\x36\n\x07results\x18\x01 \x03(\x0b\x32%.dapr.proto.runtime.v1.QueryStateItem\x12\r\n\x05token\x18\x02 \x01(\t\x12I\n\x08metadata\x18\x03 \x03(\x0b\x32\x37.dapr.proto.runtime.v1.QueryStateResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"f\n\x1bTransactionalStateOperation\x12\x15\n\roperationType\x18\x01 \x01(\t\x12\x30\n\x07request\x18\x02 \x01(\x0b\x32\x1f.dapr.proto.common.v1.StateItem\"\x83\x02\n\x1e\x45xecuteStateTransactionRequest\x12\x11\n\tstoreName\x18\x01 \x01(\t\x12\x46\n\noperations\x18\x02 \x03(\x0b\x32\x32.dapr.proto.runtime.v1.TransactionalStateOperation\x12U\n\x08metadata\x18\x03 \x03(\x0b\x32\x43.dapr.proto.runtime.v1.ExecuteStateTransactionRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42n\n\nio.dapr.v1B\x0f\x44\x61prStateProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dapr.proto.runtime.v1.state_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' + _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\017DaprStateProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' _globals['_GETSTATEREQUEST_METADATAENTRY']._loaded_options = None _globals['_GETSTATEREQUEST_METADATAENTRY']._serialized_options = b'8\001' _globals['_GETBULKSTATEREQUEST_METADATAENTRY']._loaded_options = None diff --git a/dapr/proto/runtime/v1/state_pb2.pyi b/dapr/proto/runtime/v1/state_pb2.pyi index 86da1c2d0..587d9fa33 100644 --- a/dapr/proto/runtime/v1/state_pb2.pyi +++ b/dapr/proto/runtime/v1/state_pb2.pyi @@ -14,561 +14,561 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import dapr.proto.common.v1.common_pb2 -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.message +from collections import abc as _abc +from dapr.proto.common.v1 import common_pb2 as _common_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class GetStateRequest(google.protobuf.message.Message): +@_typing.final +class GetStateRequest(_message.Message): """GetStateRequest is the message to get key-value states from specific state store.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - STORE_NAME_FIELD_NUMBER: builtins.int - KEY_FIELD_NUMBER: builtins.int - CONSISTENCY_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - store_name: builtins.str + STORE_NAME_FIELD_NUMBER: _builtins.int + KEY_FIELD_NUMBER: _builtins.int + CONSISTENCY_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + store_name: _builtins.str """The name of state store.""" - key: builtins.str + key: _builtins.str """The key of the desired state""" - consistency: dapr.proto.common.v1.common_pb2.StateOptions.StateConsistency.ValueType + consistency: _common_pb2.StateOptions.StateConsistency.ValueType """The read consistency of the state store.""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata which will be sent to state store components.""" def __init__( self, *, - store_name: builtins.str = ..., - key: builtins.str = ..., - consistency: dapr.proto.common.v1.common_pb2.StateOptions.StateConsistency.ValueType = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + store_name: _builtins.str = ..., + key: _builtins.str = ..., + consistency: _common_pb2.StateOptions.StateConsistency.ValueType = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["consistency", b"consistency", "key", b"key", "metadata", b"metadata", "store_name", b"store_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["consistency", b"consistency", "key", b"key", "metadata", b"metadata", "store_name", b"store_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetStateRequest: typing_extensions.TypeAlias = GetStateRequest +Global___GetStateRequest: _TypeAlias = GetStateRequest # noqa: Y015 -@typing.final -class GetBulkStateRequest(google.protobuf.message.Message): +@_typing.final +class GetBulkStateRequest(_message.Message): """GetBulkStateRequest is the message to get a list of key-value states from specific state store.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - STORE_NAME_FIELD_NUMBER: builtins.int - KEYS_FIELD_NUMBER: builtins.int - PARALLELISM_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - store_name: builtins.str + STORE_NAME_FIELD_NUMBER: _builtins.int + KEYS_FIELD_NUMBER: _builtins.int + PARALLELISM_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + store_name: _builtins.str """The name of state store.""" - parallelism: builtins.int + parallelism: _builtins.int """The number of parallel operations executed on the state store for a get operation.""" - @property - def keys(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + @_builtins.property + def keys(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """The keys to get.""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata which will be sent to state store components.""" def __init__( self, *, - store_name: builtins.str = ..., - keys: collections.abc.Iterable[builtins.str] | None = ..., - parallelism: builtins.int = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + store_name: _builtins.str = ..., + keys: _abc.Iterable[_builtins.str] | None = ..., + parallelism: _builtins.int = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["keys", b"keys", "metadata", b"metadata", "parallelism", b"parallelism", "store_name", b"store_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["keys", b"keys", "metadata", b"metadata", "parallelism", b"parallelism", "store_name", b"store_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetBulkStateRequest: typing_extensions.TypeAlias = GetBulkStateRequest +Global___GetBulkStateRequest: _TypeAlias = GetBulkStateRequest # noqa: Y015 -@typing.final -class GetBulkStateResponse(google.protobuf.message.Message): +@_typing.final +class GetBulkStateResponse(_message.Message): """GetBulkStateResponse is the response conveying the list of state values.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ITEMS_FIELD_NUMBER: builtins.int - @property - def items(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___BulkStateItem]: + ITEMS_FIELD_NUMBER: _builtins.int + @_builtins.property + def items(self) -> _containers.RepeatedCompositeFieldContainer[Global___BulkStateItem]: """The list of items containing the keys to get values for.""" def __init__( self, *, - items: collections.abc.Iterable[Global___BulkStateItem] | None = ..., + items: _abc.Iterable[Global___BulkStateItem] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["items", b"items"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["items", b"items"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetBulkStateResponse: typing_extensions.TypeAlias = GetBulkStateResponse +Global___GetBulkStateResponse: _TypeAlias = GetBulkStateResponse # noqa: Y015 -@typing.final -class BulkStateItem(google.protobuf.message.Message): +@_typing.final +class BulkStateItem(_message.Message): """BulkStateItem is the response item for a bulk get operation. Return values include the item key, data and etag. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - KEY_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - ETAG_FIELD_NUMBER: builtins.int - ERROR_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - key: builtins.str + KEY_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + ETAG_FIELD_NUMBER: _builtins.int + ERROR_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + key: _builtins.str """state item key""" - data: builtins.bytes + data: _builtins.bytes """The byte array data""" - etag: builtins.str + etag: _builtins.str """The entity tag which represents the specific version of data. ETag format is defined by the corresponding data store. """ - error: builtins.str + error: _builtins.str """The error that was returned from the state store in case of a failed get operation.""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata which will be sent to app.""" def __init__( self, *, - key: builtins.str = ..., - data: builtins.bytes = ..., - etag: builtins.str = ..., - error: builtins.str = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + key: _builtins.str = ..., + data: _builtins.bytes = ..., + etag: _builtins.str = ..., + error: _builtins.str = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data", "error", b"error", "etag", b"etag", "key", b"key", "metadata", b"metadata"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "error", b"error", "etag", b"etag", "key", b"key", "metadata", b"metadata"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___BulkStateItem: typing_extensions.TypeAlias = BulkStateItem +Global___BulkStateItem: _TypeAlias = BulkStateItem # noqa: Y015 -@typing.final -class GetStateResponse(google.protobuf.message.Message): +@_typing.final +class GetStateResponse(_message.Message): """GetStateResponse is the response conveying the state value and etag.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - DATA_FIELD_NUMBER: builtins.int - ETAG_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - data: builtins.bytes + DATA_FIELD_NUMBER: _builtins.int + ETAG_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + data: _builtins.bytes """The byte array data""" - etag: builtins.str + etag: _builtins.str """The entity tag which represents the specific version of data. ETag format is defined by the corresponding data store. """ - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata which will be sent to app.""" def __init__( self, *, - data: builtins.bytes = ..., - etag: builtins.str = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + data: _builtins.bytes = ..., + etag: _builtins.str = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data", "etag", b"etag", "metadata", b"metadata"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "etag", b"etag", "metadata", b"metadata"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetStateResponse: typing_extensions.TypeAlias = GetStateResponse +Global___GetStateResponse: _TypeAlias = GetStateResponse # noqa: Y015 -@typing.final -class DeleteStateRequest(google.protobuf.message.Message): +@_typing.final +class DeleteStateRequest(_message.Message): """DeleteStateRequest is the message to delete key-value states in the specific state store.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - STORE_NAME_FIELD_NUMBER: builtins.int - KEY_FIELD_NUMBER: builtins.int - ETAG_FIELD_NUMBER: builtins.int - OPTIONS_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - store_name: builtins.str + STORE_NAME_FIELD_NUMBER: _builtins.int + KEY_FIELD_NUMBER: _builtins.int + ETAG_FIELD_NUMBER: _builtins.int + OPTIONS_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + store_name: _builtins.str """The name of state store.""" - key: builtins.str + key: _builtins.str """The key of the desired state""" - @property - def etag(self) -> dapr.proto.common.v1.common_pb2.Etag: + @_builtins.property + def etag(self) -> _common_pb2.Etag: """The entity tag which represents the specific version of data. The exact ETag format is defined by the corresponding data store. """ - @property - def options(self) -> dapr.proto.common.v1.common_pb2.StateOptions: + @_builtins.property + def options(self) -> _common_pb2.StateOptions: """State operation options which includes concurrency/ consistency/retry_policy. """ - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata which will be sent to state store components.""" def __init__( self, *, - store_name: builtins.str = ..., - key: builtins.str = ..., - etag: dapr.proto.common.v1.common_pb2.Etag | None = ..., - options: dapr.proto.common.v1.common_pb2.StateOptions | None = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + store_name: _builtins.str = ..., + key: _builtins.str = ..., + etag: _common_pb2.Etag | None = ..., + options: _common_pb2.StateOptions | None = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["etag", b"etag", "options", b"options"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["etag", b"etag", "key", b"key", "metadata", b"metadata", "options", b"options", "store_name", b"store_name"] + _HasFieldArgType: _TypeAlias = _typing.Literal["etag", b"etag", "options", b"options"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["etag", b"etag", "key", b"key", "metadata", b"metadata", "options", b"options", "store_name", b"store_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___DeleteStateRequest: typing_extensions.TypeAlias = DeleteStateRequest +Global___DeleteStateRequest: _TypeAlias = DeleteStateRequest # noqa: Y015 -@typing.final -class DeleteBulkStateRequest(google.protobuf.message.Message): +@_typing.final +class DeleteBulkStateRequest(_message.Message): """DeleteBulkStateRequest is the message to delete a list of key-value states from specific state store.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - STORE_NAME_FIELD_NUMBER: builtins.int - STATES_FIELD_NUMBER: builtins.int - store_name: builtins.str + STORE_NAME_FIELD_NUMBER: _builtins.int + STATES_FIELD_NUMBER: _builtins.int + store_name: _builtins.str """The name of state store.""" - @property - def states(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[dapr.proto.common.v1.common_pb2.StateItem]: + @_builtins.property + def states(self) -> _containers.RepeatedCompositeFieldContainer[_common_pb2.StateItem]: """The array of the state key values.""" def __init__( self, *, - store_name: builtins.str = ..., - states: collections.abc.Iterable[dapr.proto.common.v1.common_pb2.StateItem] | None = ..., + store_name: _builtins.str = ..., + states: _abc.Iterable[_common_pb2.StateItem] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["states", b"states", "store_name", b"store_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["states", b"states", "store_name", b"store_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___DeleteBulkStateRequest: typing_extensions.TypeAlias = DeleteBulkStateRequest +Global___DeleteBulkStateRequest: _TypeAlias = DeleteBulkStateRequest # noqa: Y015 -@typing.final -class SaveStateRequest(google.protobuf.message.Message): +@_typing.final +class SaveStateRequest(_message.Message): """SaveStateRequest is the message to save multiple states into state store.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - STORE_NAME_FIELD_NUMBER: builtins.int - STATES_FIELD_NUMBER: builtins.int - store_name: builtins.str + STORE_NAME_FIELD_NUMBER: _builtins.int + STATES_FIELD_NUMBER: _builtins.int + store_name: _builtins.str """The name of state store.""" - @property - def states(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[dapr.proto.common.v1.common_pb2.StateItem]: + @_builtins.property + def states(self) -> _containers.RepeatedCompositeFieldContainer[_common_pb2.StateItem]: """The array of the state key values.""" def __init__( self, *, - store_name: builtins.str = ..., - states: collections.abc.Iterable[dapr.proto.common.v1.common_pb2.StateItem] | None = ..., + store_name: _builtins.str = ..., + states: _abc.Iterable[_common_pb2.StateItem] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["states", b"states", "store_name", b"store_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["states", b"states", "store_name", b"store_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___SaveStateRequest: typing_extensions.TypeAlias = SaveStateRequest +Global___SaveStateRequest: _TypeAlias = SaveStateRequest # noqa: Y015 -@typing.final -class QueryStateRequest(google.protobuf.message.Message): +@_typing.final +class QueryStateRequest(_message.Message): """QueryStateRequest is the message to query state store.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - STORE_NAME_FIELD_NUMBER: builtins.int - QUERY_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - store_name: builtins.str + STORE_NAME_FIELD_NUMBER: _builtins.int + QUERY_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + store_name: _builtins.str """The name of state store.""" - query: builtins.str + query: _builtins.str """The query in JSON format.""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata which will be sent to state store components.""" def __init__( self, *, - store_name: builtins.str = ..., - query: builtins.str = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + store_name: _builtins.str = ..., + query: _builtins.str = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["metadata", b"metadata", "query", b"query", "store_name", b"store_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["metadata", b"metadata", "query", b"query", "store_name", b"store_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___QueryStateRequest: typing_extensions.TypeAlias = QueryStateRequest +Global___QueryStateRequest: _TypeAlias = QueryStateRequest # noqa: Y015 -@typing.final -class QueryStateItem(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class QueryStateItem(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - DATA_FIELD_NUMBER: builtins.int - ETAG_FIELD_NUMBER: builtins.int - ERROR_FIELD_NUMBER: builtins.int - key: builtins.str + KEY_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + ETAG_FIELD_NUMBER: _builtins.int + ERROR_FIELD_NUMBER: _builtins.int + key: _builtins.str """The object key.""" - data: builtins.bytes + data: _builtins.bytes """The object value.""" - etag: builtins.str + etag: _builtins.str """The entity tag which represents the specific version of data. ETag format is defined by the corresponding data store. """ - error: builtins.str + error: _builtins.str """The error message indicating an error in processing of the query result.""" def __init__( self, *, - key: builtins.str = ..., - data: builtins.bytes = ..., - etag: builtins.str = ..., - error: builtins.str = ..., + key: _builtins.str = ..., + data: _builtins.bytes = ..., + etag: _builtins.str = ..., + error: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["data", b"data", "error", b"error", "etag", b"etag", "key", b"key"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "error", b"error", "etag", b"etag", "key", b"key"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___QueryStateItem: typing_extensions.TypeAlias = QueryStateItem +Global___QueryStateItem: _TypeAlias = QueryStateItem # noqa: Y015 -@typing.final -class QueryStateResponse(google.protobuf.message.Message): +@_typing.final +class QueryStateResponse(_message.Message): """QueryStateResponse is the response conveying the query results.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - RESULTS_FIELD_NUMBER: builtins.int - TOKEN_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - token: builtins.str + RESULTS_FIELD_NUMBER: _builtins.int + TOKEN_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + token: _builtins.str """Pagination token.""" - @property - def results(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___QueryStateItem]: + @_builtins.property + def results(self) -> _containers.RepeatedCompositeFieldContainer[Global___QueryStateItem]: """An array of query results.""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata which will be sent to app.""" def __init__( self, *, - results: collections.abc.Iterable[Global___QueryStateItem] | None = ..., - token: builtins.str = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + results: _abc.Iterable[Global___QueryStateItem] | None = ..., + token: _builtins.str = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["metadata", b"metadata", "results", b"results", "token", b"token"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["metadata", b"metadata", "results", b"results", "token", b"token"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___QueryStateResponse: typing_extensions.TypeAlias = QueryStateResponse +Global___QueryStateResponse: _TypeAlias = QueryStateResponse # noqa: Y015 -@typing.final -class TransactionalStateOperation(google.protobuf.message.Message): +@_typing.final +class TransactionalStateOperation(_message.Message): """TransactionalStateOperation is the message to execute a specified operation with a key-value pair.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - OPERATIONTYPE_FIELD_NUMBER: builtins.int - REQUEST_FIELD_NUMBER: builtins.int - operationType: builtins.str + OPERATIONTYPE_FIELD_NUMBER: _builtins.int + REQUEST_FIELD_NUMBER: _builtins.int + operationType: _builtins.str """The type of operation to be executed""" - @property - def request(self) -> dapr.proto.common.v1.common_pb2.StateItem: + @_builtins.property + def request(self) -> _common_pb2.StateItem: """State values to be operated on""" def __init__( self, *, - operationType: builtins.str = ..., - request: dapr.proto.common.v1.common_pb2.StateItem | None = ..., + operationType: _builtins.str = ..., + request: _common_pb2.StateItem | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["request", b"request"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["operationType", b"operationType", "request", b"request"] + _HasFieldArgType: _TypeAlias = _typing.Literal["request", b"request"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["operationType", b"operationType", "request", b"request"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___TransactionalStateOperation: typing_extensions.TypeAlias = TransactionalStateOperation +Global___TransactionalStateOperation: _TypeAlias = TransactionalStateOperation # noqa: Y015 -@typing.final -class ExecuteStateTransactionRequest(google.protobuf.message.Message): +@_typing.final +class ExecuteStateTransactionRequest(_message.Message): """ExecuteStateTransactionRequest is the message to execute multiple operations on a specified store.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class MetadataEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - STORENAME_FIELD_NUMBER: builtins.int - OPERATIONS_FIELD_NUMBER: builtins.int - METADATA_FIELD_NUMBER: builtins.int - storeName: builtins.str + STORENAME_FIELD_NUMBER: _builtins.int + OPERATIONS_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + storeName: _builtins.str """Required. name of state store.""" - @property - def operations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___TransactionalStateOperation]: + @_builtins.property + def operations(self) -> _containers.RepeatedCompositeFieldContainer[Global___TransactionalStateOperation]: """Required. transactional operation list.""" - @property - def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """The metadata used for transactional operations.""" def __init__( self, *, - storeName: builtins.str = ..., - operations: collections.abc.Iterable[Global___TransactionalStateOperation] | None = ..., - metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + storeName: _builtins.str = ..., + operations: _abc.Iterable[Global___TransactionalStateOperation] | None = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["metadata", b"metadata", "operations", b"operations", "storeName", b"storeName"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["metadata", b"metadata", "operations", b"operations", "storeName", b"storeName"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ExecuteStateTransactionRequest: typing_extensions.TypeAlias = ExecuteStateTransactionRequest +Global___ExecuteStateTransactionRequest: _TypeAlias = ExecuteStateTransactionRequest # noqa: Y015 diff --git a/dapr/proto/runtime/v1/workflow_pb2.py b/dapr/proto/runtime/v1/workflow_pb2.py index 8c9338e91..460fc04d4 100644 --- a/dapr/proto/runtime/v1/workflow_pb2.py +++ b/dapr/proto/runtime/v1/workflow_pb2.py @@ -25,14 +25,14 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$dapr/proto/runtime/v1/workflow.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"d\n\x12GetWorkflowRequest\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12-\n\x12workflow_component\x18\x02 \x01(\tR\x11workflowComponent\"\x84\x03\n\x13GetWorkflowResponse\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12#\n\rworkflow_name\x18\x02 \x01(\tR\x0cworkflowName\x12\x39\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x42\n\x0flast_updated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\rlastUpdatedAt\x12%\n\x0eruntime_status\x18\x05 \x01(\tR\rruntimeStatus\x12N\n\nproperties\x18\x06 \x03(\x0b\x32:.dapr.proto.runtime.v1.GetWorkflowResponse.PropertiesEntry\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x95\x02\n\x14StartWorkflowRequest\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12-\n\x12workflow_component\x18\x02 \x01(\tR\x11workflowComponent\x12#\n\rworkflow_name\x18\x03 \x01(\tR\x0cworkflowName\x12I\n\x07options\x18\x04 \x03(\x0b\x32\x38.dapr.proto.runtime.v1.StartWorkflowRequest.OptionsEntry\x12\r\n\x05input\x18\x05 \x01(\x0c\x1a.\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"8\n\x15StartWorkflowResponse\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\"j\n\x18TerminateWorkflowRequest\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12-\n\x12workflow_component\x18\x02 \x01(\tR\x11workflowComponent\"f\n\x14PauseWorkflowRequest\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12-\n\x12workflow_component\x18\x02 \x01(\tR\x11workflowComponent\"g\n\x15ResumeWorkflowRequest\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12-\n\x12workflow_component\x18\x02 \x01(\tR\x11workflowComponent\"\x9e\x01\n\x19RaiseEventWorkflowRequest\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12-\n\x12workflow_component\x18\x02 \x01(\tR\x11workflowComponent\x12\x1d\n\nevent_name\x18\x03 \x01(\tR\teventName\x12\x12\n\nevent_data\x18\x04 \x01(\x0c\"f\n\x14PurgeWorkflowRequest\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12-\n\x12workflow_component\x18\x02 \x01(\tR\x11workflowComponentBi\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$dapr/proto/runtime/v1/workflow.proto\x12\x15\x64\x61pr.proto.runtime.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"d\n\x12GetWorkflowRequest\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12-\n\x12workflow_component\x18\x02 \x01(\tR\x11workflowComponent\"\x84\x03\n\x13GetWorkflowResponse\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12#\n\rworkflow_name\x18\x02 \x01(\tR\x0cworkflowName\x12\x39\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x42\n\x0flast_updated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\rlastUpdatedAt\x12%\n\x0eruntime_status\x18\x05 \x01(\tR\rruntimeStatus\x12N\n\nproperties\x18\x06 \x03(\x0b\x32:.dapr.proto.runtime.v1.GetWorkflowResponse.PropertiesEntry\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x95\x02\n\x14StartWorkflowRequest\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12-\n\x12workflow_component\x18\x02 \x01(\tR\x11workflowComponent\x12#\n\rworkflow_name\x18\x03 \x01(\tR\x0cworkflowName\x12I\n\x07options\x18\x04 \x03(\x0b\x32\x38.dapr.proto.runtime.v1.StartWorkflowRequest.OptionsEntry\x12\r\n\x05input\x18\x05 \x01(\x0c\x1a.\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"8\n\x15StartWorkflowResponse\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\"j\n\x18TerminateWorkflowRequest\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12-\n\x12workflow_component\x18\x02 \x01(\tR\x11workflowComponent\"f\n\x14PauseWorkflowRequest\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12-\n\x12workflow_component\x18\x02 \x01(\tR\x11workflowComponent\"g\n\x15ResumeWorkflowRequest\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12-\n\x12workflow_component\x18\x02 \x01(\tR\x11workflowComponent\"\x9e\x01\n\x19RaiseEventWorkflowRequest\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12-\n\x12workflow_component\x18\x02 \x01(\tR\x11workflowComponent\x12\x1d\n\nevent_name\x18\x03 \x01(\tR\teventName\x12\x12\n\nevent_data\x18\x04 \x01(\x0c\"f\n\x14PurgeWorkflowRequest\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceID\x12-\n\x12workflow_component\x18\x02 \x01(\tR\x11workflowComponentBq\n\nio.dapr.v1B\x12\x44\x61prWorkflowProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\xaa\x02\x1b\x44\x61pr.Client.Autogen.Grpc.v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dapr.proto.runtime.v1.workflow_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\nDaprProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' + _globals['DESCRIPTOR']._serialized_options = b'\n\nio.dapr.v1B\022DaprWorkflowProtosZ1github.com/dapr/dapr/pkg/proto/runtime/v1;runtime\252\002\033Dapr.Client.Autogen.Grpc.v1' _globals['_GETWORKFLOWRESPONSE_PROPERTIESENTRY']._loaded_options = None _globals['_GETWORKFLOWRESPONSE_PROPERTIESENTRY']._serialized_options = b'8\001' _globals['_STARTWORKFLOWREQUEST_OPTIONSENTRY']._loaded_options = None diff --git a/dapr/proto/runtime/v1/workflow_pb2.pyi b/dapr/proto/runtime/v1/workflow_pb2.pyi index 0bbff3d09..fb5fedc01 100644 --- a/dapr/proto/runtime/v1/workflow_pb2.pyi +++ b/dapr/proto/runtime/v1/workflow_pb2.pyi @@ -14,301 +14,301 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.message -import google.protobuf.timestamp_pb2 +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class GetWorkflowRequest(google.protobuf.message.Message): +@_typing.final +class GetWorkflowRequest(_message.Message): """GetWorkflowRequest is the request for GetWorkflowBeta1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - INSTANCE_ID_FIELD_NUMBER: builtins.int - WORKFLOW_COMPONENT_FIELD_NUMBER: builtins.int - instance_id: builtins.str + INSTANCE_ID_FIELD_NUMBER: _builtins.int + WORKFLOW_COMPONENT_FIELD_NUMBER: _builtins.int + instance_id: _builtins.str """ID of the workflow instance to query.""" - workflow_component: builtins.str + workflow_component: _builtins.str """Name of the workflow component.""" def __init__( self, *, - instance_id: builtins.str = ..., - workflow_component: builtins.str = ..., + instance_id: _builtins.str = ..., + workflow_component: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["instance_id", b"instance_id", "workflow_component", b"workflow_component"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["instance_id", b"instance_id", "workflow_component", b"workflow_component"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetWorkflowRequest: typing_extensions.TypeAlias = GetWorkflowRequest +Global___GetWorkflowRequest: _TypeAlias = GetWorkflowRequest # noqa: Y015 -@typing.final -class GetWorkflowResponse(google.protobuf.message.Message): +@_typing.final +class GetWorkflowResponse(_message.Message): """GetWorkflowResponse is the response for GetWorkflowBeta1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class PropertiesEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class PropertiesEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - INSTANCE_ID_FIELD_NUMBER: builtins.int - WORKFLOW_NAME_FIELD_NUMBER: builtins.int - CREATED_AT_FIELD_NUMBER: builtins.int - LAST_UPDATED_AT_FIELD_NUMBER: builtins.int - RUNTIME_STATUS_FIELD_NUMBER: builtins.int - PROPERTIES_FIELD_NUMBER: builtins.int - instance_id: builtins.str + INSTANCE_ID_FIELD_NUMBER: _builtins.int + WORKFLOW_NAME_FIELD_NUMBER: _builtins.int + CREATED_AT_FIELD_NUMBER: _builtins.int + LAST_UPDATED_AT_FIELD_NUMBER: _builtins.int + RUNTIME_STATUS_FIELD_NUMBER: _builtins.int + PROPERTIES_FIELD_NUMBER: _builtins.int + instance_id: _builtins.str """ID of the workflow instance.""" - workflow_name: builtins.str + workflow_name: _builtins.str """Name of the workflow.""" - runtime_status: builtins.str + runtime_status: _builtins.str """The current status of the workflow instance, for example, "PENDING", "RUNNING", "SUSPENDED", "COMPLETED", "FAILED", and "TERMINATED".""" - @property - def created_at(self) -> google.protobuf.timestamp_pb2.Timestamp: + @_builtins.property + def created_at(self) -> _timestamp_pb2.Timestamp: """The time at which the workflow instance was created.""" - @property - def last_updated_at(self) -> google.protobuf.timestamp_pb2.Timestamp: + @_builtins.property + def last_updated_at(self) -> _timestamp_pb2.Timestamp: """The last time at which the workflow instance had its state changed.""" - @property - def properties(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def properties(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """Additional component-specific properties of the workflow instance.""" def __init__( self, *, - instance_id: builtins.str = ..., - workflow_name: builtins.str = ..., - created_at: google.protobuf.timestamp_pb2.Timestamp | None = ..., - last_updated_at: google.protobuf.timestamp_pb2.Timestamp | None = ..., - runtime_status: builtins.str = ..., - properties: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + instance_id: _builtins.str = ..., + workflow_name: _builtins.str = ..., + created_at: _timestamp_pb2.Timestamp | None = ..., + last_updated_at: _timestamp_pb2.Timestamp | None = ..., + runtime_status: _builtins.str = ..., + properties: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., ) -> None: ... - _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["created_at", b"created_at", "last_updated_at", b"last_updated_at"] - def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["created_at", b"created_at", "instance_id", b"instance_id", "last_updated_at", b"last_updated_at", "properties", b"properties", "runtime_status", b"runtime_status", "workflow_name", b"workflow_name"] + _HasFieldArgType: _TypeAlias = _typing.Literal["created_at", b"created_at", "last_updated_at", b"last_updated_at"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["created_at", b"created_at", "instance_id", b"instance_id", "last_updated_at", b"last_updated_at", "properties", b"properties", "runtime_status", b"runtime_status", "workflow_name", b"workflow_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___GetWorkflowResponse: typing_extensions.TypeAlias = GetWorkflowResponse +Global___GetWorkflowResponse: _TypeAlias = GetWorkflowResponse # noqa: Y015 -@typing.final -class StartWorkflowRequest(google.protobuf.message.Message): +@_typing.final +class StartWorkflowRequest(_message.Message): """StartWorkflowRequest is the request for StartWorkflowBeta1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - @typing.final - class OptionsEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class OptionsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["key", b"key", "value", b"value"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - INSTANCE_ID_FIELD_NUMBER: builtins.int - WORKFLOW_COMPONENT_FIELD_NUMBER: builtins.int - WORKFLOW_NAME_FIELD_NUMBER: builtins.int - OPTIONS_FIELD_NUMBER: builtins.int - INPUT_FIELD_NUMBER: builtins.int - instance_id: builtins.str + INSTANCE_ID_FIELD_NUMBER: _builtins.int + WORKFLOW_COMPONENT_FIELD_NUMBER: _builtins.int + WORKFLOW_NAME_FIELD_NUMBER: _builtins.int + OPTIONS_FIELD_NUMBER: _builtins.int + INPUT_FIELD_NUMBER: _builtins.int + instance_id: _builtins.str """The ID to assign to the started workflow instance. If empty, a random ID is generated.""" - workflow_component: builtins.str + workflow_component: _builtins.str """Name of the workflow component.""" - workflow_name: builtins.str + workflow_name: _builtins.str """Name of the workflow.""" - input: builtins.bytes + input: _builtins.bytes """Input data for the workflow instance.""" - @property - def options(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + @_builtins.property + def options(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: """Additional component-specific options for starting the workflow instance.""" def __init__( self, *, - instance_id: builtins.str = ..., - workflow_component: builtins.str = ..., - workflow_name: builtins.str = ..., - options: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., - input: builtins.bytes = ..., + instance_id: _builtins.str = ..., + workflow_component: _builtins.str = ..., + workflow_name: _builtins.str = ..., + options: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + input: _builtins.bytes = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["input", b"input", "instance_id", b"instance_id", "options", b"options", "workflow_component", b"workflow_component", "workflow_name", b"workflow_name"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["input", b"input", "instance_id", b"instance_id", "options", b"options", "workflow_component", b"workflow_component", "workflow_name", b"workflow_name"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___StartWorkflowRequest: typing_extensions.TypeAlias = StartWorkflowRequest +Global___StartWorkflowRequest: _TypeAlias = StartWorkflowRequest # noqa: Y015 -@typing.final -class StartWorkflowResponse(google.protobuf.message.Message): +@_typing.final +class StartWorkflowResponse(_message.Message): """StartWorkflowResponse is the response for StartWorkflowBeta1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - INSTANCE_ID_FIELD_NUMBER: builtins.int - instance_id: builtins.str + INSTANCE_ID_FIELD_NUMBER: _builtins.int + instance_id: _builtins.str """ID of the started workflow instance.""" def __init__( self, *, - instance_id: builtins.str = ..., + instance_id: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["instance_id", b"instance_id"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["instance_id", b"instance_id"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___StartWorkflowResponse: typing_extensions.TypeAlias = StartWorkflowResponse +Global___StartWorkflowResponse: _TypeAlias = StartWorkflowResponse # noqa: Y015 -@typing.final -class TerminateWorkflowRequest(google.protobuf.message.Message): +@_typing.final +class TerminateWorkflowRequest(_message.Message): """TerminateWorkflowRequest is the request for TerminateWorkflowBeta1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - INSTANCE_ID_FIELD_NUMBER: builtins.int - WORKFLOW_COMPONENT_FIELD_NUMBER: builtins.int - instance_id: builtins.str + INSTANCE_ID_FIELD_NUMBER: _builtins.int + WORKFLOW_COMPONENT_FIELD_NUMBER: _builtins.int + instance_id: _builtins.str """ID of the workflow instance to terminate.""" - workflow_component: builtins.str + workflow_component: _builtins.str """Name of the workflow component.""" def __init__( self, *, - instance_id: builtins.str = ..., - workflow_component: builtins.str = ..., + instance_id: _builtins.str = ..., + workflow_component: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["instance_id", b"instance_id", "workflow_component", b"workflow_component"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["instance_id", b"instance_id", "workflow_component", b"workflow_component"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___TerminateWorkflowRequest: typing_extensions.TypeAlias = TerminateWorkflowRequest +Global___TerminateWorkflowRequest: _TypeAlias = TerminateWorkflowRequest # noqa: Y015 -@typing.final -class PauseWorkflowRequest(google.protobuf.message.Message): +@_typing.final +class PauseWorkflowRequest(_message.Message): """PauseWorkflowRequest is the request for PauseWorkflowBeta1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - INSTANCE_ID_FIELD_NUMBER: builtins.int - WORKFLOW_COMPONENT_FIELD_NUMBER: builtins.int - instance_id: builtins.str + INSTANCE_ID_FIELD_NUMBER: _builtins.int + WORKFLOW_COMPONENT_FIELD_NUMBER: _builtins.int + instance_id: _builtins.str """ID of the workflow instance to pause.""" - workflow_component: builtins.str + workflow_component: _builtins.str """Name of the workflow component.""" def __init__( self, *, - instance_id: builtins.str = ..., - workflow_component: builtins.str = ..., + instance_id: _builtins.str = ..., + workflow_component: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["instance_id", b"instance_id", "workflow_component", b"workflow_component"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["instance_id", b"instance_id", "workflow_component", b"workflow_component"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___PauseWorkflowRequest: typing_extensions.TypeAlias = PauseWorkflowRequest +Global___PauseWorkflowRequest: _TypeAlias = PauseWorkflowRequest # noqa: Y015 -@typing.final -class ResumeWorkflowRequest(google.protobuf.message.Message): +@_typing.final +class ResumeWorkflowRequest(_message.Message): """ResumeWorkflowRequest is the request for ResumeWorkflowBeta1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - INSTANCE_ID_FIELD_NUMBER: builtins.int - WORKFLOW_COMPONENT_FIELD_NUMBER: builtins.int - instance_id: builtins.str + INSTANCE_ID_FIELD_NUMBER: _builtins.int + WORKFLOW_COMPONENT_FIELD_NUMBER: _builtins.int + instance_id: _builtins.str """ID of the workflow instance to resume.""" - workflow_component: builtins.str + workflow_component: _builtins.str """Name of the workflow component.""" def __init__( self, *, - instance_id: builtins.str = ..., - workflow_component: builtins.str = ..., + instance_id: _builtins.str = ..., + workflow_component: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["instance_id", b"instance_id", "workflow_component", b"workflow_component"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["instance_id", b"instance_id", "workflow_component", b"workflow_component"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___ResumeWorkflowRequest: typing_extensions.TypeAlias = ResumeWorkflowRequest +Global___ResumeWorkflowRequest: _TypeAlias = ResumeWorkflowRequest # noqa: Y015 -@typing.final -class RaiseEventWorkflowRequest(google.protobuf.message.Message): +@_typing.final +class RaiseEventWorkflowRequest(_message.Message): """RaiseEventWorkflowRequest is the request for RaiseEventWorkflowBeta1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - INSTANCE_ID_FIELD_NUMBER: builtins.int - WORKFLOW_COMPONENT_FIELD_NUMBER: builtins.int - EVENT_NAME_FIELD_NUMBER: builtins.int - EVENT_DATA_FIELD_NUMBER: builtins.int - instance_id: builtins.str + INSTANCE_ID_FIELD_NUMBER: _builtins.int + WORKFLOW_COMPONENT_FIELD_NUMBER: _builtins.int + EVENT_NAME_FIELD_NUMBER: _builtins.int + EVENT_DATA_FIELD_NUMBER: _builtins.int + instance_id: _builtins.str """ID of the workflow instance to raise an event for.""" - workflow_component: builtins.str + workflow_component: _builtins.str """Name of the workflow component.""" - event_name: builtins.str + event_name: _builtins.str """Name of the event.""" - event_data: builtins.bytes + event_data: _builtins.bytes """Data associated with the event.""" def __init__( self, *, - instance_id: builtins.str = ..., - workflow_component: builtins.str = ..., - event_name: builtins.str = ..., - event_data: builtins.bytes = ..., + instance_id: _builtins.str = ..., + workflow_component: _builtins.str = ..., + event_name: _builtins.str = ..., + event_data: _builtins.bytes = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["event_data", b"event_data", "event_name", b"event_name", "instance_id", b"instance_id", "workflow_component", b"workflow_component"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["event_data", b"event_data", "event_name", b"event_name", "instance_id", b"instance_id", "workflow_component", b"workflow_component"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___RaiseEventWorkflowRequest: typing_extensions.TypeAlias = RaiseEventWorkflowRequest +Global___RaiseEventWorkflowRequest: _TypeAlias = RaiseEventWorkflowRequest # noqa: Y015 -@typing.final -class PurgeWorkflowRequest(google.protobuf.message.Message): +@_typing.final +class PurgeWorkflowRequest(_message.Message): """PurgeWorkflowRequest is the request for PurgeWorkflowBeta1.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - INSTANCE_ID_FIELD_NUMBER: builtins.int - WORKFLOW_COMPONENT_FIELD_NUMBER: builtins.int - instance_id: builtins.str + INSTANCE_ID_FIELD_NUMBER: _builtins.int + WORKFLOW_COMPONENT_FIELD_NUMBER: _builtins.int + instance_id: _builtins.str """ID of the workflow instance to purge.""" - workflow_component: builtins.str + workflow_component: _builtins.str """Name of the workflow component.""" def __init__( self, *, - instance_id: builtins.str = ..., - workflow_component: builtins.str = ..., + instance_id: _builtins.str = ..., + workflow_component: _builtins.str = ..., ) -> None: ... - _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["instance_id", b"instance_id", "workflow_component", b"workflow_component"] + _ClearFieldArgType: _TypeAlias = _typing.Literal["instance_id", b"instance_id", "workflow_component", b"workflow_component"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -Global___PurgeWorkflowRequest: typing_extensions.TypeAlias = PurgeWorkflowRequest +Global___PurgeWorkflowRequest: _TypeAlias = PurgeWorkflowRequest # noqa: Y015 diff --git a/tools/requirements.txt b/tools/requirements.txt index cdddb9744..28b129e1c 100644 --- a/tools/requirements.txt +++ b/tools/requirements.txt @@ -1,2 +1,2 @@ grpcio-tools==1.76.0 -mypy-protobuf==4.0.0 +mypy-protobuf==5.0.0 From 27e164fe54a8a1697b11cc14e7e5b9a5d3308f9c Mon Sep 17 00:00:00 2001 From: Albert Callarisa Date: Fri, 13 Feb 2026 14:59:50 +0100 Subject: [PATCH 15/22] fix: Use highest version, not latest (#918) Signed-off-by: Albert Callarisa --- .github/workflows/validate_examples.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate_examples.yaml b/.github/workflows/validate_examples.yaml index a003bb025..abd521fd9 100644 --- a/.github/workflows/validate_examples.yaml +++ b/.github/workflows/validate_examples.yaml @@ -67,12 +67,12 @@ jobs: - uses: azure/setup-helm@v4 - name: Determine latest Dapr Runtime version (including prerelease) run: | - RUNTIME_VERSION=$(curl -s "https://api.github.com/repos/dapr/dapr/releases" | grep '"tag_name"' | head -n 1 | cut -d ':' -f2 | tr -d '",v ') + RUNTIME_VERSION=$(curl -s "https://api.github.com/repos/dapr/dapr/releases" | sort -r | grep '"tag_name"' | head -n 1 | cut -d ':' -f2 | tr -d '",v ') echo "DAPR_RUNTIME_VER=$RUNTIME_VERSION" >> $GITHUB_ENV echo "Found $RUNTIME_VERSION" - name: Determine latest Dapr Cli version (including prerelease) run: | - CLI_VERSION=$(curl -s "https://api.github.com/repos/dapr/cli/releases" | grep '"tag_name"' | head -n 1 | cut -d ':' -f2 | tr -d '",v ') + CLI_VERSION=$(curl -s "https://api.github.com/repos/dapr/cli/releases" | sort -r | grep '"tag_name"' | head -n 1 | cut -d ':' -f2 | tr -d '",v ') echo "DAPR_CLI_VER=$CLI_VERSION" >> $GITHUB_ENV echo "Found $CLI_VERSION" - name: Set up Python ${{ matrix.python_ver }} From cb20efdb3ad4ffa3245228f9f16f0cffc798230d Mon Sep 17 00:00:00 2001 From: Albert Callarisa Date: Mon, 16 Feb 2026 21:27:03 +0100 Subject: [PATCH 16/22] Point backport action to a specific commit (#920) Signed-off-by: Albert Callarisa --- .github/workflows/backport.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml index 17bebf47b..5be6f43d2 100644 --- a/.github/workflows/backport.yaml +++ b/.github/workflows/backport.yaml @@ -32,6 +32,6 @@ jobs: ) ) steps: - - uses: tibdex/backport@v2 + - uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e with: github_token: ${{ secrets.GITHUB_TOKEN }} From 4e0e38cddc18bbb4fb3d226cf92d7d0fe6061d05 Mon Sep 17 00:00:00 2001 From: Albert Callarisa Date: Fri, 20 Feb 2026 07:18:26 +0100 Subject: [PATCH 17/22] Add support to bulk pubsub (#915) * Add support to bulk pubsub Signed-off-by: Albert Callarisa * lint Signed-off-by: Albert Callarisa * install dapr last Signed-off-by: Albert Callarisa * Fix tox dependencies install Signed-off-by: Albert Callarisa * add callback logic Signed-off-by: Cassandra Coyle * Fix bulk pubsub unit tests Signed-off-by: Albert Callarisa * lint Signed-off-by: Albert Callarisa * Fix type Signed-off-by: Albert Callarisa * Add tests for some edge cases Signed-off-by: Albert Callarisa * Add tests to cover more missed scenarios Signed-off-by: Albert Callarisa --------- Signed-off-by: Albert Callarisa Signed-off-by: Cassandra Coyle Co-authored-by: Cassandra Coyle --- dapr/aio/clients/grpc/client.py | 93 +++++++++++++ dapr/clients/grpc/_response.py | 58 ++++++++ dapr/clients/grpc/client.py | 93 +++++++++++++ examples/pubsub-simple/README.md | 8 +- examples/pubsub-simple/publisher.py | 25 ++++ ext/dapr-ext-grpc/dapr/ext/grpc/_servicer.py | 81 +++++++++++ ext/dapr-ext-grpc/tests/test_servicier.py | 137 +++++++++++++++++++ tests/clients/fake_dapr_server.py | 56 +++++++- tests/clients/test_dapr_grpc_client.py | 71 ++++++++++ tests/clients/test_dapr_grpc_client_async.py | 74 ++++++++++ tox.ini | 72 ++++++---- 11 files changed, 736 insertions(+), 32 deletions(-) diff --git a/dapr/aio/clients/grpc/client.py b/dapr/aio/clients/grpc/client.py index a17b5311a..28cf24143 100644 --- a/dapr/aio/clients/grpc/client.py +++ b/dapr/aio/clients/grpc/client.py @@ -27,6 +27,7 @@ from google.protobuf.any_pb2 import Any as GrpcAny from google.protobuf.empty_pb2 import Empty as GrpcEmpty from google.protobuf.message import Message as GrpcMessage +from grpc import StatusCode # type: ignore from grpc.aio import ( # type: ignore AioRpcError, StreamStreamClientInterceptor, @@ -69,6 +70,8 @@ ) from dapr.clients.grpc._response import ( BindingResponse, + BulkPublishResponse, + BulkPublishResponseFailedEntry, BulkStateItem, BulkStatesResponse, ConfigurationResponse, @@ -484,6 +487,96 @@ async def publish_event( return DaprResponse(await call.initial_metadata()) + async def publish_events( + self, + pubsub_name: str, + topic_name: str, + data: Sequence[Union[bytes, str]], + publish_metadata: Dict[str, str] = {}, + data_content_type: Optional[str] = None, + ) -> BulkPublishResponse: + """Bulk publish multiple events to a given topic. + This publishes multiple events to a specified topic and pubsub component. + Each event can be bytes or str. The str data is encoded into bytes with + default charset of utf-8. + + The example publishes multiple string events to a topic: + + from dapr.aio.clients import DaprClient + async with DaprClient() as d: + resp = await d.publish_events( + pubsub_name='pubsub_1', + topic_name='TOPIC_A', + data=['message1', 'message2', 'message3'], + data_content_type='text/plain', + ) + # resp.failed_entries includes any entries that failed to publish. + + Args: + pubsub_name (str): the name of the pubsub component + topic_name (str): the topic name to publish to + data (Sequence[Union[bytes, str]]): sequence of events to publish; + each event must be bytes or str + publish_metadata (Dict[str, str], optional): Dapr metadata for the + bulk publish request + data_content_type (str, optional): content type of the event data + + Returns: + :class:`BulkPublishResponse` with any failed entries + """ + entries = [] + for event in data: + entry_id = str(uuid.uuid4()) + if isinstance(event, bytes): + event_data = event + content_type = data_content_type or 'application/octet-stream' + elif isinstance(event, str): + event_data = event.encode('utf-8') + content_type = data_content_type or 'text/plain' + else: + raise ValueError(f'invalid type for event {type(event)}') + + entries.append( + api_v1.BulkPublishRequestEntry( + entry_id=entry_id, + event=event_data, + content_type=content_type, + ) + ) + + req = api_v1.BulkPublishRequest( + pubsub_name=pubsub_name, + topic=topic_name, + entries=entries, + metadata=publish_metadata, + ) + + try: + call = self._stub.BulkPublishEvent(req) + response = await call + except AioRpcError as err: + if err.code() == StatusCode.UNIMPLEMENTED: + try: + call = self._stub.BulkPublishEventAlpha1(req) + response = await call + except AioRpcError as err2: + raise DaprGrpcError(err2) from err2 + else: + raise DaprGrpcError(err) from err + + failed_entries = [ + BulkPublishResponseFailedEntry( + entry_id=entry.entry_id, + error=entry.error, + ) + for entry in response.failedEntries + ] + + return BulkPublishResponse( + failed_entries=failed_entries, + headers=await call.initial_metadata(), + ) + async def subscribe( self, pubsub_name: str, diff --git a/dapr/clients/grpc/_response.py b/dapr/clients/grpc/_response.py index 6898bc42d..1c1856e6f 100644 --- a/dapr/clients/grpc/_response.py +++ b/dapr/clients/grpc/_response.py @@ -723,6 +723,64 @@ def _read_subscribe_config( pass +class BulkPublishResponseFailedEntry: + """A failed entry from the bulk publish response. + + Attributes: + entry_id (str): the entry ID that failed. + error (str): the error message for the failure. + """ + + def __init__(self, entry_id: str, error: str): + """Initializes BulkPublishResponseFailedEntry. + + Args: + entry_id (str): the entry ID that failed. + error (str): the error message for the failure. + """ + self._entry_id = entry_id + self._error = error + + @property + def entry_id(self) -> str: + """Gets the entry ID.""" + return self._entry_id + + @property + def error(self) -> str: + """Gets the error message.""" + return self._error + + +class BulkPublishResponse(DaprResponse): + """The response of publish_events (bulk publish) API. + + This inherits from DaprResponse + + Attributes: + failed_entries (List[BulkPublishResponseFailedEntry]): the entries that failed to publish. + """ + + def __init__( + self, + failed_entries: List[BulkPublishResponseFailedEntry] = [], + headers: MetadataTuple = (), + ): + """Initializes BulkPublishResponse from :obj:`runtime_v1.BulkPublishResponse`. + + Args: + failed_entries (List[BulkPublishResponseFailedEntry]): the entries that failed. + headers (Tuple, optional): the headers from Dapr gRPC response. + """ + super(BulkPublishResponse, self).__init__(headers) + self._failed_entries = failed_entries + + @property + def failed_entries(self) -> List[BulkPublishResponseFailedEntry]: + """Gets the failed entries.""" + return self._failed_entries + + class TopicEventResponseStatus(Enum): # success is the default behavior: message is acknowledged and not retried success = appcallback_v1.TopicEventResponse.TopicEventResponseStatus.SUCCESS diff --git a/dapr/clients/grpc/client.py b/dapr/clients/grpc/client.py index faf356491..fa69c359a 100644 --- a/dapr/clients/grpc/client.py +++ b/dapr/clients/grpc/client.py @@ -31,6 +31,7 @@ from google.protobuf.struct_pb2 import Struct as GrpcStruct from grpc import ( # type: ignore RpcError, + StatusCode, StreamStreamClientInterceptor, StreamUnaryClientInterceptor, UnaryStreamClientInterceptor, @@ -60,6 +61,8 @@ ) from dapr.clients.grpc._response import ( BindingResponse, + BulkPublishResponse, + BulkPublishResponseFailedEntry, BulkStateItem, BulkStatesResponse, ConfigurationResponse, @@ -487,6 +490,96 @@ def publish_event( return DaprResponse(call.initial_metadata()) + def publish_events( + self, + pubsub_name: str, + topic_name: str, + data: Sequence[Union[bytes, str]], + publish_metadata: Dict[str, str] = {}, + data_content_type: Optional[str] = None, + ) -> BulkPublishResponse: + """Bulk publish multiple events to a given topic. + This publishes multiple events to a specified topic and pubsub component. + Each event can be bytes or str. The str data is encoded into bytes with + default charset of utf-8. + + The example publishes multiple string events to a topic: + + from dapr.clients import DaprClient + with DaprClient() as d: + resp = d.publish_events( + pubsub_name='pubsub_1', + topic_name='TOPIC_A', + data=['message1', 'message2', 'message3'], + data_content_type='text/plain', + ) + # resp.failed_entries includes any entries that failed to publish. + + Args: + pubsub_name (str): the name of the pubsub component + topic_name (str): the topic name to publish to + data (Sequence[Union[bytes, str]]): sequence of events to publish; + each event must be bytes or str + publish_metadata (Dict[str, str], optional): Dapr metadata for the + bulk publish request + data_content_type (str, optional): content type of the event data + + Returns: + :class:`BulkPublishResponse` with any failed entries + """ + entries = [] + for event in data: + entry_id = str(uuid.uuid4()) + if isinstance(event, bytes): + event_data = event + content_type = data_content_type or 'application/octet-stream' + elif isinstance(event, str): + event_data = event.encode('utf-8') + content_type = data_content_type or 'text/plain' + else: + raise ValueError(f'invalid type for event {type(event)}') + + entries.append( + api_v1.BulkPublishRequestEntry( + entry_id=entry_id, + event=event_data, + content_type=content_type, + ) + ) + + req = api_v1.BulkPublishRequest( + pubsub_name=pubsub_name, + topic=topic_name, + entries=entries, + metadata=publish_metadata, + ) + + try: + response, call = self.retry_policy.run_rpc(self._stub.BulkPublishEvent.with_call, req) + except RpcError as err: + if err.code() == StatusCode.UNIMPLEMENTED: + try: + response, call = self.retry_policy.run_rpc( + self._stub.BulkPublishEventAlpha1.with_call, req + ) + except RpcError as err2: + raise DaprGrpcError(err2) from err2 + else: + raise DaprGrpcError(err) from err + + failed_entries = [ + BulkPublishResponseFailedEntry( + entry_id=entry.entry_id, + error=entry.error, + ) + for entry in response.failedEntries + ] + + return BulkPublishResponse( + failed_entries=failed_entries, + headers=call.initial_metadata(), + ) + def subscribe( self, pubsub_name: str, diff --git a/examples/pubsub-simple/README.md b/examples/pubsub-simple/README.md index 8abfad96b..98ff8ccfc 100644 --- a/examples/pubsub-simple/README.md +++ b/examples/pubsub-simple/README.md @@ -1,7 +1,7 @@ # Example - Publish and subscribe to messages -This example utilizes a publisher and a subscriber to show the pubsub pattern, it also shows `PublishEvent`, `OnTopicEvent`, `GetTopicSubscriptions`, and `TopicEventResponse` functionality. -It creates a publisher and calls the `publish_event` method in the `DaprClient`. +This example utilizes a publisher and a subscriber to show the pubsub pattern, it also shows `PublishEvent`, `PublishEvents` (bulk), `OnTopicEvent`, `GetTopicSubscriptions`, and `TopicEventResponse` functionality. +It creates a publisher and calls the `publish_event` and `publish_events` methods in the `DaprClient`. It will create a gRPC subscriber and bind the `OnTopicEvent` method, which gets triggered after a message is published to the subscribed topic. The subscriber will tell dapr to retry delivery of the first message it receives, logging that the message will be retried, and printing it at least once to standard output. @@ -39,6 +39,9 @@ expected_stdout_lines: - '== APP == Dead-Letter Subscriber. Originally intended topic: TOPIC_D' - '== APP == Subscriber received: TOPIC_CE' - '== APP == Subscriber received a json cloud event: id=8, message="hello world", content_type="application/json"' + - '== APP == Subscriber received: id=20, message="bulk event 1", content_type="application/json"' + - '== APP == Subscriber received: id=21, message="bulk event 2", content_type="application/json"' + - '== APP == Subscriber received: id=22, message="bulk event 3", content_type="application/json"' - '== APP == Subscriber received: TOPIC_CE' - '== APP == Subscriber received plain text cloud event: hello world, content_type="text/plain"' @@ -68,6 +71,7 @@ expected_stdout_lines: - "== APP == {'id': 6, 'message': 'hello world'}" - "== APP == {'id': 7, 'message': 'hello world'}" - "== APP == {'specversion': '1.0', 'type': 'com.example.event', 'source': 'my-service', 'id': 'abc-8', 'data': {'id': 8, 'message': 'hello world'}, 'datacontenttype': 'application/json'}" + - "== APP == Bulk published 3 events. Failed entries: 0" - "== APP == {'specversion': '1.0', 'type': 'com.example.event', 'source': 'my-service', 'id': 'abc-10', 'data': 'hello world', 'datacontenttype': 'text/plain'}" background: true sleep: 15 diff --git a/examples/pubsub-simple/publisher.py b/examples/pubsub-simple/publisher.py index e5954c651..28232ec39 100644 --- a/examples/pubsub-simple/publisher.py +++ b/examples/pubsub-simple/publisher.py @@ -91,6 +91,31 @@ time.sleep(0.5) + # Bulk publish multiple events at once using publish_events + bulk_events = [ + json.dumps({'id': 20, 'message': 'bulk event 1'}), + json.dumps({'id': 21, 'message': 'bulk event 2'}), + json.dumps({'id': 22, 'message': 'bulk event 3'}), + ] + + resp = d.publish_events( + pubsub_name='pubsub', + topic_name='TOPIC_A', + data=bulk_events, + data_content_type='application/json', + ) + + print( + f'Bulk published {len(bulk_events)} events. Failed entries: {len(resp.failed_entries)}', + flush=True, + ) + + if resp.failed_entries: + for entry in resp.failed_entries: + print(f' Failed entry_id={entry.entry_id}: {entry.error}', flush=True) + + time.sleep(0.5) + # Send a cloud event with plain text data id = 10 cloud_event = { diff --git a/ext/dapr-ext-grpc/dapr/ext/grpc/_servicer.py b/ext/dapr-ext-grpc/dapr/ext/grpc/_servicer.py index 8de632f97..3d9fcdb28 100644 --- a/ext/dapr-ext-grpc/dapr/ext/grpc/_servicer.py +++ b/ext/dapr-ext-grpc/dapr/ext/grpc/_servicer.py @@ -13,6 +13,7 @@ limitations under the License. """ +import warnings from typing import Callable, Dict, List, Optional, Tuple, Union from cloudevents.sdk.event import v1 # type: ignore @@ -29,6 +30,8 @@ from dapr.proto.runtime.v1.appcallback_pb2 import ( BindingEventRequest, JobEventRequest, + TopicEventBulkRequest, + TopicEventBulkResponse, TopicEventRequest, ) @@ -276,3 +279,81 @@ def OnJobEventAlpha1(self, request: JobEventRequest, context): # Return empty response return appcallback_v1.JobEventResponse() + + def _handle_bulk_topic_event( + self, request: TopicEventBulkRequest, context + ) -> Optional[TopicEventBulkResponse]: + """Process bulk topic event request - routes each entry to the appropriate topic handler.""" + topic_key = request.pubsub_name + DELIMITER + request.topic + DELIMITER + request.path + no_validation_key = request.pubsub_name + DELIMITER + request.path + + if topic_key not in self._topic_map and no_validation_key not in self._topic_map: + return None # we don't have a handler + + handler_key = topic_key if topic_key in self._topic_map else no_validation_key + cb = self._topic_map[handler_key] # callback + + statuses = [] + for entry in request.entries: + entry_id = entry.entry_id + try: + # Build event from entry & send req with many entries + event = v1.Event() + extensions = dict() + if entry.HasField('cloud_event') and entry.cloud_event: + ce = entry.cloud_event + event.SetEventType(ce.type) + event.SetEventID(ce.id) + event.SetSource(ce.source) + event.SetData(ce.data) + event.SetContentType(ce.data_content_type) + if ce.extensions: + for k, v in ce.extensions.items(): + extensions[k] = v + else: + event.SetEventID(entry_id) + event.SetData(entry.bytes if entry.HasField('bytes') else b'') + event.SetContentType(entry.content_type or '') + event.SetSubject(request.topic) + if entry.metadata: + for k, v in entry.metadata.items(): + extensions[k] = v + for k, v in context.invocation_metadata(): + extensions['_metadata_' + k] = v + if extensions: + event.SetExtensions(extensions) + + response = cb(event) # invoke app registered handler and send event + if isinstance(response, TopicEventResponse): + status = response.status.value + else: + status = appcallback_v1.TopicEventResponse.TopicEventResponseStatus.SUCCESS + except Exception: + status = appcallback_v1.TopicEventResponse.TopicEventResponseStatus.RETRY + statuses.append( + appcallback_v1.TopicEventBulkResponseEntry(entry_id=entry_id, status=status) + ) + return appcallback_v1.TopicEventBulkResponse(statuses=statuses) + + def OnBulkTopicEvent(self, request: TopicEventBulkRequest, context): + """Subscribes bulk events from Pubsub""" + response = self._handle_bulk_topic_event(request, context) + if response is None: + context.set_code(grpc.StatusCode.UNIMPLEMENTED) # type: ignore + raise NotImplementedError(f'bulk topic {request.topic} is not implemented!') + return response + + def OnBulkTopicEventAlpha1(self, request: TopicEventBulkRequest, context): + """Subscribes bulk events from Pubsub. + Deprecated: Use OnBulkTopicEvent instead. + """ + warnings.warn( + 'OnBulkTopicEventAlpha1 is deprecated. Use OnBulkTopicEvent instead.', + DeprecationWarning, + stacklevel=2, + ) + response = self._handle_bulk_topic_event(request, context) + if response is None: + context.set_code(grpc.StatusCode.UNIMPLEMENTED) # type: ignore + raise NotImplementedError(f'bulk topic {request.topic} is not implemented!') + return response diff --git a/ext/dapr-ext-grpc/tests/test_servicier.py b/ext/dapr-ext-grpc/tests/test_servicier.py index 325d9b6d6..1d362ea52 100644 --- a/ext/dapr-ext-grpc/tests/test_servicier.py +++ b/ext/dapr-ext-grpc/tests/test_servicier.py @@ -183,6 +183,143 @@ def test_non_registered_topic(self): ) +class BulkTopicEventTests(unittest.TestCase): + def setUp(self): + self._servicer = _CallbackServicer() + self._topic_method = Mock() + self._topic_method.return_value = TopicEventResponse('success') + self._servicer.register_topic('pubsub1', 'topic1', self._topic_method, {'session': 'key'}) + + self.fake_context = MagicMock() + self.fake_context.invocation_metadata.return_value = ( + ('key1', 'value1'), + ('key2', 'value1'), + ) + + def test_on_bulk_topic_event(self): + from dapr.proto.runtime.v1.appcallback_pb2 import ( + TopicEventBulkRequest, + TopicEventBulkRequestEntry, + ) + + entry1 = TopicEventBulkRequestEntry( + entry_id='entry1', + bytes=b'hello', + content_type='text/plain', + ) + entry2 = TopicEventBulkRequestEntry( + entry_id='entry2', + bytes=b'{"a": 1}', + content_type='application/json', + ) + request = TopicEventBulkRequest( + id='bulk1', + pubsub_name='pubsub1', + topic='topic1', + path='', + entries=[entry1, entry2], + ) + resp = self._servicer.OnBulkTopicEvent(request, self.fake_context) + self.assertEqual(2, len(resp.statuses)) + self.assertEqual('entry1', resp.statuses[0].entry_id) + self.assertEqual('entry2', resp.statuses[1].entry_id) + self.assertEqual( + appcallback_v1.TopicEventResponse.TopicEventResponseStatus.SUCCESS, + resp.statuses[0].status, + ) + self.assertEqual(2, self._topic_method.call_count) + + def test_on_bulk_topic_event_non_registered(self): + from dapr.proto.runtime.v1.appcallback_pb2 import ( + TopicEventBulkRequest, + TopicEventBulkRequestEntry, + ) + + entry = TopicEventBulkRequestEntry(entry_id='entry1', bytes=b'hello') + request = TopicEventBulkRequest( + id='bulk1', + pubsub_name='pubsub1', + topic='unknown_topic', + path='', + entries=[entry], + ) + with self.assertRaises(NotImplementedError): + self._servicer.OnBulkTopicEvent(request, self.fake_context) + + def test_on_bulk_topic_event_cloud_event_entry(self): + """Covers the cloud_event branch in _handle_bulk_topic_event.""" + from dapr.proto.runtime.v1.appcallback_pb2 import ( + TopicEventBulkRequest, + TopicEventBulkRequestEntry, + TopicEventCERequest, + ) + + ce = TopicEventCERequest( + id='ce-1', + source='test', + type='test.type', + spec_version='1.0', + data_content_type='text/plain', + data=b'cloud event payload', + ) + entry = TopicEventBulkRequestEntry(entry_id='entry1', cloud_event=ce) + request = TopicEventBulkRequest( + id='bulk1', + pubsub_name='pubsub1', + topic='topic1', + path='', + entries=[entry], + ) + resp = self._servicer.OnBulkTopicEvent(request, self.fake_context) + self.assertEqual(1, len(resp.statuses)) + self.assertEqual('entry1', resp.statuses[0].entry_id) + self._topic_method.assert_called_once() + + def test_on_bulk_topic_event_handler_raises_retry(self): + """Covers the exception -> RETRY path in _handle_bulk_topic_event.""" + from dapr.proto.runtime.v1.appcallback_pb2 import ( + TopicEventBulkRequest, + TopicEventBulkRequestEntry, + ) + + self._topic_method.side_effect = RuntimeError('handler failed') + entry = TopicEventBulkRequestEntry(entry_id='entry1', bytes=b'hello') + request = TopicEventBulkRequest( + id='bulk1', + pubsub_name='pubsub1', + topic='topic1', + path='', + entries=[entry], + ) + resp = self._servicer.OnBulkTopicEvent(request, self.fake_context) + self.assertEqual(1, len(resp.statuses)) + self.assertEqual( + appcallback_v1.TopicEventResponse.TopicEventResponseStatus.RETRY, + resp.statuses[0].status, + ) + + def test_on_bulk_topic_event_alpha1(self): + """Covers OnBulkTopicEventAlpha1 (deprecated) delegates like OnBulkTopicEvent.""" + from dapr.proto.runtime.v1.appcallback_pb2 import ( + TopicEventBulkRequest, + TopicEventBulkRequestEntry, + ) + + entry = TopicEventBulkRequestEntry(entry_id='alpha1', bytes=b'data') + request = TopicEventBulkRequest( + id='bulk1', + pubsub_name='pubsub1', + topic='topic1', + path='', + entries=[entry], + ) + with self.assertWarns(DeprecationWarning): + resp = self._servicer.OnBulkTopicEventAlpha1(request, self.fake_context) + self.assertEqual(1, len(resp.statuses)) + self.assertEqual('alpha1', resp.statuses[0].entry_id) + self._topic_method.assert_called_once() + + class BindingTests(unittest.TestCase): def setUp(self): self._servicer = _CallbackServicer() diff --git a/tests/clients/fake_dapr_server.py b/tests/clients/fake_dapr_server.py index 742b96763..2c3d9b685 100644 --- a/tests/clients/fake_dapr_server.py +++ b/tests/clients/fake_dapr_server.py @@ -1,6 +1,6 @@ import json from concurrent import futures -from typing import Dict +from typing import Dict, Optional, Tuple import grpc from google.protobuf import empty_pb2, struct_pb2 @@ -32,6 +32,28 @@ def __init__(self, grpc_port: int = 50001, http_port: int = 8080): self.jobs: Dict[str, api_v1.Job] = {} self.job_overwrites: Dict[str, bool] = {} self._next_exception = None + # When set, the next BulkPublishEvent call returns this many entries as failed. + self._bulk_publish_fail_next: Optional[Tuple[int, str]] = None + # When True, the next BulkPublishEvent (stable) call returns UNIMPLEMENTED; Alpha1 is unchanged. + self._bulk_publish_stable_unimplemented_next: bool = False + + def set_bulk_publish_unimplemented_on_stable_next(self) -> None: + """Make the next BulkPublishEvent (stable) call return UNIMPLEMENTED. + + BulkPublishEventAlpha1 is unchanged, so clients can fall back to Alpha1 and succeed. + Useful for testing the UNIMPLEMENTED fallback path in publish_events. + """ + self._bulk_publish_stable_unimplemented_next = True + + def set_bulk_publish_failed_entries_on_next_call( + self, failed_entry_count: int = 1, error_message: str = 'simulated failure' + ) -> None: + """Configure the next BulkPublishEvent/BulkPublishEventAlpha1 call to return failed entries. + + The first failed_entry_count entries from the request will be reported as failed. + Useful for testing BulkPublishResponse with non-empty failed_entries. + """ + self._bulk_publish_fail_next = (failed_entry_count, error_message) def start(self): self._grpc_server.add_insecure_port(f'[::]:{self.grpc_port}') @@ -155,6 +177,38 @@ def PublishEvent(self, request, context): context.set_trailing_metadata(trailers) return empty_pb2.Empty() + def _bulk_publish_response(self, request) -> api_v1.BulkPublishResponse: + if not self._bulk_publish_fail_next or not request.entries: + return api_v1.BulkPublishResponse() + count, error_message = self._bulk_publish_fail_next + self._bulk_publish_fail_next = None + failed = [ + api_v1.BulkPublishResponseFailedEntry( + entry_id=entry.entry_id, + error=error_message, + ) + for entry in request.entries[:count] + ] + return api_v1.BulkPublishResponse(failedEntries=failed) + + def BulkPublishEvent(self, request, context): + if self._bulk_publish_stable_unimplemented_next: + self._bulk_publish_stable_unimplemented_next = False + context.abort_with_status( + rpc_status.to_status( + status_pb2.Status( + code=code_pb2.UNIMPLEMENTED, + message='BulkPublishEvent not implemented', + ) + ) + ) + self.check_for_exception(context) + return self._bulk_publish_response(request) + + def BulkPublishEventAlpha1(self, request, context): + self.check_for_exception(context) + return self._bulk_publish_response(request) + def SubscribeTopicEventsAlpha1(self, request_iterator, context): for request in request_iterator: if request.HasField('initial_request'): diff --git a/tests/clients/test_dapr_grpc_client.py b/tests/clients/test_dapr_grpc_client.py index a52bbeb0d..8930e328b 100644 --- a/tests/clients/test_dapr_grpc_client.py +++ b/tests/clients/test_dapr_grpc_client.py @@ -271,6 +271,77 @@ def test_publish_error(self): data=111, ) + def test_publish_events_bytes(self): + dapr = DaprGrpcClient(f'{self.scheme}localhost:{self.grpc_port}') + resp = dapr.publish_events( + pubsub_name='pubsub', + topic_name='example', + data=[ + b'{"key": "value1"}', + b'{"key": "value2"}', + ], + ) + self.assertEqual(0, len(resp.failed_entries)) + + def test_publish_events_strings(self): + dapr = DaprGrpcClient(f'{self.scheme}localhost:{self.grpc_port}') + resp = dapr.publish_events( + pubsub_name='pubsub', + topic_name='example', + data=['content1', 'content2'], + ) + self.assertEqual(0, len(resp.failed_entries)) + + def test_publish_events_invalid_event_type(self): + dapr = DaprGrpcClient(f'{self.scheme}localhost:{self.grpc_port}') + with self.assertRaisesRegex(ValueError, "invalid type for event "): + dapr.publish_events( + pubsub_name='pubsub', + topic_name='example', + data=[ + {'entry_id': '1', 'event': 123}, + ], + ) + + def test_publish_events_with_failed_entries(self): + """Covers BulkPublishResponse with non-empty failed_entries.""" + self._fake_dapr_server.set_bulk_publish_failed_entries_on_next_call( + failed_entry_count=1, error_message='simulated failure' + ) + dapr = DaprGrpcClient(f'{self.scheme}localhost:{self.grpc_port}') + resp = dapr.publish_events( + pubsub_name='pubsub', + topic_name='example', + data=[b'first', b'second'], + ) + self.assertEqual(1, len(resp.failed_entries)) + self.assertEqual('simulated failure', resp.failed_entries[0].error) + self.assertIsNotNone(resp.failed_entries[0].entry_id) + + def test_publish_events_fallback_to_alpha1_when_stable_unimplemented(self): + """Covers UNIMPLEMENTED -> BulkPublishEventAlpha1 fallback in publish_events.""" + self._fake_dapr_server.set_bulk_publish_unimplemented_on_stable_next() + dapr = DaprGrpcClient(f'{self.scheme}localhost:{self.grpc_port}') + resp = dapr.publish_events( + pubsub_name='pubsub', + topic_name='example', + data=[b'msg1', b'msg2'], + ) + self.assertEqual(0, len(resp.failed_entries)) + + def test_publish_events_raises_on_non_unimplemented_error(self): + """Covers non-UNIMPLEMENTED RpcError path in publish_events (raises DaprGrpcError).""" + self._fake_dapr_server.raise_exception_on_next_call( + status_pb2.Status(code=code_pb2.INTERNAL, message='bulk publish failed') + ) + dapr = DaprGrpcClient(f'{self.scheme}localhost:{self.grpc_port}') + with self.assertRaises(DaprGrpcError): + dapr.publish_events( + pubsub_name='pubsub', + topic_name='example', + data=[b'msg'], + ) + def test_subscribe_topic(self): # The fake server we're using sends two messages and then closes the stream # The client should be able to read both messages, handle the stream closure and reconnect diff --git a/tests/clients/test_dapr_grpc_client_async.py b/tests/clients/test_dapr_grpc_client_async.py index 245c384dd..e27b8dc52 100644 --- a/tests/clients/test_dapr_grpc_client_async.py +++ b/tests/clients/test_dapr_grpc_client_async.py @@ -266,6 +266,80 @@ async def test_publish_error(self): data=111, ) + async def test_publish_events_bytes(self): + dapr = DaprGrpcClientAsync(f'{self.scheme}localhost:{self.grpc_port}') + resp = await dapr.publish_events( + pubsub_name='pubsub', + topic_name='example', + data=[ + b'{"key": "value1"}', + b'{"key": "value2"}', + ], + ) + self.assertEqual(0, len(resp.failed_entries)) + + async def test_publish_events_strings(self): + dapr = DaprGrpcClientAsync(f'{self.scheme}localhost:{self.grpc_port}') + resp = await dapr.publish_events( + pubsub_name='pubsub', + topic_name='example', + data=[ + 'content1', + 'content2', + ], + ) + self.assertEqual(0, len(resp.failed_entries)) + + async def test_publish_events_invalid_event_type(self): + dapr = DaprGrpcClientAsync(f'{self.scheme}localhost:{self.grpc_port}') + with self.assertRaisesRegex(ValueError, "invalid type for event "): + await dapr.publish_events( + pubsub_name='pubsub', + topic_name='example', + data=[ + {'entry_id': '1', 'event': 123}, + ], + ) + + async def test_publish_events_with_failed_entries(self): + """Covers BulkPublishResponse with non-empty failed_entries.""" + self._fake_dapr_server.set_bulk_publish_failed_entries_on_next_call( + failed_entry_count=1, error_message='simulated failure' + ) + dapr = DaprGrpcClientAsync(f'{self.scheme}localhost:{self.grpc_port}') + resp = await dapr.publish_events( + pubsub_name='pubsub', + topic_name='example', + data=[b'first', b'second'], + ) + self.assertEqual(1, len(resp.failed_entries)) + self.assertEqual('simulated failure', resp.failed_entries[0].error) + self.assertIsNotNone(resp.failed_entries[0].entry_id) + + async def test_publish_events_fallback_to_alpha1_when_stable_unimplemented(self): + """Covers UNIMPLEMENTED -> BulkPublishEventAlpha1 fallback in publish_events.""" + self._fake_dapr_server.set_bulk_publish_unimplemented_on_stable_next() + dapr = DaprGrpcClientAsync(f'{self.scheme}localhost:{self.grpc_port}') + resp = await dapr.publish_events( + pubsub_name='pubsub', + topic_name='example', + data=[b'msg1', b'msg2'], + ) + self.assertEqual(0, len(resp.failed_entries)) + + async def test_publish_events_raises_on_non_unimplemented_error(self): + """Covers non-UNIMPLEMENTED AioRpcError path in publish_events (raises DaprGrpcError).""" + self._fake_dapr_server.raise_exception_on_next_call( + status_pb2.Status(code=code_pb2.INTERNAL, message='bulk publish failed') + ) + dapr = DaprGrpcClientAsync(f'{self.scheme}localhost:{self.grpc_port}') + with self.assertRaises(DaprGrpcError): + await dapr.publish_events( + pubsub_name='pubsub', + topic_name='example', + data=[b'msg'], + ) + async def test_subscribe_topic(self): # The fake server we're using sends two messages and then closes the stream # The client should be able to read both messages, handle the stream closure and reconnect diff --git a/tox.ini b/tox.ini index 1bdb17921..65f26ea0d 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,15 @@ envlist = [testenv] setenv = PYTHONDONTWRITEBYTECODE=1 -deps = -rdev-requirements.txt +deps = + -rdev-requirements.txt + -e {toxinidir}/ext/dapr-ext-workflow/ + -e {toxinidir}/ext/dapr-ext-grpc/ + -e {toxinidir}/ext/dapr-ext-fastapi/ + -e {toxinidir}/ext/dapr-ext-langgraph/ + -e {toxinidir}/ext/dapr-ext-strands/ + -e {toxinidir}/ext/flask_dapr/ + -e {toxinidir}/ commands = coverage run -m unittest discover -v ./tests coverage run -a -m unittest discover -v ./ext/dapr-ext-workflow/tests @@ -19,14 +27,9 @@ commands = coverage run -a -m unittest discover -v ./ext/dapr-ext-strands/tests coverage run -a -m unittest discover -v ./ext/flask_dapr/tests coverage xml + commands_pre = - pip3 install -e {toxinidir}/ - pip3 install -e {toxinidir}/ext/dapr-ext-workflow/ - pip3 install -e {toxinidir}/ext/dapr-ext-grpc/ - pip3 install -e {toxinidir}/ext/dapr-ext-fastapi/ - pip3 install -e {toxinidir}/ext/dapr-ext-langgraph/ - pip3 install -e {toxinidir}/ext/dapr-ext-strands/ - pip3 install -e {toxinidir}/ext/flask_dapr/ + pip uninstall -y dapr dapr-ext-grpc dapr-ext-fastapi dapr-ext-langgraph dapr-ext-strands dapr-ext-flask dapr-ext-langgraph dapr-ext-strands [testenv:ruff] basepython = python3 @@ -41,6 +44,14 @@ basepython = python3 changedir = ./examples/ deps = mechanical-markdown + -e {toxinidir}/ext/dapr-ext-workflow/ + -e {toxinidir}/ext/dapr-ext-grpc/ + -e {toxinidir}/ext/dapr-ext-fastapi/ + -e {toxinidir}/ext/dapr-ext-langgraph/ + -e {toxinidir}/ext/dapr-ext-strands/ + -e {toxinidir}/ext/flask_dapr/ + -e {toxinidir}/ + commands = ./validate.sh conversation ./validate.sh crypto @@ -65,15 +76,11 @@ commands = ./validate.sh jobs ./validate.sh langgraph-checkpointer ./validate.sh ../ -commands_pre = - pip3 install -e {toxinidir}/ - pip3 install -e {toxinidir}/ext/dapr-ext-workflow/ - pip3 install -e {toxinidir}/ext/dapr-ext-grpc/ - pip3 install -e {toxinidir}/ext/dapr-ext-fastapi/ - pip3 install -e {toxinidir}/ext/dapr-ext-langgraph/ - pip3 install -e {toxinidir}/ext/dapr-ext-strands/ allowlist_externals=* +commands_pre = + pip uninstall -y dapr dapr-ext-grpc dapr-ext-fastapi dapr-ext-langgraph dapr-ext-strands dapr-ext-flask dapr-ext-langgraph dapr-ext-strands + [testenv:example-component] ; This environment is used to validate a specific example component. ; Usage: tox -e example-component -- component_name @@ -83,31 +90,38 @@ basepython = python3 changedir = ./examples/ deps = mechanical-markdown + -e {toxinidir}/ext/dapr-ext-workflow/ + -e {toxinidir}/ext/dapr-ext-grpc/ + -e {toxinidir}/ext/dapr-ext-fastapi/ + -e {toxinidir}/ext/dapr-ext-langgraph/ + -e {toxinidir}/ext/dapr-ext-strands/ + -e {toxinidir}/ext/flask_dapr/ + -e {toxinidir}/ commands = ./validate.sh {posargs} -commands_pre = - pip3 install -e {toxinidir}/ - pip3 install -e {toxinidir}/ext/dapr-ext-workflow/ - pip3 install -e {toxinidir}/ext/dapr-ext-grpc/ - pip3 install -e {toxinidir}/ext/dapr-ext-fastapi/ - pip3 install -e {toxinidir}/ext/dapr-ext-langgraph/ - pip3 install -e {toxinidir}/ext/dapr-ext-strands/ allowlist_externals=* +commands_pre = + pip uninstall -y dapr dapr-ext-grpc dapr-ext-fastapi dapr-ext-langgraph dapr-ext-strands dapr-ext-flask dapr-ext-langgraph dapr-ext-strands + [testenv:type] basepython = python3 usedevelop = False -deps = -rdev-requirements.txt +deps = + -rdev-requirements.txt + -e {toxinidir}/ext/dapr-ext-workflow/ + -e {toxinidir}/ext/dapr-ext-grpc/ + -e {toxinidir}/ext/dapr-ext-fastapi/ + -e {toxinidir}/ext/dapr-ext-langgraph/ + -e {toxinidir}/ext/dapr-ext-strands/ + -e {toxinidir}/ext/flask_dapr/ + -e {toxinidir}/ commands = mypy --config-file mypy.ini commands_pre = - pip3 install -e {toxinidir}/ - pip3 install -e {toxinidir}/ext/dapr-ext-workflow/ - pip3 install -e {toxinidir}/ext/dapr-ext-grpc/ - pip3 install -e {toxinidir}/ext/dapr-ext-fastapi/ - pip3 install -e {toxinidir}/ext/dapr-ext-langgraph/ - pip3 install -e {toxinidir}/ext/dapr-ext-strands/ + pip uninstall -y dapr dapr-ext-grpc dapr-ext-fastapi dapr-ext-langgraph dapr-ext-strands dapr-ext-flask dapr-ext-langgraph dapr-ext-strands + [testenv:doc] basepython = python3 usedevelop = False From dbaa95e3ff2a2898271329de193ce488b02ca0ad Mon Sep 17 00:00:00 2001 From: Albert Callarisa Date: Fri, 20 Feb 2026 14:20:30 +0100 Subject: [PATCH 18/22] Fix tox (#925) * Fix tox Signed-off-by: Albert Callarisa * Remove validation steps that install dapr Signed-off-by: Albert Callarisa * Fix ext dependencies on dapr to point to dev if necessary Signed-off-by: Albert Callarisa * lint Signed-off-by: Albert Callarisa * Revert w3c example Signed-off-by: Albert Callarisa --------- Signed-off-by: Albert Callarisa --- examples/invoke-http/README.md | 14 +++++--- ext/dapr-ext-fastapi/setup.py | 13 +++++++ ext/dapr-ext-grpc/setup.py | 13 +++++++ ext/dapr-ext-langgraph/setup.py | 13 +++++++ ext/dapr-ext-strands/setup.py | 13 +++++++ ext/dapr-ext-workflow/setup.py | 13 +++++++ ext/flask_dapr/setup.py | 13 +++++++ tox.ini | 62 ++++++++++++++++----------------- 8 files changed, 117 insertions(+), 37 deletions(-) diff --git a/examples/invoke-http/README.md b/examples/invoke-http/README.md index 466392d20..7f69b1798 100644 --- a/examples/invoke-http/README.md +++ b/examples/invoke-http/README.md @@ -12,13 +12,17 @@ This example utilizes a receiver and a caller for the `invoke_method` functional ### Install requirements You can install dapr SDK package using pip command: +```sh +pip3 install dapr +``` - +Also install Flask package: ```sh -pip3 install dapr Flask +pip3 install Flask ``` @@ -55,7 +59,7 @@ expected_stdout_lines: - '== APP == 503' - '== APP == Internal Server Error' background: true -sleep: 5 +sleep: 5 --> ```bash @@ -66,7 +70,7 @@ dapr run --app-id=invoke-caller -- python3 invoke-caller.py ## Cleanup @@ -75,4 +79,4 @@ name: Shutdown dapr dapr stop --app-id invoke-receiver ``` - \ No newline at end of file + diff --git a/ext/dapr-ext-fastapi/setup.py b/ext/dapr-ext-fastapi/setup.py index 8d6a400cf..2899b9b24 100644 --- a/ext/dapr-ext-fastapi/setup.py +++ b/ext/dapr-ext-fastapi/setup.py @@ -13,6 +13,7 @@ limitations under the License. """ +import configparser import os from setuptools import setup @@ -47,11 +48,22 @@ def is_release(): # Get build number from GITHUB_RUN_NUMBER environment variable build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') +cfg = configparser.ConfigParser() +cfg.read('setup.cfg') +install_requires = [ + r.strip() + for r in cfg.get('options', 'install_requires', fallback='').strip().splitlines() + if r.strip() +] + if not is_release(): name += '-dev' version = f'{__version__}{build_number}' description = 'The developmental release for Dapr FastAPI extension.' long_description = 'This is the developmental release for Dapr FastAPI extension.' + install_requires = [ + 'dapr-dev' + r[4:] if r.startswith('dapr ') else r for r in install_requires + ] print(f'package name: {name}, version: {version}', flush=True) @@ -61,4 +73,5 @@ def is_release(): version=version, description=description, long_description=long_description, + install_requires=install_requires, ) diff --git a/ext/dapr-ext-grpc/setup.py b/ext/dapr-ext-grpc/setup.py index 67d282b68..6c95a9151 100644 --- a/ext/dapr-ext-grpc/setup.py +++ b/ext/dapr-ext-grpc/setup.py @@ -13,6 +13,7 @@ limitations under the License. """ +import configparser import os from setuptools import setup @@ -47,11 +48,22 @@ def is_release(): # Get build number from GITHUB_RUN_NUMBER environment variable build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') +cfg = configparser.ConfigParser() +cfg.read('setup.cfg') +install_requires = [ + r.strip() + for r in cfg.get('options', 'install_requires', fallback='').strip().splitlines() + if r.strip() +] + if not is_release(): name += '-dev' version = f'{__version__}{build_number}' description = 'The developmental release for Dapr gRPC AppCallback.' long_description = 'This is the developmental release for Dapr gRPC AppCallback.' + install_requires = [ + 'dapr-dev' + r[4:] if r.startswith('dapr ') else r for r in install_requires + ] print(f'package name: {name}, version: {version}', flush=True) @@ -61,4 +73,5 @@ def is_release(): version=version, description=description, long_description=long_description, + install_requires=install_requires, ) diff --git a/ext/dapr-ext-langgraph/setup.py b/ext/dapr-ext-langgraph/setup.py index 78c0daace..48dc9ad5a 100644 --- a/ext/dapr-ext-langgraph/setup.py +++ b/ext/dapr-ext-langgraph/setup.py @@ -13,6 +13,7 @@ limitations under the License. """ +import configparser import os from setuptools import setup @@ -47,6 +48,14 @@ def is_release(): # Get build number from GITHUB_RUN_NUMBER environment variable build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') +cfg = configparser.ConfigParser() +cfg.read('setup.cfg') +install_requires = [ + r.strip() + for r in cfg.get('options', 'install_requires', fallback='').strip().splitlines() + if r.strip() +] + if not is_release(): name += '-dev' version = f'{__version__}{build_number}' @@ -54,6 +63,9 @@ def is_release(): long_description = ( 'This is the developmental release for the Dapr Checkpointer extension for LangGraph' ) + install_requires = [ + 'dapr-dev' + r[4:] if r.startswith('dapr ') else r for r in install_requires + ] print(f'package name: {name}, version: {version}', flush=True) @@ -63,4 +75,5 @@ def is_release(): version=version, description=description, long_description=long_description, + install_requires=install_requires, ) diff --git a/ext/dapr-ext-strands/setup.py b/ext/dapr-ext-strands/setup.py index 1d8c6732d..eea782d5b 100644 --- a/ext/dapr-ext-strands/setup.py +++ b/ext/dapr-ext-strands/setup.py @@ -13,6 +13,7 @@ limitations under the License. """ +import configparser import os from setuptools import setup @@ -47,6 +48,14 @@ def is_release(): # Get build number from GITHUB_RUN_NUMBER environment variable build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') +cfg = configparser.ConfigParser() +cfg.read('setup.cfg') +install_requires = [ + r.strip() + for r in cfg.get('options', 'install_requires', fallback='').strip().splitlines() + if r.strip() +] + if not is_release(): name += '-dev' version = f'{__version__}{build_number}' @@ -54,6 +63,9 @@ def is_release(): 'The developmental release for the Dapr Session Manager extension for Strands Agents' ) long_description = 'This is the developmental release for the Dapr Session Manager extension for Strands Agents' + install_requires = [ + 'dapr-dev' + r[4:] if r.startswith('dapr ') else r for r in install_requires + ] print(f'package name: {name}, version: {version}', flush=True) @@ -63,4 +75,5 @@ def is_release(): version=version, description=description, long_description=long_description, + install_requires=install_requires, ) diff --git a/ext/dapr-ext-workflow/setup.py b/ext/dapr-ext-workflow/setup.py index e66837f7c..e09cf77a5 100644 --- a/ext/dapr-ext-workflow/setup.py +++ b/ext/dapr-ext-workflow/setup.py @@ -13,6 +13,7 @@ limitations under the License. """ +import configparser import os from setuptools import setup @@ -47,11 +48,22 @@ def is_release(): # Get build number from GITHUB_RUN_NUMBER environment variable build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') +cfg = configparser.ConfigParser() +cfg.read('setup.cfg') +install_requires = [ + r.strip() + for r in cfg.get('options', 'install_requires', fallback='').strip().splitlines() + if r.strip() +] + if not is_release(): name += '-dev' version = f'{__version__}{build_number}' description = 'The developmental release for Dapr Workflow Authoring.' long_description = 'This is the developmental release for Dapr Workflow Authoring.' + install_requires = [ + 'dapr-dev' + r[4:] if r.startswith('dapr ') else r for r in install_requires + ] print(f'package name: {name}, version: {version}', flush=True) @@ -61,4 +73,5 @@ def is_release(): version=version, description=description, long_description=long_description, + install_requires=install_requires, ) diff --git a/ext/flask_dapr/setup.py b/ext/flask_dapr/setup.py index d2aca0577..b14b4fabc 100644 --- a/ext/flask_dapr/setup.py +++ b/ext/flask_dapr/setup.py @@ -13,6 +13,7 @@ limitations under the License. """ +import configparser import os from setuptools import setup @@ -47,11 +48,22 @@ def is_release(): # Get build number from GITHUB_RUN_NUMBER environment variable build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') +cfg = configparser.ConfigParser() +cfg.read('setup.cfg') +install_requires = [ + r.strip() + for r in cfg.get('options', 'install_requires', fallback='').strip().splitlines() + if r.strip() +] + if not is_release(): name += '-dev' version = f'{__version__}{build_number}' description = 'The developmental release for Dapr Python SDK Flask.' long_description = 'This is the developmental release for Dapr Python SDK Flask.' + install_requires = [ + 'dapr-dev' + r[4:] if r.startswith('dapr ') else r for r in install_requires + ] print(f'package name: {name}, version: {version}', flush=True) @@ -61,4 +73,5 @@ def is_release(): version=version, description=description, long_description=long_description, + install_requires=install_requires, ) diff --git a/tox.ini b/tox.ini index 65f26ea0d..c7123a593 100644 --- a/tox.ini +++ b/tox.ini @@ -9,15 +9,6 @@ envlist = [testenv] setenv = PYTHONDONTWRITEBYTECODE=1 -deps = - -rdev-requirements.txt - -e {toxinidir}/ext/dapr-ext-workflow/ - -e {toxinidir}/ext/dapr-ext-grpc/ - -e {toxinidir}/ext/dapr-ext-fastapi/ - -e {toxinidir}/ext/dapr-ext-langgraph/ - -e {toxinidir}/ext/dapr-ext-strands/ - -e {toxinidir}/ext/flask_dapr/ - -e {toxinidir}/ commands = coverage run -m unittest discover -v ./tests coverage run -a -m unittest discover -v ./ext/dapr-ext-workflow/tests @@ -30,6 +21,14 @@ commands = commands_pre = pip uninstall -y dapr dapr-ext-grpc dapr-ext-fastapi dapr-ext-langgraph dapr-ext-strands dapr-ext-flask dapr-ext-langgraph dapr-ext-strands + pip install -r dev-requirements.txt \ + -e {toxinidir}/ \ + -e {toxinidir}/ext/dapr-ext-workflow/ \ + -e {toxinidir}/ext/dapr-ext-grpc/ \ + -e {toxinidir}/ext/dapr-ext-fastapi/ \ + -e {toxinidir}/ext/dapr-ext-langgraph/ \ + -e {toxinidir}/ext/dapr-ext-strands/ \ + -e {toxinidir}/ext/flask_dapr/ [testenv:ruff] basepython = python3 @@ -44,13 +43,6 @@ basepython = python3 changedir = ./examples/ deps = mechanical-markdown - -e {toxinidir}/ext/dapr-ext-workflow/ - -e {toxinidir}/ext/dapr-ext-grpc/ - -e {toxinidir}/ext/dapr-ext-fastapi/ - -e {toxinidir}/ext/dapr-ext-langgraph/ - -e {toxinidir}/ext/dapr-ext-strands/ - -e {toxinidir}/ext/flask_dapr/ - -e {toxinidir}/ commands = ./validate.sh conversation @@ -80,6 +72,13 @@ allowlist_externals=* commands_pre = pip uninstall -y dapr dapr-ext-grpc dapr-ext-fastapi dapr-ext-langgraph dapr-ext-strands dapr-ext-flask dapr-ext-langgraph dapr-ext-strands + pip install -e {toxinidir}/ \ + -e {toxinidir}/ext/dapr-ext-workflow/ \ + -e {toxinidir}/ext/dapr-ext-grpc/ \ + -e {toxinidir}/ext/dapr-ext-fastapi/ \ + -e {toxinidir}/ext/dapr-ext-langgraph/ \ + -e {toxinidir}/ext/dapr-ext-strands/ \ + -e {toxinidir}/ext/flask_dapr/ [testenv:example-component] ; This environment is used to validate a specific example component. @@ -90,13 +89,6 @@ basepython = python3 changedir = ./examples/ deps = mechanical-markdown - -e {toxinidir}/ext/dapr-ext-workflow/ - -e {toxinidir}/ext/dapr-ext-grpc/ - -e {toxinidir}/ext/dapr-ext-fastapi/ - -e {toxinidir}/ext/dapr-ext-langgraph/ - -e {toxinidir}/ext/dapr-ext-strands/ - -e {toxinidir}/ext/flask_dapr/ - -e {toxinidir}/ commands = ./validate.sh {posargs} @@ -104,23 +96,29 @@ allowlist_externals=* commands_pre = pip uninstall -y dapr dapr-ext-grpc dapr-ext-fastapi dapr-ext-langgraph dapr-ext-strands dapr-ext-flask dapr-ext-langgraph dapr-ext-strands + pip install -e {toxinidir}/ \ + -e {toxinidir}/ext/dapr-ext-workflow/ \ + -e {toxinidir}/ext/dapr-ext-grpc/ \ + -e {toxinidir}/ext/dapr-ext-fastapi/ \ + -e {toxinidir}/ext/dapr-ext-langgraph/ \ + -e {toxinidir}/ext/dapr-ext-strands/ \ + -e {toxinidir}/ext/flask_dapr/ [testenv:type] basepython = python3 usedevelop = False -deps = - -rdev-requirements.txt - -e {toxinidir}/ext/dapr-ext-workflow/ - -e {toxinidir}/ext/dapr-ext-grpc/ - -e {toxinidir}/ext/dapr-ext-fastapi/ - -e {toxinidir}/ext/dapr-ext-langgraph/ - -e {toxinidir}/ext/dapr-ext-strands/ - -e {toxinidir}/ext/flask_dapr/ - -e {toxinidir}/ commands = mypy --config-file mypy.ini commands_pre = pip uninstall -y dapr dapr-ext-grpc dapr-ext-fastapi dapr-ext-langgraph dapr-ext-strands dapr-ext-flask dapr-ext-langgraph dapr-ext-strands + pip install -r dev-requirements.txt \ + -e {toxinidir}/ \ + -e {toxinidir}/ext/dapr-ext-workflow/ \ + -e {toxinidir}/ext/dapr-ext-grpc/ \ + -e {toxinidir}/ext/dapr-ext-fastapi/ \ + -e {toxinidir}/ext/dapr-ext-langgraph/ \ + -e {toxinidir}/ext/dapr-ext-strands/ \ + -e {toxinidir}/ext/flask_dapr/ [testenv:doc] basepython = python3 From 232549853b6b7cb37975d1edb6e3166927630787 Mon Sep 17 00:00:00 2001 From: Cassie Coyle Date: Mon, 23 Feb 2026 09:55:34 -0600 Subject: [PATCH 19/22] add venv (#921) Signed-off-by: Cassandra Coyle Co-authored-by: Sam --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f205a1b6a..a5d9e1987 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,14 @@ git clone https://github.com/dapr/python-sdk.git cd python-sdk ``` -2. Install a project in a editable mode +2. Create and activate a virtual environment + +```bash +python3 -m venv .venv +source .venv/bin/activate # On Windows: .venv\Scripts\activate +``` + +3. Install a project in editable mode ```bash pip3 install -e . @@ -90,31 +97,31 @@ pip3 install -e ./ext/dapr-ext-langgraph/ pip3 install -e ./ext/dapr-ext-strands/ ``` -3. Install required packages +4. Install required packages ```bash pip3 install -r dev-requirements.txt ``` -4. Run linter and autofix +5. Run linter and autofix ```bash tox -e ruff ``` -5. Run unit-test +6. Run unit-test ```bash tox -e py311 ``` -6. Run type check +7. Run type check ```bash tox -e type ``` -7. Run examples +8. Run examples ```bash tox -e examples From adbcf32fd38bf30e1a5836d5cc6a500c13345b69 Mon Sep 17 00:00:00 2001 From: Albert Callarisa Date: Tue, 24 Feb 2026 10:57:36 +0100 Subject: [PATCH 20/22] Added support for python 3.14 and done some pending 3.9 removals (#916) Signed-off-by: Albert Callarisa Co-authored-by: Sam --- .github/workflows/build-push-to-main.yaml | 2 +- .github/workflows/build-tag.yaml | 2 +- .github/workflows/build.yaml | 2 +- .github/workflows/validate_examples.yaml | 2 +- README.md | 6 ++---- dapr/clients/grpc/_conversation_helpers.py | 10 ++-------- examples/configuration/README.md | 6 +++--- examples/crypto/README.md | 2 +- examples/demo_actor/README.md | 16 ++++++++-------- examples/demo_actor/demo_actor/Dockerfile | 4 ++-- examples/demo_workflow/README.md | 2 +- examples/distributed_lock/README.md | 4 ++-- examples/error_handling/README.md | 6 +++--- examples/grpc_proxying/README.md | 14 +++++++------- examples/invoke-binding/README.md | 10 +++++----- examples/invoke-custom-data/README.md | 8 ++++---- examples/invoke-http/README.md | 2 +- examples/invoke-simple/Dockerfile | 2 +- examples/invoke-simple/README.md | 12 ++++++------ examples/jobs/README.md | 2 +- examples/metadata/README.md | 4 ++-- examples/pubsub-simple/README.md | 8 ++++---- examples/pubsub-streaming-async/README.md | 8 ++++---- examples/pubsub-streaming/README.md | 8 ++++---- examples/secret_store/README.md | 8 ++++---- examples/state_store/README.md | 4 ++-- examples/state_store_query/README.md | 6 +++--- examples/w3c-tracing/Dockerfile | 2 +- examples/w3c-tracing/README.md | 12 ++++++------ examples/workflow/README.md | 2 +- ext/dapr-ext-fastapi/setup.cfg | 5 +++-- ext/dapr-ext-grpc/setup.cfg | 4 ++-- ext/dapr-ext-workflow/setup.cfg | 4 ++-- ext/flask_dapr/setup.cfg | 4 ++-- mypy.ini | 2 +- setup.cfg | 4 ++-- tox.ini | 2 +- 37 files changed, 97 insertions(+), 104 deletions(-) diff --git a/.github/workflows/build-push-to-main.yaml b/.github/workflows/build-push-to-main.yaml index 499daebde..444c50b28 100644 --- a/.github/workflows/build-push-to-main.yaml +++ b/.github/workflows/build-push-to-main.yaml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false matrix: - python_ver: ["3.10", "3.11", "3.12", "3.13"] + python_ver: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python_ver }} diff --git a/.github/workflows/build-tag.yaml b/.github/workflows/build-tag.yaml index aabcbca23..d50d3f97a 100644 --- a/.github/workflows/build-tag.yaml +++ b/.github/workflows/build-tag.yaml @@ -43,7 +43,7 @@ jobs: strategy: fail-fast: false matrix: - python_ver: ["3.10", "3.11", "3.12", "3.13"] + python_ver: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python_ver }} diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7e03d1b80..9bd6ff6cb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -43,7 +43,7 @@ jobs: strategy: fail-fast: false matrix: - python_ver: ["3.10", "3.11", "3.12", "3.13"] + python_ver: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python_ver }} diff --git a/.github/workflows/validate_examples.yaml b/.github/workflows/validate_examples.yaml index abd521fd9..46b1c7af9 100644 --- a/.github/workflows/validate_examples.yaml +++ b/.github/workflows/validate_examples.yaml @@ -48,7 +48,7 @@ jobs: strategy: fail-fast: false matrix: - python_ver: ["3.10", "3.11", "3.12", "3.13"] + python_ver: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - name: Parse repository_dispatch payload if: github.event_name == 'repository_dispatch' diff --git a/README.md b/README.md index a5d9e1987..e212cbd43 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ This includes the following packages: ### Prerequisites * [Install Dapr standalone mode](https://github.com/dapr/cli#install-dapr-on-your-local-machine-self-hosted) -* [Install Python 3.9+](https://www.python.org/downloads/) +* [Install Python 3.10+](https://www.python.org/downloads/) ### Install Dapr python sdk @@ -152,12 +152,10 @@ The generated files will be found in `docs/_build`. ```sh pip3 install -r tools/requirements.txt -export DAPR_BRANCH=release-1.16 # Optional, defaults to master +export DAPR_BRANCH=release-1.17 # Optional, defaults to master ./tools/regen_grpcclient.sh ``` -> Note: The `grpcio-tools` version we're using doesn't support Python 3.13. - ## Help & Feedback Need help or have feedback on the SDK? Please open a GitHub issue or come chat with us in the `#python-sdk` channel of our Discord server ([click here to join](https://discord.gg/MySdVxrH)). diff --git a/dapr/clients/grpc/_conversation_helpers.py b/dapr/clients/grpc/_conversation_helpers.py index 9f57c9cc7..dae006bb4 100644 --- a/dapr/clients/grpc/_conversation_helpers.py +++ b/dapr/clients/grpc/_conversation_helpers.py @@ -16,9 +16,9 @@ import inspect import random import string -import types from dataclasses import fields, is_dataclass from enum import Enum +from types import UnionType from typing import ( Any, Callable, @@ -37,10 +37,6 @@ from dapr.conf import settings -# Make mypy happy. Runtime handle: real class on 3.10+, else None. -# TODO: Python 3.9 is about to be end-of-life, so we can drop this at some point next year (2026) -UnionType: Any = getattr(types, 'UnionType', None) - # duplicated from conversation to avoid circular import Params = Union[Mapping[str, Any], Sequence[Any], None] @@ -857,9 +853,7 @@ def _coerce_literal(value: Any, lit_args: List[Any]) -> Any: def _is_union(t) -> bool: origin = get_origin(t) - if origin is Union: - return True - return UnionType is not None and origin is UnionType + return origin is Union or origin is UnionType def _coerce_and_validate(value: Any, expected_type: Any) -> Any: diff --git a/examples/configuration/README.md b/examples/configuration/README.md index a90238887..4dc38f5e7 100644 --- a/examples/configuration/README.md +++ b/examples/configuration/README.md @@ -9,7 +9,7 @@ It demonstrates the following APIs: ## Pre-requisites - [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started) -- [Install Python 3.9+](https://www.python.org/downloads/) +- [Install Python 3.10+](https://www.python.org/downloads/) ## Install Dapr python-SDK @@ -18,7 +18,7 @@ It demonstrates the following APIs: pip3 install dapr dapr-ext-grpc ``` -## Store the configuration in configurationstore +## Store the configuration in configurationstore @@ -58,7 +58,7 @@ dapr run --app-id invoke-caller --dapr-grpc-port 50007 --config config.yaml -- ## Cleanup @@ -97,17 +97,17 @@ dapr stop --app-id invoke-receiver ``` dapr logs -a invoke-caller -k ``` - + Logs for caller app: ``` kubectl logs -l app="invokecaller" -c invokecaller ``` - + Logs for receiver sidecar: ``` dapr logs -a invoke-receiver -k ``` - + Logs for receiver app: ``` kubectl logs -l app="invokereceiver" -c invokereceiver diff --git a/examples/invoke-binding/README.md b/examples/invoke-binding/README.md index 74e395768..c90ff1dfc 100644 --- a/examples/invoke-binding/README.md +++ b/examples/invoke-binding/README.md @@ -7,7 +7,7 @@ This example utilizes a publisher and a receiver for the InvokeBinding / OnBindi ## Pre-requisites - [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started) -- [Install Python 3.9+](https://www.python.org/downloads/) +- [Install Python 3.10+](https://www.python.org/downloads/) ## Install Dapr python-SDK @@ -26,7 +26,7 @@ name: Kafka install sleep: 30 --> -1. Start the kafka containers using docker compose +1. Start the kafka containers using docker compose ```bash docker compose -f ./docker-compose-single-kafka.yml up -d @@ -36,7 +36,7 @@ docker compose -f ./docker-compose-single-kafka.yml up -d -2. Start Receiver (expose gRPC server receiver on port 50051) +2. Start Receiver (expose gRPC server receiver on port 50051) ```bash dapr run --app-id receiver --app-protocol grpc --app-port 50051 --resources-path ./components python3 invoke-input-binding.py @@ -58,7 +58,7 @@ In another terminal/command-prompt run: diff --git a/examples/invoke-http/README.md b/examples/invoke-http/README.md index 7f69b1798..042faf11e 100644 --- a/examples/invoke-http/README.md +++ b/examples/invoke-http/README.md @@ -7,7 +7,7 @@ This example utilizes a receiver and a caller for the `invoke_method` functional ## Pre-requisites - [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started) -- [Install Python 3.8+](https://www.python.org/downloads/) +- [Install Python 3.10+](https://www.python.org/downloads/) ### Install requirements diff --git a/examples/invoke-simple/Dockerfile b/examples/invoke-simple/Dockerfile index 892d3f624..4d80bcd5c 100644 --- a/examples/invoke-simple/Dockerfile +++ b/examples/invoke-simple/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9-slim +FROM python:3.10-slim WORKDIR /app diff --git a/examples/invoke-simple/README.md b/examples/invoke-simple/README.md index 08cf68e74..b2af5c60f 100644 --- a/examples/invoke-simple/README.md +++ b/examples/invoke-simple/README.md @@ -7,7 +7,7 @@ This example utilizes a receiver and a caller for the OnInvoke / Invoke function ## Pre-requisites - [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started) -- [Install Python 3.9+](https://www.python.org/downloads/) +- [Install Python 3.10+](https://www.python.org/downloads/) ## Install Dapr python-SDK @@ -47,7 +47,7 @@ expected_stdout_lines: - '== APP == text/plain' - '== APP == INVOKE_RECEIVED' background: true -sleep: 5 +sleep: 5 --> ```bash @@ -60,7 +60,7 @@ dapr run --app-id invoke-caller --app-protocol grpc --dapr-http-port 3500 python ## Cleanup ```bash @@ -87,7 +87,7 @@ dapr run --app-id python-publisher --app-protocol grpc --dapr-grpc-port=3500 --e ## Cleanup diff --git a/examples/pubsub-streaming-async/README.md b/examples/pubsub-streaming-async/README.md index 4a399a5b0..e626fe75a 100644 --- a/examples/pubsub-streaming-async/README.md +++ b/examples/pubsub-streaming-async/README.md @@ -10,7 +10,7 @@ In the s`subscriber.py` file it creates a subscriber object that can call the `n ## Pre-requisites - [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started) -- [Install Python 3.9+](https://www.python.org/downloads/) +- [Install Python 3.10+](https://www.python.org/downloads/) ## Install Dapr python-SDK @@ -36,7 +36,7 @@ expected_stdout_lines: output_match_mode: substring background: true match_order: none -sleep: 3 +sleep: 3 --> ```bash @@ -84,7 +84,7 @@ expected_stdout_lines: output_match_mode: substring background: true match_order: none -sleep: 3 +sleep: 3 --> ```bash @@ -114,7 +114,7 @@ sleep: 15 dapr run --app-id python-publisher --app-protocol grpc --dapr-grpc-port=3500 --enable-app-health-check -- python3 publisher.py --topic=TOPIC_B2 ``` - + ## Cleanup diff --git a/examples/pubsub-streaming/README.md b/examples/pubsub-streaming/README.md index d03ff045f..40a746d3e 100644 --- a/examples/pubsub-streaming/README.md +++ b/examples/pubsub-streaming/README.md @@ -10,7 +10,7 @@ In the s`subscriber.py` file it creates a subscriber object that can call the `n ## Pre-requisites - [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started) -- [Install Python 3.9+](https://www.python.org/downloads/) +- [Install Python 3.10+](https://www.python.org/downloads/) ## Install Dapr python-SDK @@ -36,7 +36,7 @@ expected_stdout_lines: output_match_mode: substring background: true match_order: none -sleep: 3 +sleep: 3 --> ```bash @@ -84,7 +84,7 @@ expected_stdout_lines: output_match_mode: substring background: true match_order: none -sleep: 3 +sleep: 3 --> ```bash @@ -114,7 +114,7 @@ sleep: 15 dapr run --app-id python-publisher --app-protocol grpc --dapr-grpc-port=3500 --enable-app-health-check -- python3 publisher.py --topic=TOPIC_A2 ``` - + ## Cleanup diff --git a/examples/secret_store/README.md b/examples/secret_store/README.md index 1bb8e3ae5..5a4c87f45 100644 --- a/examples/secret_store/README.md +++ b/examples/secret_store/README.md @@ -9,7 +9,7 @@ This example also illustrates the use of access control for secrets. ## Pre-requisites - [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started) -- [Install Python 3.9+](https://www.python.org/downloads/) +- [Install Python 3.10+](https://www.python.org/downloads/) ## Install Dapr python-SDK @@ -70,10 +70,10 @@ spec: allowedSecrets: ["secretKey",] ``` -The above configuration defines that the default access permission for the `localsecretstore` is `deny` and that only the +The above configuration defines that the default access permission for the `localsecretstore` is `deny` and that only the key `secretKey` is allowed to be accessed from the store. -To see this run the same `example.py` app with the following command: +To see this run the same `example.py` app with the following command: \ No newline at end of file + diff --git a/examples/w3c-tracing/Dockerfile b/examples/w3c-tracing/Dockerfile index 892d3f624..4d80bcd5c 100644 --- a/examples/w3c-tracing/Dockerfile +++ b/examples/w3c-tracing/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9-slim +FROM python:3.10-slim WORKDIR /app diff --git a/examples/w3c-tracing/README.md b/examples/w3c-tracing/README.md index d8ed7d6bd..58faa8590 100644 --- a/examples/w3c-tracing/README.md +++ b/examples/w3c-tracing/README.md @@ -7,15 +7,15 @@ This sample includes: - invoke-caller: Invokes the exposed methods Also consider [getting started with observability in Dapr](https://github.com/dapr/quickstarts/tree/master/tutorials/observability). - + ## Example overview -This sample uses the Client provided in Dapr's Python SDK invoking a remote method and Zipkin to collect and display tracing data. +This sample uses the Client provided in Dapr's Python SDK invoking a remote method and Zipkin to collect and display tracing data. ## Pre-requisites - [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started) -- [Install Python 3.9+](https://www.python.org/downloads/) +- [Install Python 3.10+](https://www.python.org/downloads/) ### Install dependencies @@ -46,7 +46,7 @@ pip3 install -r requirements.txt ### Verify Zipkin is running -Run `docker ps` to see if the container `dapr_zipkin` is running locally: +Run `docker ps` to see if the container `dapr_zipkin` is running locally: ```bash CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES @@ -219,7 +219,7 @@ with tracer.start_as_current_span(name='main') as span: ``` The class knows the `app-id` for the remote application. It uses `invoke_method` to invoke API calls on the service endpoint. Instrumentation happens automatically in `Dapr` client via the `tracer` argument. - + Execute the following command in order to run the caller example, it will call each method twice: diff --git a/examples/workflow/README.md b/examples/workflow/README.md index 68bb9d1ed..e27f4c78f 100644 --- a/examples/workflow/README.md +++ b/examples/workflow/README.md @@ -5,7 +5,7 @@ This directory contains examples of using the [Dapr Workflow](https://docs.dapr. ## Prerequisites - [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started) -- [Install Python 3.9+](https://www.python.org/downloads/) +- [Install Python 3.10+](https://www.python.org/downloads/) ### Install requirements diff --git a/ext/dapr-ext-fastapi/setup.cfg b/ext/dapr-ext-fastapi/setup.cfg index c182b2bc8..f5d9762ac 100644 --- a/ext/dapr-ext-fastapi/setup.cfg +++ b/ext/dapr-ext-fastapi/setup.cfg @@ -10,17 +10,18 @@ classifiers = License :: OSI Approved :: Apache Software License Operating System :: OS Independent Programming Language :: Python - Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 Programming Language :: Python :: 3.13 + Programming Language :: Python :: 3.14 + project_urls = Documentation = https://github.com/dapr/docs Source = https://github.com/dapr/python-sdk [options] -python_requires = >=3.9 +python_requires = >=3.10 packages = find_namespace: include_package_data = True install_requires = diff --git a/ext/dapr-ext-grpc/setup.cfg b/ext/dapr-ext-grpc/setup.cfg index 4225c1abb..e26dcd12d 100644 --- a/ext/dapr-ext-grpc/setup.cfg +++ b/ext/dapr-ext-grpc/setup.cfg @@ -10,17 +10,17 @@ classifiers = License :: OSI Approved :: Apache Software License Operating System :: OS Independent Programming Language :: Python - Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 Programming Language :: Python :: 3.13 + Programming Language :: Python :: 3.14 project_urls = Documentation = https://github.com/dapr/docs Source = https://github.com/dapr/python-sdk [options] -python_requires = >=3.9 +python_requires = >=3.10 packages = find_namespace: include_package_data = True install_requires = diff --git a/ext/dapr-ext-workflow/setup.cfg b/ext/dapr-ext-workflow/setup.cfg index 0c5c46624..e0accdd6b 100644 --- a/ext/dapr-ext-workflow/setup.cfg +++ b/ext/dapr-ext-workflow/setup.cfg @@ -10,17 +10,17 @@ classifiers = License :: OSI Approved :: Apache Software License Operating System :: OS Independent Programming Language :: Python - Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 Programming Language :: Python :: 3.13 + Programming Language :: Python :: 3.14 project_urls = Documentation = https://github.com/dapr/docs Source = https://github.com/dapr/python-sdk [options] -python_requires = >=3.9 +python_requires = >=3.10 packages = find_namespace: include_package_data = True install_requires = diff --git a/ext/flask_dapr/setup.cfg b/ext/flask_dapr/setup.cfg index c19bf5b5c..4c7220ef6 100644 --- a/ext/flask_dapr/setup.cfg +++ b/ext/flask_dapr/setup.cfg @@ -10,17 +10,17 @@ classifiers = License :: OSI Approved :: Apache Software License Operating System :: OS Independent Programming Language :: Python - Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 Programming Language :: Python :: 3.13 + Programming Language :: Python :: 3.14 project_urls = Documentation = https://github.com/dapr/docs Source = https://github.com/dapr/python-sdk [options] -python_requires = >=3.9 +python_requires = >=3.10 packages = find: include_package_data = true zip_safe = false diff --git a/mypy.ini b/mypy.ini index 8c0fee4f0..13a026b7d 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,5 +1,5 @@ [mypy] -python_version = 3.9 +python_version = 3.10 warn_unused_configs = True warn_redundant_casts = True show_error_codes = True diff --git a/setup.cfg b/setup.cfg index e68961557..3f859d1a9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,17 +10,17 @@ classifiers = License :: OSI Approved :: Apache Software License Operating System :: OS Independent Programming Language :: Python - Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 Programming Language :: Python :: 3.13 + Programming Language :: Python :: 3.14 project_urls = Documentation = https://github.com/dapr/docs Source = https://github.com/dapr/python-sdk [options] -python_requires = >=3.9 +python_requires = >=3.10 packages = find_namespace: include_package_data = True zip_safe = False diff --git a/tox.ini b/tox.ini index c7123a593..87f4bb5e9 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ skipsdist = True minversion = 3.10.0 envlist = - py{310,311,312,313} + py{310,311,312,313,314} ruff, mypy, From fa4a291f59037baaa4663dd73776b8de9648fc7e Mon Sep 17 00:00:00 2001 From: Albert Callarisa Date: Tue, 24 Feb 2026 22:01:00 +0100 Subject: [PATCH 21/22] chore: Use dapr-bot to create backport PRs, so they can trigger workflows (#931) Signed-off-by: Albert Callarisa --- .github/workflows/backport.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml index 5be6f43d2..71b9716cb 100644 --- a/.github/workflows/backport.yaml +++ b/.github/workflows/backport.yaml @@ -34,4 +34,4 @@ jobs: steps: - uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.DAPR_BOT_TOKEN }} From a1e03542deb38f745c25d602f59033d2611526bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Andr=C3=A9?= <92062874+matheusandre1@users.noreply.github.com> Date: Fri, 27 Feb 2026 14:19:05 -0300 Subject: [PATCH 22/22] fix: Align Workflow Multi App Naming Convention (#932) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matheus André <92062874+matheusandre1@users.noreply.github.com> --- examples/workflow/README.md | 28 +++++++++---------- .../workflow/{cross-app1.py => multi-app1.py} | 0 .../workflow/{cross-app2.py => multi-app2.py} | 0 .../workflow/{cross-app3.py => multi-app3.py} | 0 .../ext/workflow/dapr_workflow_context.py | 6 ++-- .../dapr/ext/workflow/workflow_context.py | 4 +-- 6 files changed, 19 insertions(+), 19 deletions(-) rename examples/workflow/{cross-app1.py => multi-app1.py} (100%) rename examples/workflow/{cross-app2.py => multi-app2.py} (100%) rename examples/workflow/{cross-app3.py => multi-app3.py} (100%) diff --git a/examples/workflow/README.md b/examples/workflow/README.md index e27f4c78f..b1f1cfae9 100644 --- a/examples/workflow/README.md +++ b/examples/workflow/README.md @@ -338,7 +338,7 @@ When you run the example, you will see output like this: ``` -### Cross-app Workflow +### Multi-app Workflows This example demonstrates how to call child workflows and activities in different apps. The multiple Dapr CLI instances can be started using the following commands: @@ -361,9 +361,9 @@ sleep: 20 --> ```sh -dapr run --app-id wfexample3 python3 cross-app3.py & -dapr run --app-id wfexample2 python3 cross-app2.py & -dapr run --app-id wfexample1 python3 cross-app1.py +dapr run --app-id wfexample3 python3 multi-app3.py & +dapr run --app-id wfexample2 python3 multi-app2.py & +dapr run --app-id wfexample1 python3 multi-app1.py ``` @@ -379,9 +379,9 @@ among others. This shows that the workflow calls are working as expected. #### Error handling on activity calls -This example demonstrates how the error handling works on activity calls across apps. +This example demonstrates how the error handling works on activity calls in multi-app workflows. -Error handling on activity calls across apps works as normal workflow activity calls. +Error handling on activity calls in multi-app workflows works as normal workflow activity calls. In this example we run `app3` in failing mode, which makes the activity call return error constantly. The activity call from `app2` will fail after the retry policy is exhausted. @@ -404,9 +404,9 @@ sleep: 20 ```sh export ERROR_ACTIVITY_MODE=true -dapr run --app-id wfexample3 python3 cross-app3.py & -dapr run --app-id wfexample2 python3 cross-app2.py & -dapr run --app-id wfexample1 python3 cross-app1.py +dapr run --app-id wfexample3 python3 multi-app3.py & +dapr run --app-id wfexample2 python3 multi-app2.py & +dapr run --app-id wfexample1 python3 multi-app1.py ``` @@ -424,9 +424,9 @@ among others. This shows that the activity calls are failing as expected, and th #### Error handling on workflow calls -This example demonstrates how the error handling works on workflow calls across apps. +This example demonstrates how the error handling works on workflow calls in multi-app workflows. -Error handling on workflow calls across apps works as normal workflow calls. +Error handling on workflow calls in multi-app workflows works as normal workflow calls. In this example we run `app2` in failing mode, which makes the workflow call return error constantly. The workflow call from `app1` will fail after the retry policy is exhausted. @@ -445,9 +445,9 @@ sleep: 20 ```sh export ERROR_WORKFLOW_MODE=true -dapr run --app-id wfexample3 python3 cross-app3.py & -dapr run --app-id wfexample2 python3 cross-app2.py & -dapr run --app-id wfexample1 python3 cross-app1.py +dapr run --app-id wfexample3 python3 multi-app3.py & +dapr run --app-id wfexample2 python3 multi-app2.py & +dapr run --app-id wfexample1 python3 multi-app1.py ``` diff --git a/examples/workflow/cross-app1.py b/examples/workflow/multi-app1.py similarity index 100% rename from examples/workflow/cross-app1.py rename to examples/workflow/multi-app1.py diff --git a/examples/workflow/cross-app2.py b/examples/workflow/multi-app2.py similarity index 100% rename from examples/workflow/cross-app2.py rename to examples/workflow/multi-app2.py diff --git a/examples/workflow/cross-app3.py b/examples/workflow/multi-app3.py similarity index 100% rename from examples/workflow/cross-app3.py rename to examples/workflow/multi-app3.py diff --git a/ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_context.py b/ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_context.py index cc0cfe8ba..d90c72dc2 100644 --- a/ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_context.py +++ b/ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_context.py @@ -68,12 +68,12 @@ def call_activity( retry_policy: Optional[RetryPolicy] = None, app_id: Optional[str] = None, ) -> task.Task[TOutput]: - # Handle string activity names for cross-app scenarios + # Handle string activity names for multi-app workflow scenarios if isinstance(activity, str): activity_name = activity if app_id is not None: self._logger.debug( - f'{self.instance_id}: Creating cross-app activity {activity_name} for app {app_id}' + f'{self.instance_id}: Creating multi-app workflow activity {activity_name} for app {app_id}' ) else: self._logger.debug(f'{self.instance_id}: Creating activity {activity_name}') @@ -106,7 +106,7 @@ def call_child_workflow( retry_policy: Optional[RetryPolicy] = None, app_id: Optional[str] = None, ) -> task.Task[TOutput]: - # Handle string workflow names for cross-app scenarios + # Handle string workflow names for multi-app workflow scenarios if isinstance(workflow, str): workflow_name = workflow self._logger.debug(f'{self.instance_id}: Creating child workflow {workflow_name}') diff --git a/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_context.py b/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_context.py index 8453e16ef..d41841472 100644 --- a/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_context.py +++ b/ext/dapr-ext-workflow/dapr/ext/workflow/workflow_context.py @@ -118,7 +118,7 @@ def call_activity( Parameters ---------- activity: Activity[TInput, TOutput] | str - A reference to the activity function to call, or a string name for cross-app activities. + A reference to the activity function to call, or a string name for multi-app workflow activities. input: TInput | None The JSON-serializable input (or None) to pass to the activity. app_id: str | None @@ -145,7 +145,7 @@ def call_child_workflow( Parameters ---------- orchestrator: Orchestrator[TInput, TOutput] | str - A reference to the orchestrator function to call, or a string name for cross-app workflows. + A reference to the orchestrator function to call, or a string name for multi-app workflows. input: TInput The optional JSON-serializable input to pass to the orchestrator function. instance_id: str