From d5f46da9dd41ad6e69e3a1c7457657b4704f84ba Mon Sep 17 00:00:00 2001 From: Alexey Zorkaltsev Date: Mon, 20 May 2024 16:18:33 +0300 Subject: [PATCH 001/429] chore: slo --- .github/workflows/slo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/slo.yml b/.github/workflows/slo.yml index 767a6d1c..701d6d98 100644 --- a/.github/workflows/slo.yml +++ b/.github/workflows/slo.yml @@ -27,7 +27,7 @@ jobs: DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }} - name: Run SLO - uses: ydb-platform/slo-tests@js-version + uses: ydb-platform/slo-tests@main if: env.DOCKER_REPO != null env: DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }} From 78e59c829d24b4e07448437c3a2b898a179926a8 Mon Sep 17 00:00:00 2001 From: Sergey Uzhakov Date: Tue, 11 Jun 2024 17:32:24 +0300 Subject: [PATCH 002/429] fix iam auth from file, add tests --- tests/iam/__init__.py | 0 tests/iam/test_auth.py | 43 ++++++++++++++++++++++++++++++++++++++++++ ydb/iam/auth.py | 4 +--- 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 tests/iam/__init__.py create mode 100644 tests/iam/test_auth.py diff --git a/tests/iam/__init__.py b/tests/iam/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/iam/test_auth.py b/tests/iam/test_auth.py new file mode 100644 index 00000000..b3d2e5b5 --- /dev/null +++ b/tests/iam/test_auth.py @@ -0,0 +1,43 @@ +from ydb.iam.auth import BaseJWTCredentials +from unittest.mock import patch, mock_open + +CONTENT1 = '{"service_account_id":"my_sa", "id":"123", "private_key":"pppp", "user_account_id":"ua_id"}' +CONTENT2 = '{"id":"123", "private_key":"pppp", "user_account_id":"ua_id"}' + + +class FakeAuth(BaseJWTCredentials): + def __init__(self, account_id, key_id, private_key, iam_endpoint=None, iam_channel_credentials=None): + self.account_id = account_id + self.key_id = key_id + self.private_key = private_key + self.iam_endpoint = iam_endpoint + self.iam_channel_credentials = iam_channel_credentials + + def __eq__(self, other): + return self.__dict__ == other.__dict__ if type(self) == type(other) else False + + +@patch("builtins.open", new_callable=mock_open, read_data=CONTENT1) +def test_auth_from_file(mock_file): + r1 = FakeAuth.from_file("my_file.json", iam_endpoint="my_iam_address", iam_channel_credentials="my_creds") + mock_file.assert_called_with("my_file.json", "r") + + r2 = FakeAuth.from_content(CONTENT1, iam_endpoint="my_iam_address", iam_channel_credentials="my_creds") + assert r1 == r2 + assert r1.__dict__ == { + "account_id": "my_sa", + "key_id": "123", + "private_key": "pppp", + "iam_endpoint": "my_iam_address", + "iam_channel_credentials": "my_creds" + } + + r3 = FakeAuth.from_content(CONTENT2) + + assert r3.__dict__ == { + "account_id": "ua_id", + "key_id": "123", + "private_key": "pppp", + "iam_endpoint": None, + "iam_channel_credentials": None + } diff --git a/ydb/iam/auth.py b/ydb/iam/auth.py index 613b92ad..51345240 100644 --- a/ydb/iam/auth.py +++ b/ydb/iam/auth.py @@ -101,9 +101,7 @@ def from_file(cls, key_file, iam_endpoint=None, iam_channel_credentials=None): with open(os.path.expanduser(key_file), "r") as r: key = r.read() - return BaseJWTCredentials.from_content( - cls, key, iam_endpoint=iam_endpoint, iam_channel_credentials=iam_channel_credentials - ) + return cls.from_content(key, iam_endpoint=iam_endpoint, iam_channel_credentials=iam_channel_credentials) @classmethod def from_content(cls, key, iam_endpoint=None, iam_channel_credentials=None): From 37ed807c549302aa970559e22beebcf5fafbfaf7 Mon Sep 17 00:00:00 2001 From: Sergey Uzhakov Date: Tue, 11 Jun 2024 18:17:05 +0300 Subject: [PATCH 003/429] fix style check --- tests/iam/test_auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/iam/test_auth.py b/tests/iam/test_auth.py index b3d2e5b5..54117b53 100644 --- a/tests/iam/test_auth.py +++ b/tests/iam/test_auth.py @@ -29,7 +29,7 @@ def test_auth_from_file(mock_file): "key_id": "123", "private_key": "pppp", "iam_endpoint": "my_iam_address", - "iam_channel_credentials": "my_creds" + "iam_channel_credentials": "my_creds", } r3 = FakeAuth.from_content(CONTENT2) @@ -39,5 +39,5 @@ def test_auth_from_file(mock_file): "key_id": "123", "private_key": "pppp", "iam_endpoint": None, - "iam_channel_credentials": None + "iam_channel_credentials": None, } From 3bfadb27ac27473d68d5064ccda537d77dd95b3c Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Tue, 11 Jun 2024 18:51:39 +0300 Subject: [PATCH 004/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74fdc446..d275b56b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Fixed error while read the account key from a file + ## 3.12.0 ## * Supported service account key from memory, additional to file path From 80b6b911dc309c3464f8ce2c78f85e8022091bc9 Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 11 Jun 2024 15:52:30 +0000 Subject: [PATCH 005/429] Release: 3.12.1b1 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d275b56b..3cc41d11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.12.1b1 ## * Fixed error while read the account key from a file ## 3.12.0 ## diff --git a/setup.py b/setup.py index 6bf40b16..7729dccd 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.12.0", # AUTOVERSION + version="3.12.1b1", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 7ce5c1b8..5cea4cbe 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.12.0" +VERSION = "3.12.1b1" From 88ebf901a3a8a4a15842d708581a630bd2c1e984 Mon Sep 17 00:00:00 2001 From: Roman Tretiak Date: Wed, 12 Jun 2024 17:29:28 +0200 Subject: [PATCH 006/429] Fix updating of expiration info Fix problem with refreshing of token on each request --- ydb/aio/credentials.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/aio/credentials.py b/ydb/aio/credentials.py index 48db925e..18e1b7e0 100644 --- a/ydb/aio/credentials.py +++ b/ydb/aio/credentials.py @@ -71,7 +71,7 @@ async def _refresh(self): try: auth_metadata = await self._make_token_request() await self._cached_token.update(auth_metadata["access_token"]) - self.update_expiration_info(auth_metadata) + self._update_expiration_info(auth_metadata) self.logger.info( "Token refresh successful. current_time %s, refresh_in %s", current_time, From 3f96440432b0f0826df784411b59a6656397d024 Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 11 Jun 2024 15:52:30 +0000 Subject: [PATCH 007/429] Fixed leak sessions on asyncio timeout --- CHANGELOG.md | 2 ++ ydb/_topic_writer/topic_writer_asyncio.py | 2 +- ydb/aio/credentials.py | 6 +++--- ydb/aio/pool.py | 4 ++-- ydb/aio/resolver.py | 4 ++-- ydb/aio/table.py | 25 +++++++++++++++-------- 6 files changed, 26 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cc41d11..4bc53f8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Fixed leak sessions on asyncio timeout + ## 3.12.1b1 ## * Fixed error while read the account key from a file diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index dd969c7e..e408d8a3 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -537,7 +537,7 @@ async def _send_loop(self, writer: "WriterAsyncIOStream"): m = await self._new_messages.get() # type: InternalMessage if m.seq_no > last_seq_no: writer.write([m]) - except Exception as e: + except BaseException as e: self._stop(e) raise diff --git a/ydb/aio/credentials.py b/ydb/aio/credentials.py index 48db925e..dd9c7ef5 100644 --- a/ydb/aio/credentials.py +++ b/ydb/aio/credentials.py @@ -18,7 +18,7 @@ async def consume(self, timeout=3): if self._value is None: try: await asyncio.wait_for(self._condition.wait(), timeout=timeout) - except Exception: + except BaseException: return self._value return self._value @@ -41,7 +41,7 @@ async def _wrapped_execution(self, callback): res = callback() if asyncio.iscoroutine(res): await res - except Exception: + except BaseException: pass finally: @@ -81,7 +81,7 @@ async def _refresh(self): except (KeyboardInterrupt, SystemExit): return - except Exception as e: + except BaseException as e: self.last_error = str(e) await asyncio.sleep(1) self._tp.submit(self._refresh) diff --git a/ydb/aio/pool.py b/ydb/aio/pool.py index c637a7ca..370b3719 100644 --- a/ydb/aio/pool.py +++ b/ydb/aio/pool.py @@ -170,7 +170,7 @@ async def run(self): while True: try: successful = await self.execute_discovery() - except Exception: + except BaseException: successful = False if successful: self._cache.complete_discovery(None) @@ -247,7 +247,7 @@ async def __call__( wait_timeout = settings.timeout if settings else 10 try: connection = await self._store.get(preferred_endpoint, fast_fail=fast_fail, wait_timeout=wait_timeout) - except Exception: + except BaseException: self._discovery.notify_disconnected() raise diff --git a/ydb/aio/resolver.py b/ydb/aio/resolver.py index e8d27bac..623d11ca 100644 --- a/ydb/aio/resolver.py +++ b/ydb/aio/resolver.py @@ -30,7 +30,7 @@ async def resolve(self): connection = conn_impl.Connection(endpoint, self._driver_config) try: await connection.connection_ready() - except Exception: + except BaseException: self._add_debug_details( 'Failed to establish connection to YDB discovery endpoint: "%s". Check endpoint correctness.' % endpoint ) @@ -53,7 +53,7 @@ async def resolve(self): ) return resolved - except Exception as e: + except BaseException as e: self._add_debug_details( 'Failed to resolve endpoints for database %s. Endpoint: "%s". Error details:\n %s', diff --git a/ydb/aio/table.py b/ydb/aio/table.py index 2a33cf78..3c25f7d2 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -221,7 +221,7 @@ async def retry_operation(callee, retry_settings=None, *args, **kwargs): # pyli else: try: return await next_opt.result - except Exception as e: # pylint: disable=W0703 + except BaseException as e: # pylint: disable=W0703 next_opt.set_exception(e) @@ -236,7 +236,7 @@ def __init__(self, pool, timeout, retry_timeout): :param blocking: A flag that specifies that session acquire method should blocks :param timeout: A timeout in seconds for session acquire """ - self._pool = pool + self._pool: SessionPool = pool self._acquired = None self._timeout = timeout self._retry_timeout = retry_timeout @@ -251,7 +251,7 @@ async def __aexit__(self, exc_type, exc_val, exc_tb): class SessionPool: - def __init__(self, driver: ydb.pool.IConnectionPool, size: int, min_pool_size: int = 0): + def __init__(self, driver: "ydb.aio.Driver", size: int, min_pool_size: int = 0): self._driver_await_timeout = 3 self._should_stop = asyncio.Event() self._waiters = 0 @@ -286,7 +286,7 @@ async def wrapper_callee(): return await retry_operation(wrapper_callee, retry_settings) - def _create(self) -> ydb.ISession: + def _create(self) -> Session: self._active_count += 1 session = self._driver.table_client.session() self._logger.debug("Created session %s", session) @@ -301,6 +301,9 @@ async def _init_session_logic(self, session: ydb.ISession) -> typing.Optional[yd self._logger.error("Failed to create session. Reason: %s", str(e)) except Exception as e: # pylint: disable=W0703 self._logger.exception("Failed to create session. Reason: %s", str(e)) + except BaseException as e: # pylint: disable=W0703 + self._logger.exception("Failed to create session. Reason (base exception): %s", str(e)) + raise return None @@ -324,7 +327,7 @@ async def _prepare_session(self, timeout, retry_num) -> ydb.ISession: if not new_sess: self._destroy(session) return new_sess - except Exception as e: + except BaseException as e: self._destroy(session) raise e @@ -338,7 +341,7 @@ async def _get_session_from_queue(self, timeout: float): _, session = task_wait.result() return session - async def acquire(self, timeout: float = None, retry_timeout: float = None, retry_num: int = None) -> ydb.ISession: + async def acquire(self, timeout: float = None, retry_timeout: float = None, retry_num: int = None) -> Session: if self._should_stop.is_set(): self._logger.error("Take session from closed session pool") @@ -408,7 +411,10 @@ def _destroy(self, session: ydb.ISession, wait_for_del: bool = False): asyncio.ensure_future(coro) return None - async def release(self, session: ydb.ISession): + async def release(self, session: Session): + self._release_nowait(session) + + def _release_nowait(self, session: Session): self._logger.debug("Put on session %s", session.session_id) if session.closing(): self._destroy(session) @@ -421,7 +427,8 @@ async def release(self, session: ydb.ISession): self._destroy(session) return False - await self._active_queue.put((time.time() + 10 * 60, session)) + # self._active_queue has no size limit, it means that put_nowait will be successfully always + self._active_queue.put_nowait((time.time() + 10 * 60, session)) self._logger.debug("Session returned to queue: %s", session.session_id) async def _pick_for_keepalive(self): @@ -445,7 +452,7 @@ async def _send_keep_alive(self, session: ydb.ISession): await session.keep_alive(self._req_settings) try: await self.release(session) - except Exception: # pylint: disable=W0703 + except BaseException: # pylint: disable=W0703 self._destroy(session) async def _keep_alive_loop(self): From 481e59a1035e77c69453ca1be7d07bf74de1a033 Mon Sep 17 00:00:00 2001 From: AlexSm Date: Mon, 17 Jun 2024 16:35:06 +0200 Subject: [PATCH 008/429] Update auth.py --- ydb/iam/auth.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ydb/iam/auth.py b/ydb/iam/auth.py index 7b4fa4e8..038d548b 100644 --- a/ydb/iam/auth.py +++ b/ydb/iam/auth.py @@ -16,6 +16,13 @@ from yandex.cloud.iam.v1 import iam_token_service_pb2_grpc from yandex.cloud.iam.v1 import iam_token_service_pb2 except ImportError: + try: + # This attempt is to enable the IAM auth inside the YDB repository on GitHub + from ydb.public.api.client.yc_public.iam import iam_token_service_pb2_grpc + from ydb.public.api.client.yc_public.iam import iam_token_service_pb2 + except ImportError: + iam_token_service_pb2_grpc = None + iam_token_service_pb2 = None iam_token_service_pb2_grpc = None iam_token_service_pb2 = None From ae761188b298c368026107553b857d7aae7c01ef Mon Sep 17 00:00:00 2001 From: AlexSm Date: Mon, 17 Jun 2024 16:36:38 +0200 Subject: [PATCH 009/429] Update auth.py --- ydb/iam/auth.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ydb/iam/auth.py b/ydb/iam/auth.py index 038d548b..dac9fb6c 100644 --- a/ydb/iam/auth.py +++ b/ydb/iam/auth.py @@ -23,8 +23,6 @@ except ImportError: iam_token_service_pb2_grpc = None iam_token_service_pb2 = None - iam_token_service_pb2_grpc = None - iam_token_service_pb2 = None try: import requests From aec8621dcb4a774c857cb1fd0e32412682cbfb76 Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Tue, 18 Jun 2024 11:47:47 +0300 Subject: [PATCH 010/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cc41d11..7a29e352 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Fixed error while read the account key from a file (release version) + ## 3.12.1b1 ## * Fixed error while read the account key from a file From b8564e9db473df1c52f9c114f539fa16e6f3f941 Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 18 Jun 2024 08:48:35 +0000 Subject: [PATCH 011/429] Release: 3.12.1 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a29e352..2fa587c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.12.1 ## * Fixed error while read the account key from a file (release version) ## 3.12.1b1 ## diff --git a/setup.py b/setup.py index 7729dccd..bfdd6bd7 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.12.1b1", # AUTOVERSION + version="3.12.1", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 5cea4cbe..e9b2f466 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.12.1b1" +VERSION = "3.12.1" From 3d474bb0d5a6a2c0db5300e95fbfe153bf9536c1 Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Tue, 18 Jun 2024 15:58:57 +0300 Subject: [PATCH 012/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fa587c8..e48349a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Added support ydb github repo with own auth protobuf + ## 3.12.1 ## * Fixed error while read the account key from a file (release version) From 295fb74c267e221f94acd2e46c89ba8d31feeeea Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 18 Jun 2024 12:59:50 +0000 Subject: [PATCH 013/429] Release: 3.12.2 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e48349a1..67e4f9ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.12.2 ## * Added support ydb github repo with own auth protobuf ## 3.12.1 ## diff --git a/setup.py b/setup.py index bfdd6bd7..d70731e4 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.12.1", # AUTOVERSION + version="3.12.2", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index e9b2f466..671c2822 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.12.1" +VERSION = "3.12.2" From af52fa2f609ceea22e4513045cd9897283ac788a Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Wed, 19 Jun 2024 11:58:56 +0300 Subject: [PATCH 014/429] Fix writer stop loop handle --- ydb/_topic_writer/topic_writer_asyncio.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index e408d8a3..29ae19b5 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -537,6 +537,9 @@ async def _send_loop(self, writer: "WriterAsyncIOStream"): m = await self._new_messages.get() # type: InternalMessage if m.seq_no > last_seq_no: writer.write([m]) + except asyncio.CancelledError: + # the loop task cancelled be parent code, for example for reconnection + pass except BaseException as e: self._stop(e) raise From 15614e4efa1f54cccf9816394581f7552fa31ecc Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Wed, 19 Jun 2024 15:21:37 +0300 Subject: [PATCH 015/429] revert some handles of cancellederror --- ydb/_topic_writer/topic_writer_asyncio.py | 3 ++- ydb/aio/credentials.py | 10 +++++++--- ydb/aio/pool.py | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index 29ae19b5..007c8a54 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -539,7 +539,8 @@ async def _send_loop(self, writer: "WriterAsyncIOStream"): writer.write([m]) except asyncio.CancelledError: # the loop task cancelled be parent code, for example for reconnection - pass + # no need to stop all work. + raise except BaseException as e: self._stop(e) raise diff --git a/ydb/aio/credentials.py b/ydb/aio/credentials.py index 6f4508d6..08db1fd0 100644 --- a/ydb/aio/credentials.py +++ b/ydb/aio/credentials.py @@ -18,7 +18,7 @@ async def consume(self, timeout=3): if self._value is None: try: await asyncio.wait_for(self._condition.wait(), timeout=timeout) - except BaseException: + except Exception: return self._value return self._value @@ -41,7 +41,7 @@ async def _wrapped_execution(self, callback): res = callback() if asyncio.iscoroutine(res): await res - except BaseException: + except Exception: pass finally: @@ -81,11 +81,15 @@ async def _refresh(self): except (KeyboardInterrupt, SystemExit): return - except BaseException as e: + except Exception as e: self.last_error = str(e) await asyncio.sleep(1) self._tp.submit(self._refresh) + except BaseException as e: + self.last_error = str(e) + raise + async def token(self): current_time = time.time() if current_time > self._refresh_in: diff --git a/ydb/aio/pool.py b/ydb/aio/pool.py index 370b3719..c8fbb904 100644 --- a/ydb/aio/pool.py +++ b/ydb/aio/pool.py @@ -170,7 +170,7 @@ async def run(self): while True: try: successful = await self.execute_discovery() - except BaseException: + except Exception: successful = False if successful: self._cache.complete_discovery(None) From 79ce79d007a26b022f459ee231378878a5b559f5 Mon Sep 17 00:00:00 2001 From: Oleg Geller Date: Sun, 23 Jun 2024 20:28:43 +0300 Subject: [PATCH 016/429] fix iam import in arcadia --- ydb/iam/auth.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ydb/iam/auth.py b/ydb/iam/auth.py index 5fd179d2..39d883eb 100644 --- a/ydb/iam/auth.py +++ b/ydb/iam/auth.py @@ -21,8 +21,13 @@ from ydb.public.api.client.yc_public.iam import iam_token_service_pb2_grpc from ydb.public.api.client.yc_public.iam import iam_token_service_pb2 except ImportError: - iam_token_service_pb2_grpc = None - iam_token_service_pb2 = None + try: + # This attempt is to enable the IAM auth inside the YDB repository on GitHub + from contrib.ydb.public.api.client.yc_public.iam import iam_token_service_pb2_grpc + from contrib.ydb.public.api.client.yc_public.iam import iam_token_service_pb2 + except ImportError: + iam_token_service_pb2_grpc = None + iam_token_service_pb2 = None try: import requests From 4539bda05034b6e00ac87db3c7ad3053e8d54b50 Mon Sep 17 00:00:00 2001 From: Oleg Geller Date: Sun, 23 Jun 2024 20:31:39 +0300 Subject: [PATCH 017/429] fix comment --- ydb/iam/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/iam/auth.py b/ydb/iam/auth.py index 39d883eb..c4096c09 100644 --- a/ydb/iam/auth.py +++ b/ydb/iam/auth.py @@ -22,7 +22,7 @@ from ydb.public.api.client.yc_public.iam import iam_token_service_pb2 except ImportError: try: - # This attempt is to enable the IAM auth inside the YDB repository on GitHub + # This attempt is to enable the IAM auth inside the YDB repository on Arcadia from contrib.ydb.public.api.client.yc_public.iam import iam_token_service_pb2_grpc from contrib.ydb.public.api.client.yc_public.iam import iam_token_service_pb2 except ImportError: From 74d22c58cdba0bf578bbf80d3c91ebcfecc6e58a Mon Sep 17 00:00:00 2001 From: Gleb Nosov Date: Tue, 25 Jun 2024 17:13:20 +0300 Subject: [PATCH 018/429] fix stream_reader close --- ydb/_topic_reader/topic_reader_asyncio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 7b3d1cfa..81c6d9f4 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -192,7 +192,7 @@ async def _connection_loop(self): if self._stream_reader is not None: # noinspection PyBroadException try: - await self._stream_reader.close() + await self._stream_reader.close(flush=False) except BaseException: # supress any error on close stream reader pass From 10fc7596d0c90d37dded5ced1dbb88223676b4b9 Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Tue, 25 Jun 2024 17:26:20 +0300 Subject: [PATCH 019/429] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62ee6a73..cde3ba23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ * Fixed leak sessions on asyncio timeout +* Fixed missed parameter in internal stream_reader.close() - reader hungs up ## 3.12.2 ## * Added support ydb github repo with own auth protobuf From 36ef09b624756f12a99c516d695c1991a444e890 Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 25 Jun 2024 14:27:09 +0000 Subject: [PATCH 020/429] Release: 3.12.3 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cde3ba23..63f7fab6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.12.3 ## * Fixed leak sessions on asyncio timeout * Fixed missed parameter in internal stream_reader.close() - reader hungs up diff --git a/setup.py b/setup.py index d70731e4..5d4c6f13 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.12.2", # AUTOVERSION + version="3.12.3", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 671c2822..d1c4467b 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.12.2" +VERSION = "3.12.3" From a4588fb5002cf49ce98a3d0740b7ef55a680251e Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 27 Jun 2024 18:35:39 +0300 Subject: [PATCH 021/429] Alter topic feature --- tests/topics/test_control_plane.py | 16 +++ ydb/_apis.py | 1 + ydb/_grpc/grpcwrapper/ydb_topic.py | 129 ++++++++++++++++++ .../grpcwrapper/ydb_topic_public_types.py | 39 ++++++ ydb/topic.py | 98 +++++++++++++ 5 files changed, 283 insertions(+) diff --git a/tests/topics/test_control_plane.py b/tests/topics/test_control_plane.py index 2446ddcf..384c9249 100644 --- a/tests/topics/test_control_plane.py +++ b/tests/topics/test_control_plane.py @@ -39,6 +39,14 @@ async def test_describe_topic(self, driver, topic_path: str, topic_consumer): assert has_consumer + async def test_alter_topic(self, driver, topic_path): + client = driver.topic_client + + await client.alter_topic(topic_path) + + with pytest.raises(issues.SchemeError): + await client.alter_topic(topic_path + "-not-exist") + class TestTopicClientControlPlane: def test_create_topic(self, driver_sync, database): @@ -72,3 +80,11 @@ def test_describe_topic(self, driver_sync, topic_path: str, topic_consumer): break assert has_consumer + + def test_alter_topic(self, driver_sync, topic_path): + client = driver_sync.topic_client + + client.alter_topic(topic_path) + + with pytest.raises(issues.SchemeError): + client.alter_topic(topic_path + "-not-exist") diff --git a/ydb/_apis.py b/ydb/_apis.py index 9a241e5c..bd455838 100644 --- a/ydb/_apis.py +++ b/ydb/_apis.py @@ -123,6 +123,7 @@ class TopicService(object): CreateTopic = "CreateTopic" DescribeTopic = "DescribeTopic" + AlterTopic = "AlterTopic" DropTopic = "DropTopic" StreamRead = "StreamRead" StreamWrite = "StreamWrite" diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index 5b5e294a..12c6b4cd 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -883,6 +883,39 @@ def from_proto( ) +@dataclass +class AlterConsumer(IToProto, IFromPublic): + name: str + set_important: bool + set_read_from: datetime.datetime + set_supported_codecs: SupportedCodecs + alter_attributes: Dict[str, str] + + def to_proto(self) -> ydb_topic_pb2.AlterConsumer: + return ydb_topic_pb2.AlterConsumer( + name=self.name, + set_important=self.set_important, + set_read_from=proto_timestamp_from_datetime(self.set_read_from), + set_supported_codecs=self.set_supported_codecs.to_proto(), + alter_attributes=self.alter_attributes, + ) + + @staticmethod + def from_public(alter_consumer: ydb_topic_public_types.PublicAlterConsumer) -> AlterConsumer: + if not alter_consumer: + return None + + supported_codecs = alter_consumer.set_supported_codecs if alter_consumer.set_supported_codecs else [] + + return AlterConsumer( + name=alter_consumer.name, + set_important=alter_consumer.set_important, + set_read_from=alter_consumer.set_read_from, + set_supported_codecs=SupportedCodecs(codecs=supported_codecs), + alter_attributes=alter_consumer.alter_attributes, + ) + + @dataclass class PartitioningSettings(IToProto, IFromProto): min_active_partitions: int @@ -902,6 +935,25 @@ def to_proto(self) -> ydb_topic_pb2.PartitioningSettings: ) +@dataclass +class AlterPartitioningSettings(IToProto, IFromProto): + set_min_active_partitions: int + set_partition_count_limit: int + + @staticmethod + def from_proto(msg: ydb_topic_pb2.AlterPartitioningSettings) -> "AlterPartitioningSettings": + return AlterPartitioningSettings( + set_min_active_partitions=msg.set_min_active_partitions, + set_partition_count_limit=msg.set_partition_count_limit, + ) + + def to_proto(self) -> ydb_topic_pb2.AlterPartitioningSettings: + return ydb_topic_pb2.AlterPartitioningSettings( + set_min_active_partitions=self.set_min_active_partitions, + set_partition_count_limit=self.set_partition_count_limit, + ) + + class MeteringMode(int, IFromProto, IFromPublic, IToPublic): UNSPECIFIED = 0 RESERVED_CAPACITY = 1 @@ -995,6 +1047,83 @@ class CreateTopicResult: pass +@dataclass +class AlterTopicRequest(IToProto, IFromPublic): + path: str + add_consumers: List["Consumer"] + alter_partitioning_settings: AlterPartitioningSettings + set_retention_period: datetime.timedelta + set_retention_storage_mb: int + set_supported_codecs: SupportedCodecs + set_partition_write_burst_bytes: typing.Optional[int] + set_partition_write_speed_bytes_per_second: typing.Optional[int] + alter_attributes: Dict[str, str] + alter_consumers: List[AlterConsumer] + drop_consumers: List[str] + set_metering_mode: "MeteringMode" + + def to_proto(self) -> ydb_topic_pb2.AlterTopicRequest: + return ydb_topic_pb2.AlterTopicRequest( + path=self.path, + add_consumers=[consumer.to_proto() for consumer in self.add_consumers], + alter_partitioning_settings=self.alter_partitioning_settings.to_proto(), + set_retention_period=proto_duration_from_timedelta(self.set_retention_period), + set_retention_storage_mb=self.set_retention_storage_mb, + set_supported_codecs=self.set_supported_codecs.to_proto(), + set_partition_write_burst_bytes=self.set_partition_write_burst_bytes, + set_partition_write_speed_bytes_per_second=self.set_partition_write_speed_bytes_per_second, + alter_attributes=self.alter_attributes, + alter_consumers=[consumer.to_proto() for consumer in self.alter_consumers], + drop_consumers=list(self.drop_consumers), + set_metering_mode=self.set_metering_mode, + ) + + @staticmethod + def from_public(req: ydb_topic_public_types.AlterTopicRequestParams) -> AlterTopicRequest: + add_consumers = [] + if req.add_consumers: + for consumer in req.add_consumers: + if isinstance(consumer, str): + consumer = ydb_topic_public_types.PublicConsumer(name=consumer) + add_consumers.append(Consumer.from_public(consumer)) + + alter_consumers = [] + if req.alter_consumers: + for consumer in req.alter_consumers: + if isinstance(consumer, str): + consumer = ydb_topic_public_types.PublicAlterConsumer(name=consumer) + alter_consumers.append(AlterConsumer.from_public(consumer)) + + drop_consumers = req.drop_consumers if req.drop_consumers else [] + + supported_codecs = req.set_supported_codecs if req.set_supported_codecs else [] + + return AlterTopicRequest( + path=req.path, + alter_partitioning_settings=AlterPartitioningSettings( + set_min_active_partitions=req.set_min_active_partitions, + set_partition_count_limit=req.set_partition_count_limit, + ), + add_consumers=add_consumers, + set_retention_period=req.set_retention_period, + set_retention_storage_mb=req.set_retention_storage_mb, + set_supported_codecs=SupportedCodecs( + codecs=supported_codecs, + ), + set_partition_write_burst_bytes=req.set_partition_write_burst_bytes, + set_partition_write_speed_bytes_per_second=req.set_partition_write_speed_bytes_per_second, + alter_attributes=req.alter_attributes, + alter_consumers=alter_consumers, + drop_consumers=drop_consumers, + set_metering_mode=MeteringMode.from_public(req.set_metering_mode), + ) + + +@dataclass +class AlterTopicResult: + pass + + @dataclass class DescribeTopicRequest: path: str diff --git a/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py b/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py index df280a8b..06ec8aaa 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py @@ -30,6 +30,23 @@ class CreateTopicRequestParams: metering_mode: Optional["PublicMeteringMode"] +@dataclass +class AlterTopicRequestParams: + path: str + set_min_active_partitions: Optional[int] + set_partition_count_limit: Optional[int] + add_consumers: Optional[List[Union["PublicConsumer", str]]] + alter_consumers: Optional[List[Union["PublicAlterConsumer", str]]] + drop_consumers: Optional[List[str]] # TODO: clarify + alter_attributes: Optional[Dict[str, str]] + set_metering_mode: Optional["PublicMeteringMode"] + set_partition_write_speed_bytes_per_second: Optional[int] + set_partition_write_burst_bytes: Optional[int] + set_retention_period: Optional[datetime.timedelta] + set_retention_storage_mb: Optional[int] + set_supported_codecs: Optional[List[Union["PublicCodec", int]]] + + class PublicCodec(int): """ Codec value may contain any int number. @@ -73,6 +90,28 @@ class PublicConsumer: "Attributes of consumer" +@dataclass +class PublicAlterConsumer: + name: str + set_important: bool = False + """ + Consumer may be marked as 'important'. It means messages for this consumer will never expire due to retention. + User should take care that such consumer never stalls, to prevent running out of disk space. + """ + + set_read_from: Optional[datetime.datetime] = None + "All messages with smaller server written_at timestamp will be skipped." + + set_supported_codecs: List[PublicCodec] = field(default_factory=lambda: list()) + """ + List of supported codecs by this consumer. + supported_codecs on topic must be contained inside this list. + """ + + alter_attributes: Dict[str, str] = field(default_factory=lambda: dict()) + "Attributes of consumer" + + @dataclass class DropTopicRequestParams(IToProto): path: str diff --git a/ydb/topic.py b/ydb/topic.py index 948bcff4..f0b872e2 100644 --- a/ydb/topic.py +++ b/ydb/topic.py @@ -6,6 +6,7 @@ "TopicClientSettings", "TopicCodec", "TopicConsumer", + "TopicAlterConsumer", "TopicDescription", "TopicError", "TopicMeteringMode", @@ -77,6 +78,7 @@ PublicPartitionStats as TopicPartitionStats, PublicCodec as TopicCodec, PublicConsumer as TopicConsumer, + PublicAlterConsumer as TopicAlterConsumer, PublicMeteringMode as TopicMeteringMode, ) @@ -145,6 +147,53 @@ async def create_topic( _wrap_operation, ) + async def alter_topic( + self, + path: str, + set_min_active_partitions: Optional[int] = None, + set_partition_count_limit: Optional[int] = None, + add_consumers: Optional[List[Union[TopicConsumer, str]]] = None, + alter_consumers: Optional[List[Union[TopicAlterConsumer, str]]] = None, + drop_consumers: Optional[List[str]] = None, + alter_attributes: Optional[Dict[str, str]] = None, + set_metering_mode: Optional[TopicMeteringMode] = None, + set_partition_write_speed_bytes_per_second: Optional[int] = None, + set_partition_write_burst_bytes: Optional[int] = None, + set_retention_period: Optional[datetime.timedelta] = None, + set_retention_storage_mb: Optional[int] = None, + set_supported_codecs: Optional[List[Union[TopicCodec, int]]] = None, + ): + """ + alter topic command + + :param path: full path to topic + :param set_min_active_partitions: Minimum partition count auto merge would stop working at. + :param set_partition_count_limit: Limit for total partition count, including active (open for write) + and read-only partitions. + :param add_consumers: List of consumers for this topic to add + :param alter_consumers: List of consumers for this topic to alter + :param drop_consumers: List of consumer names for this topic to drop + :param alter_attributes: User and server attributes of topic. + Server attributes starts from "_" and will be validated by server. + :param set_metering_mode: Metering mode for the topic in a serverless database + :param set_partition_write_speed_bytes_per_second: Partition write speed in bytes per second + :param set_partition_write_burst_bytes: Burst size for write in partition, in bytes + :param set_retention_period: How long data in partition should be stored + :param set_retention_storage_mb: How much data in partition should be stored + :param set_supported_codecs: List of allowed codecs for writers. Writes with codec not from this list are forbidden. + Empty list mean disable codec compatibility checks for the topic. + """ + args = locals().copy() + del args["self"] + req = _ydb_topic_public_types.AlterTopicRequestParams(**args) + req = _ydb_topic.AlterTopicRequest.from_public(req) + await self._driver( + req.to_proto(), + _apis.TopicService.Stub, + _apis.TopicService.AlterTopic, + _wrap_operation, + ) + async def describe_topic(self, path: str, include_stats: bool = False) -> TopicDescription: args = locals().copy() del args["self"] @@ -297,6 +346,55 @@ def create_topic( _wrap_operation, ) + def alter_topic( + self, + path: str, + set_min_active_partitions: Optional[int] = None, + set_partition_count_limit: Optional[int] = None, + add_consumers: Optional[List[Union[TopicConsumer, str]]] = None, + alter_consumers: Optional[List[Union[TopicAlterConsumer, str]]] = None, + drop_consumers: Optional[List[str]] = None, + alter_attributes: Optional[Dict[str, str]] = None, + set_metering_mode: Optional[TopicMeteringMode] = None, + set_partition_write_speed_bytes_per_second: Optional[int] = None, + set_partition_write_burst_bytes: Optional[int] = None, + set_retention_period: Optional[datetime.timedelta] = None, + set_retention_storage_mb: Optional[int] = None, + set_supported_codecs: Optional[List[Union[TopicCodec, int]]] = None, + ): + """ + alter topic command + + :param path: full path to topic + :param set_min_active_partitions: Minimum partition count auto merge would stop working at. + :param set_partition_count_limit: Limit for total partition count, including active (open for write) + and read-only partitions. + :param add_consumers: List of consumers for this topic to add + :param alter_consumers: List of consumers for this topic to alter + :param drop_consumers: List of consumer names for this topic to drop + :param alter_attributes: User and server attributes of topic. + Server attributes starts from "_" and will be validated by server. + :param set_metering_mode: Metering mode for the topic in a serverless database + :param set_partition_write_speed_bytes_per_second: Partition write speed in bytes per second + :param set_partition_write_burst_bytes: Burst size for write in partition, in bytes + :param set_retention_period: How long data in partition should be stored + :param set_retention_storage_mb: How much data in partition should be stored + :param set_supported_codecs: List of allowed codecs for writers. Writes with codec not from this list are forbidden. + Empty list mean disable codec compatibility checks for the topic. + """ + args = locals().copy() + del args["self"] + self._check_closed() + + req = _ydb_topic_public_types.AlterTopicRequestParams(**args) + req = _ydb_topic.AlterTopicRequest.from_public(req) + self._driver( + req.to_proto(), + _apis.TopicService.Stub, + _apis.TopicService.AlterTopic, + _wrap_operation, + ) + def describe_topic(self, path: str, include_stats: bool = False) -> TopicDescription: args = locals().copy() del args["self"] From badb27a4fb90e62bc7f82de828fac3211b2043ee Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Sat, 29 Jun 2024 23:06:26 +0300 Subject: [PATCH 022/429] tests --- tests/topics/test_control_plane.py | 30 +++++++-- ydb/_grpc/grpcwrapper/ydb_topic.py | 4 +- .../grpcwrapper/ydb_topic_public_types.py | 2 +- ydb/_grpc/grpcwrapper/ydb_topic_test.py | 67 +++++++++++++++++++ 4 files changed, 95 insertions(+), 8 deletions(-) diff --git a/tests/topics/test_control_plane.py b/tests/topics/test_control_plane.py index 384c9249..25258b61 100644 --- a/tests/topics/test_control_plane.py +++ b/tests/topics/test_control_plane.py @@ -39,14 +39,23 @@ async def test_describe_topic(self, driver, topic_path: str, topic_consumer): assert has_consumer - async def test_alter_topic(self, driver, topic_path): + async def test_alter_not_existed_topic(self, driver, topic_path): client = driver.topic_client - await client.alter_topic(topic_path) - with pytest.raises(issues.SchemeError): await client.alter_topic(topic_path + "-not-exist") + async def test_alter_existed_topic(self, driver, topic_path): + client = driver.topic_client + + topic_before = await client.describe_topic(topic_path) + + target_min_active_partitions = topic_before.min_active_partitions + 1 + await client.alter_topic(topic_path, set_min_active_partitions=target_min_active_partitions) + + topic_after = await client.describe_topic(topic_path) + assert topic_after.min_active_partitions == target_min_active_partitions + class TestTopicClientControlPlane: def test_create_topic(self, driver_sync, database): @@ -81,10 +90,19 @@ def test_describe_topic(self, driver_sync, topic_path: str, topic_consumer): assert has_consumer - def test_alter_topic(self, driver_sync, topic_path): + def test_alter_not_existed_topic(self, driver_sync, topic_path): client = driver_sync.topic_client - client.alter_topic(topic_path) - with pytest.raises(issues.SchemeError): client.alter_topic(topic_path + "-not-exist") + + def test_alter_existed_topic(self, driver_sync, topic_path): + client = driver_sync.topic_client + + topic_before = client.describe_topic(topic_path) + + target_min_active_partitions = topic_before.min_active_partitions + 1 + client.alter_topic(topic_path, set_min_active_partitions=target_min_active_partitions) + + topic_after = client.describe_topic(topic_path) + assert topic_after.min_active_partitions == target_min_active_partitions diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index 12c6b4cd..d803e048 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -1063,13 +1063,15 @@ class AlterTopicRequest(IToProto, IFromPublic): set_metering_mode: "MeteringMode" def to_proto(self) -> ydb_topic_pb2.AlterTopicRequest: + supported_codecs = self.set_supported_codecs.to_proto() if self.set_supported_codecs.codecs else None + return ydb_topic_pb2.AlterTopicRequest( path=self.path, add_consumers=[consumer.to_proto() for consumer in self.add_consumers], alter_partitioning_settings=self.alter_partitioning_settings.to_proto(), set_retention_period=proto_duration_from_timedelta(self.set_retention_period), set_retention_storage_mb=self.set_retention_storage_mb, - set_supported_codecs=self.set_supported_codecs.to_proto(), + set_supported_codecs=supported_codecs, set_partition_write_burst_bytes=self.set_partition_write_burst_bytes, set_partition_write_speed_bytes_per_second=self.set_partition_write_speed_bytes_per_second, alter_attributes=self.alter_attributes, diff --git a/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py b/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py index 06ec8aaa..e829c4ee 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py @@ -37,7 +37,7 @@ class AlterTopicRequestParams: set_partition_count_limit: Optional[int] add_consumers: Optional[List[Union["PublicConsumer", str]]] alter_consumers: Optional[List[Union["PublicAlterConsumer", str]]] - drop_consumers: Optional[List[str]] # TODO: clarify + drop_consumers: Optional[List[str]] alter_attributes: Optional[Dict[str, str]] set_metering_mode: Optional["PublicMeteringMode"] set_partition_write_speed_bytes_per_second: Optional[int] diff --git a/ydb/_grpc/grpcwrapper/ydb_topic_test.py b/ydb/_grpc/grpcwrapper/ydb_topic_test.py index ff29834a..ab888eb0 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic_test.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic_test.py @@ -1,4 +1,15 @@ +import datetime + +from google.protobuf.json_format import MessageToDict + from ydb._grpc.grpcwrapper.ydb_topic import OffsetsRange +from .ydb_topic import AlterTopicRequest +from .ydb_topic_public_types import ( + AlterTopicRequestParams, + PublicAlterConsumer, + PublicConsumer, + PublicCodec, +) def test_offsets_range_intersected(): @@ -17,3 +28,59 @@ def test_offsets_range_intersected(): ]: assert OffsetsRange(test[0], test[1]).is_intersected_with(OffsetsRange(test[2], test[3])) assert OffsetsRange(test[2], test[3]).is_intersected_with(OffsetsRange(test[0], test[1])) + + +def test_alter_topic_request_from_public_to_proto(): + # Specify all fields with all possible input ways + params = { + "path": "topic_name", + "add_consumers": [ + "new_consumer_1", + PublicConsumer("new_consumer_2"), + ], + "alter_consumers": [ + "old_consumer_1", + PublicAlterConsumer("old_consumer_2"), + ], + "drop_consumers": ["redundant_consumer"], + "set_retention_period": datetime.timedelta(weeks=4), + "set_retention_storage_mb": 4, + "set_supported_codecs": [1, PublicCodec(2)], + "set_partition_write_burst_bytes": 8, + "set_partition_write_speed_bytes_per_second": 15, + "alter_attributes": {"key": "value"}, + "set_metering_mode": 1, + "set_min_active_partitions": 2, + "set_partition_count_limit": 4, + } + + params_public = AlterTopicRequestParams(**params) + request = AlterTopicRequest.from_public(params_public) + request_proto = request.to_proto() + + msg_dict = MessageToDict(request_proto, preserving_proto_field_name=True) + + assert msg_dict["path"] == params["path"] + assert len(msg_dict["add_consumers"]) == len(params["add_consumers"]) + assert len(msg_dict["alter_consumers"]) == len(params["alter_consumers"]) + assert len(msg_dict["drop_consumers"]) == len(params["drop_consumers"]) + assert msg_dict["alter_attributes"] == params["alter_attributes"] + + assert ( + int(msg_dict["alter_partitioning_settings"]["set_min_active_partitions"]) == params["set_min_active_partitions"] + ) + assert ( + int(msg_dict["alter_partitioning_settings"]["set_partition_count_limit"]) == params["set_partition_count_limit"] + ) + + assert int(msg_dict["set_partition_write_burst_bytes"]) == params["set_partition_write_burst_bytes"] + assert ( + int(msg_dict["set_partition_write_speed_bytes_per_second"]) + == params["set_partition_write_speed_bytes_per_second"] + ) + assert msg_dict["set_retention_period"] == str(int(params["set_retention_period"].total_seconds())) + "s" + assert int(msg_dict["set_retention_storage_mb"]) == params["set_retention_storage_mb"] + + assert msg_dict["set_metering_mode"] == "METERING_MODE_RESERVED_CAPACITY" + + assert msg_dict["set_supported_codecs"]["codecs"] == params["set_supported_codecs"] From 11164ed6217618f820a85b5b1a346946535023d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jul 2024 21:39:51 +0000 Subject: [PATCH 023/429] Bump certifi from 2022.12.7 to 2024.7.4 Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.12.7 to 2024.7.4. - [Commits](https://github.com/certifi/python-certifi/compare/2022.12.07...2024.07.04) --- updated-dependencies: - dependency-name: certifi dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- test-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-requirements.txt b/test-requirements.txt index a6a65ba0..b57214f4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ attrs==21.2.0 bcrypt==3.2.0 black==22.12.0 cached-property==1.5.2 -certifi==2022.12.7 +certifi==2024.7.4 cffi==1.14.6 charset-normalizer==2.0.1 cryptography==41.0.0 From e8e1272061257366748139046a3c7138227a9060 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 2 Jul 2024 19:21:54 +0300 Subject: [PATCH 024/429] fix review comments --- ydb/_grpc/grpcwrapper/ydb_topic.py | 85 ++++++++++--------- .../grpcwrapper/ydb_topic_public_types.py | 6 +- ydb/_grpc/grpcwrapper/ydb_topic_test.py | 44 +++++----- 3 files changed, 67 insertions(+), 68 deletions(-) diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index d803e048..c1789b6c 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -33,7 +33,7 @@ ) -class Codec(int, IToPublic): +class Codec(int, IToPublic, IFromPublic): CODEC_UNSPECIFIED = 0 CODEC_RAW = 1 CODEC_GZIP = 2 @@ -47,9 +47,13 @@ def from_proto_iterable(codecs: typing.Iterable[int]) -> List["Codec"]: def to_public(self) -> ydb_topic_public_types.PublicCodec: return ydb_topic_public_types.PublicCodec(int(self)) + @staticmethod + def from_public(codec: Union[ydb_topic_public_types.PublicCodec, int]) -> "Codec": + return Codec(int(codec)) + @dataclass -class SupportedCodecs(IToProto, IFromProto, IToPublic): +class SupportedCodecs(IToProto, IFromProto, IToPublic, IFromPublic): codecs: List[Codec] def to_proto(self) -> ydb_topic_pb2.SupportedCodecs: @@ -69,6 +73,15 @@ def from_proto(msg: Optional[ydb_topic_pb2.SupportedCodecs]) -> "SupportedCodecs def to_public(self) -> List[ydb_topic_public_types.PublicCodec]: return list(map(Codec.to_public, self.codecs)) + @staticmethod + def from_public( + codecs: Optional[List[Union[ydb_topic_public_types.PublicCodec, int]]] + ) -> Optional["SupportedCodecs"]: + if codecs is None: + return None + + return SupportedCodecs(codecs=[Codec.from_public(codec) for codec in codecs]) + @dataclass(order=True) class OffsetsRange(IFromProto, IToProto): @@ -886,17 +899,21 @@ def from_proto( @dataclass class AlterConsumer(IToProto, IFromPublic): name: str - set_important: bool - set_read_from: datetime.datetime - set_supported_codecs: SupportedCodecs - alter_attributes: Dict[str, str] + set_important: Optional[bool] + set_read_from: Optional[datetime.datetime] + set_supported_codecs: Optional[SupportedCodecs] + alter_attributes: Optional[Dict[str, str]] def to_proto(self) -> ydb_topic_pb2.AlterConsumer: + supported_codecs = None + if self.set_supported_codecs is not None: + supported_codecs = self.set_supported_codecs.to_proto() + return ydb_topic_pb2.AlterConsumer( name=self.name, set_important=self.set_important, set_read_from=proto_timestamp_from_datetime(self.set_read_from), - set_supported_codecs=self.set_supported_codecs.to_proto(), + set_supported_codecs=supported_codecs, alter_attributes=self.alter_attributes, ) @@ -905,13 +922,11 @@ def from_public(alter_consumer: ydb_topic_public_types.PublicAlterConsumer) -> A if not alter_consumer: return None - supported_codecs = alter_consumer.set_supported_codecs if alter_consumer.set_supported_codecs else [] - return AlterConsumer( name=alter_consumer.name, set_important=alter_consumer.set_important, set_read_from=alter_consumer.set_read_from, - set_supported_codecs=SupportedCodecs(codecs=supported_codecs), + set_supported_codecs=SupportedCodecs.from_public(alter_consumer.set_supported_codecs), alter_attributes=alter_consumer.alter_attributes, ) @@ -936,16 +951,9 @@ def to_proto(self) -> ydb_topic_pb2.PartitioningSettings: @dataclass -class AlterPartitioningSettings(IToProto, IFromProto): - set_min_active_partitions: int - set_partition_count_limit: int - - @staticmethod - def from_proto(msg: ydb_topic_pb2.AlterPartitioningSettings) -> "AlterPartitioningSettings": - return AlterPartitioningSettings( - set_min_active_partitions=msg.set_min_active_partitions, - set_partition_count_limit=msg.set_partition_count_limit, - ) +class AlterPartitioningSettings(IToProto): + set_min_active_partitions: Optional[int] + set_partition_count_limit: Optional[int] def to_proto(self) -> ydb_topic_pb2.AlterPartitioningSettings: return ydb_topic_pb2.AlterPartitioningSettings( @@ -1050,20 +1058,22 @@ class CreateTopicResult: @dataclass class AlterTopicRequest(IToProto, IFromPublic): path: str - add_consumers: List["Consumer"] - alter_partitioning_settings: AlterPartitioningSettings - set_retention_period: datetime.timedelta - set_retention_storage_mb: int - set_supported_codecs: SupportedCodecs - set_partition_write_burst_bytes: typing.Optional[int] - set_partition_write_speed_bytes_per_second: typing.Optional[int] - alter_attributes: Dict[str, str] - alter_consumers: List[AlterConsumer] - drop_consumers: List[str] - set_metering_mode: "MeteringMode" + add_consumers: Optional[List["Consumer"]] + alter_partitioning_settings: Optional[AlterPartitioningSettings] + set_retention_period: Optional[datetime.timedelta] + set_retention_storage_mb: Optional[int] + set_supported_codecs: Optional[SupportedCodecs] + set_partition_write_burst_bytes: Optional[int] + set_partition_write_speed_bytes_per_second: Optional[int] + alter_attributes: Optional[Dict[str, str]] + alter_consumers: Optional[List[AlterConsumer]] + drop_consumers: Optional[List[str]] + set_metering_mode: Optional["MeteringMode"] def to_proto(self) -> ydb_topic_pb2.AlterTopicRequest: - supported_codecs = self.set_supported_codecs.to_proto() if self.set_supported_codecs.codecs else None + supported_codecs = None + if self.set_supported_codecs is not None: + supported_codecs = self.set_supported_codecs.to_proto() return ydb_topic_pb2.AlterTopicRequest( path=self.path, @@ -1098,8 +1108,6 @@ def from_public(req: ydb_topic_public_types.AlterTopicRequestParams) -> AlterTop drop_consumers = req.drop_consumers if req.drop_consumers else [] - supported_codecs = req.set_supported_codecs if req.set_supported_codecs else [] - return AlterTopicRequest( path=req.path, alter_partitioning_settings=AlterPartitioningSettings( @@ -1109,9 +1117,7 @@ def from_public(req: ydb_topic_public_types.AlterTopicRequestParams) -> AlterTop add_consumers=add_consumers, set_retention_period=req.set_retention_period, set_retention_storage_mb=req.set_retention_storage_mb, - set_supported_codecs=SupportedCodecs( - codecs=supported_codecs, - ), + set_supported_codecs=SupportedCodecs.from_public(req.set_supported_codecs), set_partition_write_burst_bytes=req.set_partition_write_burst_bytes, set_partition_write_speed_bytes_per_second=req.set_partition_write_speed_bytes_per_second, alter_attributes=req.alter_attributes, @@ -1121,11 +1127,6 @@ def from_public(req: ydb_topic_public_types.AlterTopicRequestParams) -> AlterTop ) -@dataclass -class AlterTopicResult: - pass - - @dataclass class DescribeTopicRequest: path: str diff --git a/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py b/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py index e829c4ee..d1987546 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py @@ -93,7 +93,7 @@ class PublicConsumer: @dataclass class PublicAlterConsumer: name: str - set_important: bool = False + set_important: Optional[bool] = None """ Consumer may be marked as 'important'. It means messages for this consumer will never expire due to retention. User should take care that such consumer never stalls, to prevent running out of disk space. @@ -102,13 +102,13 @@ class PublicAlterConsumer: set_read_from: Optional[datetime.datetime] = None "All messages with smaller server written_at timestamp will be skipped." - set_supported_codecs: List[PublicCodec] = field(default_factory=lambda: list()) + set_supported_codecs: Optional[List[PublicCodec]] = None """ List of supported codecs by this consumer. supported_codecs on topic must be contained inside this list. """ - alter_attributes: Dict[str, str] = field(default_factory=lambda: dict()) + alter_attributes: Optional[Dict[str, str]] = None "Attributes of consumer" diff --git a/ydb/_grpc/grpcwrapper/ydb_topic_test.py b/ydb/_grpc/grpcwrapper/ydb_topic_test.py index ab888eb0..53256ac1 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic_test.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic_test.py @@ -60,27 +60,25 @@ def test_alter_topic_request_from_public_to_proto(): msg_dict = MessageToDict(request_proto, preserving_proto_field_name=True) - assert msg_dict["path"] == params["path"] - assert len(msg_dict["add_consumers"]) == len(params["add_consumers"]) - assert len(msg_dict["alter_consumers"]) == len(params["alter_consumers"]) - assert len(msg_dict["drop_consumers"]) == len(params["drop_consumers"]) - assert msg_dict["alter_attributes"] == params["alter_attributes"] - - assert ( - int(msg_dict["alter_partitioning_settings"]["set_min_active_partitions"]) == params["set_min_active_partitions"] - ) - assert ( - int(msg_dict["alter_partitioning_settings"]["set_partition_count_limit"]) == params["set_partition_count_limit"] - ) - - assert int(msg_dict["set_partition_write_burst_bytes"]) == params["set_partition_write_burst_bytes"] - assert ( - int(msg_dict["set_partition_write_speed_bytes_per_second"]) - == params["set_partition_write_speed_bytes_per_second"] - ) - assert msg_dict["set_retention_period"] == str(int(params["set_retention_period"].total_seconds())) + "s" - assert int(msg_dict["set_retention_storage_mb"]) == params["set_retention_storage_mb"] - - assert msg_dict["set_metering_mode"] == "METERING_MODE_RESERVED_CAPACITY" + expected_dict = { + "path": "topic_name", + "alter_partitioning_settings": {"set_min_active_partitions": "2", "set_partition_count_limit": "4"}, + "set_retention_period": "2419200s", + "set_retention_storage_mb": "4", + "set_supported_codecs": {"codecs": [1, 2]}, + "set_partition_write_speed_bytes_per_second": "15", + "set_partition_write_burst_bytes": "8", + "alter_attributes": {"key": "value"}, + "add_consumers": [ + {"name": "new_consumer_1", "supported_codecs": {}}, + {"name": "new_consumer_2", "supported_codecs": {}}, + ], + "drop_consumers": ["redundant_consumer"], + "alter_consumers": [ + {"name": "old_consumer_1"}, + {"name": "old_consumer_2"}, + ], + "set_metering_mode": "METERING_MODE_RESERVED_CAPACITY", + } - assert msg_dict["set_supported_codecs"]["codecs"] == params["set_supported_codecs"] + assert msg_dict == expected_dict From 811173a748d4aae90fb32a76020815986366341e Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Mon, 8 Jul 2024 18:23:16 +0300 Subject: [PATCH 025/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63f7fab6..95784be5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Added alter topic method + ## 3.12.3 ## * Fixed leak sessions on asyncio timeout * Fixed missed parameter in internal stream_reader.close() - reader hungs up From c71f09c28c1ce7ef0c8f8d95f81b6e92ff6f6c5a Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 8 Jul 2024 15:24:44 +0000 Subject: [PATCH 026/429] Release: 3.13.0 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95784be5..28abb367 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.13.0 ## * Added alter topic method ## 3.12.3 ## diff --git a/setup.py b/setup.py index 5d4c6f13..9f83dd91 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.12.3", # AUTOVERSION + version="3.13.0", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index d1c4467b..2edc0629 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.12.3" +VERSION = "3.13.0" From 4c6b7ad195c78e99430afc4501d3d80c939f8a63 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 8 Jul 2024 18:40:42 +0300 Subject: [PATCH 027/429] Move draft imports to draft folder --- ydb/_apis.py | 24 ------------------------ ydb/draft/_apis.py | 29 +++++++++++++++++++++++++++++ ydb/draft/dynamic_config.py | 3 ++- 3 files changed, 31 insertions(+), 25 deletions(-) create mode 100644 ydb/draft/_apis.py diff --git a/ydb/_apis.py b/ydb/_apis.py index bd455838..12610fe9 100644 --- a/ydb/_apis.py +++ b/ydb/_apis.py @@ -12,10 +12,6 @@ ydb_topic_v1_pb2_grpc, ) - from ._grpc.v4.draft import ( - ydb_dynamic_config_v1_pb2_grpc, - ) - from ._grpc.v4.protos import ( ydb_status_codes_pb2, ydb_discovery_pb2, @@ -26,9 +22,6 @@ ydb_common_pb2, ) - from ._grpc.v4.draft.protos import ( - ydb_dynamic_config_pb2, - ) else: from ._grpc.common import ( ydb_cms_v1_pb2_grpc, @@ -39,10 +32,6 @@ ydb_topic_v1_pb2_grpc, ) - from ._grpc.common.draft import ( - ydb_dynamic_config_v1_pb2_grpc, - ) - from ._grpc.common.protos import ( ydb_status_codes_pb2, ydb_discovery_pb2, @@ -53,10 +42,6 @@ ydb_common_pb2, ) - from ._grpc.common.draft.protos import ( - ydb_dynamic_config_pb2, - ) - StatusIds = ydb_status_codes_pb2.StatusIds FeatureFlag = ydb_common_pb2.FeatureFlag @@ -127,12 +112,3 @@ class TopicService(object): DropTopic = "DropTopic" StreamRead = "StreamRead" StreamWrite = "StreamWrite" - - -class DynamicConfigService(object): - Stub = ydb_dynamic_config_v1_pb2_grpc.DynamicConfigServiceStub - - ReplaceConfig = "ReplaceConfig" - SetConfig = "SetConfig" - GetConfig = "GetConfig" - GetNodeLabels = "GetNodeLabels" diff --git a/ydb/draft/_apis.py b/ydb/draft/_apis.py new file mode 100644 index 00000000..f42ef290 --- /dev/null +++ b/ydb/draft/_apis.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +import typing + +# Workaround for good IDE and universal for runtime +if typing.TYPE_CHECKING: + from .._grpc.v4.draft import ( + ydb_dynamic_config_v1_pb2_grpc, + ) + + from .._grpc.v4.draft.protos import ( + ydb_dynamic_config_pb2, + ) +else: + from .._grpc.common.draft import ( + ydb_dynamic_config_v1_pb2_grpc, + ) + + from .._grpc.common.draft.protos import ( + ydb_dynamic_config_pb2, + ) + + +class DynamicConfigService(object): + Stub = ydb_dynamic_config_v1_pb2_grpc.DynamicConfigServiceStub + + ReplaceConfig = "ReplaceConfig" + SetConfig = "SetConfig" + GetConfig = "GetConfig" + GetNodeLabels = "GetNodeLabels" diff --git a/ydb/draft/dynamic_config.py b/ydb/draft/dynamic_config.py index afec19ec..4648b29a 100644 --- a/ydb/draft/dynamic_config.py +++ b/ydb/draft/dynamic_config.py @@ -1,6 +1,7 @@ import abc from abc import abstractmethod -from .. import issues, operation, _apis +from . import _apis +from .. import issues, operation class IDynamicConfigClient(abc.ABC): From a5bdfe8fef0d2aedaf6ec411bf84d89ae6291fed Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 8 Jul 2024 18:45:00 +0300 Subject: [PATCH 028/429] style fixes --- ydb/_apis.py | 1 - ydb/draft/_apis.py | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ydb/_apis.py b/ydb/_apis.py index 12610fe9..8c0b1164 100644 --- a/ydb/_apis.py +++ b/ydb/_apis.py @@ -51,7 +51,6 @@ ydb_table = ydb_table_pb2 ydb_discovery = ydb_discovery_pb2 ydb_operation = ydb_operation_pb2 -ydb_dynamic_config = ydb_dynamic_config_pb2 class CmsService(object): diff --git a/ydb/draft/_apis.py b/ydb/draft/_apis.py index f42ef290..5b878677 100644 --- a/ydb/draft/_apis.py +++ b/ydb/draft/_apis.py @@ -20,6 +20,9 @@ ) +ydb_dynamic_config = ydb_dynamic_config_pb2 + + class DynamicConfigService(object): Stub = ydb_dynamic_config_v1_pb2_grpc.DynamicConfigServiceStub From 6d9e936942828841b5e3b2aa6c6bebe54c014592 Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Tue, 9 Jul 2024 12:52:58 +0300 Subject: [PATCH 029/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28abb367..12ad7dd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Moved grpc draft imports to draft folder + ## 3.13.0 ## * Added alter topic method From cd580337e64d37c9b8f8bccabfcbb6b2df583c3c Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 9 Jul 2024 09:53:52 +0000 Subject: [PATCH 030/429] Release: 3.13.1 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12ad7dd4..f919d865 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.13.1 ## * Moved grpc draft imports to draft folder ## 3.13.0 ## diff --git a/setup.py b/setup.py index 9f83dd91..c2064be3 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.13.0", # AUTOVERSION + version="3.13.1", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 2edc0629..9f2a8d73 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.13.0" +VERSION = "3.13.1" From f63f76244e12103ad42e0f3692ee3c060379ab8d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 19:34:38 +0000 Subject: [PATCH 031/429] Bump zipp from 3.5.0 to 3.19.1 Bumps [zipp](https://github.com/jaraco/zipp) from 3.5.0 to 3.19.1. - [Release notes](https://github.com/jaraco/zipp/releases) - [Changelog](https://github.com/jaraco/zipp/blob/main/NEWS.rst) - [Commits](https://github.com/jaraco/zipp/compare/v3.5.0...v3.19.1) --- updated-dependencies: - dependency-name: zipp dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- test-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-requirements.txt b/test-requirements.txt index a6a65ba0..56255122 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -37,7 +37,7 @@ toml==0.10.2 typing-extensions==3.10.0.0 urllib3==1.26.6 websocket-client==0.59.0 -zipp==3.5.0 +zipp==3.19.1 aiohttp==3.7.4 pytest-pep8 pytest-flake8 From 4aa4f1cc8c63ca7667ad07a8eef28b5d2bb18cf0 Mon Sep 17 00:00:00 2001 From: Vasily Gerasimov Date: Thu, 11 Jul 2024 14:20:36 +0000 Subject: [PATCH 032/429] Load OAuth 2.0 token exchange credentials provider from config file --- tests/aio/test_credentials.py | 59 +- tests/auth/test_credentials.py | 6 +- .../test_token_exchange.py | 661 +++++++++++++++++- ydb/driver.py | 7 + ydb/oauth2_token_exchange/token_exchange.py | 172 ++++- 5 files changed, 870 insertions(+), 35 deletions(-) diff --git a/tests/aio/test_credentials.py b/tests/aio/test_credentials.py index 6e1fb316..a6f1d170 100644 --- a/tests/aio/test_credentials.py +++ b/tests/aio/test_credentials.py @@ -2,6 +2,9 @@ import time import grpc import threading +import tempfile +import os +import json import tests.auth.test_credentials import tests.oauth2_token_exchange @@ -11,7 +14,7 @@ import ydb.oauth2_token_exchange.token_source -class TestServiceAccountCredentials(ydb.aio.iam.ServiceAccountCredentials): +class ServiceAccountCredentialsForTest(ydb.aio.iam.ServiceAccountCredentials): def _channel_factory(self): return grpc.aio.insecure_channel(self._iam_endpoint) @@ -19,7 +22,7 @@ def get_expire_time(self): return self._expires_in - time.time() -class TestOauth2TokenExchangeCredentials(ydb.aio.oauth2_token_exchange.Oauth2TokenExchangeCredentials): +class Oauth2TokenExchangeCredentialsForTest(ydb.aio.oauth2_token_exchange.Oauth2TokenExchangeCredentials): def get_expire_time(self): return self._expires_in - time.time() @@ -27,7 +30,7 @@ def get_expire_time(self): @pytest.mark.asyncio async def test_yandex_service_account_credentials(): server = tests.auth.test_credentials.IamTokenServiceTestServer() - credentials = TestServiceAccountCredentials( + credentials = ServiceAccountCredentialsForTest( tests.auth.test_credentials.SERVICE_ACCOUNT_ID, tests.auth.test_credentials.ACCESS_KEY_ID, tests.auth.test_credentials.PRIVATE_KEY, @@ -49,7 +52,7 @@ def serve(s): serve_thread = threading.Thread(target=serve, args=(server,)) serve_thread.start() - credentials = TestOauth2TokenExchangeCredentials( + credentials = Oauth2TokenExchangeCredentialsForTest( server.endpoint(), ydb.oauth2_token_exchange.token_source.FixedTokenSource("test_src_token", "test_token_type"), audience=["a1", "a2"], @@ -60,3 +63,51 @@ def serve(s): assert credentials.get_expire_time() <= 42 serve_thread.join() + + +@pytest.mark.asyncio +async def test_oauth2_token_exchange_credentials_file(): + server = tests.oauth2_token_exchange.test_token_exchange.Oauth2TokenExchangeServiceForTest(40124) + + def serve(s): + s.handle_request() + + serve_thread = threading.Thread(target=serve, args=(server,)) + serve_thread.start() + + cfg = { + "subject-credentials": { + "type": "FIXED", + "token": "test_src_token", + "token-type": "test_token_type", + }, + "aud": [ + "a1", + "a2", + ], + "scope": [ + "s1", + "s2", + ], + } + + temp_cfg_file = tempfile.NamedTemporaryFile(delete=False) + cfg_file_name = temp_cfg_file.name + + try: + temp_cfg_file.write(json.dumps(cfg, indent=4).encode("utf-8")) + temp_cfg_file.close() + + credentials = Oauth2TokenExchangeCredentialsForTest.from_file( + cfg_file=cfg_file_name, iam_endpoint=server.endpoint() + ) + + t = (await credentials.auth_metadata())[0][1] + assert t == "Bearer test_dst_token" + assert credentials.get_expire_time() <= 42 + + serve_thread.join() + os.remove(cfg_file_name) + except Exception: + os.remove(cfg_file_name) + raise diff --git a/tests/auth/test_credentials.py b/tests/auth/test_credentials.py index 8b1d3e68..a78040ce 100644 --- a/tests/auth/test_credentials.py +++ b/tests/auth/test_credentials.py @@ -57,7 +57,7 @@ def get_endpoint(self): return "localhost:54321" -class TestServiceAccountCredentials(ydb.iam.ServiceAccountCredentials): +class ServiceAccountCredentialsForTest(ydb.iam.ServiceAccountCredentials): def _channel_factory(self): return grpc.insecure_channel(self._iam_endpoint) @@ -67,7 +67,9 @@ def get_expire_time(self): def test_yandex_service_account_credentials(): server = IamTokenServiceTestServer() - credentials = TestServiceAccountCredentials(SERVICE_ACCOUNT_ID, ACCESS_KEY_ID, PRIVATE_KEY, server.get_endpoint()) + credentials = ServiceAccountCredentialsForTest( + SERVICE_ACCOUNT_ID, ACCESS_KEY_ID, PRIVATE_KEY, server.get_endpoint() + ) t = credentials.get_auth_token() assert t == "test_token" assert credentials.get_expire_time() <= 42 diff --git a/tests/oauth2_token_exchange/test_token_exchange.py b/tests/oauth2_token_exchange/test_token_exchange.py index a4bb1bb5..010a5d42 100644 --- a/tests/oauth2_token_exchange/test_token_exchange.py +++ b/tests/oauth2_token_exchange/test_token_exchange.py @@ -4,12 +4,23 @@ import urllib import json import threading +import tempfile +import os +import jwt +import base64 from ydb.oauth2_token_exchange import Oauth2TokenExchangeCredentials, FixedTokenSource +from ydb.driver import credentials_from_env_variables -class TestOauth2TokenExchangeCredentials(Oauth2TokenExchangeCredentials): - def get_expire_time(self): - return self._expires_in - time.time() +TEST_RSA_PRIVATE_KEY_CONTENT = "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC75/JS3rMcLJxv\nFgpOzF5+2gH+Yig3RE2MTl9uwC0BZKAv6foYr7xywQyWIK+W1cBhz8R4LfFmZo2j\nM0aCvdRmNBdW0EDSTnHLxCsFhoQWLVq+bI5f5jzkcoiioUtaEpADPqwgVULVtN/n\nnPJiZ6/dU30C3jmR6+LUgEntUtWt3eq3xQIn5lG3zC1klBY/HxtfH5Hu8xBvwRQT\nJnh3UpPLj8XwSmriDgdrhR7o6umWyVuGrMKlLHmeivlfzjYtfzO1MOIMG8t2/zxG\nR+xb4Vwks73sH1KruH/0/JMXU97npwpe+Um+uXhpldPygGErEia7abyZB2gMpXqr\nWYKMo02NAgMBAAECggEAO0BpC5OYw/4XN/optu4/r91bupTGHKNHlsIR2rDzoBhU\nYLd1evpTQJY6O07EP5pYZx9mUwUdtU4KRJeDGO/1/WJYp7HUdtxwirHpZP0lQn77\nuccuX/QQaHLrPekBgz4ONk+5ZBqukAfQgM7fKYOLk41jgpeDbM2Ggb6QUSsJISEp\nzrwpI/nNT/wn+Hvx4DxrzWU6wF+P8kl77UwPYlTA7GsT+T7eKGVH8xsxmK8pt6lg\nsvlBA5XosWBWUCGLgcBkAY5e4ZWbkdd183o+oMo78id6C+PQPE66PLDtHWfpRRmN\nm6XC03x6NVhnfvfozoWnmS4+e4qj4F/emCHvn0GMywKBgQDLXlj7YPFVXxZpUvg/\nrheVcCTGbNmQJ+4cZXx87huqwqKgkmtOyeWsRc7zYInYgraDrtCuDBCfP//ZzOh0\nLxepYLTPk5eNn/GT+VVrqsy35Ccr60g7Lp/bzb1WxyhcLbo0KX7/6jl0lP+VKtdv\nmto+4mbSBXSM1Y5BVVoVgJ3T/wKBgQDsiSvPRzVi5TTj13x67PFymTMx3HCe2WzH\nJUyepCmVhTm482zW95pv6raDr5CTO6OYpHtc5sTTRhVYEZoEYFTM9Vw8faBtluWG\nBjkRh4cIpoIARMn74YZKj0C/0vdX7SHdyBOU3bgRPHg08Hwu3xReqT1kEPSI/B2V\n4pe5fVrucwKBgQCNFgUxUA3dJjyMES18MDDYUZaRug4tfiYouRdmLGIxUxozv6CG\nZnbZzwxFt+GpvPUV4f+P33rgoCvFU+yoPctyjE6j+0aW0DFucPmb2kBwCu5J/856\nkFwCx3blbwFHAco+SdN7g2kcwgmV2MTg/lMOcU7XwUUcN0Obe7UlWbckzQKBgQDQ\nnXaXHL24GGFaZe4y2JFmujmNy1dEsoye44W9ERpf9h1fwsoGmmCKPp90az5+rIXw\nFXl8CUgk8lXW08db/r4r+ma8Lyx0GzcZyplAnaB5/6j+pazjSxfO4KOBy4Y89Tb+\nTP0AOcCi6ws13bgY+sUTa/5qKA4UVw+c5zlb7nRpgwKBgGXAXhenFw1666482iiN\ncHSgwc4ZHa1oL6aNJR1XWH+aboBSwR+feKHUPeT4jHgzRGo/aCNHD2FE5I8eBv33\nof1kWYjAO0YdzeKrW0rTwfvt9gGg+CS397aWu4cy+mTI+MNfBgeDAIVBeJOJXLlX\nhL8bFAuNNVrCOp79TNnNIsh7\n-----END PRIVATE KEY-----\n" # noqa: E501 +TEST_RSA_PUBLIC_KEY_CONTENT = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu+fyUt6zHCycbxYKTsxe\nftoB/mIoN0RNjE5fbsAtAWSgL+n6GK+8csEMliCvltXAYc/EeC3xZmaNozNGgr3U\nZjQXVtBA0k5xy8QrBYaEFi1avmyOX+Y85HKIoqFLWhKQAz6sIFVC1bTf55zyYmev\n3VN9At45kevi1IBJ7VLVrd3qt8UCJ+ZRt8wtZJQWPx8bXx+R7vMQb8EUEyZ4d1KT\ny4/F8Epq4g4Ha4Ue6OrplslbhqzCpSx5nor5X842LX8ztTDiDBvLdv88RkfsW+Fc\nJLO97B9Sq7h/9PyTF1Pe56cKXvlJvrl4aZXT8oBhKxImu2m8mQdoDKV6q1mCjKNN\njQIDAQAB\n-----END PUBLIC KEY-----\n" # noqa: E501 +TEST_EC_PRIVATE_KEY_CONTENT = "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIB6fv25gf7P/7fkjW/2kcKICUhHeOygkFeUJ/ylyU3hloAoGCCqGSM49\nAwEHoUQDQgAEvkKy92hpLiT0GEpzFkYBEWWnkAGTTA6141H0oInA9X30eS0RObAa\nmVY8yD39NI7Nj03hBxEa4Z0tOhrq9cW8eg==\n-----END EC PRIVATE KEY-----\n" # noqa: E501 +TEST_EC_PUBLIC_KEY_CONTENT = "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEvkKy92hpLiT0GEpzFkYBEWWnkAGT\nTA6141H0oInA9X30eS0RObAamVY8yD39NI7Nj03hBxEa4Z0tOhrq9cW8eg==\n-----END PUBLIC KEY-----\n" # noqa: E501 +TEST_HMAC_SECRET_KEY_BASE64_CONTENT = "VGhlIHdvcmxkIGhhcyBjaGFuZ2VkLgpJIHNlZSBpdCBpbiB0aGUgd2F0ZXIuCkkgZmVlbCBpdCBpbiB0aGUgRWFydGguCkkgc21lbGwgaXQgaW4gdGhlIGFpci4KTXVjaCB0aGF0IG9uY2Ugd2FzIGlzIGxvc3QsCkZvciBub25lIG5vdyBsaXZlIHdobyByZW1lbWJlciBpdC4K" # noqa: E501 + + +def get_expire_time(creds): + return creds._expires_in - time.time() TOKEN_EXCHANGE_RESPONSES = { @@ -63,45 +74,197 @@ def get_expire_time(self): } -class OauthExchangeServiceHandler(http.server.BaseHTTPRequestHandler): - def do_POST(self): - assert self.headers["Content-Type"] == "application/x-www-form-urlencoded" - assert self.path == "/token/exchange" - content_length = int(self.headers["Content-Length"]) - post_data = self.rfile.read(content_length).decode("utf8") - print("OauthExchangeServiceHandler.POST data: {}".format(post_data)) - parsed_request = urllib.parse.parse_qs(str(post_data)) +class FixedTokenSourceChecker: + def __init__( + self, + token, + token_type, + ): + self.token = token + self.token_type = token_type + + def check(self, token, token_type): + assert token == self.token + assert token_type == self.token_type + + +class AnyTokenSourceChecker: + def check(self, token, token_type): + assert token != "" + assert token_type != "" + + +class JwtTokenSourceChecker: + def __init__( + self, + alg, + public_key, + key_id=None, + issuer=None, + subject=None, + aud=None, + id=None, + ttl_seconds=3600, + ): + self.alg = alg + self.public_key = public_key + self.key_id = key_id + self.issuer = issuer + self.subject = subject + self.aud = aud + self.id = id + self.ttl_seconds = ttl_seconds + + def check(self, token, token_type): + assert token_type == "urn:ietf:params:oauth:token-type:jwt" + decoded = jwt.decode( + token, + key=self.public_key, + algorithms=[self.alg], + options={ + "require": ["iat", "exp"], + "verify_signature": True, + "verify_aud": False, + "verify_iss": False, + }, + ) + header = jwt.get_unverified_header(token) + assert header.get("kid") == self.key_id + assert header.get("alg") == self.alg + assert decoded.get("iss") == self.issuer + assert decoded.get("sub") == self.subject + assert decoded.get("aud") == self.aud + assert decoded.get("jti") == self.id + assert abs(decoded["iat"] - time.time()) <= 60 + assert abs(decoded["exp"] - decoded["iat"]) == self.ttl_seconds + + +class Oauth2ExchangeServiceChecker: + def __init__( + self, + subject_token_source=None, + actor_token_source=None, + audience=None, + scope=None, + resource=None, + requested_token_type="urn:ietf:params:oauth:token-type:access_token", + grant_type="urn:ietf:params:oauth:grant-type:token-exchange", + ): + self.subject_token_source = subject_token_source + self.actor_token_source = actor_token_source + self.audience = audience + self.scope = scope + self.resource = resource + self.requested_token_type = requested_token_type + self.grant_type = grant_type + + def check(self, handler, parsed_request) -> None: + assert handler.headers["Content-Type"] == "application/x-www-form-urlencoded" + assert handler.path == "/token/exchange" + assert len(parsed_request["grant_type"]) == 1 - assert parsed_request["grant_type"][0] == "urn:ietf:params:oauth:grant-type:token-exchange" + assert parsed_request["grant_type"][0] == self.grant_type assert len(parsed_request["requested_token_type"]) == 1 - assert parsed_request["requested_token_type"][0] == "urn:ietf:params:oauth:token-type:access_token" + assert parsed_request["requested_token_type"][0] == self.requested_token_type + + if self.audience is None or len(self.audience) == 0: + assert len(parsed_request.get("audience", [])) == 0 + else: + assert len(parsed_request["audience"]) == len(self.audience) + for i in range(len(self.audience)): + assert parsed_request["audience"][i] == self.audience[i] - assert len(parsed_request["subject_token_type"]) == 1 - assert parsed_request["subject_token_type"][0] == "test_token_type" + if self.scope is None or len(self.scope) == 0: + assert len(parsed_request.get("scope", [])) == 0 + else: + assert len(parsed_request.get("scope", [])) == 1 + assert parsed_request["scope"][0] == " ".join(self.scope) + if self.resource is None or self.resource == "": + assert len(parsed_request.get("resource", [])) == 0 + else: + assert len(parsed_request.get("resource", [])) == 1 + assert parsed_request["resource"][0] == self.resource + + if self.subject_token_source is None: + assert len(parsed_request.get("subject_token", [])) == 0 + assert len(parsed_request.get("subject_token_type", [])) == 0 + else: + assert len(parsed_request.get("subject_token", [])) == 1 + assert len(parsed_request.get("subject_token_type", [])) == 1 + self.subject_token_source.check(parsed_request["subject_token"][0], parsed_request["subject_token_type"][0]) + + if self.actor_token_source is None: + assert len(parsed_request.get("actor_token", [])) == 0 + assert len(parsed_request.get("actor_token_type", [])) == 0 + else: + assert len(parsed_request.get("actor_token", [])) == 1 + assert len(parsed_request.get("actor_token_type", [])) == 1 + self.actor_token_source.check(parsed_request["actor_token"][0], parsed_request["actor_token_type"][0]) + + +class TokenExchangeResponseBySubjectToken: + def __init__(self, responses=TOKEN_EXCHANGE_RESPONSES): + self.responses = responses + + def get_response(self, parsed_request): assert len(parsed_request["subject_token"]) == 1 - responses = TOKEN_EXCHANGE_RESPONSES.get(parsed_request["subject_token"][0]) + responses = self.responses.get(parsed_request["subject_token"][0]) assert responses is not None response_code = responses[0] response = responses[1] + return response_code, response + - assert len(parsed_request["audience"]) == 2 - assert parsed_request["audience"][0] == "a1" - assert parsed_request["audience"][1] == "a2" +class Oauth2TokenExchangeResponse: + def __init__( + self, + response_code, + response, + ): + self.response_code = response_code + self.response = response - assert len(parsed_request["scope"]) == 1 - assert parsed_request["scope"][0] == "s1 s2" + def get_response(self, parsed_request): + return self.response_code, self.response - self.send_response(response_code) - self.send_header("Content-type", "application/json") - self.end_headers() - self.wfile.write(json.dumps(response).encode("utf8")) + +class OauthExchangeServiceHandler(http.server.BaseHTTPRequestHandler): + def do_POST(self): + content_length = int(self.headers["Content-Length"]) + post_data = self.rfile.read(content_length).decode("utf8") + print("OauthExchangeServiceHandler.POST data: {}".format(post_data)) + parsed_request = urllib.parse.parse_qs(str(post_data)) + try: + self.server.checker.check(self, parsed_request) + self.server.checker.check_successful = True + response_code, response = self.server.response.get_response(parsed_request) + + self.send_response(response_code) + self.send_header("Content-type", "application/json") + self.end_headers() + self.wfile.write(json.dumps(response).encode("utf8")) + except Exception as ex: + self.send_response(500) + self.send_header("Content-type", "text/plain") + self.end_headers() + self.wfile.write("Exception during text check: {}".format(ex).encode("utf8")) class Oauth2TokenExchangeServiceForTest(http.server.HTTPServer): - def __init__(self, port): + def __init__(self, port, checker=None, response=None): http.server.HTTPServer.__init__(self, ("localhost", port), OauthExchangeServiceHandler) + self.checker = checker + if self.checker is None: + self.checker = Oauth2ExchangeServiceChecker( + subject_token_source=AnyTokenSourceChecker(), + audience=["a1", "a2"], + scope=["s1", "s2"], + ) + self.response = response + if self.response is None: + self.response = TokenExchangeResponseBySubjectToken() self.port = port def endpoint(self): @@ -116,7 +279,7 @@ def __init__(self, src_token, dst_token, error_text): def run_check(self, server): try: - credentials = TestOauth2TokenExchangeCredentials( + credentials = Oauth2TokenExchangeCredentials( server.endpoint(), subject_token_source=FixedTokenSource(self.src_token, "test_token_type"), audience=["a1", "a2"], @@ -125,7 +288,7 @@ def run_check(self, server): t = credentials.get_auth_token() assert not self.error_text, "Exception is expected. Test: {}".format(self.src_token) assert t == self.dst_token - assert credentials.get_expire_time() <= 42 + assert get_expire_time(credentials) <= 42 except AssertionError: raise except Exception as ex: @@ -181,3 +344,445 @@ def serve(s): raise serve_thread.join() + + +class DataForConfigTest: + def __init__( + self, + cfg=None, # cfg or cfg text + cfg_file=None, + checker=None, + response=None, + init_error_text_part=None, + get_token_error_text_part=None, + dst_token=None, + dst_expire_time=42, + http_request_is_expected=None, + init_from_env=False, + ): + self.cfg = cfg + self.cfg_file = cfg_file + self.checker = checker + self.response = response + self.init_error_text_part = init_error_text_part + self.get_token_error_text_part = get_token_error_text_part + self.dst_token = dst_token + self.dst_expire_time = dst_expire_time + self.http_request_is_expected = http_request_is_expected + self.init_from_env = init_from_env + + def get_cfg(self): + if isinstance(self.cfg, str): + return self.cfg + else: + return json.dumps(self.cfg, indent=4) + + def expect_http_request(self): + if self.http_request_is_expected is not None: + return self.http_request_is_expected + + if self.init_error_text_part is not None: + return False + return True + + def run_check(self, server): + server.checker = self.checker + if server.checker is not None: + server.checker.check_successful = False + server.response = self.response + + if self.cfg_file: + cfg_file = self.cfg_file + + def rm_file(): + pass + + else: + temp_cfg_file = tempfile.NamedTemporaryFile(delete=False) + cfg_file = temp_cfg_file.name + temp_cfg_file.write(self.get_cfg().encode("utf-8")) + temp_cfg_file.close() + + def rm_file(): + os.remove(cfg_file) + if self.init_from_env: + del os.environ["YDB_OAUTH2_KEY_FILE"] + + try: + if self.init_from_env: + os.environ["YDB_OAUTH2_KEY_FILE"] = cfg_file + credentials = credentials_from_env_variables() + else: + credentials = Oauth2TokenExchangeCredentials.from_file( + cfg_file, + iam_endpoint=server.endpoint(), + ) + assert self.init_error_text_part is None, "Init exception is expected. Test:\n{}".format(self.get_cfg()) + + t = credentials.get_auth_token() + assert not self.get_token_error_text_part, "Exception is expected. Test:\n{}".format(self.get_cfg()) + if self.expect_http_request() and server.checker is not None: + assert server.checker.check_successful + + assert t == self.dst_token + assert get_expire_time(credentials) <= self.dst_expire_time + rm_file() + except AssertionError: + rm_file() + raise + except Exception as ex: + rm_file() + err_text = self.init_error_text_part if self.init_error_text_part else self.get_token_error_text_part + if err_text: + assert err_text in str(ex) + else: + assert False, "Exception is not expected. Test:\n{}. Exception text: {}".format(self.get_cfg(), ex) + + +def test_oauth2_token_exchange_credentials_file(): + server = Oauth2TokenExchangeServiceForTest(40124) + + tests = [ + DataForConfigTest(cfg="not json config", init_error_text_part="Failed to parse json config"), + DataForConfigTest( + init_from_env=True, + cfg={ + "res": "tEst", + "grant-type": "grant", + "requested-token-type": "access_token", + "subject-credentials": { + "type": "fixed", + "token": "test-token", + "token-type": "test-token-type", + }, + }, + init_error_text_part="no token endpoint specified", + ), + DataForConfigTest( + init_from_env=True, + cfg={ + "token-endpoint": server.endpoint(), + "res": "tEst", + "grant-type": "grant", + "requested-token-type": "access_token", + "subject-credentials": { + "type": "fixed", + "token": "test-token", + "token-type": "test-token-type", + }, + }, + checker=Oauth2ExchangeServiceChecker( + subject_token_source=FixedTokenSourceChecker( + token="test-token", + token_type="test-token-type", + ), + grant_type="grant", + requested_token_type="access_token", + resource="tEst", + ), + response=Oauth2TokenExchangeResponse( + 200, + { + "access_token": "test_dst_token", + "issued_token_type": "urn:ietf:params:oauth:token-type:access_token", + "token_type": "Bearer", + "expires_in": 42, + }, + ), + dst_token="Bearer test_dst_token", + ), + DataForConfigTest( + cfg={ + "aud": "test-aud", + "scope": [ + "s1", + "s2", + ], + "unknown-field": [123], + "actor-credentials": { + "type": "fixed", + "token": "test-token", + "token-type": "test-token-type", + }, + }, + checker=Oauth2ExchangeServiceChecker( + actor_token_source=FixedTokenSourceChecker( + token="test-token", + token_type="test-token-type", + ), + audience=["test-aud"], + scope=["s1", "s2"], + ), + response=Oauth2TokenExchangeResponse( + 200, + { + "access_token": "test_dst_token", + "issued_token_type": "urn:ietf:params:oauth:token-type:access_token", + "token_type": "Bearer", + "expires_in": 42, + }, + ), + dst_token="Bearer test_dst_token", + ), + DataForConfigTest( + cfg={ + "requested-token-type": "access_token", + "subject-credentials": { + "type": "JWT", + "alg": "ps256", + "private-key": TEST_RSA_PRIVATE_KEY_CONTENT, + "aud": ["a1", "a2"], + "jti": "123", + "sub": "test_subject", + "iss": "test_issuer", + "kid": "test_key_id", + "ttl": "24h", + "unknown_field": "hello!", + }, + }, + checker=Oauth2ExchangeServiceChecker( + subject_token_source=JwtTokenSourceChecker( + alg="PS256", + public_key=TEST_RSA_PUBLIC_KEY_CONTENT, + aud=["a1", "a2"], + id="123", + subject="test_subject", + issuer="test_issuer", + key_id="test_key_id", + ttl_seconds=24 * 3600, + ), + requested_token_type="access_token", + ), + response=Oauth2TokenExchangeResponse( + 200, + { + "access_token": "test_dst_token", + "issued_token_type": "urn:ietf:params:oauth:token-type:access_token", + "token_type": "bearer", + "expires_in": 42, + }, + ), + dst_token="Bearer test_dst_token", + ), + DataForConfigTest( + cfg={ + "actor-credentials": { + "type": "JWT", + "alg": "es256", + "private-key": TEST_EC_PRIVATE_KEY_CONTENT, + "ttl": "3m", + "unknown_field": "hello!", + }, + }, + checker=Oauth2ExchangeServiceChecker( + actor_token_source=JwtTokenSourceChecker( + alg="ES256", + public_key=TEST_EC_PUBLIC_KEY_CONTENT, + ttl_seconds=180, + ), + ), + response=Oauth2TokenExchangeResponse( + 200, + { + "access_token": "test_dst_token", + "issued_token_type": "urn:ietf:params:oauth:token-type:access_token", + "token_type": "bearer", + "expires_in": 42, + }, + ), + dst_token="Bearer test_dst_token", + ), + DataForConfigTest( + cfg={ + "subject-credentials": { + "type": "JWT", + "alg": "hs512", + "private-key": TEST_HMAC_SECRET_KEY_BASE64_CONTENT, + }, + }, + checker=Oauth2ExchangeServiceChecker( + subject_token_source=JwtTokenSourceChecker( + alg="HS512", + public_key=base64.b64decode(TEST_HMAC_SECRET_KEY_BASE64_CONTENT), + ), + ), + response=Oauth2TokenExchangeResponse( + 200, + { + "access_token": "test_dst_token", + "issued_token_type": "urn:ietf:params:oauth:token-type:access_token", + "token_type": "bearer", + "expires_in": 42, + }, + ), + dst_token="Bearer test_dst_token", + ), + DataForConfigTest( + cfg={ + "subject-credentials": { + "type": "JWT", + "alg": "rs512", + "private-key": TEST_HMAC_SECRET_KEY_BASE64_CONTENT, + }, + }, + http_request_is_expected=False, + get_token_error_text_part="Could not deserialize key data.", + ), + DataForConfigTest( + cfg={ + "subject-credentials": { + "type": "JWT", + "alg": "es512", + "private-key": TEST_HMAC_SECRET_KEY_BASE64_CONTENT, + }, + }, + http_request_is_expected=False, + get_token_error_text_part="Could not deserialize key data.", + ), + DataForConfigTest( + cfg={ + "subject-credentials": { + "type": "JWT", + "alg": "es512", + "private-key": TEST_RSA_PRIVATE_KEY_CONTENT, + }, + }, + http_request_is_expected=False, + get_token_error_text_part="sign() missing 1 required positional argument", + ), + DataForConfigTest( + cfg_file="~/unknown-file.cfg", + init_error_text_part="No such file or directory", + ), + DataForConfigTest( + cfg={ + "actor-credentials": "", + }, + init_error_text_part='Key "actor-credentials" is expected to be a json map', + ), + DataForConfigTest( + cfg={ + "subject-credentials": { + "type": "JWT", + "alg": "RS256", + "private-key": "123", + "ttl": 123, + }, + }, + init_error_text_part='Key "ttl" is expected to be a string', + ), + DataForConfigTest( + cfg={ + "subject-credentials": { + "type": "JWT", + "alg": "RS256", + "private-key": "123", + "ttl": "-3h", + }, + }, + init_error_text_part="-3: negative duration is not allowed", + ), + DataForConfigTest( + cfg={ + "subject-credentials": { + "type": "JWT", + "private-key": "123", + }, + }, + init_error_text_part='Key "alg" is expected to be a nonempty string', + ), + DataForConfigTest( + cfg={ + "subject-credentials": { + "type": "JWT", + "alg": "HS384", + }, + }, + init_error_text_part='Key "private-key" is expected to be a nonempty string', + ), + DataForConfigTest( + cfg={ + "subject-credentials": { + "type": "JWT", + "alg": "unknown", + "private-key": "123", + }, + }, + http_request_is_expected=False, + get_token_error_text_part="Algorithm not supported.", + ), + DataForConfigTest( + cfg={ + "aud": { + "value": "wrong_format of aud: not string and not list", + }, + "subject-credentials": { + "type": "FIXED", + "token": "test-token", + "token-type": "test-token-type", + }, + }, + init_error_text_part='Key "aud" is expected to be a single string or list of nonempty strings', + ), + DataForConfigTest( + cfg={ + "subject-credentials": { + "type": "JWT", + "alg": "RS256", + "private-key": "123", + "aud": { + "value": "wrong_format of aud: not string and not list", + }, + }, + }, + init_error_text_part='Key "aud" is expected to be a single string or list of nonempty strings', + ), + DataForConfigTest( + cfg={ + "subject-credentials": { + "type": "unknown", + }, + }, + init_error_text_part='"subject-credentials": unknown token source type: "unknown"', + ), + DataForConfigTest( + cfg={ + "subject-credentials": { + "token": "test", + }, + }, + init_error_text_part='Key "type" is expected to be a nonempty string', + ), + DataForConfigTest( + cfg={ + "subject-credentials": { + "type": "FIXED", + "token": "test", + }, + }, + init_error_text_part='Key "token-type" is expected to be a nonempty string', + ), + DataForConfigTest( + cfg={ + "subject-credentials": { + "type": "FIXED", + "token-type": "test", + }, + }, + init_error_text_part='Key "token" is expected to be a nonempty string', + ), + ] + + def serve(s): + for t in tests: + # one request per test + if t.expect_http_request(): + s.handle_request() + + serve_thread = threading.Thread(target=serve, args=(server,)) + serve_thread.start() + + for t in tests: + t.run_check(server) + + serve_thread.join() diff --git a/ydb/driver.py b/ydb/driver.py index 89109b9b..ecd3319e 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -54,6 +54,13 @@ def credentials_from_env_variables(tracer=None): ctx.trace({"credentials.access_token": True}) return credentials_impl.AuthTokenCredentials(access_token) + oauth2_key_file = os.getenv("YDB_OAUTH2_KEY_FILE") + if oauth2_key_file: + ctx.trace({"credentials.oauth2_key_file": True}) + import ydb.oauth2_token_exchange + + return ydb.oauth2_token_exchange.Oauth2TokenExchangeCredentials.from_file(oauth2_key_file) + ctx.trace( { "credentials.env_default": True, diff --git a/ydb/oauth2_token_exchange/token_exchange.py b/ydb/oauth2_token_exchange/token_exchange.py index e4d1db94..8f16619d 100644 --- a/ydb/oauth2_token_exchange/token_exchange.py +++ b/ydb/oauth2_token_exchange/token_exchange.py @@ -2,6 +2,8 @@ import typing import json import abc +import os +import base64 try: import requests @@ -9,7 +11,24 @@ requests = None from ydb import credentials, tracing, issues -from .token_source import TokenSource +from .token_source import TokenSource, FixedTokenSource, JwtTokenSource + + +# method -> is HMAC +_supported_uppercase_jwt_algs = { + "HS256": True, + "HS384": True, + "HS512": True, + "RS256": False, + "RS384": False, + "RS512": False, + "PS256": False, + "PS384": False, + "PS512": False, + "ES256": False, + "ES384": False, + "ES512": False, +} class Oauth2TokenExchangeCredentialsBase(abc.ABC): @@ -94,6 +113,157 @@ def _make_token_request_params(self): return params + @classmethod + def _jwt_token_source_from_config(cls, cfg_json): + signing_method = cls._required_string_from_config(cfg_json, "alg") + is_hmac = _supported_uppercase_jwt_algs.get(signing_method.upper(), None) + if is_hmac is not None: # we know this method => do uppercase + signing_method = signing_method.upper() + private_key = cls._required_string_from_config(cfg_json, "private-key") + if is_hmac: # decode from base64 + private_key = base64.b64decode(private_key + "===") # to allow unpadded strings + return JwtTokenSource( + signing_method=signing_method, + private_key=private_key, + key_id=cls._string_with_default_from_config(cfg_json, "kid", None), + issuer=cls._string_with_default_from_config(cfg_json, "iss", None), + subject=cls._string_with_default_from_config(cfg_json, "sub", None), + audience=cls._list_of_strings_or_single_from_config(cfg_json, "aud"), + id=cls._string_with_default_from_config(cfg_json, "jti", None), + token_ttl_seconds=cls._duration_seconds_from_config(cfg_json, "ttl", 3600), + ) + + @classmethod + def _fixed_token_source_from_config(cls, cfg_json): + return FixedTokenSource( + cls._required_string_from_config(cfg_json, "token"), + cls._required_string_from_config(cfg_json, "token-type"), + ) + + @classmethod + def _token_source_from_config(cls, cfg_json, key_name): + value = cfg_json.get(key_name, None) + if value is None: + return None + if not isinstance(value, dict): + raise Exception('Key "{}" is expected to be a json map'.format(key_name)) + + source_type = cls._required_string_from_config(value, "type") + if source_type.upper() == "FIXED": + return cls._fixed_token_source_from_config(value) + if source_type.upper() == "JWT": + return cls._jwt_token_source_from_config(value) + raise Exception('"{}": unknown token source type: "{}"'.format(key_name, source_type)) + + @classmethod + def _list_of_strings_or_single_from_config(cls, cfg_json, key_name): + value = cfg_json.get(key_name, None) + if value is None: + return None + if isinstance(value, list): + for val in value: + if not isinstance(val, str) or not val: + raise Exception( + 'Key "{}" is expected to be a single string or list of nonempty strings'.format(key_name) + ) + return value + else: + if isinstance(value, str): + return value + raise Exception('Key "{}" is expected to be a single string or list of nonempty strings'.format(key_name)) + + @classmethod + def _required_string_from_config(cls, cfg_json, key_name): + value = cfg_json.get(key_name, None) + if value is None or not isinstance(value, str) or not value: + raise Exception('Key "{}" is expected to be a nonempty string'.format(key_name)) + return value + + @classmethod + def _string_with_default_from_config(cls, cfg_json, key_name, default_value): + value = cfg_json.get(key_name, None) + if value is None: + return default_value + if not isinstance(value, str): + raise Exception('Key "{}" is expected to be a string'.format(key_name)) + return value + + @classmethod + def _duration_seconds_from_config(cls, cfg_json, key_name, default_value): + value = cfg_json.get(key_name, None) + if value is None: + return default_value + if not isinstance(value, str): + raise Exception('Key "{}" is expected to be a string'.format(key_name)) + multiplier = 1 + if value.endswith("s"): + multiplier = 1 + value = value[:-1] + elif value.endswith("m"): + multiplier = 60 + value = value[:-1] + elif value.endswith("h"): + multiplier = 3600 + value = value[:-1] + elif value.endswith("d"): + multiplier = 3600 * 24 + value = value[:-1] + elif value.endswith("ms"): + multiplier = 1.0 / 1000 + value = value[:-2] + elif value.endswith("us"): + multiplier = 1.0 / 1000000 + value = value[:-2] + elif value.endswith("ns"): + multiplier = 1.0 / 1000000000 + value = value[:-2] + f = float(value) + if f < 0.0: + raise Exception("{}: negative duration is not allowed".format(value)) + return int(f * multiplier) + + @classmethod + def from_file(cls, cfg_file, iam_endpoint=None): + with open(os.path.expanduser(cfg_file), "r") as r: + cfg = r.read() + + return cls.from_content(cfg, iam_endpoint=iam_endpoint) + + @classmethod + def from_content(cls, cfg, iam_endpoint=None): + try: + cfg_json = json.loads(cfg) + except Exception as ex: + raise Exception("Failed to parse json config: {}".format(ex)) + + if iam_endpoint is not None: + token_endpoint = iam_endpoint + else: + token_endpoint = cfg_json.get("token-endpoint", "") + + subject_token_source = cls._token_source_from_config(cfg_json, "subject-credentials") + actor_token_source = cls._token_source_from_config(cfg_json, "actor-credentials") + audience = cls._list_of_strings_or_single_from_config(cfg_json, "aud") + scope = cls._list_of_strings_or_single_from_config(cfg_json, "scope") + resource = cls._string_with_default_from_config(cfg_json, "res", None) + grant_type = cls._string_with_default_from_config( + cfg_json, "grant-type", "urn:ietf:params:oauth:grant-type:token-exchange" + ) + requested_token_type = cls._string_with_default_from_config( + cfg_json, "requested-token-type", "urn:ietf:params:oauth:token-type:access_token" + ) + + return cls( + token_endpoint=token_endpoint, + subject_token_source=subject_token_source, + actor_token_source=actor_token_source, + audience=audience, + scope=scope, + resource=resource, + grant_type=grant_type, + requested_token_type=requested_token_type, + ) + class Oauth2TokenExchangeCredentials(credentials.AbstractExpiringTokenCredentials, Oauth2TokenExchangeCredentialsBase): def __init__( From 8fc3f56baebddf5934392bddc6cb42d491544cc5 Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Fri, 12 Jul 2024 15:02:52 +0300 Subject: [PATCH 033/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f919d865..9a6af19d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Added load OAuth 2.0 token exchange credentials provider from config file + ## 3.13.1 ## * Moved grpc draft imports to draft folder From 513d840ec438b7a12c0217945ab404b153996200 Mon Sep 17 00:00:00 2001 From: robot Date: Fri, 12 Jul 2024 12:03:35 +0000 Subject: [PATCH 034/429] Release: 3.14.0 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a6af19d..7ae7391e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.14.0 ## * Added load OAuth 2.0 token exchange credentials provider from config file ## 3.13.1 ## diff --git a/setup.py b/setup.py index c2064be3..4227fea5 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.13.1", # AUTOVERSION + version="3.14.0", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 9f2a8d73..faf1da08 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.13.1" +VERSION = "3.14.0" From 93e0fde90ef7b6d2712518f4375c581863cbe4ee Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 16 Jul 2024 11:50:00 +0300 Subject: [PATCH 035/429] Update generated protos --- ydb-api-protos | 2 +- .../draft/protos/ydb_federated_query_pb2.py | 6591 +++++++++++++++++ .../protos/ydb_federated_query_pb2_grpc.py | 4 + ydb/_grpc/v3/draft/protos/ydb_keyvalue_pb2.py | 2612 +++++++ .../v3/draft/protos/ydb_keyvalue_pb2_grpc.py | 4 + .../v3/draft/protos/ydb_maintenance_pb2.py | 151 +- .../v3/draft/protos/ydb_object_storage_pb2.py | 240 + .../protos/ydb_object_storage_pb2_grpc.py | 4 + .../v3/draft/ydb_federated_query_v1_pb2.py | 260 + .../draft/ydb_federated_query_v1_pb2_grpc.py | 755 ++ ydb/_grpc/v3/draft/ydb_keyvalue_v1_pb2.py | 160 + .../v3/draft/ydb_keyvalue_v1_pb2_grpc.py | 419 ++ .../v3/draft/ydb_object_storage_v1_pb2.py | 60 + .../draft/ydb_object_storage_v1_pb2_grpc.py | 66 + .../v3/protos/annotations/sensitive_pb2.py | 44 + .../protos/annotations/sensitive_pb2_grpc.py | 4 + ydb/_grpc/v3/protos/ydb_query_pb2.py | 48 +- ydb/_grpc/v3/protos/ydb_topic_pb2.py | 519 +- ydb/_grpc/v3/ydb_topic_v1_pb2.py | 24 +- ydb/_grpc/v3/ydb_topic_v1_pb2_grpc.py | 34 + .../draft/protos/ydb_federated_query_pb2.py | 499 ++ .../draft/protos/ydb_federated_query_pb2.pyi | 1125 +++ .../protos/ydb_federated_query_pb2_grpc.py | 4 + ydb/_grpc/v4/draft/protos/ydb_keyvalue_pb2.py | 124 + .../v4/draft/protos/ydb_keyvalue_pb2.pyi | 437 ++ .../v4/draft/protos/ydb_keyvalue_pb2_grpc.py | 4 + .../v4/draft/protos/ydb_maintenance_pb2.py | 136 +- .../v4/draft/protos/ydb_maintenance_pb2.pyi | 8 +- .../v4/draft/protos/ydb_object_storage_pb2.py | 34 + .../draft/protos/ydb_object_storage_pb2.pyi | 52 + .../protos/ydb_object_storage_pb2_grpc.py | 4 + .../v4/draft/ydb_federated_query_v1_pb2.py | 28 + .../v4/draft/ydb_federated_query_v1_pb2.pyi | 5 + .../draft/ydb_federated_query_v1_pb2_grpc.py | 755 ++ ydb/_grpc/v4/draft/ydb_keyvalue_v1_pb2.py | 28 + ydb/_grpc/v4/draft/ydb_keyvalue_v1_pb2.pyi | 5 + .../v4/draft/ydb_keyvalue_v1_pb2_grpc.py | 419 ++ .../v4/draft/ydb_object_storage_v1_pb2.py | 28 + .../v4/draft/ydb_object_storage_v1_pb2.pyi | 5 + .../draft/ydb_object_storage_v1_pb2_grpc.py | 66 + .../v4/protos/annotations/sensitive_pb2.py | 27 + .../v4/protos/annotations/sensitive_pb2.pyi | 7 + .../protos/annotations/sensitive_pb2_grpc.py | 4 + ydb/_grpc/v4/protos/ydb_query_pb2.py | 40 +- ydb/_grpc/v4/protos/ydb_query_pb2.pyi | 6 +- ydb/_grpc/v4/protos/ydb_topic_pb2.py | 337 +- ydb/_grpc/v4/protos/ydb_topic_pb2.pyi | 89 +- ydb/_grpc/v4/ydb_topic_v1_pb2.py | 4 +- ydb/_grpc/v4/ydb_topic_v1_pb2_grpc.py | 34 + 49 files changed, 15684 insertions(+), 631 deletions(-) create mode 100644 ydb/_grpc/v3/draft/protos/ydb_federated_query_pb2.py create mode 100644 ydb/_grpc/v3/draft/protos/ydb_federated_query_pb2_grpc.py create mode 100644 ydb/_grpc/v3/draft/protos/ydb_keyvalue_pb2.py create mode 100644 ydb/_grpc/v3/draft/protos/ydb_keyvalue_pb2_grpc.py create mode 100644 ydb/_grpc/v3/draft/protos/ydb_object_storage_pb2.py create mode 100644 ydb/_grpc/v3/draft/protos/ydb_object_storage_pb2_grpc.py create mode 100644 ydb/_grpc/v3/draft/ydb_federated_query_v1_pb2.py create mode 100644 ydb/_grpc/v3/draft/ydb_federated_query_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v3/draft/ydb_keyvalue_v1_pb2.py create mode 100644 ydb/_grpc/v3/draft/ydb_keyvalue_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v3/draft/ydb_object_storage_v1_pb2.py create mode 100644 ydb/_grpc/v3/draft/ydb_object_storage_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v3/protos/annotations/sensitive_pb2.py create mode 100644 ydb/_grpc/v3/protos/annotations/sensitive_pb2_grpc.py create mode 100644 ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.py create mode 100644 ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.pyi create mode 100644 ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2_grpc.py create mode 100644 ydb/_grpc/v4/draft/protos/ydb_keyvalue_pb2.py create mode 100644 ydb/_grpc/v4/draft/protos/ydb_keyvalue_pb2.pyi create mode 100644 ydb/_grpc/v4/draft/protos/ydb_keyvalue_pb2_grpc.py create mode 100644 ydb/_grpc/v4/draft/protos/ydb_object_storage_pb2.py create mode 100644 ydb/_grpc/v4/draft/protos/ydb_object_storage_pb2.pyi create mode 100644 ydb/_grpc/v4/draft/protos/ydb_object_storage_pb2_grpc.py create mode 100644 ydb/_grpc/v4/draft/ydb_federated_query_v1_pb2.py create mode 100644 ydb/_grpc/v4/draft/ydb_federated_query_v1_pb2.pyi create mode 100644 ydb/_grpc/v4/draft/ydb_federated_query_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v4/draft/ydb_keyvalue_v1_pb2.py create mode 100644 ydb/_grpc/v4/draft/ydb_keyvalue_v1_pb2.pyi create mode 100644 ydb/_grpc/v4/draft/ydb_keyvalue_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v4/draft/ydb_object_storage_v1_pb2.py create mode 100644 ydb/_grpc/v4/draft/ydb_object_storage_v1_pb2.pyi create mode 100644 ydb/_grpc/v4/draft/ydb_object_storage_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v4/protos/annotations/sensitive_pb2.py create mode 100644 ydb/_grpc/v4/protos/annotations/sensitive_pb2.pyi create mode 100644 ydb/_grpc/v4/protos/annotations/sensitive_pb2_grpc.py diff --git a/ydb-api-protos b/ydb-api-protos index 850eab0b..8e2eef00 160000 --- a/ydb-api-protos +++ b/ydb-api-protos @@ -1 +1 @@ -Subproject commit 850eab0bb30874ceffdbc248f2a5f641b914d904 +Subproject commit 8e2eef00b7334b4a77b8c9772dbefa862a8812fa diff --git a/ydb/_grpc/v3/draft/protos/ydb_federated_query_pb2.py b/ydb/_grpc/v3/draft/protos/ydb_federated_query_pb2.py new file mode 100644 index 00000000..f11640a6 --- /dev/null +++ b/ydb/_grpc/v3/draft/protos/ydb_federated_query_pb2.py @@ -0,0 +1,6591 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/protos/ydb_federated_query.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v3.protos.annotations import sensitive_pb2 as protos_dot_annotations_dot_sensitive__pb2 +from ydb._grpc.v3.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 +from ydb._grpc.v3.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 +from ydb._grpc.v3.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 +from ydb._grpc.v3.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='draft/protos/ydb_federated_query.proto', + package='FederatedQuery', + syntax='proto3', + serialized_options=b'\n$tech.ydb.proto.draft.federated.queryZGgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_FederatedQuery\370\001\001', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n&draft/protos/ydb_federated_query.proto\x12\x0e\x46\x65\x64\x65ratedQuery\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x16protos/ydb_value.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"{\n\x03\x41\x63l\x12\x32\n\nvisibility\x18\x01 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"@\n\nVisibility\x12\x1a\n\x16VISIBILITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\t\n\x05SCOPE\x10\x02\"\x83\x03\n\x06Limits\x12!\n\x0fvcpu_rate_limit\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0f\x66low_rate_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fvcpu_time_limit\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_size\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_rows\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1e\n\x0cmemory_limit\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\nresult_ttl\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x11\x65xecution_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x38\n\x12\x65xecution_deadline\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\t\n\x07timeout\"\xef\x03\n\x14StreamingDisposition\x12(\n\x06oldest\x18\x01 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\'\n\x05\x66resh\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x42\n\tfrom_time\x18\x03 \x01(\x0b\x32-.FederatedQuery.StreamingDisposition.FromTimeH\x00\x12@\n\x08time_ago\x18\x04 \x01(\x0b\x32,.FederatedQuery.StreamingDisposition.TimeAgoH\x00\x12W\n\x14\x66rom_last_checkpoint\x18\x05 \x01(\x0b\x32\x37.FederatedQuery.StreamingDisposition.FromLastCheckpointH\x00\x1a\x39\n\x08\x46romTime\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x36\n\x07TimeAgo\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a#\n\x12\x46romLastCheckpoint\x12\r\n\x05\x66orce\x18\x01 \x01(\x08\x42\r\n\x0b\x64isposition\"\xd4\x04\n\x0cQueryContent\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12&\n\x06limits\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Limits\x12\x1a\n\x04text\x18\x05 \x01(\tB\x0c\xa2\xe6*\x08\n\x06\x08\x01\x10\x80\xa0\x06\x12\x11\n\tautomatic\x18\x06 \x01(\x08\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\x12\x64\n\x12\x65xecution_settings\x18\n \x03(\x0b\x32\x33.FederatedQuery.QueryContent.ExecutionSettingsEntryB\x13\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x03\x18\x80 \x12\x38\n\x06syntax\x18\x0b \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\x1a\x38\n\x16\x45xecutionSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"E\n\tQueryType\x12\x1a\n\x16QUERY_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tANALYTICS\x10\x01\x12\r\n\tSTREAMING\x10\x02\"?\n\x0bQuerySyntax\x12\x1c\n\x18QUERY_SYNTAX_UNSPECIFIED\x10\x00\x12\n\n\x06YQL_V1\x10\x01\x12\x06\n\x02PG\x10\x02\"\xe5\x01\n\nCommonMeta\x12\x17\n\x02id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x1f\n\ncreated_by\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12 \n\x0bmodified_by\x18\x03 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12.\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bmodified_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x08revision\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbf\x06\n\tQueryMeta\x12*\n\x06\x63ommon\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x30\n\x0csubmitted_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstarted_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x37\n\x06status\x18\x05 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x1f\n\x17last_job_query_revision\x18\x06 \x01(\x03\x12\x13\n\x0blast_job_id\x18\x07 \x01(\t\x12-\n\texpire_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10result_expire_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nstarted_by\x18\n \x01(\t\x12\x14\n\naborted_by\x18\x0b \x01(\tH\x00\x12\x13\n\tpaused_by\x18\x0c \x01(\tH\x00\x12\x1d\n\x15has_saved_checkpoints\x18\r \x01(\x08\"\x83\x02\n\rComputeStatus\x12\x1e\n\x1a\x43OMPUTE_STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STARTING\x10\x01\x12\x13\n\x0f\x41\x42ORTED_BY_USER\x10\x02\x12\x15\n\x11\x41\x42ORTED_BY_SYSTEM\x10\x03\x12\x14\n\x10\x41\x42ORTING_BY_USER\x10\x04\x12\x16\n\x12\x41\x42ORTING_BY_SYSTEM\x10\x05\x12\x0c\n\x08RESUMING\x10\x06\x12\x0b\n\x07RUNNING\x10\x07\x12\r\n\tCOMPLETED\x10\x08\x12\x0e\n\nCOMPLETING\x10\x0c\x12\n\n\x06\x46\x41ILED\x10\t\x12\x0b\n\x07\x46\x41ILING\x10\r\x12\n\n\x06PAUSED\x10\x0b\x12\x0b\n\x07PAUSING\x10\nB\x08\n\x06\x61\x63tion\"\xc9\x01\n\nBriefQuery\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\'\n\x04meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x05 \x01(\x08\"\x19\n\tQueryPlan\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x18\n\x08QueryAst\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\t\"]\n\rResultSetMeta\x12\x1b\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x1c\n\nrows_count\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x11\n\ttruncated\x18\x03 \x01(\x08\"\xf6\x02\n\x05Query\x12\'\n\x04meta\x18\x01 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\'\n\x04plan\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x04 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x30\n\x0ftransient_issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\"\x1f\n\x0fQueryStatistics\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x8e\x02\n\x12\x43reateQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x04 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x43reateQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\".\n\x11\x43reateQueryResult\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x93\x04\n\x12ListQueriesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x39\n\x06\x66ilter\x18\x04 \x01(\x0b\x32).FederatedQuery.ListQueriesRequest.Filter\x1a\xcc\x02\n\x06\x46ilter\x12:\n\nquery_type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12?\n\x06status\x18\x02 \x03(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatusB\x06\x9a\xe6*\x02\x18\x14\x12\x31\n\x04mode\x18\x03 \x03(\x0e\x32\x1b.FederatedQuery.ExecuteModeB\x06\x9a\xe6*\x02\x18\x14\x12\x15\n\x04name\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x05 \x01(\x08\x12\x32\n\nvisibility\x18\x06 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x30\n\tautomatic\x18\x07 \x01(\x0e\x32\x1d.FederatedQuery.AutomaticType\"C\n\x13ListQueriesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"`\n\x11ListQueriesResult\x12)\n\x05query\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.BriefQuery\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"p\n\x14\x44\x65scribeQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"E\n\x15\x44\x65scribeQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\";\n\x13\x44\x65scribeQueryResult\x12$\n\x05query\x18\x01 \x01(\x0b\x32\x15.FederatedQuery.Query\"q\n\x15GetQueryStatusRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"F\n\x16GetQueryStatusResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"f\n\x14GetQueryStatusResult\x12\x37\n\x06status\x18\x01 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x15\n\rmeta_revision\x18\x02 \x01(\x03\"\xb5\x01\n\x12\x44\x65leteQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x44\x65leteQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x44\x65leteQueryResult\"\x8a\x03\n\x12ModifyQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12-\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x05 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12\x36\n\x0fstate_load_mode\x18\x06 \x01(\x0e\x32\x1d.FederatedQuery.StateLoadMode\x12#\n\x11previous_revision\x18\x07 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13ModifyQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11ModifyQueryResult\"\xe3\x01\n\x13\x43ontrolQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12+\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.QueryAction\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"D\n\x14\x43ontrolQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ontrolQueryResult\"\xed\x01\n\x08\x42riefJob\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x12\n\nquery_name\x18\t \x01(\t\x12\x32\n\nvisibility\x18\n \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x83\x04\n\x03Job\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x0c\n\x04text\x18\x02 \x01(\t\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\'\n\x04plan\x18\x04 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\x12\x12\n\nquery_name\x18\t \x01(\t\x12 \n\x03\x61\x63l\x18\n \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x06syntax\x18\r \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\"\x8c\x02\n\x0fListJobsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x10\n\x08query_id\x18\x05 \x01(\t\x12\x36\n\x06\x66ilter\x18\x04 \x01(\x0b\x32&.FederatedQuery.ListJobsRequest.Filter\x1a:\n\x06\x46ilter\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\"@\n\x10ListJobsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Y\n\x0eListJobsResult\x12%\n\x03job\x18\x01 \x03(\x0b\x32\x18.FederatedQuery.BriefJob\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"l\n\x12\x44\x65scribeJobRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\x06job_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"C\n\x13\x44\x65scribeJobResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"5\n\x11\x44\x65scribeJobResult\x12 \n\x03job\x18\x01 \x01(\x0b\x32\x13.FederatedQuery.Job\"\x15\n\x13\x43urrentIAMTokenAuth\"\n\n\x08NoneAuth\")\n\x12ServiceAccountAuth\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\xba\x01\n\x07IamAuth\x12:\n\x0b\x63urrent_iam\x18\x01 \x01(\x0b\x32#.FederatedQuery.CurrentIAMTokenAuthH\x00\x12=\n\x0fservice_account\x18\x02 \x01(\x0b\x32\".FederatedQuery.ServiceAccountAuthH\x00\x12(\n\x04none\x18\x03 \x01(\x0b\x32\x18.FederatedQuery.NoneAuthH\x00\x42\n\n\x08identity\"\x98\x01\n\x0b\x44\x61taStreams\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"g\n\nMonitoring\x12\x18\n\x07project\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12\x18\n\x07\x63luster\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12%\n\x04\x61uth\x18\x03 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x98\x01\n\x0bYdbDatabase\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"\xf8\x01\n\x11\x43lickHouseCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"Y\n\x17ObjectStorageConnection\x12\x17\n\x06\x62ucket\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x91\x02\n\x11PostgreSQLCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x17\n\x06schema\x18\t \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"\xae\x04\n\x11\x43onnectionSetting\x12\x33\n\x0cydb_database\x18\x01 \x01(\x0b\x32\x1b.FederatedQuery.YdbDatabaseH\x00\x12?\n\x12\x63lickhouse_cluster\x18\x02 \x01(\x0b\x32!.FederatedQuery.ClickHouseClusterH\x00\x12\x33\n\x0c\x64\x61ta_streams\x18\x03 \x01(\x0b\x32\x1b.FederatedQuery.DataStreamsH\x00\x12\x41\n\x0eobject_storage\x18\x04 \x01(\x0b\x32\'.FederatedQuery.ObjectStorageConnectionH\x00\x12\x30\n\nmonitoring\x18\x05 \x01(\x0b\x32\x1a.FederatedQuery.MonitoringH\x00\x12?\n\x12postgresql_cluster\x18\x06 \x01(\x0b\x32!.FederatedQuery.PostgreSQLClusterH\x00\"\xa9\x01\n\x0e\x43onnectionType\x12\x1f\n\x1b\x43ONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cYDB_DATABASE\x10\x01\x12\x16\n\x12\x43LICKHOUSE_CLUSTER\x10\x02\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x03\x12\x12\n\x0eOBJECT_STORAGE\x10\x04\x12\x0e\n\nMONITORING\x10\x05\x12\x16\n\x12POSTGRESQL_CLUSTER\x10\x06\x42\x0c\n\nconnection\"\xa2\x01\n\x11\x43onnectionContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"j\n\nConnection\x12\x32\n\x07\x63ontent\x18\x01 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xaa\x01\n\x17\x43reateConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x43reateConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"<\n\x16\x43reateConnectionResult\x12\"\n\rconnection_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\x84\x03\n\x16ListConnectionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12=\n\x06\x66ilter\x18\x04 \x01(\x0b\x32-.FederatedQuery.ListConnectionsRequest.Filter\x1a\xb5\x01\n\x06\x46ilter\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\x12I\n\x0f\x63onnection_type\x18\x03 \x01(\x0e\x32\x30.FederatedQuery.ConnectionSetting.ConnectionType\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"G\n\x17ListConnectionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"i\n\x15ListConnectionsResult\x12.\n\nconnection\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.Connection\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"z\n\x19\x44\x65scribeConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"J\n\x1a\x44\x65scribeConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"J\n\x18\x44\x65scribeConnectionResult\x12.\n\nconnection\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.Connection\"\xf3\x01\n\x17ModifyConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07\x63ontent\x18\x03 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18ModifyConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16ModifyConnectionResult\"\xbf\x01\n\x17\x44\x65leteConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x44\x65leteConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16\x44\x65leteConnectionResult\"\x86\x01\n\x15TestConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\"F\n\x16TestConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x16\n\x14TestConnectionResult\"\xcc\x01\n\x14GetResultDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\x10result_set_index\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12\x18\n\x06offset\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1c\n\x05limit\x18\x05 \x01(\x03\x42\r\xb2\xe6*\t[1; 1000]\"E\n\x15GetResultDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"9\n\x13GetResultDataResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\".\n\x06Schema\x12$\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.ColumnB\x07\x9a\xe6*\x03\x18\xe8\x07\"\xa2\x02\n\x12\x44\x61taStreamsBinding\x12 \n\x0bstream_name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x0b\x63ompression\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12U\n\x0e\x66ormat_setting\x18\x05 \x03(\x0b\x32\x35.FederatedQuery.DataStreamsBinding.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x92\x04\n\x14ObjectStorageBinding\x12;\n\x06subset\x18\x01 \x03(\x0b\x32+.FederatedQuery.ObjectStorageBinding.Subset\x1a\xbc\x03\n\x06Subset\x12!\n\x0cpath_pattern\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12^\n\x0e\x66ormat_setting\x18\x03 \x03(\x0b\x32>.FederatedQuery.ObjectStorageBinding.Subset.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x12\x1c\n\x0b\x63ompression\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x05 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12O\n\nprojection\x18\x06 \x03(\x0b\x32;.FederatedQuery.ObjectStorageBinding.Subset.ProjectionEntry\x12\x16\n\x0epartitioned_by\x18\x07 \x03(\t\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fProjectionEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xea\x01\n\x0e\x42indingSetting\x12:\n\x0c\x64\x61ta_streams\x18\x01 \x01(\x0b\x32\".FederatedQuery.DataStreamsBindingH\x00\x12>\n\x0eobject_storage\x18\x02 \x01(\x0b\x32$.FederatedQuery.ObjectStorageBindingH\x00\"Q\n\x0b\x42indingType\x12\x1c\n\x18\x42INDING_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x01\x12\x12\n\x0eOBJECT_STORAGE\x10\x02\x42\t\n\x07\x62inding\"\xe5\x01\n\x0c\x42riefBinding\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12(\n\x04meta\x18\x03 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x38\n\x04type\x18\x04 \x01(\x0e\x32*.FederatedQuery.BindingSetting.BindingType\x12\x32\n\nvisibility\x18\x05 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"\xc0\x01\n\x0e\x42indingContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07setting\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingSetting\x12 \n\x03\x61\x63l\x18\x04 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"d\n\x07\x42inding\x12/\n\x07\x63ontent\x18\x01 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xa4\x01\n\x14\x43reateBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12/\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x43reateBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"6\n\x13\x43reateBindingResult\x12\x1f\n\nbinding_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\xd3\x02\n\x13ListBindingsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12:\n\x06\x66ilter\x18\x04 \x01(\x0b\x32*.FederatedQuery.ListBindingsRequest.Filter\x1a\x8a\x01\n\x06\x46ilter\x12\x1e\n\rconnection_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x03 \x01(\x08\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"D\n\x14ListBindingsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"e\n\x12ListBindingsResult\x12-\n\x07\x62inding\x18\x01 \x03(\x0b\x32\x1c.FederatedQuery.BriefBinding\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"t\n\x16\x44\x65scribeBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"G\n\x17\x44\x65scribeBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"A\n\x15\x44\x65scribeBindingResult\x12(\n\x07\x62inding\x18\x01 \x01(\x0b\x32\x17.FederatedQuery.Binding\"\xea\x01\n\x14ModifyBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15ModifyBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13ModifyBindingResult\"\xb9\x01\n\x14\x44\x65leteBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x44\x65leteBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13\x44\x65leteBindingResult*q\n\x0b\x45xecuteMode\x12\x1c\n\x18\x45XECUTE_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04SAVE\x10\x01\x12\t\n\x05PARSE\x10\x02\x12\x0b\n\x07\x43OMPILE\x10\x03\x12\x0c\n\x08VALIDATE\x10\x04\x12\x0b\n\x07\x45XPLAIN\x10\x05\x12\x07\n\x03RUN\x10\x06*y\n\x0bQueryAction\x12\x1c\n\x18QUERY_ACTION_UNSPECIFIED\x10\x00\x12\t\n\x05PAUSE\x10\x01\x12\x14\n\x10PAUSE_GRACEFULLY\x10\x02\x12\t\n\x05\x41\x42ORT\x10\x03\x12\x14\n\x10\x41\x42ORT_GRACEFULLY\x10\x04\x12\n\n\x06RESUME\x10\x05*U\n\rStateLoadMode\x12\x1f\n\x1bSTATE_LOAD_MODE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45MPTY\x10\x01\x12\x18\n\x14\x46ROM_LAST_CHECKPOINT\x10\x02*Q\n\rAutomaticType\x12\x1e\n\x1a\x41UTOMATIC_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\x11\n\rNOT_AUTOMATIC\x10\x02\x42r\n$tech.ydb.proto.draft.federated.queryZGgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_FederatedQuery\xf8\x01\x01\x62\x06proto3' + , + dependencies=[protos_dot_annotations_dot_sensitive__pb2.DESCRIPTOR,protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,protos_dot_ydb__value__pb2.DESCRIPTOR,protos_dot_ydb__issue__message__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,]) + +_EXECUTEMODE = _descriptor.EnumDescriptor( + name='ExecuteMode', + full_name='FederatedQuery.ExecuteMode', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='EXECUTE_MODE_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='SAVE', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PARSE', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='COMPILE', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='VALIDATE', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='EXPLAIN', index=5, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='RUN', index=6, number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=15700, + serialized_end=15813, +) +_sym_db.RegisterEnumDescriptor(_EXECUTEMODE) + +ExecuteMode = enum_type_wrapper.EnumTypeWrapper(_EXECUTEMODE) +_QUERYACTION = _descriptor.EnumDescriptor( + name='QueryAction', + full_name='FederatedQuery.QueryAction', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='QUERY_ACTION_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PAUSE', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PAUSE_GRACEFULLY', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ABORT', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ABORT_GRACEFULLY', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='RESUME', index=5, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=15815, + serialized_end=15936, +) +_sym_db.RegisterEnumDescriptor(_QUERYACTION) + +QueryAction = enum_type_wrapper.EnumTypeWrapper(_QUERYACTION) +_STATELOADMODE = _descriptor.EnumDescriptor( + name='StateLoadMode', + full_name='FederatedQuery.StateLoadMode', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='STATE_LOAD_MODE_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='EMPTY', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='FROM_LAST_CHECKPOINT', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=15938, + serialized_end=16023, +) +_sym_db.RegisterEnumDescriptor(_STATELOADMODE) + +StateLoadMode = enum_type_wrapper.EnumTypeWrapper(_STATELOADMODE) +_AUTOMATICTYPE = _descriptor.EnumDescriptor( + name='AutomaticType', + full_name='FederatedQuery.AutomaticType', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='AUTOMATIC_TYPE_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='AUTOMATIC', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='NOT_AUTOMATIC', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=16025, + serialized_end=16106, +) +_sym_db.RegisterEnumDescriptor(_AUTOMATICTYPE) + +AutomaticType = enum_type_wrapper.EnumTypeWrapper(_AUTOMATICTYPE) +EXECUTE_MODE_UNSPECIFIED = 0 +SAVE = 1 +PARSE = 2 +COMPILE = 3 +VALIDATE = 4 +EXPLAIN = 5 +RUN = 6 +QUERY_ACTION_UNSPECIFIED = 0 +PAUSE = 1 +PAUSE_GRACEFULLY = 2 +ABORT = 3 +ABORT_GRACEFULLY = 4 +RESUME = 5 +STATE_LOAD_MODE_UNSPECIFIED = 0 +EMPTY = 1 +FROM_LAST_CHECKPOINT = 2 +AUTOMATIC_TYPE_UNSPECIFIED = 0 +AUTOMATIC = 1 +NOT_AUTOMATIC = 2 + + +_ACL_VISIBILITY = _descriptor.EnumDescriptor( + name='Visibility', + full_name='FederatedQuery.Acl.Visibility', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='VISIBILITY_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PRIVATE', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='SCOPE', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=368, + serialized_end=432, +) +_sym_db.RegisterEnumDescriptor(_ACL_VISIBILITY) + +_QUERYCONTENT_QUERYTYPE = _descriptor.EnumDescriptor( + name='QueryType', + full_name='FederatedQuery.QueryContent.QueryType', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='QUERY_TYPE_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ANALYTICS', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='STREAMING', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=1785, + serialized_end=1854, +) +_sym_db.RegisterEnumDescriptor(_QUERYCONTENT_QUERYTYPE) + +_QUERYCONTENT_QUERYSYNTAX = _descriptor.EnumDescriptor( + name='QuerySyntax', + full_name='FederatedQuery.QueryContent.QuerySyntax', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='QUERY_SYNTAX_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='YQL_V1', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PG', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=1856, + serialized_end=1919, +) +_sym_db.RegisterEnumDescriptor(_QUERYCONTENT_QUERYSYNTAX) + +_QUERYMETA_COMPUTESTATUS = _descriptor.EnumDescriptor( + name='ComputeStatus', + full_name='FederatedQuery.QueryMeta.ComputeStatus', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='COMPUTE_STATUS_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='STARTING', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ABORTED_BY_USER', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ABORTED_BY_SYSTEM', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ABORTING_BY_USER', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ABORTING_BY_SYSTEM', index=5, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='RESUMING', index=6, number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='RUNNING', index=7, number=7, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='COMPLETED', index=8, number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='COMPLETING', index=9, number=12, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='FAILED', index=10, number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='FAILING', index=11, number=13, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PAUSED', index=12, number=11, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PAUSING', index=13, number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=2716, + serialized_end=2975, +) +_sym_db.RegisterEnumDescriptor(_QUERYMETA_COMPUTESTATUS) + +_CONNECTIONSETTING_CONNECTIONTYPE = _descriptor.EnumDescriptor( + name='ConnectionType', + full_name='FederatedQuery.ConnectionSetting.ConnectionType', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='CONNECTION_TYPE_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='YDB_DATABASE', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='CLICKHOUSE_CLUSTER', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='DATA_STREAMS', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='OBJECT_STORAGE', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MONITORING', index=5, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='POSTGRESQL_CLUSTER', index=6, number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=9556, + serialized_end=9725, +) +_sym_db.RegisterEnumDescriptor(_CONNECTIONSETTING_CONNECTIONTYPE) + +_BINDINGSETTING_BINDINGTYPE = _descriptor.EnumDescriptor( + name='BindingType', + full_name='FederatedQuery.BindingSetting.BindingType', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='BINDING_TYPE_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='DATA_STREAMS', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='OBJECT_STORAGE', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=13397, + serialized_end=13478, +) +_sym_db.RegisterEnumDescriptor(_BINDINGSETTING_BINDINGTYPE) + + +_ACL = _descriptor.Descriptor( + name='Acl', + full_name='FederatedQuery.Acl', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='visibility', full_name='FederatedQuery.Acl.visibility', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _ACL_VISIBILITY, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=309, + serialized_end=432, +) + + +_LIMITS = _descriptor.Descriptor( + name='Limits', + full_name='FederatedQuery.Limits', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='vcpu_rate_limit', full_name='FederatedQuery.Limits.vcpu_rate_limit', index=0, + number=1, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='flow_rate_limit', full_name='FederatedQuery.Limits.flow_rate_limit', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='vcpu_time_limit', full_name='FederatedQuery.Limits.vcpu_time_limit', index=2, + number=3, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='max_result_size', full_name='FederatedQuery.Limits.max_result_size', index=3, + number=4, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='max_result_rows', full_name='FederatedQuery.Limits.max_result_rows', index=4, + number=5, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='memory_limit', full_name='FederatedQuery.Limits.memory_limit', index=5, + number=6, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='result_ttl', full_name='FederatedQuery.Limits.result_ttl', index=6, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='execution_timeout', full_name='FederatedQuery.Limits.execution_timeout', index=7, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='execution_deadline', full_name='FederatedQuery.Limits.execution_deadline', index=8, + number=9, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='timeout', full_name='FederatedQuery.Limits.timeout', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=435, + serialized_end=822, +) + + +_STREAMINGDISPOSITION_FROMTIME = _descriptor.Descriptor( + name='FromTime', + full_name='FederatedQuery.StreamingDisposition.FromTime', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='timestamp', full_name='FederatedQuery.StreamingDisposition.FromTime.timestamp', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1155, + serialized_end=1212, +) + +_STREAMINGDISPOSITION_TIMEAGO = _descriptor.Descriptor( + name='TimeAgo', + full_name='FederatedQuery.StreamingDisposition.TimeAgo', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='duration', full_name='FederatedQuery.StreamingDisposition.TimeAgo.duration', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1214, + serialized_end=1268, +) + +_STREAMINGDISPOSITION_FROMLASTCHECKPOINT = _descriptor.Descriptor( + name='FromLastCheckpoint', + full_name='FederatedQuery.StreamingDisposition.FromLastCheckpoint', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='force', full_name='FederatedQuery.StreamingDisposition.FromLastCheckpoint.force', index=0, + number=1, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1270, + serialized_end=1305, +) + +_STREAMINGDISPOSITION = _descriptor.Descriptor( + name='StreamingDisposition', + full_name='FederatedQuery.StreamingDisposition', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='oldest', full_name='FederatedQuery.StreamingDisposition.oldest', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='fresh', full_name='FederatedQuery.StreamingDisposition.fresh', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='from_time', full_name='FederatedQuery.StreamingDisposition.from_time', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='time_ago', full_name='FederatedQuery.StreamingDisposition.time_ago', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='from_last_checkpoint', full_name='FederatedQuery.StreamingDisposition.from_last_checkpoint', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_STREAMINGDISPOSITION_FROMTIME, _STREAMINGDISPOSITION_TIMEAGO, _STREAMINGDISPOSITION_FROMLASTCHECKPOINT, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='disposition', full_name='FederatedQuery.StreamingDisposition.disposition', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=825, + serialized_end=1320, +) + + +_QUERYCONTENT_EXECUTIONSETTINGSENTRY = _descriptor.Descriptor( + name='ExecutionSettingsEntry', + full_name='FederatedQuery.QueryContent.ExecutionSettingsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='FederatedQuery.QueryContent.ExecutionSettingsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='FederatedQuery.QueryContent.ExecutionSettingsEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=b'8\001', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1727, + serialized_end=1783, +) + +_QUERYCONTENT = _descriptor.Descriptor( + name='QueryContent', + full_name='FederatedQuery.QueryContent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='type', full_name='FederatedQuery.QueryContent.type', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='name', full_name='FederatedQuery.QueryContent.name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='acl', full_name='FederatedQuery.QueryContent.acl', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='limits', full_name='FederatedQuery.QueryContent.limits', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='text', full_name='FederatedQuery.QueryContent.text', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\010\n\006\010\001\020\200\240\006', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='automatic', full_name='FederatedQuery.QueryContent.automatic', index=5, + number=6, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='description', full_name='FederatedQuery.QueryContent.description', index=6, + number=7, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200P', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='execution_settings', full_name='FederatedQuery.QueryContent.execution_settings', index=7, + number=10, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\252\346*\010\n\006\n\004\010\001\020d\242\346*\003\030\200 ', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='syntax', full_name='FederatedQuery.QueryContent.syntax', index=8, + number=11, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_QUERYCONTENT_EXECUTIONSETTINGSENTRY, ], + enum_types=[ + _QUERYCONTENT_QUERYTYPE, + _QUERYCONTENT_QUERYSYNTAX, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1323, + serialized_end=1919, +) + + +_COMMONMETA = _descriptor.Descriptor( + name='CommonMeta', + full_name='FederatedQuery.CommonMeta', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='FederatedQuery.CommonMeta.id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='created_by', full_name='FederatedQuery.CommonMeta.created_by', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='modified_by', full_name='FederatedQuery.CommonMeta.modified_by', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='created_at', full_name='FederatedQuery.CommonMeta.created_at', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='modified_at', full_name='FederatedQuery.CommonMeta.modified_at', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='revision', full_name='FederatedQuery.CommonMeta.revision', index=5, + number=6, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1922, + serialized_end=2151, +) + + +_QUERYMETA = _descriptor.Descriptor( + name='QueryMeta', + full_name='FederatedQuery.QueryMeta', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='common', full_name='FederatedQuery.QueryMeta.common', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='submitted_at', full_name='FederatedQuery.QueryMeta.submitted_at', index=1, + number=14, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='started_at', full_name='FederatedQuery.QueryMeta.started_at', index=2, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='finished_at', full_name='FederatedQuery.QueryMeta.finished_at', index=3, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='execute_mode', full_name='FederatedQuery.QueryMeta.execute_mode', index=4, + number=4, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='status', full_name='FederatedQuery.QueryMeta.status', index=5, + number=5, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='last_job_query_revision', full_name='FederatedQuery.QueryMeta.last_job_query_revision', index=6, + number=6, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='last_job_id', full_name='FederatedQuery.QueryMeta.last_job_id', index=7, + number=7, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='expire_at', full_name='FederatedQuery.QueryMeta.expire_at', index=8, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='result_expire_at', full_name='FederatedQuery.QueryMeta.result_expire_at', index=9, + number=9, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='started_by', full_name='FederatedQuery.QueryMeta.started_by', index=10, + number=10, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='aborted_by', full_name='FederatedQuery.QueryMeta.aborted_by', index=11, + number=11, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='paused_by', full_name='FederatedQuery.QueryMeta.paused_by', index=12, + number=12, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='has_saved_checkpoints', full_name='FederatedQuery.QueryMeta.has_saved_checkpoints', index=13, + number=13, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _QUERYMETA_COMPUTESTATUS, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='action', full_name='FederatedQuery.QueryMeta.action', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=2154, + serialized_end=2985, +) + + +_BRIEFQUERY = _descriptor.Descriptor( + name='BriefQuery', + full_name='FederatedQuery.BriefQuery', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='type', full_name='FederatedQuery.BriefQuery.type', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='name', full_name='FederatedQuery.BriefQuery.name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='meta', full_name='FederatedQuery.BriefQuery.meta', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='visibility', full_name='FederatedQuery.BriefQuery.visibility', index=3, + number=4, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='automatic', full_name='FederatedQuery.BriefQuery.automatic', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2988, + serialized_end=3189, +) + + +_QUERYPLAN = _descriptor.Descriptor( + name='QueryPlan', + full_name='FederatedQuery.QueryPlan', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='json', full_name='FederatedQuery.QueryPlan.json', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3191, + serialized_end=3216, +) + + +_QUERYAST = _descriptor.Descriptor( + name='QueryAst', + full_name='FederatedQuery.QueryAst', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='data', full_name='FederatedQuery.QueryAst.data', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3218, + serialized_end=3242, +) + + +_RESULTSETMETA = _descriptor.Descriptor( + name='ResultSetMeta', + full_name='FederatedQuery.ResultSetMeta', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='column', full_name='FederatedQuery.ResultSetMeta.column', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='rows_count', full_name='FederatedQuery.ResultSetMeta.rows_count', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='truncated', full_name='FederatedQuery.ResultSetMeta.truncated', index=2, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3244, + serialized_end=3337, +) + + +_QUERY = _descriptor.Descriptor( + name='Query', + full_name='FederatedQuery.Query', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='meta', full_name='FederatedQuery.Query.meta', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='content', full_name='FederatedQuery.Query.content', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='plan', full_name='FederatedQuery.Query.plan', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='issue', full_name='FederatedQuery.Query.issue', index=3, + number=4, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='transient_issue', full_name='FederatedQuery.Query.transient_issue', index=4, + number=5, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='statistics', full_name='FederatedQuery.Query.statistics', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='result_set_meta', full_name='FederatedQuery.Query.result_set_meta', index=6, + number=7, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='ast', full_name='FederatedQuery.Query.ast', index=7, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3340, + serialized_end=3714, +) + + +_QUERYSTATISTICS = _descriptor.Descriptor( + name='QueryStatistics', + full_name='FederatedQuery.QueryStatistics', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='json', full_name='FederatedQuery.QueryStatistics.json', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3716, + serialized_end=3747, +) + + +_CREATEQUERYREQUEST = _descriptor.Descriptor( + name='CreateQueryRequest', + full_name='FederatedQuery.CreateQueryRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.CreateQueryRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='content', full_name='FederatedQuery.CreateQueryRequest.content', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='execute_mode', full_name='FederatedQuery.CreateQueryRequest.execute_mode', index=2, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='disposition', full_name='FederatedQuery.CreateQueryRequest.disposition', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='idempotency_key', full_name='FederatedQuery.CreateQueryRequest.idempotency_key', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3750, + serialized_end=4020, +) + + +_CREATEQUERYRESPONSE = _descriptor.Descriptor( + name='CreateQueryResponse', + full_name='FederatedQuery.CreateQueryResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.CreateQueryResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4022, + serialized_end=4089, +) + + +_CREATEQUERYRESULT = _descriptor.Descriptor( + name='CreateQueryResult', + full_name='FederatedQuery.CreateQueryResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='query_id', full_name='FederatedQuery.CreateQueryResult.query_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4091, + serialized_end=4137, +) + + +_LISTQUERIESREQUEST_FILTER = _descriptor.Descriptor( + name='Filter', + full_name='FederatedQuery.ListQueriesRequest.Filter', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='query_type', full_name='FederatedQuery.ListQueriesRequest.Filter.query_type', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='status', full_name='FederatedQuery.ListQueriesRequest.Filter.status', index=1, + number=2, type=14, cpp_type=8, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\232\346*\002\030\024', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='mode', full_name='FederatedQuery.ListQueriesRequest.Filter.mode', index=2, + number=3, type=14, cpp_type=8, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\232\346*\002\030\024', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='name', full_name='FederatedQuery.ListQueriesRequest.Filter.name', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='created_by_me', full_name='FederatedQuery.ListQueriesRequest.Filter.created_by_me', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='visibility', full_name='FederatedQuery.ListQueriesRequest.Filter.visibility', index=5, + number=6, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='automatic', full_name='FederatedQuery.ListQueriesRequest.Filter.automatic', index=6, + number=7, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4339, + serialized_end=4671, +) + +_LISTQUERIESREQUEST = _descriptor.Descriptor( + name='ListQueriesRequest', + full_name='FederatedQuery.ListQueriesRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.ListQueriesRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_token', full_name='FederatedQuery.ListQueriesRequest.page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='limit', full_name='FederatedQuery.ListQueriesRequest.limit', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\010[1; 100]', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='filter', full_name='FederatedQuery.ListQueriesRequest.filter', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_LISTQUERIESREQUEST_FILTER, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4140, + serialized_end=4671, +) + + +_LISTQUERIESRESPONSE = _descriptor.Descriptor( + name='ListQueriesResponse', + full_name='FederatedQuery.ListQueriesResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.ListQueriesResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4673, + serialized_end=4740, +) + + +_LISTQUERIESRESULT = _descriptor.Descriptor( + name='ListQueriesResult', + full_name='FederatedQuery.ListQueriesResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='query', full_name='FederatedQuery.ListQueriesResult.query', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='next_page_token', full_name='FederatedQuery.ListQueriesResult.next_page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4742, + serialized_end=4838, +) + + +_DESCRIBEQUERYREQUEST = _descriptor.Descriptor( + name='DescribeQueryRequest', + full_name='FederatedQuery.DescribeQueryRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.DescribeQueryRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='query_id', full_name='FederatedQuery.DescribeQueryRequest.query_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4840, + serialized_end=4952, +) + + +_DESCRIBEQUERYRESPONSE = _descriptor.Descriptor( + name='DescribeQueryResponse', + full_name='FederatedQuery.DescribeQueryResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.DescribeQueryResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4954, + serialized_end=5023, +) + + +_DESCRIBEQUERYRESULT = _descriptor.Descriptor( + name='DescribeQueryResult', + full_name='FederatedQuery.DescribeQueryResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='query', full_name='FederatedQuery.DescribeQueryResult.query', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5025, + serialized_end=5084, +) + + +_GETQUERYSTATUSREQUEST = _descriptor.Descriptor( + name='GetQueryStatusRequest', + full_name='FederatedQuery.GetQueryStatusRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.GetQueryStatusRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='query_id', full_name='FederatedQuery.GetQueryStatusRequest.query_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5086, + serialized_end=5199, +) + + +_GETQUERYSTATUSRESPONSE = _descriptor.Descriptor( + name='GetQueryStatusResponse', + full_name='FederatedQuery.GetQueryStatusResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.GetQueryStatusResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5201, + serialized_end=5271, +) + + +_GETQUERYSTATUSRESULT = _descriptor.Descriptor( + name='GetQueryStatusResult', + full_name='FederatedQuery.GetQueryStatusResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='status', full_name='FederatedQuery.GetQueryStatusResult.status', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='meta_revision', full_name='FederatedQuery.GetQueryStatusResult.meta_revision', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5273, + serialized_end=5375, +) + + +_DELETEQUERYREQUEST = _descriptor.Descriptor( + name='DeleteQueryRequest', + full_name='FederatedQuery.DeleteQueryRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.DeleteQueryRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='query_id', full_name='FederatedQuery.DeleteQueryRequest.query_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='previous_revision', full_name='FederatedQuery.DeleteQueryRequest.previous_revision', index=2, + number=3, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='idempotency_key', full_name='FederatedQuery.DeleteQueryRequest.idempotency_key', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5378, + serialized_end=5559, +) + + +_DELETEQUERYRESPONSE = _descriptor.Descriptor( + name='DeleteQueryResponse', + full_name='FederatedQuery.DeleteQueryResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.DeleteQueryResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5561, + serialized_end=5628, +) + + +_DELETEQUERYRESULT = _descriptor.Descriptor( + name='DeleteQueryResult', + full_name='FederatedQuery.DeleteQueryResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5630, + serialized_end=5649, +) + + +_MODIFYQUERYREQUEST = _descriptor.Descriptor( + name='ModifyQueryRequest', + full_name='FederatedQuery.ModifyQueryRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.ModifyQueryRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='query_id', full_name='FederatedQuery.ModifyQueryRequest.query_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='content', full_name='FederatedQuery.ModifyQueryRequest.content', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='execute_mode', full_name='FederatedQuery.ModifyQueryRequest.execute_mode', index=3, + number=4, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='disposition', full_name='FederatedQuery.ModifyQueryRequest.disposition', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='state_load_mode', full_name='FederatedQuery.ModifyQueryRequest.state_load_mode', index=5, + number=6, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='previous_revision', full_name='FederatedQuery.ModifyQueryRequest.previous_revision', index=6, + number=7, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='idempotency_key', full_name='FederatedQuery.ModifyQueryRequest.idempotency_key', index=7, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5652, + serialized_end=6046, +) + + +_MODIFYQUERYRESPONSE = _descriptor.Descriptor( + name='ModifyQueryResponse', + full_name='FederatedQuery.ModifyQueryResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.ModifyQueryResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=6048, + serialized_end=6115, +) + + +_MODIFYQUERYRESULT = _descriptor.Descriptor( + name='ModifyQueryResult', + full_name='FederatedQuery.ModifyQueryResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=6117, + serialized_end=6136, +) + + +_CONTROLQUERYREQUEST = _descriptor.Descriptor( + name='ControlQueryRequest', + full_name='FederatedQuery.ControlQueryRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.ControlQueryRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='query_id', full_name='FederatedQuery.ControlQueryRequest.query_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='action', full_name='FederatedQuery.ControlQueryRequest.action', index=2, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='previous_revision', full_name='FederatedQuery.ControlQueryRequest.previous_revision', index=3, + number=4, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='idempotency_key', full_name='FederatedQuery.ControlQueryRequest.idempotency_key', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=6139, + serialized_end=6366, +) + + +_CONTROLQUERYRESPONSE = _descriptor.Descriptor( + name='ControlQueryResponse', + full_name='FederatedQuery.ControlQueryResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.ControlQueryResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=6368, + serialized_end=6436, +) + + +_CONTROLQUERYRESULT = _descriptor.Descriptor( + name='ControlQueryResult', + full_name='FederatedQuery.ControlQueryResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=6438, + serialized_end=6458, +) + + +_BRIEFJOB = _descriptor.Descriptor( + name='BriefJob', + full_name='FederatedQuery.BriefJob', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='meta', full_name='FederatedQuery.BriefJob.meta', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='query_meta', full_name='FederatedQuery.BriefJob.query_meta', index=1, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='query_name', full_name='FederatedQuery.BriefJob.query_name', index=2, + number=9, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='visibility', full_name='FederatedQuery.BriefJob.visibility', index=3, + number=10, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='automatic', full_name='FederatedQuery.BriefJob.automatic', index=4, + number=11, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='expire_at', full_name='FederatedQuery.BriefJob.expire_at', index=5, + number=12, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=6461, + serialized_end=6698, +) + + +_JOB = _descriptor.Descriptor( + name='Job', + full_name='FederatedQuery.Job', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='meta', full_name='FederatedQuery.Job.meta', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='text', full_name='FederatedQuery.Job.text', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='query_meta', full_name='FederatedQuery.Job.query_meta', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='plan', full_name='FederatedQuery.Job.plan', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='issue', full_name='FederatedQuery.Job.issue', index=4, + number=5, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='statistics', full_name='FederatedQuery.Job.statistics', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='result_set_meta', full_name='FederatedQuery.Job.result_set_meta', index=6, + number=7, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='ast', full_name='FederatedQuery.Job.ast', index=7, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='query_name', full_name='FederatedQuery.Job.query_name', index=8, + number=9, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='acl', full_name='FederatedQuery.Job.acl', index=9, + number=10, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='automatic', full_name='FederatedQuery.Job.automatic', index=10, + number=11, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='expire_at', full_name='FederatedQuery.Job.expire_at', index=11, + number=12, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='syntax', full_name='FederatedQuery.Job.syntax', index=12, + number=13, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=6701, + serialized_end=7216, +) + + +_LISTJOBSREQUEST_FILTER = _descriptor.Descriptor( + name='Filter', + full_name='FederatedQuery.ListJobsRequest.Filter', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='query_id', full_name='FederatedQuery.ListJobsRequest.Filter.query_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='created_by_me', full_name='FederatedQuery.ListJobsRequest.Filter.created_by_me', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=7429, + serialized_end=7487, +) + +_LISTJOBSREQUEST = _descriptor.Descriptor( + name='ListJobsRequest', + full_name='FederatedQuery.ListJobsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.ListJobsRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_token', full_name='FederatedQuery.ListJobsRequest.page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='limit', full_name='FederatedQuery.ListJobsRequest.limit', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\010[1; 100]', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='query_id', full_name='FederatedQuery.ListJobsRequest.query_id', index=3, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='filter', full_name='FederatedQuery.ListJobsRequest.filter', index=4, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_LISTJOBSREQUEST_FILTER, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=7219, + serialized_end=7487, +) + + +_LISTJOBSRESPONSE = _descriptor.Descriptor( + name='ListJobsResponse', + full_name='FederatedQuery.ListJobsResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.ListJobsResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=7489, + serialized_end=7553, +) + + +_LISTJOBSRESULT = _descriptor.Descriptor( + name='ListJobsResult', + full_name='FederatedQuery.ListJobsResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='job', full_name='FederatedQuery.ListJobsResult.job', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='next_page_token', full_name='FederatedQuery.ListJobsResult.next_page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=7555, + serialized_end=7644, +) + + +_DESCRIBEJOBREQUEST = _descriptor.Descriptor( + name='DescribeJobRequest', + full_name='FederatedQuery.DescribeJobRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.DescribeJobRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='job_id', full_name='FederatedQuery.DescribeJobRequest.job_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=7646, + serialized_end=7754, +) + + +_DESCRIBEJOBRESPONSE = _descriptor.Descriptor( + name='DescribeJobResponse', + full_name='FederatedQuery.DescribeJobResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.DescribeJobResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=7756, + serialized_end=7823, +) + + +_DESCRIBEJOBRESULT = _descriptor.Descriptor( + name='DescribeJobResult', + full_name='FederatedQuery.DescribeJobResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='job', full_name='FederatedQuery.DescribeJobResult.job', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=7825, + serialized_end=7878, +) + + +_CURRENTIAMTOKENAUTH = _descriptor.Descriptor( + name='CurrentIAMTokenAuth', + full_name='FederatedQuery.CurrentIAMTokenAuth', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=7880, + serialized_end=7901, +) + + +_NONEAUTH = _descriptor.Descriptor( + name='NoneAuth', + full_name='FederatedQuery.NoneAuth', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=7903, + serialized_end=7913, +) + + +_SERVICEACCOUNTAUTH = _descriptor.Descriptor( + name='ServiceAccountAuth', + full_name='FederatedQuery.ServiceAccountAuth', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='FederatedQuery.ServiceAccountAuth.id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=7915, + serialized_end=7956, +) + + +_IAMAUTH = _descriptor.Descriptor( + name='IamAuth', + full_name='FederatedQuery.IamAuth', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='current_iam', full_name='FederatedQuery.IamAuth.current_iam', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='service_account', full_name='FederatedQuery.IamAuth.service_account', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='none', full_name='FederatedQuery.IamAuth.none', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='identity', full_name='FederatedQuery.IamAuth.identity', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=7959, + serialized_end=8145, +) + + +_DATASTREAMS = _descriptor.Descriptor( + name='DataStreams', + full_name='FederatedQuery.DataStreams', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='database_id', full_name='FederatedQuery.DataStreams.database_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auth', full_name='FederatedQuery.DataStreams.auth', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='endpoint', full_name='FederatedQuery.DataStreams.endpoint', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='database', full_name='FederatedQuery.DataStreams.database', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='secure', full_name='FederatedQuery.DataStreams.secure', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=8148, + serialized_end=8300, +) + + +_MONITORING = _descriptor.Descriptor( + name='Monitoring', + full_name='FederatedQuery.Monitoring', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='project', full_name='FederatedQuery.Monitoring.project', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\310\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='cluster', full_name='FederatedQuery.Monitoring.cluster', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\310\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auth', full_name='FederatedQuery.Monitoring.auth', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=8302, + serialized_end=8405, +) + + +_YDBDATABASE = _descriptor.Descriptor( + name='YdbDatabase', + full_name='FederatedQuery.YdbDatabase', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='database_id', full_name='FederatedQuery.YdbDatabase.database_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auth', full_name='FederatedQuery.YdbDatabase.auth', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='endpoint', full_name='FederatedQuery.YdbDatabase.endpoint', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='database', full_name='FederatedQuery.YdbDatabase.database', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='secure', full_name='FederatedQuery.YdbDatabase.secure', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=8408, + serialized_end=8560, +) + + +_CLICKHOUSECLUSTER = _descriptor.Descriptor( + name='ClickHouseCluster', + full_name='FederatedQuery.ClickHouseCluster', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='database_id', full_name='FederatedQuery.ClickHouseCluster.database_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='database_name', full_name='FederatedQuery.ClickHouseCluster.database_name', index=1, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='login', full_name='FederatedQuery.ClickHouseCluster.login', index=2, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='password', full_name='FederatedQuery.ClickHouseCluster.password', index=3, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auth', full_name='FederatedQuery.ClickHouseCluster.auth', index=4, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='host', full_name='FederatedQuery.ClickHouseCluster.host', index=5, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='port', full_name='FederatedQuery.ClickHouseCluster.port', index=6, + number=6, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\n[0; 65536]', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='secure', full_name='FederatedQuery.ClickHouseCluster.secure', index=7, + number=7, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=8563, + serialized_end=8811, +) + + +_OBJECTSTORAGECONNECTION = _descriptor.Descriptor( + name='ObjectStorageConnection', + full_name='FederatedQuery.ObjectStorageConnection', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='bucket', full_name='FederatedQuery.ObjectStorageConnection.bucket', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auth', full_name='FederatedQuery.ObjectStorageConnection.auth', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=8813, + serialized_end=8902, +) + + +_POSTGRESQLCLUSTER = _descriptor.Descriptor( + name='PostgreSQLCluster', + full_name='FederatedQuery.PostgreSQLCluster', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='database_id', full_name='FederatedQuery.PostgreSQLCluster.database_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='database_name', full_name='FederatedQuery.PostgreSQLCluster.database_name', index=1, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='login', full_name='FederatedQuery.PostgreSQLCluster.login', index=2, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='password', full_name='FederatedQuery.PostgreSQLCluster.password', index=3, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='schema', full_name='FederatedQuery.PostgreSQLCluster.schema', index=4, + number=9, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auth', full_name='FederatedQuery.PostgreSQLCluster.auth', index=5, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='host', full_name='FederatedQuery.PostgreSQLCluster.host', index=6, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='port', full_name='FederatedQuery.PostgreSQLCluster.port', index=7, + number=6, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\n[0; 65536]', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='secure', full_name='FederatedQuery.PostgreSQLCluster.secure', index=8, + number=7, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=8905, + serialized_end=9178, +) + + +_CONNECTIONSETTING = _descriptor.Descriptor( + name='ConnectionSetting', + full_name='FederatedQuery.ConnectionSetting', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='ydb_database', full_name='FederatedQuery.ConnectionSetting.ydb_database', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='clickhouse_cluster', full_name='FederatedQuery.ConnectionSetting.clickhouse_cluster', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='data_streams', full_name='FederatedQuery.ConnectionSetting.data_streams', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='object_storage', full_name='FederatedQuery.ConnectionSetting.object_storage', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='monitoring', full_name='FederatedQuery.ConnectionSetting.monitoring', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='postgresql_cluster', full_name='FederatedQuery.ConnectionSetting.postgresql_cluster', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _CONNECTIONSETTING_CONNECTIONTYPE, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='connection', full_name='FederatedQuery.ConnectionSetting.connection', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=9181, + serialized_end=9739, +) + + +_CONNECTIONCONTENT = _descriptor.Descriptor( + name='ConnectionContent', + full_name='FederatedQuery.ConnectionContent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='FederatedQuery.ConnectionContent.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='setting', full_name='FederatedQuery.ConnectionContent.setting', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='acl', full_name='FederatedQuery.ConnectionContent.acl', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='description', full_name='FederatedQuery.ConnectionContent.description', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200P', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=9742, + serialized_end=9904, +) + + +_CONNECTION = _descriptor.Descriptor( + name='Connection', + full_name='FederatedQuery.Connection', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='content', full_name='FederatedQuery.Connection.content', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='meta', full_name='FederatedQuery.Connection.meta', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=9906, + serialized_end=10012, +) + + +_CREATECONNECTIONREQUEST = _descriptor.Descriptor( + name='CreateConnectionRequest', + full_name='FederatedQuery.CreateConnectionRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.CreateConnectionRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='content', full_name='FederatedQuery.CreateConnectionRequest.content', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='idempotency_key', full_name='FederatedQuery.CreateConnectionRequest.idempotency_key', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10015, + serialized_end=10185, +) + + +_CREATECONNECTIONRESPONSE = _descriptor.Descriptor( + name='CreateConnectionResponse', + full_name='FederatedQuery.CreateConnectionResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.CreateConnectionResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10187, + serialized_end=10259, +) + + +_CREATECONNECTIONRESULT = _descriptor.Descriptor( + name='CreateConnectionResult', + full_name='FederatedQuery.CreateConnectionResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='connection_id', full_name='FederatedQuery.CreateConnectionResult.connection_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10261, + serialized_end=10321, +) + + +_LISTCONNECTIONSREQUEST_FILTER = _descriptor.Descriptor( + name='Filter', + full_name='FederatedQuery.ListConnectionsRequest.Filter', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='FederatedQuery.ListConnectionsRequest.Filter.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='created_by_me', full_name='FederatedQuery.ListConnectionsRequest.Filter.created_by_me', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='connection_type', full_name='FederatedQuery.ListConnectionsRequest.Filter.connection_type', index=2, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='visibility', full_name='FederatedQuery.ListConnectionsRequest.Filter.visibility', index=3, + number=4, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10531, + serialized_end=10712, +) + +_LISTCONNECTIONSREQUEST = _descriptor.Descriptor( + name='ListConnectionsRequest', + full_name='FederatedQuery.ListConnectionsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.ListConnectionsRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_token', full_name='FederatedQuery.ListConnectionsRequest.page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='limit', full_name='FederatedQuery.ListConnectionsRequest.limit', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\010[1; 100]', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='filter', full_name='FederatedQuery.ListConnectionsRequest.filter', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_LISTCONNECTIONSREQUEST_FILTER, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10324, + serialized_end=10712, +) + + +_LISTCONNECTIONSRESPONSE = _descriptor.Descriptor( + name='ListConnectionsResponse', + full_name='FederatedQuery.ListConnectionsResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.ListConnectionsResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10714, + serialized_end=10785, +) + + +_LISTCONNECTIONSRESULT = _descriptor.Descriptor( + name='ListConnectionsResult', + full_name='FederatedQuery.ListConnectionsResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='connection', full_name='FederatedQuery.ListConnectionsResult.connection', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='next_page_token', full_name='FederatedQuery.ListConnectionsResult.next_page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10787, + serialized_end=10892, +) + + +_DESCRIBECONNECTIONREQUEST = _descriptor.Descriptor( + name='DescribeConnectionRequest', + full_name='FederatedQuery.DescribeConnectionRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.DescribeConnectionRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='connection_id', full_name='FederatedQuery.DescribeConnectionRequest.connection_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10894, + serialized_end=11016, +) + + +_DESCRIBECONNECTIONRESPONSE = _descriptor.Descriptor( + name='DescribeConnectionResponse', + full_name='FederatedQuery.DescribeConnectionResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.DescribeConnectionResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=11018, + serialized_end=11092, +) + + +_DESCRIBECONNECTIONRESULT = _descriptor.Descriptor( + name='DescribeConnectionResult', + full_name='FederatedQuery.DescribeConnectionResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='connection', full_name='FederatedQuery.DescribeConnectionResult.connection', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=11094, + serialized_end=11168, +) + + +_MODIFYCONNECTIONREQUEST = _descriptor.Descriptor( + name='ModifyConnectionRequest', + full_name='FederatedQuery.ModifyConnectionRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.ModifyConnectionRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='connection_id', full_name='FederatedQuery.ModifyConnectionRequest.connection_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='content', full_name='FederatedQuery.ModifyConnectionRequest.content', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='previous_revision', full_name='FederatedQuery.ModifyConnectionRequest.previous_revision', index=3, + number=4, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='idempotency_key', full_name='FederatedQuery.ModifyConnectionRequest.idempotency_key', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=11171, + serialized_end=11414, +) + + +_MODIFYCONNECTIONRESPONSE = _descriptor.Descriptor( + name='ModifyConnectionResponse', + full_name='FederatedQuery.ModifyConnectionResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.ModifyConnectionResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=11416, + serialized_end=11488, +) + + +_MODIFYCONNECTIONRESULT = _descriptor.Descriptor( + name='ModifyConnectionResult', + full_name='FederatedQuery.ModifyConnectionResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=11490, + serialized_end=11514, +) + + +_DELETECONNECTIONREQUEST = _descriptor.Descriptor( + name='DeleteConnectionRequest', + full_name='FederatedQuery.DeleteConnectionRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.DeleteConnectionRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='connection_id', full_name='FederatedQuery.DeleteConnectionRequest.connection_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='previous_revision', full_name='FederatedQuery.DeleteConnectionRequest.previous_revision', index=2, + number=3, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='idempotency_key', full_name='FederatedQuery.DeleteConnectionRequest.idempotency_key', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=11517, + serialized_end=11708, +) + + +_DELETECONNECTIONRESPONSE = _descriptor.Descriptor( + name='DeleteConnectionResponse', + full_name='FederatedQuery.DeleteConnectionResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.DeleteConnectionResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=11710, + serialized_end=11782, +) + + +_DELETECONNECTIONRESULT = _descriptor.Descriptor( + name='DeleteConnectionResult', + full_name='FederatedQuery.DeleteConnectionResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=11784, + serialized_end=11808, +) + + +_TESTCONNECTIONREQUEST = _descriptor.Descriptor( + name='TestConnectionRequest', + full_name='FederatedQuery.TestConnectionRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.TestConnectionRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='setting', full_name='FederatedQuery.TestConnectionRequest.setting', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=11811, + serialized_end=11945, +) + + +_TESTCONNECTIONRESPONSE = _descriptor.Descriptor( + name='TestConnectionResponse', + full_name='FederatedQuery.TestConnectionResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.TestConnectionResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=11947, + serialized_end=12017, +) + + +_TESTCONNECTIONRESULT = _descriptor.Descriptor( + name='TestConnectionResult', + full_name='FederatedQuery.TestConnectionResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=12019, + serialized_end=12041, +) + + +_GETRESULTDATAREQUEST = _descriptor.Descriptor( + name='GetResultDataRequest', + full_name='FederatedQuery.GetResultDataRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.GetResultDataRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='query_id', full_name='FederatedQuery.GetResultDataRequest.query_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='result_set_index', full_name='FederatedQuery.GetResultDataRequest.result_set_index', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='offset', full_name='FederatedQuery.GetResultDataRequest.offset', index=3, + number=4, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='limit', full_name='FederatedQuery.GetResultDataRequest.limit', index=4, + number=5, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\t[1; 1000]', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=12044, + serialized_end=12248, +) + + +_GETRESULTDATARESPONSE = _descriptor.Descriptor( + name='GetResultDataResponse', + full_name='FederatedQuery.GetResultDataResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.GetResultDataResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=12250, + serialized_end=12319, +) + + +_GETRESULTDATARESULT = _descriptor.Descriptor( + name='GetResultDataResult', + full_name='FederatedQuery.GetResultDataResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='result_set', full_name='FederatedQuery.GetResultDataResult.result_set', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=12321, + serialized_end=12378, +) + + +_SCHEMA = _descriptor.Descriptor( + name='Schema', + full_name='FederatedQuery.Schema', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='column', full_name='FederatedQuery.Schema.column', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\232\346*\003\030\350\007', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=12380, + serialized_end=12426, +) + + +_DATASTREAMSBINDING_FORMATSETTINGENTRY = _descriptor.Descriptor( + name='FormatSettingEntry', + full_name='FederatedQuery.DataStreamsBinding.FormatSettingEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='FederatedQuery.DataStreamsBinding.FormatSettingEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='FederatedQuery.DataStreamsBinding.FormatSettingEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=b'8\001', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=12667, + serialized_end=12719, +) + +_DATASTREAMSBINDING = _descriptor.Descriptor( + name='DataStreamsBinding', + full_name='FederatedQuery.DataStreamsBinding', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='stream_name', full_name='FederatedQuery.DataStreamsBinding.stream_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='format', full_name='FederatedQuery.DataStreamsBinding.format', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='compression', full_name='FederatedQuery.DataStreamsBinding.compression', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='schema', full_name='FederatedQuery.DataStreamsBinding.schema', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='format_setting', full_name='FederatedQuery.DataStreamsBinding.format_setting', index=4, + number=5, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\232\346*\002\030d', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_DATASTREAMSBINDING_FORMATSETTINGENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=12429, + serialized_end=12719, +) + + +_OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY = _descriptor.Descriptor( + name='FormatSettingEntry', + full_name='FederatedQuery.ObjectStorageBinding.Subset.FormatSettingEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='FederatedQuery.ObjectStorageBinding.Subset.FormatSettingEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='FederatedQuery.ObjectStorageBinding.Subset.FormatSettingEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=b'8\001', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=12667, + serialized_end=12719, +) + +_OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY = _descriptor.Descriptor( + name='ProjectionEntry', + full_name='FederatedQuery.ObjectStorageBinding.Subset.ProjectionEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='FederatedQuery.ObjectStorageBinding.Subset.ProjectionEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='FederatedQuery.ObjectStorageBinding.Subset.ProjectionEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=b'8\001', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=13203, + serialized_end=13252, +) + +_OBJECTSTORAGEBINDING_SUBSET = _descriptor.Descriptor( + name='Subset', + full_name='FederatedQuery.ObjectStorageBinding.Subset', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='path_pattern', full_name='FederatedQuery.ObjectStorageBinding.Subset.path_pattern', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='format', full_name='FederatedQuery.ObjectStorageBinding.Subset.format', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='format_setting', full_name='FederatedQuery.ObjectStorageBinding.Subset.format_setting', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\232\346*\002\030d', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='compression', full_name='FederatedQuery.ObjectStorageBinding.Subset.compression', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='schema', full_name='FederatedQuery.ObjectStorageBinding.Subset.schema', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='projection', full_name='FederatedQuery.ObjectStorageBinding.Subset.projection', index=5, + number=6, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partitioned_by', full_name='FederatedQuery.ObjectStorageBinding.Subset.partitioned_by', index=6, + number=7, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY, _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=12808, + serialized_end=13252, +) + +_OBJECTSTORAGEBINDING = _descriptor.Descriptor( + name='ObjectStorageBinding', + full_name='FederatedQuery.ObjectStorageBinding', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='subset', full_name='FederatedQuery.ObjectStorageBinding.subset', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_OBJECTSTORAGEBINDING_SUBSET, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=12722, + serialized_end=13252, +) + + +_BINDINGSETTING = _descriptor.Descriptor( + name='BindingSetting', + full_name='FederatedQuery.BindingSetting', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='data_streams', full_name='FederatedQuery.BindingSetting.data_streams', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='object_storage', full_name='FederatedQuery.BindingSetting.object_storage', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _BINDINGSETTING_BINDINGTYPE, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='binding', full_name='FederatedQuery.BindingSetting.binding', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=13255, + serialized_end=13489, +) + + +_BRIEFBINDING = _descriptor.Descriptor( + name='BriefBinding', + full_name='FederatedQuery.BriefBinding', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='FederatedQuery.BriefBinding.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='connection_id', full_name='FederatedQuery.BriefBinding.connection_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='meta', full_name='FederatedQuery.BriefBinding.meta', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='type', full_name='FederatedQuery.BriefBinding.type', index=3, + number=4, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='visibility', full_name='FederatedQuery.BriefBinding.visibility', index=4, + number=5, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=13492, + serialized_end=13721, +) + + +_BINDINGCONTENT = _descriptor.Descriptor( + name='BindingContent', + full_name='FederatedQuery.BindingContent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='FederatedQuery.BindingContent.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='connection_id', full_name='FederatedQuery.BindingContent.connection_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='setting', full_name='FederatedQuery.BindingContent.setting', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='acl', full_name='FederatedQuery.BindingContent.acl', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='description', full_name='FederatedQuery.BindingContent.description', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200P', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=13724, + serialized_end=13916, +) + + +_BINDING = _descriptor.Descriptor( + name='Binding', + full_name='FederatedQuery.Binding', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='content', full_name='FederatedQuery.Binding.content', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='meta', full_name='FederatedQuery.Binding.meta', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=13918, + serialized_end=14018, +) + + +_CREATEBINDINGREQUEST = _descriptor.Descriptor( + name='CreateBindingRequest', + full_name='FederatedQuery.CreateBindingRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.CreateBindingRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='content', full_name='FederatedQuery.CreateBindingRequest.content', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='idempotency_key', full_name='FederatedQuery.CreateBindingRequest.idempotency_key', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=14021, + serialized_end=14185, +) + + +_CREATEBINDINGRESPONSE = _descriptor.Descriptor( + name='CreateBindingResponse', + full_name='FederatedQuery.CreateBindingResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.CreateBindingResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=14187, + serialized_end=14256, +) + + +_CREATEBINDINGRESULT = _descriptor.Descriptor( + name='CreateBindingResult', + full_name='FederatedQuery.CreateBindingResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='binding_id', full_name='FederatedQuery.CreateBindingResult.binding_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=14258, + serialized_end=14312, +) + + +_LISTBINDINGSREQUEST_FILTER = _descriptor.Descriptor( + name='Filter', + full_name='FederatedQuery.ListBindingsRequest.Filter', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='connection_id', full_name='FederatedQuery.ListBindingsRequest.Filter.connection_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='name', full_name='FederatedQuery.ListBindingsRequest.Filter.name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='created_by_me', full_name='FederatedQuery.ListBindingsRequest.Filter.created_by_me', index=2, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='visibility', full_name='FederatedQuery.ListBindingsRequest.Filter.visibility', index=3, + number=4, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=14516, + serialized_end=14654, +) + +_LISTBINDINGSREQUEST = _descriptor.Descriptor( + name='ListBindingsRequest', + full_name='FederatedQuery.ListBindingsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.ListBindingsRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_token', full_name='FederatedQuery.ListBindingsRequest.page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='limit', full_name='FederatedQuery.ListBindingsRequest.limit', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\010[1; 100]', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='filter', full_name='FederatedQuery.ListBindingsRequest.filter', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_LISTBINDINGSREQUEST_FILTER, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=14315, + serialized_end=14654, +) + + +_LISTBINDINGSRESPONSE = _descriptor.Descriptor( + name='ListBindingsResponse', + full_name='FederatedQuery.ListBindingsResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.ListBindingsResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=14656, + serialized_end=14724, +) + + +_LISTBINDINGSRESULT = _descriptor.Descriptor( + name='ListBindingsResult', + full_name='FederatedQuery.ListBindingsResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='binding', full_name='FederatedQuery.ListBindingsResult.binding', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='next_page_token', full_name='FederatedQuery.ListBindingsResult.next_page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=14726, + serialized_end=14827, +) + + +_DESCRIBEBINDINGREQUEST = _descriptor.Descriptor( + name='DescribeBindingRequest', + full_name='FederatedQuery.DescribeBindingRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.DescribeBindingRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='binding_id', full_name='FederatedQuery.DescribeBindingRequest.binding_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=14829, + serialized_end=14945, +) + + +_DESCRIBEBINDINGRESPONSE = _descriptor.Descriptor( + name='DescribeBindingResponse', + full_name='FederatedQuery.DescribeBindingResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.DescribeBindingResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=14947, + serialized_end=15018, +) + + +_DESCRIBEBINDINGRESULT = _descriptor.Descriptor( + name='DescribeBindingResult', + full_name='FederatedQuery.DescribeBindingResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='binding', full_name='FederatedQuery.DescribeBindingResult.binding', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=15020, + serialized_end=15085, +) + + +_MODIFYBINDINGREQUEST = _descriptor.Descriptor( + name='ModifyBindingRequest', + full_name='FederatedQuery.ModifyBindingRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.ModifyBindingRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='binding_id', full_name='FederatedQuery.ModifyBindingRequest.binding_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='content', full_name='FederatedQuery.ModifyBindingRequest.content', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='previous_revision', full_name='FederatedQuery.ModifyBindingRequest.previous_revision', index=3, + number=4, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='idempotency_key', full_name='FederatedQuery.ModifyBindingRequest.idempotency_key', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=15088, + serialized_end=15322, +) + + +_MODIFYBINDINGRESPONSE = _descriptor.Descriptor( + name='ModifyBindingResponse', + full_name='FederatedQuery.ModifyBindingResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.ModifyBindingResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=15324, + serialized_end=15393, +) + + +_MODIFYBINDINGRESULT = _descriptor.Descriptor( + name='ModifyBindingResult', + full_name='FederatedQuery.ModifyBindingResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=15395, + serialized_end=15416, +) + + +_DELETEBINDINGREQUEST = _descriptor.Descriptor( + name='DeleteBindingRequest', + full_name='FederatedQuery.DeleteBindingRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='FederatedQuery.DeleteBindingRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='binding_id', full_name='FederatedQuery.DeleteBindingRequest.binding_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\007\n\005\010\001\020\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='previous_revision', full_name='FederatedQuery.DeleteBindingRequest.previous_revision', index=2, + number=3, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='idempotency_key', full_name='FederatedQuery.DeleteBindingRequest.idempotency_key', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=15419, + serialized_end=15604, +) + + +_DELETEBINDINGRESPONSE = _descriptor.Descriptor( + name='DeleteBindingResponse', + full_name='FederatedQuery.DeleteBindingResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='FederatedQuery.DeleteBindingResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=15606, + serialized_end=15675, +) + + +_DELETEBINDINGRESULT = _descriptor.Descriptor( + name='DeleteBindingResult', + full_name='FederatedQuery.DeleteBindingResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=15677, + serialized_end=15698, +) + +_ACL.fields_by_name['visibility'].enum_type = _ACL_VISIBILITY +_ACL_VISIBILITY.containing_type = _ACL +_LIMITS.fields_by_name['result_ttl'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +_LIMITS.fields_by_name['execution_timeout'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +_LIMITS.fields_by_name['execution_deadline'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LIMITS.oneofs_by_name['timeout'].fields.append( + _LIMITS.fields_by_name['execution_timeout']) +_LIMITS.fields_by_name['execution_timeout'].containing_oneof = _LIMITS.oneofs_by_name['timeout'] +_LIMITS.oneofs_by_name['timeout'].fields.append( + _LIMITS.fields_by_name['execution_deadline']) +_LIMITS.fields_by_name['execution_deadline'].containing_oneof = _LIMITS.oneofs_by_name['timeout'] +_STREAMINGDISPOSITION_FROMTIME.fields_by_name['timestamp'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_STREAMINGDISPOSITION_FROMTIME.containing_type = _STREAMINGDISPOSITION +_STREAMINGDISPOSITION_TIMEAGO.fields_by_name['duration'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +_STREAMINGDISPOSITION_TIMEAGO.containing_type = _STREAMINGDISPOSITION +_STREAMINGDISPOSITION_FROMLASTCHECKPOINT.containing_type = _STREAMINGDISPOSITION +_STREAMINGDISPOSITION.fields_by_name['oldest'].message_type = google_dot_protobuf_dot_empty__pb2._EMPTY +_STREAMINGDISPOSITION.fields_by_name['fresh'].message_type = google_dot_protobuf_dot_empty__pb2._EMPTY +_STREAMINGDISPOSITION.fields_by_name['from_time'].message_type = _STREAMINGDISPOSITION_FROMTIME +_STREAMINGDISPOSITION.fields_by_name['time_ago'].message_type = _STREAMINGDISPOSITION_TIMEAGO +_STREAMINGDISPOSITION.fields_by_name['from_last_checkpoint'].message_type = _STREAMINGDISPOSITION_FROMLASTCHECKPOINT +_STREAMINGDISPOSITION.oneofs_by_name['disposition'].fields.append( + _STREAMINGDISPOSITION.fields_by_name['oldest']) +_STREAMINGDISPOSITION.fields_by_name['oldest'].containing_oneof = _STREAMINGDISPOSITION.oneofs_by_name['disposition'] +_STREAMINGDISPOSITION.oneofs_by_name['disposition'].fields.append( + _STREAMINGDISPOSITION.fields_by_name['fresh']) +_STREAMINGDISPOSITION.fields_by_name['fresh'].containing_oneof = _STREAMINGDISPOSITION.oneofs_by_name['disposition'] +_STREAMINGDISPOSITION.oneofs_by_name['disposition'].fields.append( + _STREAMINGDISPOSITION.fields_by_name['from_time']) +_STREAMINGDISPOSITION.fields_by_name['from_time'].containing_oneof = _STREAMINGDISPOSITION.oneofs_by_name['disposition'] +_STREAMINGDISPOSITION.oneofs_by_name['disposition'].fields.append( + _STREAMINGDISPOSITION.fields_by_name['time_ago']) +_STREAMINGDISPOSITION.fields_by_name['time_ago'].containing_oneof = _STREAMINGDISPOSITION.oneofs_by_name['disposition'] +_STREAMINGDISPOSITION.oneofs_by_name['disposition'].fields.append( + _STREAMINGDISPOSITION.fields_by_name['from_last_checkpoint']) +_STREAMINGDISPOSITION.fields_by_name['from_last_checkpoint'].containing_oneof = _STREAMINGDISPOSITION.oneofs_by_name['disposition'] +_QUERYCONTENT_EXECUTIONSETTINGSENTRY.containing_type = _QUERYCONTENT +_QUERYCONTENT.fields_by_name['type'].enum_type = _QUERYCONTENT_QUERYTYPE +_QUERYCONTENT.fields_by_name['acl'].message_type = _ACL +_QUERYCONTENT.fields_by_name['limits'].message_type = _LIMITS +_QUERYCONTENT.fields_by_name['execution_settings'].message_type = _QUERYCONTENT_EXECUTIONSETTINGSENTRY +_QUERYCONTENT.fields_by_name['syntax'].enum_type = _QUERYCONTENT_QUERYSYNTAX +_QUERYCONTENT_QUERYTYPE.containing_type = _QUERYCONTENT +_QUERYCONTENT_QUERYSYNTAX.containing_type = _QUERYCONTENT +_COMMONMETA.fields_by_name['created_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_COMMONMETA.fields_by_name['modified_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_QUERYMETA.fields_by_name['common'].message_type = _COMMONMETA +_QUERYMETA.fields_by_name['submitted_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_QUERYMETA.fields_by_name['started_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_QUERYMETA.fields_by_name['finished_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_QUERYMETA.fields_by_name['execute_mode'].enum_type = _EXECUTEMODE +_QUERYMETA.fields_by_name['status'].enum_type = _QUERYMETA_COMPUTESTATUS +_QUERYMETA.fields_by_name['expire_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_QUERYMETA.fields_by_name['result_expire_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_QUERYMETA_COMPUTESTATUS.containing_type = _QUERYMETA +_QUERYMETA.oneofs_by_name['action'].fields.append( + _QUERYMETA.fields_by_name['aborted_by']) +_QUERYMETA.fields_by_name['aborted_by'].containing_oneof = _QUERYMETA.oneofs_by_name['action'] +_QUERYMETA.oneofs_by_name['action'].fields.append( + _QUERYMETA.fields_by_name['paused_by']) +_QUERYMETA.fields_by_name['paused_by'].containing_oneof = _QUERYMETA.oneofs_by_name['action'] +_BRIEFQUERY.fields_by_name['type'].enum_type = _QUERYCONTENT_QUERYTYPE +_BRIEFQUERY.fields_by_name['meta'].message_type = _QUERYMETA +_BRIEFQUERY.fields_by_name['visibility'].enum_type = _ACL_VISIBILITY +_RESULTSETMETA.fields_by_name['column'].message_type = protos_dot_ydb__value__pb2._COLUMN +_QUERY.fields_by_name['meta'].message_type = _QUERYMETA +_QUERY.fields_by_name['content'].message_type = _QUERYCONTENT +_QUERY.fields_by_name['plan'].message_type = _QUERYPLAN +_QUERY.fields_by_name['issue'].message_type = protos_dot_ydb__issue__message__pb2._ISSUEMESSAGE +_QUERY.fields_by_name['transient_issue'].message_type = protos_dot_ydb__issue__message__pb2._ISSUEMESSAGE +_QUERY.fields_by_name['statistics'].message_type = _QUERYSTATISTICS +_QUERY.fields_by_name['result_set_meta'].message_type = _RESULTSETMETA +_QUERY.fields_by_name['ast'].message_type = _QUERYAST +_CREATEQUERYREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_CREATEQUERYREQUEST.fields_by_name['content'].message_type = _QUERYCONTENT +_CREATEQUERYREQUEST.fields_by_name['execute_mode'].enum_type = _EXECUTEMODE +_CREATEQUERYREQUEST.fields_by_name['disposition'].message_type = _STREAMINGDISPOSITION +_CREATEQUERYRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_LISTQUERIESREQUEST_FILTER.fields_by_name['query_type'].enum_type = _QUERYCONTENT_QUERYTYPE +_LISTQUERIESREQUEST_FILTER.fields_by_name['status'].enum_type = _QUERYMETA_COMPUTESTATUS +_LISTQUERIESREQUEST_FILTER.fields_by_name['mode'].enum_type = _EXECUTEMODE +_LISTQUERIESREQUEST_FILTER.fields_by_name['visibility'].enum_type = _ACL_VISIBILITY +_LISTQUERIESREQUEST_FILTER.fields_by_name['automatic'].enum_type = _AUTOMATICTYPE +_LISTQUERIESREQUEST_FILTER.containing_type = _LISTQUERIESREQUEST +_LISTQUERIESREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_LISTQUERIESREQUEST.fields_by_name['filter'].message_type = _LISTQUERIESREQUEST_FILTER +_LISTQUERIESRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_LISTQUERIESRESULT.fields_by_name['query'].message_type = _BRIEFQUERY +_DESCRIBEQUERYREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_DESCRIBEQUERYRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_DESCRIBEQUERYRESULT.fields_by_name['query'].message_type = _QUERY +_GETQUERYSTATUSREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_GETQUERYSTATUSRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_GETQUERYSTATUSRESULT.fields_by_name['status'].enum_type = _QUERYMETA_COMPUTESTATUS +_DELETEQUERYREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_DELETEQUERYRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_MODIFYQUERYREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_MODIFYQUERYREQUEST.fields_by_name['content'].message_type = _QUERYCONTENT +_MODIFYQUERYREQUEST.fields_by_name['execute_mode'].enum_type = _EXECUTEMODE +_MODIFYQUERYREQUEST.fields_by_name['disposition'].message_type = _STREAMINGDISPOSITION +_MODIFYQUERYREQUEST.fields_by_name['state_load_mode'].enum_type = _STATELOADMODE +_MODIFYQUERYRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_CONTROLQUERYREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_CONTROLQUERYREQUEST.fields_by_name['action'].enum_type = _QUERYACTION +_CONTROLQUERYRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_BRIEFJOB.fields_by_name['meta'].message_type = _COMMONMETA +_BRIEFJOB.fields_by_name['query_meta'].message_type = _QUERYMETA +_BRIEFJOB.fields_by_name['visibility'].enum_type = _ACL_VISIBILITY +_BRIEFJOB.fields_by_name['expire_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_JOB.fields_by_name['meta'].message_type = _COMMONMETA +_JOB.fields_by_name['query_meta'].message_type = _QUERYMETA +_JOB.fields_by_name['plan'].message_type = _QUERYPLAN +_JOB.fields_by_name['issue'].message_type = protos_dot_ydb__issue__message__pb2._ISSUEMESSAGE +_JOB.fields_by_name['statistics'].message_type = _QUERYSTATISTICS +_JOB.fields_by_name['result_set_meta'].message_type = _RESULTSETMETA +_JOB.fields_by_name['ast'].message_type = _QUERYAST +_JOB.fields_by_name['acl'].message_type = _ACL +_JOB.fields_by_name['expire_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_JOB.fields_by_name['syntax'].enum_type = _QUERYCONTENT_QUERYSYNTAX +_LISTJOBSREQUEST_FILTER.containing_type = _LISTJOBSREQUEST +_LISTJOBSREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_LISTJOBSREQUEST.fields_by_name['filter'].message_type = _LISTJOBSREQUEST_FILTER +_LISTJOBSRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_LISTJOBSRESULT.fields_by_name['job'].message_type = _BRIEFJOB +_DESCRIBEJOBREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_DESCRIBEJOBRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_DESCRIBEJOBRESULT.fields_by_name['job'].message_type = _JOB +_IAMAUTH.fields_by_name['current_iam'].message_type = _CURRENTIAMTOKENAUTH +_IAMAUTH.fields_by_name['service_account'].message_type = _SERVICEACCOUNTAUTH +_IAMAUTH.fields_by_name['none'].message_type = _NONEAUTH +_IAMAUTH.oneofs_by_name['identity'].fields.append( + _IAMAUTH.fields_by_name['current_iam']) +_IAMAUTH.fields_by_name['current_iam'].containing_oneof = _IAMAUTH.oneofs_by_name['identity'] +_IAMAUTH.oneofs_by_name['identity'].fields.append( + _IAMAUTH.fields_by_name['service_account']) +_IAMAUTH.fields_by_name['service_account'].containing_oneof = _IAMAUTH.oneofs_by_name['identity'] +_IAMAUTH.oneofs_by_name['identity'].fields.append( + _IAMAUTH.fields_by_name['none']) +_IAMAUTH.fields_by_name['none'].containing_oneof = _IAMAUTH.oneofs_by_name['identity'] +_DATASTREAMS.fields_by_name['auth'].message_type = _IAMAUTH +_MONITORING.fields_by_name['auth'].message_type = _IAMAUTH +_YDBDATABASE.fields_by_name['auth'].message_type = _IAMAUTH +_CLICKHOUSECLUSTER.fields_by_name['auth'].message_type = _IAMAUTH +_OBJECTSTORAGECONNECTION.fields_by_name['auth'].message_type = _IAMAUTH +_POSTGRESQLCLUSTER.fields_by_name['auth'].message_type = _IAMAUTH +_CONNECTIONSETTING.fields_by_name['ydb_database'].message_type = _YDBDATABASE +_CONNECTIONSETTING.fields_by_name['clickhouse_cluster'].message_type = _CLICKHOUSECLUSTER +_CONNECTIONSETTING.fields_by_name['data_streams'].message_type = _DATASTREAMS +_CONNECTIONSETTING.fields_by_name['object_storage'].message_type = _OBJECTSTORAGECONNECTION +_CONNECTIONSETTING.fields_by_name['monitoring'].message_type = _MONITORING +_CONNECTIONSETTING.fields_by_name['postgresql_cluster'].message_type = _POSTGRESQLCLUSTER +_CONNECTIONSETTING_CONNECTIONTYPE.containing_type = _CONNECTIONSETTING +_CONNECTIONSETTING.oneofs_by_name['connection'].fields.append( + _CONNECTIONSETTING.fields_by_name['ydb_database']) +_CONNECTIONSETTING.fields_by_name['ydb_database'].containing_oneof = _CONNECTIONSETTING.oneofs_by_name['connection'] +_CONNECTIONSETTING.oneofs_by_name['connection'].fields.append( + _CONNECTIONSETTING.fields_by_name['clickhouse_cluster']) +_CONNECTIONSETTING.fields_by_name['clickhouse_cluster'].containing_oneof = _CONNECTIONSETTING.oneofs_by_name['connection'] +_CONNECTIONSETTING.oneofs_by_name['connection'].fields.append( + _CONNECTIONSETTING.fields_by_name['data_streams']) +_CONNECTIONSETTING.fields_by_name['data_streams'].containing_oneof = _CONNECTIONSETTING.oneofs_by_name['connection'] +_CONNECTIONSETTING.oneofs_by_name['connection'].fields.append( + _CONNECTIONSETTING.fields_by_name['object_storage']) +_CONNECTIONSETTING.fields_by_name['object_storage'].containing_oneof = _CONNECTIONSETTING.oneofs_by_name['connection'] +_CONNECTIONSETTING.oneofs_by_name['connection'].fields.append( + _CONNECTIONSETTING.fields_by_name['monitoring']) +_CONNECTIONSETTING.fields_by_name['monitoring'].containing_oneof = _CONNECTIONSETTING.oneofs_by_name['connection'] +_CONNECTIONSETTING.oneofs_by_name['connection'].fields.append( + _CONNECTIONSETTING.fields_by_name['postgresql_cluster']) +_CONNECTIONSETTING.fields_by_name['postgresql_cluster'].containing_oneof = _CONNECTIONSETTING.oneofs_by_name['connection'] +_CONNECTIONCONTENT.fields_by_name['setting'].message_type = _CONNECTIONSETTING +_CONNECTIONCONTENT.fields_by_name['acl'].message_type = _ACL +_CONNECTION.fields_by_name['content'].message_type = _CONNECTIONCONTENT +_CONNECTION.fields_by_name['meta'].message_type = _COMMONMETA +_CREATECONNECTIONREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_CREATECONNECTIONREQUEST.fields_by_name['content'].message_type = _CONNECTIONCONTENT +_CREATECONNECTIONRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_LISTCONNECTIONSREQUEST_FILTER.fields_by_name['connection_type'].enum_type = _CONNECTIONSETTING_CONNECTIONTYPE +_LISTCONNECTIONSREQUEST_FILTER.fields_by_name['visibility'].enum_type = _ACL_VISIBILITY +_LISTCONNECTIONSREQUEST_FILTER.containing_type = _LISTCONNECTIONSREQUEST +_LISTCONNECTIONSREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_LISTCONNECTIONSREQUEST.fields_by_name['filter'].message_type = _LISTCONNECTIONSREQUEST_FILTER +_LISTCONNECTIONSRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_LISTCONNECTIONSRESULT.fields_by_name['connection'].message_type = _CONNECTION +_DESCRIBECONNECTIONREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_DESCRIBECONNECTIONRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_DESCRIBECONNECTIONRESULT.fields_by_name['connection'].message_type = _CONNECTION +_MODIFYCONNECTIONREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_MODIFYCONNECTIONREQUEST.fields_by_name['content'].message_type = _CONNECTIONCONTENT +_MODIFYCONNECTIONRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_DELETECONNECTIONREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_DELETECONNECTIONRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_TESTCONNECTIONREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_TESTCONNECTIONREQUEST.fields_by_name['setting'].message_type = _CONNECTIONSETTING +_TESTCONNECTIONRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_GETRESULTDATAREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_GETRESULTDATARESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_GETRESULTDATARESULT.fields_by_name['result_set'].message_type = protos_dot_ydb__value__pb2._RESULTSET +_SCHEMA.fields_by_name['column'].message_type = protos_dot_ydb__value__pb2._COLUMN +_DATASTREAMSBINDING_FORMATSETTINGENTRY.containing_type = _DATASTREAMSBINDING +_DATASTREAMSBINDING.fields_by_name['schema'].message_type = _SCHEMA +_DATASTREAMSBINDING.fields_by_name['format_setting'].message_type = _DATASTREAMSBINDING_FORMATSETTINGENTRY +_OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY.containing_type = _OBJECTSTORAGEBINDING_SUBSET +_OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY.containing_type = _OBJECTSTORAGEBINDING_SUBSET +_OBJECTSTORAGEBINDING_SUBSET.fields_by_name['format_setting'].message_type = _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY +_OBJECTSTORAGEBINDING_SUBSET.fields_by_name['schema'].message_type = _SCHEMA +_OBJECTSTORAGEBINDING_SUBSET.fields_by_name['projection'].message_type = _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY +_OBJECTSTORAGEBINDING_SUBSET.containing_type = _OBJECTSTORAGEBINDING +_OBJECTSTORAGEBINDING.fields_by_name['subset'].message_type = _OBJECTSTORAGEBINDING_SUBSET +_BINDINGSETTING.fields_by_name['data_streams'].message_type = _DATASTREAMSBINDING +_BINDINGSETTING.fields_by_name['object_storage'].message_type = _OBJECTSTORAGEBINDING +_BINDINGSETTING_BINDINGTYPE.containing_type = _BINDINGSETTING +_BINDINGSETTING.oneofs_by_name['binding'].fields.append( + _BINDINGSETTING.fields_by_name['data_streams']) +_BINDINGSETTING.fields_by_name['data_streams'].containing_oneof = _BINDINGSETTING.oneofs_by_name['binding'] +_BINDINGSETTING.oneofs_by_name['binding'].fields.append( + _BINDINGSETTING.fields_by_name['object_storage']) +_BINDINGSETTING.fields_by_name['object_storage'].containing_oneof = _BINDINGSETTING.oneofs_by_name['binding'] +_BRIEFBINDING.fields_by_name['meta'].message_type = _COMMONMETA +_BRIEFBINDING.fields_by_name['type'].enum_type = _BINDINGSETTING_BINDINGTYPE +_BRIEFBINDING.fields_by_name['visibility'].enum_type = _ACL_VISIBILITY +_BINDINGCONTENT.fields_by_name['setting'].message_type = _BINDINGSETTING +_BINDINGCONTENT.fields_by_name['acl'].message_type = _ACL +_BINDING.fields_by_name['content'].message_type = _BINDINGCONTENT +_BINDING.fields_by_name['meta'].message_type = _COMMONMETA +_CREATEBINDINGREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_CREATEBINDINGREQUEST.fields_by_name['content'].message_type = _BINDINGCONTENT +_CREATEBINDINGRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_LISTBINDINGSREQUEST_FILTER.fields_by_name['visibility'].enum_type = _ACL_VISIBILITY +_LISTBINDINGSREQUEST_FILTER.containing_type = _LISTBINDINGSREQUEST +_LISTBINDINGSREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_LISTBINDINGSREQUEST.fields_by_name['filter'].message_type = _LISTBINDINGSREQUEST_FILTER +_LISTBINDINGSRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_LISTBINDINGSRESULT.fields_by_name['binding'].message_type = _BRIEFBINDING +_DESCRIBEBINDINGREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_DESCRIBEBINDINGRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_DESCRIBEBINDINGRESULT.fields_by_name['binding'].message_type = _BINDING +_MODIFYBINDINGREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_MODIFYBINDINGREQUEST.fields_by_name['content'].message_type = _BINDINGCONTENT +_MODIFYBINDINGRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_DELETEBINDINGREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_DELETEBINDINGRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +DESCRIPTOR.message_types_by_name['Acl'] = _ACL +DESCRIPTOR.message_types_by_name['Limits'] = _LIMITS +DESCRIPTOR.message_types_by_name['StreamingDisposition'] = _STREAMINGDISPOSITION +DESCRIPTOR.message_types_by_name['QueryContent'] = _QUERYCONTENT +DESCRIPTOR.message_types_by_name['CommonMeta'] = _COMMONMETA +DESCRIPTOR.message_types_by_name['QueryMeta'] = _QUERYMETA +DESCRIPTOR.message_types_by_name['BriefQuery'] = _BRIEFQUERY +DESCRIPTOR.message_types_by_name['QueryPlan'] = _QUERYPLAN +DESCRIPTOR.message_types_by_name['QueryAst'] = _QUERYAST +DESCRIPTOR.message_types_by_name['ResultSetMeta'] = _RESULTSETMETA +DESCRIPTOR.message_types_by_name['Query'] = _QUERY +DESCRIPTOR.message_types_by_name['QueryStatistics'] = _QUERYSTATISTICS +DESCRIPTOR.message_types_by_name['CreateQueryRequest'] = _CREATEQUERYREQUEST +DESCRIPTOR.message_types_by_name['CreateQueryResponse'] = _CREATEQUERYRESPONSE +DESCRIPTOR.message_types_by_name['CreateQueryResult'] = _CREATEQUERYRESULT +DESCRIPTOR.message_types_by_name['ListQueriesRequest'] = _LISTQUERIESREQUEST +DESCRIPTOR.message_types_by_name['ListQueriesResponse'] = _LISTQUERIESRESPONSE +DESCRIPTOR.message_types_by_name['ListQueriesResult'] = _LISTQUERIESRESULT +DESCRIPTOR.message_types_by_name['DescribeQueryRequest'] = _DESCRIBEQUERYREQUEST +DESCRIPTOR.message_types_by_name['DescribeQueryResponse'] = _DESCRIBEQUERYRESPONSE +DESCRIPTOR.message_types_by_name['DescribeQueryResult'] = _DESCRIBEQUERYRESULT +DESCRIPTOR.message_types_by_name['GetQueryStatusRequest'] = _GETQUERYSTATUSREQUEST +DESCRIPTOR.message_types_by_name['GetQueryStatusResponse'] = _GETQUERYSTATUSRESPONSE +DESCRIPTOR.message_types_by_name['GetQueryStatusResult'] = _GETQUERYSTATUSRESULT +DESCRIPTOR.message_types_by_name['DeleteQueryRequest'] = _DELETEQUERYREQUEST +DESCRIPTOR.message_types_by_name['DeleteQueryResponse'] = _DELETEQUERYRESPONSE +DESCRIPTOR.message_types_by_name['DeleteQueryResult'] = _DELETEQUERYRESULT +DESCRIPTOR.message_types_by_name['ModifyQueryRequest'] = _MODIFYQUERYREQUEST +DESCRIPTOR.message_types_by_name['ModifyQueryResponse'] = _MODIFYQUERYRESPONSE +DESCRIPTOR.message_types_by_name['ModifyQueryResult'] = _MODIFYQUERYRESULT +DESCRIPTOR.message_types_by_name['ControlQueryRequest'] = _CONTROLQUERYREQUEST +DESCRIPTOR.message_types_by_name['ControlQueryResponse'] = _CONTROLQUERYRESPONSE +DESCRIPTOR.message_types_by_name['ControlQueryResult'] = _CONTROLQUERYRESULT +DESCRIPTOR.message_types_by_name['BriefJob'] = _BRIEFJOB +DESCRIPTOR.message_types_by_name['Job'] = _JOB +DESCRIPTOR.message_types_by_name['ListJobsRequest'] = _LISTJOBSREQUEST +DESCRIPTOR.message_types_by_name['ListJobsResponse'] = _LISTJOBSRESPONSE +DESCRIPTOR.message_types_by_name['ListJobsResult'] = _LISTJOBSRESULT +DESCRIPTOR.message_types_by_name['DescribeJobRequest'] = _DESCRIBEJOBREQUEST +DESCRIPTOR.message_types_by_name['DescribeJobResponse'] = _DESCRIBEJOBRESPONSE +DESCRIPTOR.message_types_by_name['DescribeJobResult'] = _DESCRIBEJOBRESULT +DESCRIPTOR.message_types_by_name['CurrentIAMTokenAuth'] = _CURRENTIAMTOKENAUTH +DESCRIPTOR.message_types_by_name['NoneAuth'] = _NONEAUTH +DESCRIPTOR.message_types_by_name['ServiceAccountAuth'] = _SERVICEACCOUNTAUTH +DESCRIPTOR.message_types_by_name['IamAuth'] = _IAMAUTH +DESCRIPTOR.message_types_by_name['DataStreams'] = _DATASTREAMS +DESCRIPTOR.message_types_by_name['Monitoring'] = _MONITORING +DESCRIPTOR.message_types_by_name['YdbDatabase'] = _YDBDATABASE +DESCRIPTOR.message_types_by_name['ClickHouseCluster'] = _CLICKHOUSECLUSTER +DESCRIPTOR.message_types_by_name['ObjectStorageConnection'] = _OBJECTSTORAGECONNECTION +DESCRIPTOR.message_types_by_name['PostgreSQLCluster'] = _POSTGRESQLCLUSTER +DESCRIPTOR.message_types_by_name['ConnectionSetting'] = _CONNECTIONSETTING +DESCRIPTOR.message_types_by_name['ConnectionContent'] = _CONNECTIONCONTENT +DESCRIPTOR.message_types_by_name['Connection'] = _CONNECTION +DESCRIPTOR.message_types_by_name['CreateConnectionRequest'] = _CREATECONNECTIONREQUEST +DESCRIPTOR.message_types_by_name['CreateConnectionResponse'] = _CREATECONNECTIONRESPONSE +DESCRIPTOR.message_types_by_name['CreateConnectionResult'] = _CREATECONNECTIONRESULT +DESCRIPTOR.message_types_by_name['ListConnectionsRequest'] = _LISTCONNECTIONSREQUEST +DESCRIPTOR.message_types_by_name['ListConnectionsResponse'] = _LISTCONNECTIONSRESPONSE +DESCRIPTOR.message_types_by_name['ListConnectionsResult'] = _LISTCONNECTIONSRESULT +DESCRIPTOR.message_types_by_name['DescribeConnectionRequest'] = _DESCRIBECONNECTIONREQUEST +DESCRIPTOR.message_types_by_name['DescribeConnectionResponse'] = _DESCRIBECONNECTIONRESPONSE +DESCRIPTOR.message_types_by_name['DescribeConnectionResult'] = _DESCRIBECONNECTIONRESULT +DESCRIPTOR.message_types_by_name['ModifyConnectionRequest'] = _MODIFYCONNECTIONREQUEST +DESCRIPTOR.message_types_by_name['ModifyConnectionResponse'] = _MODIFYCONNECTIONRESPONSE +DESCRIPTOR.message_types_by_name['ModifyConnectionResult'] = _MODIFYCONNECTIONRESULT +DESCRIPTOR.message_types_by_name['DeleteConnectionRequest'] = _DELETECONNECTIONREQUEST +DESCRIPTOR.message_types_by_name['DeleteConnectionResponse'] = _DELETECONNECTIONRESPONSE +DESCRIPTOR.message_types_by_name['DeleteConnectionResult'] = _DELETECONNECTIONRESULT +DESCRIPTOR.message_types_by_name['TestConnectionRequest'] = _TESTCONNECTIONREQUEST +DESCRIPTOR.message_types_by_name['TestConnectionResponse'] = _TESTCONNECTIONRESPONSE +DESCRIPTOR.message_types_by_name['TestConnectionResult'] = _TESTCONNECTIONRESULT +DESCRIPTOR.message_types_by_name['GetResultDataRequest'] = _GETRESULTDATAREQUEST +DESCRIPTOR.message_types_by_name['GetResultDataResponse'] = _GETRESULTDATARESPONSE +DESCRIPTOR.message_types_by_name['GetResultDataResult'] = _GETRESULTDATARESULT +DESCRIPTOR.message_types_by_name['Schema'] = _SCHEMA +DESCRIPTOR.message_types_by_name['DataStreamsBinding'] = _DATASTREAMSBINDING +DESCRIPTOR.message_types_by_name['ObjectStorageBinding'] = _OBJECTSTORAGEBINDING +DESCRIPTOR.message_types_by_name['BindingSetting'] = _BINDINGSETTING +DESCRIPTOR.message_types_by_name['BriefBinding'] = _BRIEFBINDING +DESCRIPTOR.message_types_by_name['BindingContent'] = _BINDINGCONTENT +DESCRIPTOR.message_types_by_name['Binding'] = _BINDING +DESCRIPTOR.message_types_by_name['CreateBindingRequest'] = _CREATEBINDINGREQUEST +DESCRIPTOR.message_types_by_name['CreateBindingResponse'] = _CREATEBINDINGRESPONSE +DESCRIPTOR.message_types_by_name['CreateBindingResult'] = _CREATEBINDINGRESULT +DESCRIPTOR.message_types_by_name['ListBindingsRequest'] = _LISTBINDINGSREQUEST +DESCRIPTOR.message_types_by_name['ListBindingsResponse'] = _LISTBINDINGSRESPONSE +DESCRIPTOR.message_types_by_name['ListBindingsResult'] = _LISTBINDINGSRESULT +DESCRIPTOR.message_types_by_name['DescribeBindingRequest'] = _DESCRIBEBINDINGREQUEST +DESCRIPTOR.message_types_by_name['DescribeBindingResponse'] = _DESCRIBEBINDINGRESPONSE +DESCRIPTOR.message_types_by_name['DescribeBindingResult'] = _DESCRIBEBINDINGRESULT +DESCRIPTOR.message_types_by_name['ModifyBindingRequest'] = _MODIFYBINDINGREQUEST +DESCRIPTOR.message_types_by_name['ModifyBindingResponse'] = _MODIFYBINDINGRESPONSE +DESCRIPTOR.message_types_by_name['ModifyBindingResult'] = _MODIFYBINDINGRESULT +DESCRIPTOR.message_types_by_name['DeleteBindingRequest'] = _DELETEBINDINGREQUEST +DESCRIPTOR.message_types_by_name['DeleteBindingResponse'] = _DELETEBINDINGRESPONSE +DESCRIPTOR.message_types_by_name['DeleteBindingResult'] = _DELETEBINDINGRESULT +DESCRIPTOR.enum_types_by_name['ExecuteMode'] = _EXECUTEMODE +DESCRIPTOR.enum_types_by_name['QueryAction'] = _QUERYACTION +DESCRIPTOR.enum_types_by_name['StateLoadMode'] = _STATELOADMODE +DESCRIPTOR.enum_types_by_name['AutomaticType'] = _AUTOMATICTYPE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Acl = _reflection.GeneratedProtocolMessageType('Acl', (_message.Message,), { + 'DESCRIPTOR' : _ACL, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.Acl) + }) +_sym_db.RegisterMessage(Acl) + +Limits = _reflection.GeneratedProtocolMessageType('Limits', (_message.Message,), { + 'DESCRIPTOR' : _LIMITS, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.Limits) + }) +_sym_db.RegisterMessage(Limits) + +StreamingDisposition = _reflection.GeneratedProtocolMessageType('StreamingDisposition', (_message.Message,), { + + 'FromTime' : _reflection.GeneratedProtocolMessageType('FromTime', (_message.Message,), { + 'DESCRIPTOR' : _STREAMINGDISPOSITION_FROMTIME, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.StreamingDisposition.FromTime) + }) + , + + 'TimeAgo' : _reflection.GeneratedProtocolMessageType('TimeAgo', (_message.Message,), { + 'DESCRIPTOR' : _STREAMINGDISPOSITION_TIMEAGO, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.StreamingDisposition.TimeAgo) + }) + , + + 'FromLastCheckpoint' : _reflection.GeneratedProtocolMessageType('FromLastCheckpoint', (_message.Message,), { + 'DESCRIPTOR' : _STREAMINGDISPOSITION_FROMLASTCHECKPOINT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.StreamingDisposition.FromLastCheckpoint) + }) + , + 'DESCRIPTOR' : _STREAMINGDISPOSITION, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.StreamingDisposition) + }) +_sym_db.RegisterMessage(StreamingDisposition) +_sym_db.RegisterMessage(StreamingDisposition.FromTime) +_sym_db.RegisterMessage(StreamingDisposition.TimeAgo) +_sym_db.RegisterMessage(StreamingDisposition.FromLastCheckpoint) + +QueryContent = _reflection.GeneratedProtocolMessageType('QueryContent', (_message.Message,), { + + 'ExecutionSettingsEntry' : _reflection.GeneratedProtocolMessageType('ExecutionSettingsEntry', (_message.Message,), { + 'DESCRIPTOR' : _QUERYCONTENT_EXECUTIONSETTINGSENTRY, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.QueryContent.ExecutionSettingsEntry) + }) + , + 'DESCRIPTOR' : _QUERYCONTENT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.QueryContent) + }) +_sym_db.RegisterMessage(QueryContent) +_sym_db.RegisterMessage(QueryContent.ExecutionSettingsEntry) + +CommonMeta = _reflection.GeneratedProtocolMessageType('CommonMeta', (_message.Message,), { + 'DESCRIPTOR' : _COMMONMETA, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.CommonMeta) + }) +_sym_db.RegisterMessage(CommonMeta) + +QueryMeta = _reflection.GeneratedProtocolMessageType('QueryMeta', (_message.Message,), { + 'DESCRIPTOR' : _QUERYMETA, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.QueryMeta) + }) +_sym_db.RegisterMessage(QueryMeta) + +BriefQuery = _reflection.GeneratedProtocolMessageType('BriefQuery', (_message.Message,), { + 'DESCRIPTOR' : _BRIEFQUERY, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.BriefQuery) + }) +_sym_db.RegisterMessage(BriefQuery) + +QueryPlan = _reflection.GeneratedProtocolMessageType('QueryPlan', (_message.Message,), { + 'DESCRIPTOR' : _QUERYPLAN, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.QueryPlan) + }) +_sym_db.RegisterMessage(QueryPlan) + +QueryAst = _reflection.GeneratedProtocolMessageType('QueryAst', (_message.Message,), { + 'DESCRIPTOR' : _QUERYAST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.QueryAst) + }) +_sym_db.RegisterMessage(QueryAst) + +ResultSetMeta = _reflection.GeneratedProtocolMessageType('ResultSetMeta', (_message.Message,), { + 'DESCRIPTOR' : _RESULTSETMETA, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ResultSetMeta) + }) +_sym_db.RegisterMessage(ResultSetMeta) + +Query = _reflection.GeneratedProtocolMessageType('Query', (_message.Message,), { + 'DESCRIPTOR' : _QUERY, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.Query) + }) +_sym_db.RegisterMessage(Query) + +QueryStatistics = _reflection.GeneratedProtocolMessageType('QueryStatistics', (_message.Message,), { + 'DESCRIPTOR' : _QUERYSTATISTICS, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.QueryStatistics) + }) +_sym_db.RegisterMessage(QueryStatistics) + +CreateQueryRequest = _reflection.GeneratedProtocolMessageType('CreateQueryRequest', (_message.Message,), { + 'DESCRIPTOR' : _CREATEQUERYREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.CreateQueryRequest) + }) +_sym_db.RegisterMessage(CreateQueryRequest) + +CreateQueryResponse = _reflection.GeneratedProtocolMessageType('CreateQueryResponse', (_message.Message,), { + 'DESCRIPTOR' : _CREATEQUERYRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.CreateQueryResponse) + }) +_sym_db.RegisterMessage(CreateQueryResponse) + +CreateQueryResult = _reflection.GeneratedProtocolMessageType('CreateQueryResult', (_message.Message,), { + 'DESCRIPTOR' : _CREATEQUERYRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.CreateQueryResult) + }) +_sym_db.RegisterMessage(CreateQueryResult) + +ListQueriesRequest = _reflection.GeneratedProtocolMessageType('ListQueriesRequest', (_message.Message,), { + + 'Filter' : _reflection.GeneratedProtocolMessageType('Filter', (_message.Message,), { + 'DESCRIPTOR' : _LISTQUERIESREQUEST_FILTER, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListQueriesRequest.Filter) + }) + , + 'DESCRIPTOR' : _LISTQUERIESREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListQueriesRequest) + }) +_sym_db.RegisterMessage(ListQueriesRequest) +_sym_db.RegisterMessage(ListQueriesRequest.Filter) + +ListQueriesResponse = _reflection.GeneratedProtocolMessageType('ListQueriesResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTQUERIESRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListQueriesResponse) + }) +_sym_db.RegisterMessage(ListQueriesResponse) + +ListQueriesResult = _reflection.GeneratedProtocolMessageType('ListQueriesResult', (_message.Message,), { + 'DESCRIPTOR' : _LISTQUERIESRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListQueriesResult) + }) +_sym_db.RegisterMessage(ListQueriesResult) + +DescribeQueryRequest = _reflection.GeneratedProtocolMessageType('DescribeQueryRequest', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEQUERYREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DescribeQueryRequest) + }) +_sym_db.RegisterMessage(DescribeQueryRequest) + +DescribeQueryResponse = _reflection.GeneratedProtocolMessageType('DescribeQueryResponse', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEQUERYRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DescribeQueryResponse) + }) +_sym_db.RegisterMessage(DescribeQueryResponse) + +DescribeQueryResult = _reflection.GeneratedProtocolMessageType('DescribeQueryResult', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEQUERYRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DescribeQueryResult) + }) +_sym_db.RegisterMessage(DescribeQueryResult) + +GetQueryStatusRequest = _reflection.GeneratedProtocolMessageType('GetQueryStatusRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETQUERYSTATUSREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.GetQueryStatusRequest) + }) +_sym_db.RegisterMessage(GetQueryStatusRequest) + +GetQueryStatusResponse = _reflection.GeneratedProtocolMessageType('GetQueryStatusResponse', (_message.Message,), { + 'DESCRIPTOR' : _GETQUERYSTATUSRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.GetQueryStatusResponse) + }) +_sym_db.RegisterMessage(GetQueryStatusResponse) + +GetQueryStatusResult = _reflection.GeneratedProtocolMessageType('GetQueryStatusResult', (_message.Message,), { + 'DESCRIPTOR' : _GETQUERYSTATUSRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.GetQueryStatusResult) + }) +_sym_db.RegisterMessage(GetQueryStatusResult) + +DeleteQueryRequest = _reflection.GeneratedProtocolMessageType('DeleteQueryRequest', (_message.Message,), { + 'DESCRIPTOR' : _DELETEQUERYREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DeleteQueryRequest) + }) +_sym_db.RegisterMessage(DeleteQueryRequest) + +DeleteQueryResponse = _reflection.GeneratedProtocolMessageType('DeleteQueryResponse', (_message.Message,), { + 'DESCRIPTOR' : _DELETEQUERYRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DeleteQueryResponse) + }) +_sym_db.RegisterMessage(DeleteQueryResponse) + +DeleteQueryResult = _reflection.GeneratedProtocolMessageType('DeleteQueryResult', (_message.Message,), { + 'DESCRIPTOR' : _DELETEQUERYRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DeleteQueryResult) + }) +_sym_db.RegisterMessage(DeleteQueryResult) + +ModifyQueryRequest = _reflection.GeneratedProtocolMessageType('ModifyQueryRequest', (_message.Message,), { + 'DESCRIPTOR' : _MODIFYQUERYREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ModifyQueryRequest) + }) +_sym_db.RegisterMessage(ModifyQueryRequest) + +ModifyQueryResponse = _reflection.GeneratedProtocolMessageType('ModifyQueryResponse', (_message.Message,), { + 'DESCRIPTOR' : _MODIFYQUERYRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ModifyQueryResponse) + }) +_sym_db.RegisterMessage(ModifyQueryResponse) + +ModifyQueryResult = _reflection.GeneratedProtocolMessageType('ModifyQueryResult', (_message.Message,), { + 'DESCRIPTOR' : _MODIFYQUERYRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ModifyQueryResult) + }) +_sym_db.RegisterMessage(ModifyQueryResult) + +ControlQueryRequest = _reflection.GeneratedProtocolMessageType('ControlQueryRequest', (_message.Message,), { + 'DESCRIPTOR' : _CONTROLQUERYREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ControlQueryRequest) + }) +_sym_db.RegisterMessage(ControlQueryRequest) + +ControlQueryResponse = _reflection.GeneratedProtocolMessageType('ControlQueryResponse', (_message.Message,), { + 'DESCRIPTOR' : _CONTROLQUERYRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ControlQueryResponse) + }) +_sym_db.RegisterMessage(ControlQueryResponse) + +ControlQueryResult = _reflection.GeneratedProtocolMessageType('ControlQueryResult', (_message.Message,), { + 'DESCRIPTOR' : _CONTROLQUERYRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ControlQueryResult) + }) +_sym_db.RegisterMessage(ControlQueryResult) + +BriefJob = _reflection.GeneratedProtocolMessageType('BriefJob', (_message.Message,), { + 'DESCRIPTOR' : _BRIEFJOB, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.BriefJob) + }) +_sym_db.RegisterMessage(BriefJob) + +Job = _reflection.GeneratedProtocolMessageType('Job', (_message.Message,), { + 'DESCRIPTOR' : _JOB, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.Job) + }) +_sym_db.RegisterMessage(Job) + +ListJobsRequest = _reflection.GeneratedProtocolMessageType('ListJobsRequest', (_message.Message,), { + + 'Filter' : _reflection.GeneratedProtocolMessageType('Filter', (_message.Message,), { + 'DESCRIPTOR' : _LISTJOBSREQUEST_FILTER, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListJobsRequest.Filter) + }) + , + 'DESCRIPTOR' : _LISTJOBSREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListJobsRequest) + }) +_sym_db.RegisterMessage(ListJobsRequest) +_sym_db.RegisterMessage(ListJobsRequest.Filter) + +ListJobsResponse = _reflection.GeneratedProtocolMessageType('ListJobsResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTJOBSRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListJobsResponse) + }) +_sym_db.RegisterMessage(ListJobsResponse) + +ListJobsResult = _reflection.GeneratedProtocolMessageType('ListJobsResult', (_message.Message,), { + 'DESCRIPTOR' : _LISTJOBSRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListJobsResult) + }) +_sym_db.RegisterMessage(ListJobsResult) + +DescribeJobRequest = _reflection.GeneratedProtocolMessageType('DescribeJobRequest', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEJOBREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DescribeJobRequest) + }) +_sym_db.RegisterMessage(DescribeJobRequest) + +DescribeJobResponse = _reflection.GeneratedProtocolMessageType('DescribeJobResponse', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEJOBRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DescribeJobResponse) + }) +_sym_db.RegisterMessage(DescribeJobResponse) + +DescribeJobResult = _reflection.GeneratedProtocolMessageType('DescribeJobResult', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEJOBRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DescribeJobResult) + }) +_sym_db.RegisterMessage(DescribeJobResult) + +CurrentIAMTokenAuth = _reflection.GeneratedProtocolMessageType('CurrentIAMTokenAuth', (_message.Message,), { + 'DESCRIPTOR' : _CURRENTIAMTOKENAUTH, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.CurrentIAMTokenAuth) + }) +_sym_db.RegisterMessage(CurrentIAMTokenAuth) + +NoneAuth = _reflection.GeneratedProtocolMessageType('NoneAuth', (_message.Message,), { + 'DESCRIPTOR' : _NONEAUTH, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.NoneAuth) + }) +_sym_db.RegisterMessage(NoneAuth) + +ServiceAccountAuth = _reflection.GeneratedProtocolMessageType('ServiceAccountAuth', (_message.Message,), { + 'DESCRIPTOR' : _SERVICEACCOUNTAUTH, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ServiceAccountAuth) + }) +_sym_db.RegisterMessage(ServiceAccountAuth) + +IamAuth = _reflection.GeneratedProtocolMessageType('IamAuth', (_message.Message,), { + 'DESCRIPTOR' : _IAMAUTH, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.IamAuth) + }) +_sym_db.RegisterMessage(IamAuth) + +DataStreams = _reflection.GeneratedProtocolMessageType('DataStreams', (_message.Message,), { + 'DESCRIPTOR' : _DATASTREAMS, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DataStreams) + }) +_sym_db.RegisterMessage(DataStreams) + +Monitoring = _reflection.GeneratedProtocolMessageType('Monitoring', (_message.Message,), { + 'DESCRIPTOR' : _MONITORING, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.Monitoring) + }) +_sym_db.RegisterMessage(Monitoring) + +YdbDatabase = _reflection.GeneratedProtocolMessageType('YdbDatabase', (_message.Message,), { + 'DESCRIPTOR' : _YDBDATABASE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.YdbDatabase) + }) +_sym_db.RegisterMessage(YdbDatabase) + +ClickHouseCluster = _reflection.GeneratedProtocolMessageType('ClickHouseCluster', (_message.Message,), { + 'DESCRIPTOR' : _CLICKHOUSECLUSTER, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ClickHouseCluster) + }) +_sym_db.RegisterMessage(ClickHouseCluster) + +ObjectStorageConnection = _reflection.GeneratedProtocolMessageType('ObjectStorageConnection', (_message.Message,), { + 'DESCRIPTOR' : _OBJECTSTORAGECONNECTION, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ObjectStorageConnection) + }) +_sym_db.RegisterMessage(ObjectStorageConnection) + +PostgreSQLCluster = _reflection.GeneratedProtocolMessageType('PostgreSQLCluster', (_message.Message,), { + 'DESCRIPTOR' : _POSTGRESQLCLUSTER, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.PostgreSQLCluster) + }) +_sym_db.RegisterMessage(PostgreSQLCluster) + +ConnectionSetting = _reflection.GeneratedProtocolMessageType('ConnectionSetting', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONSETTING, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ConnectionSetting) + }) +_sym_db.RegisterMessage(ConnectionSetting) + +ConnectionContent = _reflection.GeneratedProtocolMessageType('ConnectionContent', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONCONTENT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ConnectionContent) + }) +_sym_db.RegisterMessage(ConnectionContent) + +Connection = _reflection.GeneratedProtocolMessageType('Connection', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTION, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.Connection) + }) +_sym_db.RegisterMessage(Connection) + +CreateConnectionRequest = _reflection.GeneratedProtocolMessageType('CreateConnectionRequest', (_message.Message,), { + 'DESCRIPTOR' : _CREATECONNECTIONREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.CreateConnectionRequest) + }) +_sym_db.RegisterMessage(CreateConnectionRequest) + +CreateConnectionResponse = _reflection.GeneratedProtocolMessageType('CreateConnectionResponse', (_message.Message,), { + 'DESCRIPTOR' : _CREATECONNECTIONRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.CreateConnectionResponse) + }) +_sym_db.RegisterMessage(CreateConnectionResponse) + +CreateConnectionResult = _reflection.GeneratedProtocolMessageType('CreateConnectionResult', (_message.Message,), { + 'DESCRIPTOR' : _CREATECONNECTIONRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.CreateConnectionResult) + }) +_sym_db.RegisterMessage(CreateConnectionResult) + +ListConnectionsRequest = _reflection.GeneratedProtocolMessageType('ListConnectionsRequest', (_message.Message,), { + + 'Filter' : _reflection.GeneratedProtocolMessageType('Filter', (_message.Message,), { + 'DESCRIPTOR' : _LISTCONNECTIONSREQUEST_FILTER, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListConnectionsRequest.Filter) + }) + , + 'DESCRIPTOR' : _LISTCONNECTIONSREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListConnectionsRequest) + }) +_sym_db.RegisterMessage(ListConnectionsRequest) +_sym_db.RegisterMessage(ListConnectionsRequest.Filter) + +ListConnectionsResponse = _reflection.GeneratedProtocolMessageType('ListConnectionsResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTCONNECTIONSRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListConnectionsResponse) + }) +_sym_db.RegisterMessage(ListConnectionsResponse) + +ListConnectionsResult = _reflection.GeneratedProtocolMessageType('ListConnectionsResult', (_message.Message,), { + 'DESCRIPTOR' : _LISTCONNECTIONSRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListConnectionsResult) + }) +_sym_db.RegisterMessage(ListConnectionsResult) + +DescribeConnectionRequest = _reflection.GeneratedProtocolMessageType('DescribeConnectionRequest', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBECONNECTIONREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DescribeConnectionRequest) + }) +_sym_db.RegisterMessage(DescribeConnectionRequest) + +DescribeConnectionResponse = _reflection.GeneratedProtocolMessageType('DescribeConnectionResponse', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBECONNECTIONRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DescribeConnectionResponse) + }) +_sym_db.RegisterMessage(DescribeConnectionResponse) + +DescribeConnectionResult = _reflection.GeneratedProtocolMessageType('DescribeConnectionResult', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBECONNECTIONRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DescribeConnectionResult) + }) +_sym_db.RegisterMessage(DescribeConnectionResult) + +ModifyConnectionRequest = _reflection.GeneratedProtocolMessageType('ModifyConnectionRequest', (_message.Message,), { + 'DESCRIPTOR' : _MODIFYCONNECTIONREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ModifyConnectionRequest) + }) +_sym_db.RegisterMessage(ModifyConnectionRequest) + +ModifyConnectionResponse = _reflection.GeneratedProtocolMessageType('ModifyConnectionResponse', (_message.Message,), { + 'DESCRIPTOR' : _MODIFYCONNECTIONRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ModifyConnectionResponse) + }) +_sym_db.RegisterMessage(ModifyConnectionResponse) + +ModifyConnectionResult = _reflection.GeneratedProtocolMessageType('ModifyConnectionResult', (_message.Message,), { + 'DESCRIPTOR' : _MODIFYCONNECTIONRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ModifyConnectionResult) + }) +_sym_db.RegisterMessage(ModifyConnectionResult) + +DeleteConnectionRequest = _reflection.GeneratedProtocolMessageType('DeleteConnectionRequest', (_message.Message,), { + 'DESCRIPTOR' : _DELETECONNECTIONREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DeleteConnectionRequest) + }) +_sym_db.RegisterMessage(DeleteConnectionRequest) + +DeleteConnectionResponse = _reflection.GeneratedProtocolMessageType('DeleteConnectionResponse', (_message.Message,), { + 'DESCRIPTOR' : _DELETECONNECTIONRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DeleteConnectionResponse) + }) +_sym_db.RegisterMessage(DeleteConnectionResponse) + +DeleteConnectionResult = _reflection.GeneratedProtocolMessageType('DeleteConnectionResult', (_message.Message,), { + 'DESCRIPTOR' : _DELETECONNECTIONRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DeleteConnectionResult) + }) +_sym_db.RegisterMessage(DeleteConnectionResult) + +TestConnectionRequest = _reflection.GeneratedProtocolMessageType('TestConnectionRequest', (_message.Message,), { + 'DESCRIPTOR' : _TESTCONNECTIONREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.TestConnectionRequest) + }) +_sym_db.RegisterMessage(TestConnectionRequest) + +TestConnectionResponse = _reflection.GeneratedProtocolMessageType('TestConnectionResponse', (_message.Message,), { + 'DESCRIPTOR' : _TESTCONNECTIONRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.TestConnectionResponse) + }) +_sym_db.RegisterMessage(TestConnectionResponse) + +TestConnectionResult = _reflection.GeneratedProtocolMessageType('TestConnectionResult', (_message.Message,), { + 'DESCRIPTOR' : _TESTCONNECTIONRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.TestConnectionResult) + }) +_sym_db.RegisterMessage(TestConnectionResult) + +GetResultDataRequest = _reflection.GeneratedProtocolMessageType('GetResultDataRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETRESULTDATAREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.GetResultDataRequest) + }) +_sym_db.RegisterMessage(GetResultDataRequest) + +GetResultDataResponse = _reflection.GeneratedProtocolMessageType('GetResultDataResponse', (_message.Message,), { + 'DESCRIPTOR' : _GETRESULTDATARESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.GetResultDataResponse) + }) +_sym_db.RegisterMessage(GetResultDataResponse) + +GetResultDataResult = _reflection.GeneratedProtocolMessageType('GetResultDataResult', (_message.Message,), { + 'DESCRIPTOR' : _GETRESULTDATARESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.GetResultDataResult) + }) +_sym_db.RegisterMessage(GetResultDataResult) + +Schema = _reflection.GeneratedProtocolMessageType('Schema', (_message.Message,), { + 'DESCRIPTOR' : _SCHEMA, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.Schema) + }) +_sym_db.RegisterMessage(Schema) + +DataStreamsBinding = _reflection.GeneratedProtocolMessageType('DataStreamsBinding', (_message.Message,), { + + 'FormatSettingEntry' : _reflection.GeneratedProtocolMessageType('FormatSettingEntry', (_message.Message,), { + 'DESCRIPTOR' : _DATASTREAMSBINDING_FORMATSETTINGENTRY, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DataStreamsBinding.FormatSettingEntry) + }) + , + 'DESCRIPTOR' : _DATASTREAMSBINDING, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DataStreamsBinding) + }) +_sym_db.RegisterMessage(DataStreamsBinding) +_sym_db.RegisterMessage(DataStreamsBinding.FormatSettingEntry) + +ObjectStorageBinding = _reflection.GeneratedProtocolMessageType('ObjectStorageBinding', (_message.Message,), { + + 'Subset' : _reflection.GeneratedProtocolMessageType('Subset', (_message.Message,), { + + 'FormatSettingEntry' : _reflection.GeneratedProtocolMessageType('FormatSettingEntry', (_message.Message,), { + 'DESCRIPTOR' : _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ObjectStorageBinding.Subset.FormatSettingEntry) + }) + , + + 'ProjectionEntry' : _reflection.GeneratedProtocolMessageType('ProjectionEntry', (_message.Message,), { + 'DESCRIPTOR' : _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ObjectStorageBinding.Subset.ProjectionEntry) + }) + , + 'DESCRIPTOR' : _OBJECTSTORAGEBINDING_SUBSET, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ObjectStorageBinding.Subset) + }) + , + 'DESCRIPTOR' : _OBJECTSTORAGEBINDING, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ObjectStorageBinding) + }) +_sym_db.RegisterMessage(ObjectStorageBinding) +_sym_db.RegisterMessage(ObjectStorageBinding.Subset) +_sym_db.RegisterMessage(ObjectStorageBinding.Subset.FormatSettingEntry) +_sym_db.RegisterMessage(ObjectStorageBinding.Subset.ProjectionEntry) + +BindingSetting = _reflection.GeneratedProtocolMessageType('BindingSetting', (_message.Message,), { + 'DESCRIPTOR' : _BINDINGSETTING, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.BindingSetting) + }) +_sym_db.RegisterMessage(BindingSetting) + +BriefBinding = _reflection.GeneratedProtocolMessageType('BriefBinding', (_message.Message,), { + 'DESCRIPTOR' : _BRIEFBINDING, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.BriefBinding) + }) +_sym_db.RegisterMessage(BriefBinding) + +BindingContent = _reflection.GeneratedProtocolMessageType('BindingContent', (_message.Message,), { + 'DESCRIPTOR' : _BINDINGCONTENT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.BindingContent) + }) +_sym_db.RegisterMessage(BindingContent) + +Binding = _reflection.GeneratedProtocolMessageType('Binding', (_message.Message,), { + 'DESCRIPTOR' : _BINDING, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.Binding) + }) +_sym_db.RegisterMessage(Binding) + +CreateBindingRequest = _reflection.GeneratedProtocolMessageType('CreateBindingRequest', (_message.Message,), { + 'DESCRIPTOR' : _CREATEBINDINGREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.CreateBindingRequest) + }) +_sym_db.RegisterMessage(CreateBindingRequest) + +CreateBindingResponse = _reflection.GeneratedProtocolMessageType('CreateBindingResponse', (_message.Message,), { + 'DESCRIPTOR' : _CREATEBINDINGRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.CreateBindingResponse) + }) +_sym_db.RegisterMessage(CreateBindingResponse) + +CreateBindingResult = _reflection.GeneratedProtocolMessageType('CreateBindingResult', (_message.Message,), { + 'DESCRIPTOR' : _CREATEBINDINGRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.CreateBindingResult) + }) +_sym_db.RegisterMessage(CreateBindingResult) + +ListBindingsRequest = _reflection.GeneratedProtocolMessageType('ListBindingsRequest', (_message.Message,), { + + 'Filter' : _reflection.GeneratedProtocolMessageType('Filter', (_message.Message,), { + 'DESCRIPTOR' : _LISTBINDINGSREQUEST_FILTER, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListBindingsRequest.Filter) + }) + , + 'DESCRIPTOR' : _LISTBINDINGSREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListBindingsRequest) + }) +_sym_db.RegisterMessage(ListBindingsRequest) +_sym_db.RegisterMessage(ListBindingsRequest.Filter) + +ListBindingsResponse = _reflection.GeneratedProtocolMessageType('ListBindingsResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTBINDINGSRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListBindingsResponse) + }) +_sym_db.RegisterMessage(ListBindingsResponse) + +ListBindingsResult = _reflection.GeneratedProtocolMessageType('ListBindingsResult', (_message.Message,), { + 'DESCRIPTOR' : _LISTBINDINGSRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ListBindingsResult) + }) +_sym_db.RegisterMessage(ListBindingsResult) + +DescribeBindingRequest = _reflection.GeneratedProtocolMessageType('DescribeBindingRequest', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEBINDINGREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DescribeBindingRequest) + }) +_sym_db.RegisterMessage(DescribeBindingRequest) + +DescribeBindingResponse = _reflection.GeneratedProtocolMessageType('DescribeBindingResponse', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEBINDINGRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DescribeBindingResponse) + }) +_sym_db.RegisterMessage(DescribeBindingResponse) + +DescribeBindingResult = _reflection.GeneratedProtocolMessageType('DescribeBindingResult', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEBINDINGRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DescribeBindingResult) + }) +_sym_db.RegisterMessage(DescribeBindingResult) + +ModifyBindingRequest = _reflection.GeneratedProtocolMessageType('ModifyBindingRequest', (_message.Message,), { + 'DESCRIPTOR' : _MODIFYBINDINGREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ModifyBindingRequest) + }) +_sym_db.RegisterMessage(ModifyBindingRequest) + +ModifyBindingResponse = _reflection.GeneratedProtocolMessageType('ModifyBindingResponse', (_message.Message,), { + 'DESCRIPTOR' : _MODIFYBINDINGRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ModifyBindingResponse) + }) +_sym_db.RegisterMessage(ModifyBindingResponse) + +ModifyBindingResult = _reflection.GeneratedProtocolMessageType('ModifyBindingResult', (_message.Message,), { + 'DESCRIPTOR' : _MODIFYBINDINGRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.ModifyBindingResult) + }) +_sym_db.RegisterMessage(ModifyBindingResult) + +DeleteBindingRequest = _reflection.GeneratedProtocolMessageType('DeleteBindingRequest', (_message.Message,), { + 'DESCRIPTOR' : _DELETEBINDINGREQUEST, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DeleteBindingRequest) + }) +_sym_db.RegisterMessage(DeleteBindingRequest) + +DeleteBindingResponse = _reflection.GeneratedProtocolMessageType('DeleteBindingResponse', (_message.Message,), { + 'DESCRIPTOR' : _DELETEBINDINGRESPONSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DeleteBindingResponse) + }) +_sym_db.RegisterMessage(DeleteBindingResponse) + +DeleteBindingResult = _reflection.GeneratedProtocolMessageType('DeleteBindingResult', (_message.Message,), { + 'DESCRIPTOR' : _DELETEBINDINGRESULT, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.DeleteBindingResult) + }) +_sym_db.RegisterMessage(DeleteBindingResult) + + +DESCRIPTOR._options = None +_LIMITS.fields_by_name['vcpu_rate_limit']._options = None +_LIMITS.fields_by_name['flow_rate_limit']._options = None +_LIMITS.fields_by_name['vcpu_time_limit']._options = None +_LIMITS.fields_by_name['max_result_size']._options = None +_LIMITS.fields_by_name['max_result_rows']._options = None +_LIMITS.fields_by_name['memory_limit']._options = None +_QUERYCONTENT_EXECUTIONSETTINGSENTRY._options = None +_QUERYCONTENT.fields_by_name['name']._options = None +_QUERYCONTENT.fields_by_name['text']._options = None +_QUERYCONTENT.fields_by_name['description']._options = None +_QUERYCONTENT.fields_by_name['execution_settings']._options = None +_COMMONMETA.fields_by_name['id']._options = None +_COMMONMETA.fields_by_name['created_by']._options = None +_COMMONMETA.fields_by_name['modified_by']._options = None +_COMMONMETA.fields_by_name['revision']._options = None +_BRIEFQUERY.fields_by_name['name']._options = None +_RESULTSETMETA.fields_by_name['rows_count']._options = None +_CREATEQUERYREQUEST.fields_by_name['idempotency_key']._options = None +_CREATEQUERYRESULT.fields_by_name['query_id']._options = None +_LISTQUERIESREQUEST_FILTER.fields_by_name['status']._options = None +_LISTQUERIESREQUEST_FILTER.fields_by_name['mode']._options = None +_LISTQUERIESREQUEST_FILTER.fields_by_name['name']._options = None +_LISTQUERIESREQUEST.fields_by_name['page_token']._options = None +_LISTQUERIESREQUEST.fields_by_name['limit']._options = None +_LISTQUERIESRESULT.fields_by_name['next_page_token']._options = None +_DESCRIBEQUERYREQUEST.fields_by_name['query_id']._options = None +_GETQUERYSTATUSREQUEST.fields_by_name['query_id']._options = None +_DELETEQUERYREQUEST.fields_by_name['query_id']._options = None +_DELETEQUERYREQUEST.fields_by_name['previous_revision']._options = None +_DELETEQUERYREQUEST.fields_by_name['idempotency_key']._options = None +_MODIFYQUERYREQUEST.fields_by_name['query_id']._options = None +_MODIFYQUERYREQUEST.fields_by_name['previous_revision']._options = None +_MODIFYQUERYREQUEST.fields_by_name['idempotency_key']._options = None +_CONTROLQUERYREQUEST.fields_by_name['query_id']._options = None +_CONTROLQUERYREQUEST.fields_by_name['previous_revision']._options = None +_CONTROLQUERYREQUEST.fields_by_name['idempotency_key']._options = None +_LISTJOBSREQUEST_FILTER.fields_by_name['query_id']._options = None +_LISTJOBSREQUEST.fields_by_name['page_token']._options = None +_LISTJOBSREQUEST.fields_by_name['limit']._options = None +_LISTJOBSRESULT.fields_by_name['next_page_token']._options = None +_DESCRIBEJOBREQUEST.fields_by_name['job_id']._options = None +_SERVICEACCOUNTAUTH.fields_by_name['id']._options = None +_DATASTREAMS.fields_by_name['database_id']._options = None +_DATASTREAMS.fields_by_name['endpoint']._options = None +_DATASTREAMS.fields_by_name['database']._options = None +_MONITORING.fields_by_name['project']._options = None +_MONITORING.fields_by_name['cluster']._options = None +_YDBDATABASE.fields_by_name['database_id']._options = None +_YDBDATABASE.fields_by_name['endpoint']._options = None +_YDBDATABASE.fields_by_name['database']._options = None +_CLICKHOUSECLUSTER.fields_by_name['database_id']._options = None +_CLICKHOUSECLUSTER.fields_by_name['database_name']._options = None +_CLICKHOUSECLUSTER.fields_by_name['login']._options = None +_CLICKHOUSECLUSTER.fields_by_name['password']._options = None +_CLICKHOUSECLUSTER.fields_by_name['host']._options = None +_CLICKHOUSECLUSTER.fields_by_name['port']._options = None +_OBJECTSTORAGECONNECTION.fields_by_name['bucket']._options = None +_POSTGRESQLCLUSTER.fields_by_name['database_id']._options = None +_POSTGRESQLCLUSTER.fields_by_name['database_name']._options = None +_POSTGRESQLCLUSTER.fields_by_name['login']._options = None +_POSTGRESQLCLUSTER.fields_by_name['password']._options = None +_POSTGRESQLCLUSTER.fields_by_name['schema']._options = None +_POSTGRESQLCLUSTER.fields_by_name['host']._options = None +_POSTGRESQLCLUSTER.fields_by_name['port']._options = None +_CONNECTIONCONTENT.fields_by_name['name']._options = None +_CONNECTIONCONTENT.fields_by_name['description']._options = None +_CREATECONNECTIONREQUEST.fields_by_name['idempotency_key']._options = None +_CREATECONNECTIONRESULT.fields_by_name['connection_id']._options = None +_LISTCONNECTIONSREQUEST_FILTER.fields_by_name['name']._options = None +_LISTCONNECTIONSREQUEST.fields_by_name['page_token']._options = None +_LISTCONNECTIONSREQUEST.fields_by_name['limit']._options = None +_LISTCONNECTIONSRESULT.fields_by_name['next_page_token']._options = None +_DESCRIBECONNECTIONREQUEST.fields_by_name['connection_id']._options = None +_MODIFYCONNECTIONREQUEST.fields_by_name['connection_id']._options = None +_MODIFYCONNECTIONREQUEST.fields_by_name['previous_revision']._options = None +_MODIFYCONNECTIONREQUEST.fields_by_name['idempotency_key']._options = None +_DELETECONNECTIONREQUEST.fields_by_name['connection_id']._options = None +_DELETECONNECTIONREQUEST.fields_by_name['previous_revision']._options = None +_DELETECONNECTIONREQUEST.fields_by_name['idempotency_key']._options = None +_GETRESULTDATAREQUEST.fields_by_name['query_id']._options = None +_GETRESULTDATAREQUEST.fields_by_name['result_set_index']._options = None +_GETRESULTDATAREQUEST.fields_by_name['offset']._options = None +_GETRESULTDATAREQUEST.fields_by_name['limit']._options = None +_SCHEMA.fields_by_name['column']._options = None +_DATASTREAMSBINDING_FORMATSETTINGENTRY._options = None +_DATASTREAMSBINDING.fields_by_name['stream_name']._options = None +_DATASTREAMSBINDING.fields_by_name['format']._options = None +_DATASTREAMSBINDING.fields_by_name['compression']._options = None +_DATASTREAMSBINDING.fields_by_name['format_setting']._options = None +_OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._options = None +_OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._options = None +_OBJECTSTORAGEBINDING_SUBSET.fields_by_name['path_pattern']._options = None +_OBJECTSTORAGEBINDING_SUBSET.fields_by_name['format']._options = None +_OBJECTSTORAGEBINDING_SUBSET.fields_by_name['format_setting']._options = None +_OBJECTSTORAGEBINDING_SUBSET.fields_by_name['compression']._options = None +_BRIEFBINDING.fields_by_name['name']._options = None +_BRIEFBINDING.fields_by_name['connection_id']._options = None +_BINDINGCONTENT.fields_by_name['name']._options = None +_BINDINGCONTENT.fields_by_name['connection_id']._options = None +_BINDINGCONTENT.fields_by_name['description']._options = None +_CREATEBINDINGREQUEST.fields_by_name['idempotency_key']._options = None +_CREATEBINDINGRESULT.fields_by_name['binding_id']._options = None +_LISTBINDINGSREQUEST_FILTER.fields_by_name['connection_id']._options = None +_LISTBINDINGSREQUEST_FILTER.fields_by_name['name']._options = None +_LISTBINDINGSREQUEST.fields_by_name['page_token']._options = None +_LISTBINDINGSREQUEST.fields_by_name['limit']._options = None +_LISTBINDINGSRESULT.fields_by_name['next_page_token']._options = None +_DESCRIBEBINDINGREQUEST.fields_by_name['binding_id']._options = None +_MODIFYBINDINGREQUEST.fields_by_name['binding_id']._options = None +_MODIFYBINDINGREQUEST.fields_by_name['previous_revision']._options = None +_MODIFYBINDINGREQUEST.fields_by_name['idempotency_key']._options = None +_DELETEBINDINGREQUEST.fields_by_name['binding_id']._options = None +_DELETEBINDINGREQUEST.fields_by_name['previous_revision']._options = None +_DELETEBINDINGREQUEST.fields_by_name['idempotency_key']._options = None +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v3/draft/protos/ydb_federated_query_pb2_grpc.py b/ydb/_grpc/v3/draft/protos/ydb_federated_query_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v3/draft/protos/ydb_federated_query_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v3/draft/protos/ydb_keyvalue_pb2.py b/ydb/_grpc/v3/draft/protos/ydb_keyvalue_pb2.py new file mode 100644 index 00000000..703c6506 --- /dev/null +++ b/ydb/_grpc/v3/draft/protos/ydb_keyvalue_pb2.py @@ -0,0 +1,2612 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/protos/ydb_keyvalue.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v3.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='draft/protos/ydb_keyvalue.proto', + package='Ydb.KeyValue', + syntax='proto3', + serialized_options=b'\n tech.ydb.proto.draft.keyvalue.v1ZAgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_KeyValue\370\001\001', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\x1f\x64raft/protos/ydb_keyvalue.proto\x12\x0cYdb.KeyValue\x1a\x1aprotos/ydb_operation.proto\"\xf0\x01\n\x12StorageChannelInfo\x12\x17\n\x0fstorage_channel\x18\x01 \x01(\r\x12@\n\x0bstatus_flag\x18\x02 \x01(\x0e\x32+.Ydb.KeyValue.StorageChannelInfo.StatusFlag\"\x7f\n\nStatusFlag\x12\x1b\n\x17STATUS_FLAG_UNSPECIFIED\x10\x00\x12\x15\n\x11STATUS_FLAG_GREEN\x10\n\x12\x1b\n\x17STATUS_FLAG_YELLOW_STOP\x10\x14\x12 \n\x1cSTATUS_FLAG_ORANGE_OUT_SPACE\x10\x1e\"b\n\nPriorities\"T\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x15\n\x11PRIORITY_REALTIME\x10\x01\x12\x17\n\x13PRIORITY_BACKGROUND\x10\x02\"k\n\rStorageConfig\x12:\n\x07\x63hannel\x18\x01 \x03(\x0b\x32).Ydb.KeyValue.StorageConfig.ChannelConfig\x1a\x1e\n\rChannelConfig\x12\r\n\x05media\x18\x01 \x01(\t\"\x98\x01\n\x08KeyRange\x12\x1c\n\x12\x66rom_key_inclusive\x18\x01 \x01(\tH\x00\x12\x1c\n\x12\x66rom_key_exclusive\x18\x02 \x01(\tH\x00\x12\x1a\n\x10to_key_inclusive\x18\x03 \x01(\tH\x01\x12\x1a\n\x10to_key_exclusive\x18\x04 \x01(\tH\x01\x42\x0c\n\nfrom_boundB\n\n\x08to_bound\"s\n\x12\x41\x63quireLockRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\"C\n\x13\x41\x63quireLockResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"=\n\x11\x41\x63quireLockResult\x12\x17\n\x0flock_generation\x18\x01 \x01(\x04\x12\x0f\n\x07node_id\x18\x02 \x01(\r\"\xac\t\n\x19\x45xecuteTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12\x41\n\x08\x63ommands\x18\x05 \x03(\x0b\x32/.Ydb.KeyValue.ExecuteTransactionRequest.Command\x1a\xba\x07\n\x07\x43ommand\x12S\n\x0c\x64\x65lete_range\x18\x01 \x01(\x0b\x32;.Ydb.KeyValue.ExecuteTransactionRequest.Command.DeleteRangeH\x00\x12H\n\x06rename\x18\x02 \x01(\x0b\x32\x36.Ydb.KeyValue.ExecuteTransactionRequest.Command.RenameH\x00\x12O\n\ncopy_range\x18\x03 \x01(\x0b\x32\x39.Ydb.KeyValue.ExecuteTransactionRequest.Command.CopyRangeH\x00\x12H\n\x06\x63oncat\x18\x04 \x01(\x0b\x32\x36.Ydb.KeyValue.ExecuteTransactionRequest.Command.ConcatH\x00\x12\x46\n\x05write\x18\x05 \x01(\x0b\x32\x35.Ydb.KeyValue.ExecuteTransactionRequest.Command.WriteH\x00\x1a*\n\x06Rename\x12\x0f\n\x07old_key\x18\x01 \x01(\t\x12\x0f\n\x07new_key\x18\x02 \x01(\t\x1a\x45\n\x06\x43oncat\x12\x12\n\ninput_keys\x18\x01 \x03(\t\x12\x12\n\noutput_key\x18\x02 \x01(\t\x12\x13\n\x0bkeep_inputs\x18\x03 \x01(\x08\x1a\x63\n\tCopyRange\x12%\n\x05range\x18\x01 \x01(\x0b\x32\x16.Ydb.KeyValue.KeyRange\x12\x18\n\x10prefix_to_remove\x18\x02 \x01(\t\x12\x15\n\rprefix_to_add\x18\x03 \x01(\t\x1a\x94\x02\n\x05Write\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\x12\x17\n\x0fstorage_channel\x18\x03 \x01(\r\x12\x33\n\x08priority\x18\x04 \x01(\x0e\x32!.Ydb.KeyValue.Priorities.Priority\x12L\n\x06tactic\x18\x05 \x01(\x0e\x32<.Ydb.KeyValue.ExecuteTransactionRequest.Command.Write.Tactic\"S\n\x06Tactic\x12\x16\n\x12TACTIC_UNSPECIFIED\x10\x00\x12\x19\n\x15TACTIC_MAX_THROUGHPUT\x10\x01\x12\x16\n\x12TACTIC_MIN_LATENCY\x10\x02\x1a\x34\n\x0b\x44\x65leteRange\x12%\n\x05range\x18\x01 \x01(\x0b\x32\x16.Ydb.KeyValue.KeyRangeB\x08\n\x06\x61\x63tionB\x12\n\x10_lock_generation\"J\n\x1a\x45xecuteTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"k\n\x18\x45xecuteTransactionResult\x12>\n\x14storage_channel_info\x18\x01 \x03(\x0b\x32 .Ydb.KeyValue.StorageChannelInfo\x12\x0f\n\x07node_id\x18\x02 \x01(\r\"\x93\x02\n\x0bReadRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12\x0b\n\x03key\x18\x05 \x01(\t\x12\x0e\n\x06offset\x18\x06 \x01(\x04\x12\x0c\n\x04size\x18\x07 \x01(\x04\x12\x13\n\x0blimit_bytes\x18\x08 \x01(\x04\x12\x33\n\x08priority\x18\t \x01(\x0e\x32!.Ydb.KeyValue.Priorities.PriorityB\x12\n\x10_lock_generation\"<\n\x0cReadResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x89\x01\n\nReadResult\x12\x15\n\rrequested_key\x18\x01 \x01(\t\x12\x18\n\x10requested_offset\x18\x02 \x01(\x04\x12\x16\n\x0erequested_size\x18\x03 \x01(\x04\x12\r\n\x05value\x18\x04 \x01(\x0c\x12\x12\n\nis_overrun\x18\x05 \x01(\x08\x12\x0f\n\x07node_id\x18\x06 \x01(\r\"\x94\x02\n\x10ReadRangeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12%\n\x05range\x18\x05 \x01(\x0b\x32\x16.Ydb.KeyValue.KeyRange\x12\x13\n\x0blimit_bytes\x18\x06 \x01(\x04\x12\x33\n\x08priority\x18\x07 \x01(\x0e\x32!.Ydb.KeyValue.Priorities.PriorityB\x12\n\x10_lock_generation\"A\n\x11ReadRangeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xd1\x01\n\x0fReadRangeResult\x12\x38\n\x04pair\x18\x01 \x03(\x0b\x32*.Ydb.KeyValue.ReadRangeResult.KeyValuePair\x12\x12\n\nis_overrun\x18\x02 \x01(\x08\x12\x0f\n\x07node_id\x18\x03 \x01(\r\x1a_\n\x0cKeyValuePair\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\x12\x1a\n\x12\x63reation_unix_time\x18\x04 \x01(\x04\x12\x17\n\x0fstorage_channel\x18\x05 \x01(\r\"\xdf\x01\n\x10ListRangeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12%\n\x05range\x18\x05 \x01(\x0b\x32\x16.Ydb.KeyValue.KeyRange\x12\x13\n\x0blimit_bytes\x18\x06 \x01(\x04\x42\x12\n\x10_lock_generation\"A\n\x11ListRangeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xcb\x01\n\x0fListRangeResult\x12\x32\n\x03key\x18\x01 \x03(\x0b\x32%.Ydb.KeyValue.ListRangeResult.KeyInfo\x12\x12\n\nis_overrun\x18\x02 \x01(\x08\x12\x0f\n\x07node_id\x18\x03 \x01(\r\x1a_\n\x07KeyInfo\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x12\n\nvalue_size\x18\x02 \x01(\r\x12\x1a\n\x12\x63reation_unix_time\x18\x03 \x01(\x04\x12\x17\n\x0fstorage_channel\x18\x04 \x01(\r\"\xca\x01\n\x1eGetStorageChannelStatusRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12\x17\n\x0fstorage_channel\x18\x05 \x03(\rB\x12\n\x10_lock_generation\"O\n\x1fGetStorageChannelStatusResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"p\n\x1dGetStorageChannelStatusResult\x12>\n\x14storage_channel_info\x18\x01 \x03(\x0b\x32 .Ydb.KeyValue.StorageChannelInfo\x12\x0f\n\x07node_id\x18\x02 \x01(\r\"\xac\x01\n\x13\x43reateVolumeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x17\n\x0fpartition_count\x18\x04 \x01(\r\x12\x33\n\x0estorage_config\x18\x05 \x01(\x0b\x32\x1b.Ydb.KeyValue.StorageConfig\"D\n\x14\x43reateVolumeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43reateVolumeResult\"\\\n\x11\x44ropVolumeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"B\n\x12\x44ropVolumeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x44ropVolumeResult\"\xb1\x01\n\x12\x41lterVolumeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x1d\n\x15\x61lter_partition_count\x18\x03 \x01(\r\x12\x33\n\x0estorage_config\x18\x04 \x01(\x0b\x32\x1b.Ydb.KeyValue.StorageConfig\"C\n\x13\x41lterVolumeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x41lterVolumeResult\"`\n\x15\x44\x65scribeVolumeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"F\n\x16\x44\x65scribeVolumeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"=\n\x14\x44\x65scribeVolumeResult\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x17\n\x0fpartition_count\x18\x02 \x01(\x04\"v\n\x1aListLocalPartitionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x0f\n\x07node_id\x18\x03 \x01(\x04\"K\n\x1bListLocalPartitionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Q\n\x19ListLocalPartitionsResult\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0f\n\x07node_id\x18\x02 \x01(\x04\x12\x15\n\rpartition_ids\x18\x03 \x03(\x04\x42h\n tech.ydb.proto.draft.keyvalue.v1ZAgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_KeyValue\xf8\x01\x01\x62\x06proto3' + , + dependencies=[protos_dot_ydb__operation__pb2.DESCRIPTOR,]) + + + +_STORAGECHANNELINFO_STATUSFLAG = _descriptor.EnumDescriptor( + name='StatusFlag', + full_name='Ydb.KeyValue.StorageChannelInfo.StatusFlag', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='STATUS_FLAG_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='STATUS_FLAG_GREEN', index=1, number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='STATUS_FLAG_YELLOW_STOP', index=2, number=20, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='STATUS_FLAG_ORANGE_OUT_SPACE', index=3, number=30, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=191, + serialized_end=318, +) +_sym_db.RegisterEnumDescriptor(_STORAGECHANNELINFO_STATUSFLAG) + +_PRIORITIES_PRIORITY = _descriptor.EnumDescriptor( + name='Priority', + full_name='Ydb.KeyValue.Priorities.Priority', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='PRIORITY_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PRIORITY_REALTIME', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PRIORITY_BACKGROUND', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=334, + serialized_end=418, +) +_sym_db.RegisterEnumDescriptor(_PRIORITIES_PRIORITY) + +_EXECUTETRANSACTIONREQUEST_COMMAND_WRITE_TACTIC = _descriptor.EnumDescriptor( + name='Tactic', + full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.Write.Tactic', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='TACTIC_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='TACTIC_MAX_THROUGHPUT', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='TACTIC_MIN_LATENCY', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=1963, + serialized_end=2046, +) +_sym_db.RegisterEnumDescriptor(_EXECUTETRANSACTIONREQUEST_COMMAND_WRITE_TACTIC) + + +_STORAGECHANNELINFO = _descriptor.Descriptor( + name='StorageChannelInfo', + full_name='Ydb.KeyValue.StorageChannelInfo', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='storage_channel', full_name='Ydb.KeyValue.StorageChannelInfo.storage_channel', index=0, + number=1, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='status_flag', full_name='Ydb.KeyValue.StorageChannelInfo.status_flag', index=1, + number=2, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _STORAGECHANNELINFO_STATUSFLAG, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=78, + serialized_end=318, +) + + +_PRIORITIES = _descriptor.Descriptor( + name='Priorities', + full_name='Ydb.KeyValue.Priorities', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _PRIORITIES_PRIORITY, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=320, + serialized_end=418, +) + + +_STORAGECONFIG_CHANNELCONFIG = _descriptor.Descriptor( + name='ChannelConfig', + full_name='Ydb.KeyValue.StorageConfig.ChannelConfig', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='media', full_name='Ydb.KeyValue.StorageConfig.ChannelConfig.media', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=497, + serialized_end=527, +) + +_STORAGECONFIG = _descriptor.Descriptor( + name='StorageConfig', + full_name='Ydb.KeyValue.StorageConfig', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='channel', full_name='Ydb.KeyValue.StorageConfig.channel', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_STORAGECONFIG_CHANNELCONFIG, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=420, + serialized_end=527, +) + + +_KEYRANGE = _descriptor.Descriptor( + name='KeyRange', + full_name='Ydb.KeyValue.KeyRange', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='from_key_inclusive', full_name='Ydb.KeyValue.KeyRange.from_key_inclusive', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='from_key_exclusive', full_name='Ydb.KeyValue.KeyRange.from_key_exclusive', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='to_key_inclusive', full_name='Ydb.KeyValue.KeyRange.to_key_inclusive', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='to_key_exclusive', full_name='Ydb.KeyValue.KeyRange.to_key_exclusive', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='from_bound', full_name='Ydb.KeyValue.KeyRange.from_bound', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='to_bound', full_name='Ydb.KeyValue.KeyRange.to_bound', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=530, + serialized_end=682, +) + + +_ACQUIRELOCKREQUEST = _descriptor.Descriptor( + name='AcquireLockRequest', + full_name='Ydb.KeyValue.AcquireLockRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='Ydb.KeyValue.AcquireLockRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.KeyValue.AcquireLockRequest.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_id', full_name='Ydb.KeyValue.AcquireLockRequest.partition_id', index=2, + number=3, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=684, + serialized_end=799, +) + + +_ACQUIRELOCKRESPONSE = _descriptor.Descriptor( + name='AcquireLockResponse', + full_name='Ydb.KeyValue.AcquireLockResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.KeyValue.AcquireLockResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=801, + serialized_end=868, +) + + +_ACQUIRELOCKRESULT = _descriptor.Descriptor( + name='AcquireLockResult', + full_name='Ydb.KeyValue.AcquireLockResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='lock_generation', full_name='Ydb.KeyValue.AcquireLockResult.lock_generation', index=0, + number=1, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='node_id', full_name='Ydb.KeyValue.AcquireLockResult.node_id', index=1, + number=2, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=870, + serialized_end=931, +) + + +_EXECUTETRANSACTIONREQUEST_COMMAND_RENAME = _descriptor.Descriptor( + name='Rename', + full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.Rename', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='old_key', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.Rename.old_key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='new_key', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.Rename.new_key', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1553, + serialized_end=1595, +) + +_EXECUTETRANSACTIONREQUEST_COMMAND_CONCAT = _descriptor.Descriptor( + name='Concat', + full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.Concat', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='input_keys', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.Concat.input_keys', index=0, + number=1, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='output_key', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.Concat.output_key', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='keep_inputs', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.Concat.keep_inputs', index=2, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1597, + serialized_end=1666, +) + +_EXECUTETRANSACTIONREQUEST_COMMAND_COPYRANGE = _descriptor.Descriptor( + name='CopyRange', + full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.CopyRange', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='range', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.CopyRange.range', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='prefix_to_remove', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.CopyRange.prefix_to_remove', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='prefix_to_add', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.CopyRange.prefix_to_add', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1668, + serialized_end=1767, +) + +_EXECUTETRANSACTIONREQUEST_COMMAND_WRITE = _descriptor.Descriptor( + name='Write', + full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.Write', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.Write.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.Write.value', index=1, + number=2, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='storage_channel', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.Write.storage_channel', index=2, + number=3, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='priority', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.Write.priority', index=3, + number=4, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='tactic', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.Write.tactic', index=4, + number=5, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _EXECUTETRANSACTIONREQUEST_COMMAND_WRITE_TACTIC, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1770, + serialized_end=2046, +) + +_EXECUTETRANSACTIONREQUEST_COMMAND_DELETERANGE = _descriptor.Descriptor( + name='DeleteRange', + full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.DeleteRange', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='range', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.DeleteRange.range', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2048, + serialized_end=2100, +) + +_EXECUTETRANSACTIONREQUEST_COMMAND = _descriptor.Descriptor( + name='Command', + full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='delete_range', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.delete_range', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='rename', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.rename', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='copy_range', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.copy_range', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='concat', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.concat', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='write', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.write', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_EXECUTETRANSACTIONREQUEST_COMMAND_RENAME, _EXECUTETRANSACTIONREQUEST_COMMAND_CONCAT, _EXECUTETRANSACTIONREQUEST_COMMAND_COPYRANGE, _EXECUTETRANSACTIONREQUEST_COMMAND_WRITE, _EXECUTETRANSACTIONREQUEST_COMMAND_DELETERANGE, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='action', full_name='Ydb.KeyValue.ExecuteTransactionRequest.Command.action', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=1156, + serialized_end=2110, +) + +_EXECUTETRANSACTIONREQUEST = _descriptor.Descriptor( + name='ExecuteTransactionRequest', + full_name='Ydb.KeyValue.ExecuteTransactionRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='Ydb.KeyValue.ExecuteTransactionRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.KeyValue.ExecuteTransactionRequest.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_id', full_name='Ydb.KeyValue.ExecuteTransactionRequest.partition_id', index=2, + number=3, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='lock_generation', full_name='Ydb.KeyValue.ExecuteTransactionRequest.lock_generation', index=3, + number=4, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='commands', full_name='Ydb.KeyValue.ExecuteTransactionRequest.commands', index=4, + number=5, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_EXECUTETRANSACTIONREQUEST_COMMAND, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_lock_generation', full_name='Ydb.KeyValue.ExecuteTransactionRequest._lock_generation', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=934, + serialized_end=2130, +) + + +_EXECUTETRANSACTIONRESPONSE = _descriptor.Descriptor( + name='ExecuteTransactionResponse', + full_name='Ydb.KeyValue.ExecuteTransactionResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.KeyValue.ExecuteTransactionResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2132, + serialized_end=2206, +) + + +_EXECUTETRANSACTIONRESULT = _descriptor.Descriptor( + name='ExecuteTransactionResult', + full_name='Ydb.KeyValue.ExecuteTransactionResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='storage_channel_info', full_name='Ydb.KeyValue.ExecuteTransactionResult.storage_channel_info', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='node_id', full_name='Ydb.KeyValue.ExecuteTransactionResult.node_id', index=1, + number=2, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2208, + serialized_end=2315, +) + + +_READREQUEST = _descriptor.Descriptor( + name='ReadRequest', + full_name='Ydb.KeyValue.ReadRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='Ydb.KeyValue.ReadRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.KeyValue.ReadRequest.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_id', full_name='Ydb.KeyValue.ReadRequest.partition_id', index=2, + number=3, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='lock_generation', full_name='Ydb.KeyValue.ReadRequest.lock_generation', index=3, + number=4, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='key', full_name='Ydb.KeyValue.ReadRequest.key', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='offset', full_name='Ydb.KeyValue.ReadRequest.offset', index=5, + number=6, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='size', full_name='Ydb.KeyValue.ReadRequest.size', index=6, + number=7, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='limit_bytes', full_name='Ydb.KeyValue.ReadRequest.limit_bytes', index=7, + number=8, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='priority', full_name='Ydb.KeyValue.ReadRequest.priority', index=8, + number=9, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_lock_generation', full_name='Ydb.KeyValue.ReadRequest._lock_generation', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=2318, + serialized_end=2593, +) + + +_READRESPONSE = _descriptor.Descriptor( + name='ReadResponse', + full_name='Ydb.KeyValue.ReadResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.KeyValue.ReadResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2595, + serialized_end=2655, +) + + +_READRESULT = _descriptor.Descriptor( + name='ReadResult', + full_name='Ydb.KeyValue.ReadResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='requested_key', full_name='Ydb.KeyValue.ReadResult.requested_key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='requested_offset', full_name='Ydb.KeyValue.ReadResult.requested_offset', index=1, + number=2, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='requested_size', full_name='Ydb.KeyValue.ReadResult.requested_size', index=2, + number=3, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='Ydb.KeyValue.ReadResult.value', index=3, + number=4, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='is_overrun', full_name='Ydb.KeyValue.ReadResult.is_overrun', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='node_id', full_name='Ydb.KeyValue.ReadResult.node_id', index=5, + number=6, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2658, + serialized_end=2795, +) + + +_READRANGEREQUEST = _descriptor.Descriptor( + name='ReadRangeRequest', + full_name='Ydb.KeyValue.ReadRangeRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='Ydb.KeyValue.ReadRangeRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.KeyValue.ReadRangeRequest.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_id', full_name='Ydb.KeyValue.ReadRangeRequest.partition_id', index=2, + number=3, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='lock_generation', full_name='Ydb.KeyValue.ReadRangeRequest.lock_generation', index=3, + number=4, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='range', full_name='Ydb.KeyValue.ReadRangeRequest.range', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='limit_bytes', full_name='Ydb.KeyValue.ReadRangeRequest.limit_bytes', index=5, + number=6, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='priority', full_name='Ydb.KeyValue.ReadRangeRequest.priority', index=6, + number=7, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_lock_generation', full_name='Ydb.KeyValue.ReadRangeRequest._lock_generation', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=2798, + serialized_end=3074, +) + + +_READRANGERESPONSE = _descriptor.Descriptor( + name='ReadRangeResponse', + full_name='Ydb.KeyValue.ReadRangeResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.KeyValue.ReadRangeResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3076, + serialized_end=3141, +) + + +_READRANGERESULT_KEYVALUEPAIR = _descriptor.Descriptor( + name='KeyValuePair', + full_name='Ydb.KeyValue.ReadRangeResult.KeyValuePair', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='Ydb.KeyValue.ReadRangeResult.KeyValuePair.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='Ydb.KeyValue.ReadRangeResult.KeyValuePair.value', index=1, + number=2, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='creation_unix_time', full_name='Ydb.KeyValue.ReadRangeResult.KeyValuePair.creation_unix_time', index=2, + number=4, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='storage_channel', full_name='Ydb.KeyValue.ReadRangeResult.KeyValuePair.storage_channel', index=3, + number=5, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3258, + serialized_end=3353, +) + +_READRANGERESULT = _descriptor.Descriptor( + name='ReadRangeResult', + full_name='Ydb.KeyValue.ReadRangeResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='pair', full_name='Ydb.KeyValue.ReadRangeResult.pair', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='is_overrun', full_name='Ydb.KeyValue.ReadRangeResult.is_overrun', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='node_id', full_name='Ydb.KeyValue.ReadRangeResult.node_id', index=2, + number=3, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_READRANGERESULT_KEYVALUEPAIR, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3144, + serialized_end=3353, +) + + +_LISTRANGEREQUEST = _descriptor.Descriptor( + name='ListRangeRequest', + full_name='Ydb.KeyValue.ListRangeRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='Ydb.KeyValue.ListRangeRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.KeyValue.ListRangeRequest.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_id', full_name='Ydb.KeyValue.ListRangeRequest.partition_id', index=2, + number=3, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='lock_generation', full_name='Ydb.KeyValue.ListRangeRequest.lock_generation', index=3, + number=4, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='range', full_name='Ydb.KeyValue.ListRangeRequest.range', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='limit_bytes', full_name='Ydb.KeyValue.ListRangeRequest.limit_bytes', index=5, + number=6, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_lock_generation', full_name='Ydb.KeyValue.ListRangeRequest._lock_generation', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=3356, + serialized_end=3579, +) + + +_LISTRANGERESPONSE = _descriptor.Descriptor( + name='ListRangeResponse', + full_name='Ydb.KeyValue.ListRangeResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.KeyValue.ListRangeResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3581, + serialized_end=3646, +) + + +_LISTRANGERESULT_KEYINFO = _descriptor.Descriptor( + name='KeyInfo', + full_name='Ydb.KeyValue.ListRangeResult.KeyInfo', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='Ydb.KeyValue.ListRangeResult.KeyInfo.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value_size', full_name='Ydb.KeyValue.ListRangeResult.KeyInfo.value_size', index=1, + number=2, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='creation_unix_time', full_name='Ydb.KeyValue.ListRangeResult.KeyInfo.creation_unix_time', index=2, + number=3, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='storage_channel', full_name='Ydb.KeyValue.ListRangeResult.KeyInfo.storage_channel', index=3, + number=4, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3757, + serialized_end=3852, +) + +_LISTRANGERESULT = _descriptor.Descriptor( + name='ListRangeResult', + full_name='Ydb.KeyValue.ListRangeResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='Ydb.KeyValue.ListRangeResult.key', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='is_overrun', full_name='Ydb.KeyValue.ListRangeResult.is_overrun', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='node_id', full_name='Ydb.KeyValue.ListRangeResult.node_id', index=2, + number=3, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_LISTRANGERESULT_KEYINFO, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3649, + serialized_end=3852, +) + + +_GETSTORAGECHANNELSTATUSREQUEST = _descriptor.Descriptor( + name='GetStorageChannelStatusRequest', + full_name='Ydb.KeyValue.GetStorageChannelStatusRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='Ydb.KeyValue.GetStorageChannelStatusRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.KeyValue.GetStorageChannelStatusRequest.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_id', full_name='Ydb.KeyValue.GetStorageChannelStatusRequest.partition_id', index=2, + number=3, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='lock_generation', full_name='Ydb.KeyValue.GetStorageChannelStatusRequest.lock_generation', index=3, + number=4, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='storage_channel', full_name='Ydb.KeyValue.GetStorageChannelStatusRequest.storage_channel', index=4, + number=5, type=13, cpp_type=3, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_lock_generation', full_name='Ydb.KeyValue.GetStorageChannelStatusRequest._lock_generation', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=3855, + serialized_end=4057, +) + + +_GETSTORAGECHANNELSTATUSRESPONSE = _descriptor.Descriptor( + name='GetStorageChannelStatusResponse', + full_name='Ydb.KeyValue.GetStorageChannelStatusResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.KeyValue.GetStorageChannelStatusResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4059, + serialized_end=4138, +) + + +_GETSTORAGECHANNELSTATUSRESULT = _descriptor.Descriptor( + name='GetStorageChannelStatusResult', + full_name='Ydb.KeyValue.GetStorageChannelStatusResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='storage_channel_info', full_name='Ydb.KeyValue.GetStorageChannelStatusResult.storage_channel_info', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='node_id', full_name='Ydb.KeyValue.GetStorageChannelStatusResult.node_id', index=1, + number=2, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4140, + serialized_end=4252, +) + + +_CREATEVOLUMEREQUEST = _descriptor.Descriptor( + name='CreateVolumeRequest', + full_name='Ydb.KeyValue.CreateVolumeRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='Ydb.KeyValue.CreateVolumeRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.KeyValue.CreateVolumeRequest.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_count', full_name='Ydb.KeyValue.CreateVolumeRequest.partition_count', index=2, + number=4, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='storage_config', full_name='Ydb.KeyValue.CreateVolumeRequest.storage_config', index=3, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4255, + serialized_end=4427, +) + + +_CREATEVOLUMERESPONSE = _descriptor.Descriptor( + name='CreateVolumeResponse', + full_name='Ydb.KeyValue.CreateVolumeResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.KeyValue.CreateVolumeResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4429, + serialized_end=4497, +) + + +_CREATEVOLUMERESULT = _descriptor.Descriptor( + name='CreateVolumeResult', + full_name='Ydb.KeyValue.CreateVolumeResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4499, + serialized_end=4519, +) + + +_DROPVOLUMEREQUEST = _descriptor.Descriptor( + name='DropVolumeRequest', + full_name='Ydb.KeyValue.DropVolumeRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='Ydb.KeyValue.DropVolumeRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.KeyValue.DropVolumeRequest.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4521, + serialized_end=4613, +) + + +_DROPVOLUMERESPONSE = _descriptor.Descriptor( + name='DropVolumeResponse', + full_name='Ydb.KeyValue.DropVolumeResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.KeyValue.DropVolumeResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4615, + serialized_end=4681, +) + + +_DROPVOLUMERESULT = _descriptor.Descriptor( + name='DropVolumeResult', + full_name='Ydb.KeyValue.DropVolumeResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4683, + serialized_end=4701, +) + + +_ALTERVOLUMEREQUEST = _descriptor.Descriptor( + name='AlterVolumeRequest', + full_name='Ydb.KeyValue.AlterVolumeRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='Ydb.KeyValue.AlterVolumeRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.KeyValue.AlterVolumeRequest.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='alter_partition_count', full_name='Ydb.KeyValue.AlterVolumeRequest.alter_partition_count', index=2, + number=3, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='storage_config', full_name='Ydb.KeyValue.AlterVolumeRequest.storage_config', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4704, + serialized_end=4881, +) + + +_ALTERVOLUMERESPONSE = _descriptor.Descriptor( + name='AlterVolumeResponse', + full_name='Ydb.KeyValue.AlterVolumeResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.KeyValue.AlterVolumeResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4883, + serialized_end=4950, +) + + +_ALTERVOLUMERESULT = _descriptor.Descriptor( + name='AlterVolumeResult', + full_name='Ydb.KeyValue.AlterVolumeResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4952, + serialized_end=4971, +) + + +_DESCRIBEVOLUMEREQUEST = _descriptor.Descriptor( + name='DescribeVolumeRequest', + full_name='Ydb.KeyValue.DescribeVolumeRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='Ydb.KeyValue.DescribeVolumeRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.KeyValue.DescribeVolumeRequest.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4973, + serialized_end=5069, +) + + +_DESCRIBEVOLUMERESPONSE = _descriptor.Descriptor( + name='DescribeVolumeResponse', + full_name='Ydb.KeyValue.DescribeVolumeResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.KeyValue.DescribeVolumeResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5071, + serialized_end=5141, +) + + +_DESCRIBEVOLUMERESULT = _descriptor.Descriptor( + name='DescribeVolumeResult', + full_name='Ydb.KeyValue.DescribeVolumeResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.KeyValue.DescribeVolumeResult.path', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_count', full_name='Ydb.KeyValue.DescribeVolumeResult.partition_count', index=1, + number=2, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5143, + serialized_end=5204, +) + + +_LISTLOCALPARTITIONSREQUEST = _descriptor.Descriptor( + name='ListLocalPartitionsRequest', + full_name='Ydb.KeyValue.ListLocalPartitionsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='Ydb.KeyValue.ListLocalPartitionsRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.KeyValue.ListLocalPartitionsRequest.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='node_id', full_name='Ydb.KeyValue.ListLocalPartitionsRequest.node_id', index=2, + number=3, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5206, + serialized_end=5324, +) + + +_LISTLOCALPARTITIONSRESPONSE = _descriptor.Descriptor( + name='ListLocalPartitionsResponse', + full_name='Ydb.KeyValue.ListLocalPartitionsResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.KeyValue.ListLocalPartitionsResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5326, + serialized_end=5401, +) + + +_LISTLOCALPARTITIONSRESULT = _descriptor.Descriptor( + name='ListLocalPartitionsResult', + full_name='Ydb.KeyValue.ListLocalPartitionsResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.KeyValue.ListLocalPartitionsResult.path', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='node_id', full_name='Ydb.KeyValue.ListLocalPartitionsResult.node_id', index=1, + number=2, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_ids', full_name='Ydb.KeyValue.ListLocalPartitionsResult.partition_ids', index=2, + number=3, type=4, cpp_type=4, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5403, + serialized_end=5484, +) + +_STORAGECHANNELINFO.fields_by_name['status_flag'].enum_type = _STORAGECHANNELINFO_STATUSFLAG +_STORAGECHANNELINFO_STATUSFLAG.containing_type = _STORAGECHANNELINFO +_PRIORITIES_PRIORITY.containing_type = _PRIORITIES +_STORAGECONFIG_CHANNELCONFIG.containing_type = _STORAGECONFIG +_STORAGECONFIG.fields_by_name['channel'].message_type = _STORAGECONFIG_CHANNELCONFIG +_KEYRANGE.oneofs_by_name['from_bound'].fields.append( + _KEYRANGE.fields_by_name['from_key_inclusive']) +_KEYRANGE.fields_by_name['from_key_inclusive'].containing_oneof = _KEYRANGE.oneofs_by_name['from_bound'] +_KEYRANGE.oneofs_by_name['from_bound'].fields.append( + _KEYRANGE.fields_by_name['from_key_exclusive']) +_KEYRANGE.fields_by_name['from_key_exclusive'].containing_oneof = _KEYRANGE.oneofs_by_name['from_bound'] +_KEYRANGE.oneofs_by_name['to_bound'].fields.append( + _KEYRANGE.fields_by_name['to_key_inclusive']) +_KEYRANGE.fields_by_name['to_key_inclusive'].containing_oneof = _KEYRANGE.oneofs_by_name['to_bound'] +_KEYRANGE.oneofs_by_name['to_bound'].fields.append( + _KEYRANGE.fields_by_name['to_key_exclusive']) +_KEYRANGE.fields_by_name['to_key_exclusive'].containing_oneof = _KEYRANGE.oneofs_by_name['to_bound'] +_ACQUIRELOCKREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_ACQUIRELOCKRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_EXECUTETRANSACTIONREQUEST_COMMAND_RENAME.containing_type = _EXECUTETRANSACTIONREQUEST_COMMAND +_EXECUTETRANSACTIONREQUEST_COMMAND_CONCAT.containing_type = _EXECUTETRANSACTIONREQUEST_COMMAND +_EXECUTETRANSACTIONREQUEST_COMMAND_COPYRANGE.fields_by_name['range'].message_type = _KEYRANGE +_EXECUTETRANSACTIONREQUEST_COMMAND_COPYRANGE.containing_type = _EXECUTETRANSACTIONREQUEST_COMMAND +_EXECUTETRANSACTIONREQUEST_COMMAND_WRITE.fields_by_name['priority'].enum_type = _PRIORITIES_PRIORITY +_EXECUTETRANSACTIONREQUEST_COMMAND_WRITE.fields_by_name['tactic'].enum_type = _EXECUTETRANSACTIONREQUEST_COMMAND_WRITE_TACTIC +_EXECUTETRANSACTIONREQUEST_COMMAND_WRITE.containing_type = _EXECUTETRANSACTIONREQUEST_COMMAND +_EXECUTETRANSACTIONREQUEST_COMMAND_WRITE_TACTIC.containing_type = _EXECUTETRANSACTIONREQUEST_COMMAND_WRITE +_EXECUTETRANSACTIONREQUEST_COMMAND_DELETERANGE.fields_by_name['range'].message_type = _KEYRANGE +_EXECUTETRANSACTIONREQUEST_COMMAND_DELETERANGE.containing_type = _EXECUTETRANSACTIONREQUEST_COMMAND +_EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['delete_range'].message_type = _EXECUTETRANSACTIONREQUEST_COMMAND_DELETERANGE +_EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['rename'].message_type = _EXECUTETRANSACTIONREQUEST_COMMAND_RENAME +_EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['copy_range'].message_type = _EXECUTETRANSACTIONREQUEST_COMMAND_COPYRANGE +_EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['concat'].message_type = _EXECUTETRANSACTIONREQUEST_COMMAND_CONCAT +_EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['write'].message_type = _EXECUTETRANSACTIONREQUEST_COMMAND_WRITE +_EXECUTETRANSACTIONREQUEST_COMMAND.containing_type = _EXECUTETRANSACTIONREQUEST +_EXECUTETRANSACTIONREQUEST_COMMAND.oneofs_by_name['action'].fields.append( + _EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['delete_range']) +_EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['delete_range'].containing_oneof = _EXECUTETRANSACTIONREQUEST_COMMAND.oneofs_by_name['action'] +_EXECUTETRANSACTIONREQUEST_COMMAND.oneofs_by_name['action'].fields.append( + _EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['rename']) +_EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['rename'].containing_oneof = _EXECUTETRANSACTIONREQUEST_COMMAND.oneofs_by_name['action'] +_EXECUTETRANSACTIONREQUEST_COMMAND.oneofs_by_name['action'].fields.append( + _EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['copy_range']) +_EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['copy_range'].containing_oneof = _EXECUTETRANSACTIONREQUEST_COMMAND.oneofs_by_name['action'] +_EXECUTETRANSACTIONREQUEST_COMMAND.oneofs_by_name['action'].fields.append( + _EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['concat']) +_EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['concat'].containing_oneof = _EXECUTETRANSACTIONREQUEST_COMMAND.oneofs_by_name['action'] +_EXECUTETRANSACTIONREQUEST_COMMAND.oneofs_by_name['action'].fields.append( + _EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['write']) +_EXECUTETRANSACTIONREQUEST_COMMAND.fields_by_name['write'].containing_oneof = _EXECUTETRANSACTIONREQUEST_COMMAND.oneofs_by_name['action'] +_EXECUTETRANSACTIONREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_EXECUTETRANSACTIONREQUEST.fields_by_name['commands'].message_type = _EXECUTETRANSACTIONREQUEST_COMMAND +_EXECUTETRANSACTIONREQUEST.oneofs_by_name['_lock_generation'].fields.append( + _EXECUTETRANSACTIONREQUEST.fields_by_name['lock_generation']) +_EXECUTETRANSACTIONREQUEST.fields_by_name['lock_generation'].containing_oneof = _EXECUTETRANSACTIONREQUEST.oneofs_by_name['_lock_generation'] +_EXECUTETRANSACTIONRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_EXECUTETRANSACTIONRESULT.fields_by_name['storage_channel_info'].message_type = _STORAGECHANNELINFO +_READREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_READREQUEST.fields_by_name['priority'].enum_type = _PRIORITIES_PRIORITY +_READREQUEST.oneofs_by_name['_lock_generation'].fields.append( + _READREQUEST.fields_by_name['lock_generation']) +_READREQUEST.fields_by_name['lock_generation'].containing_oneof = _READREQUEST.oneofs_by_name['_lock_generation'] +_READRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_READRANGEREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_READRANGEREQUEST.fields_by_name['range'].message_type = _KEYRANGE +_READRANGEREQUEST.fields_by_name['priority'].enum_type = _PRIORITIES_PRIORITY +_READRANGEREQUEST.oneofs_by_name['_lock_generation'].fields.append( + _READRANGEREQUEST.fields_by_name['lock_generation']) +_READRANGEREQUEST.fields_by_name['lock_generation'].containing_oneof = _READRANGEREQUEST.oneofs_by_name['_lock_generation'] +_READRANGERESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_READRANGERESULT_KEYVALUEPAIR.containing_type = _READRANGERESULT +_READRANGERESULT.fields_by_name['pair'].message_type = _READRANGERESULT_KEYVALUEPAIR +_LISTRANGEREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_LISTRANGEREQUEST.fields_by_name['range'].message_type = _KEYRANGE +_LISTRANGEREQUEST.oneofs_by_name['_lock_generation'].fields.append( + _LISTRANGEREQUEST.fields_by_name['lock_generation']) +_LISTRANGEREQUEST.fields_by_name['lock_generation'].containing_oneof = _LISTRANGEREQUEST.oneofs_by_name['_lock_generation'] +_LISTRANGERESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_LISTRANGERESULT_KEYINFO.containing_type = _LISTRANGERESULT +_LISTRANGERESULT.fields_by_name['key'].message_type = _LISTRANGERESULT_KEYINFO +_GETSTORAGECHANNELSTATUSREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_GETSTORAGECHANNELSTATUSREQUEST.oneofs_by_name['_lock_generation'].fields.append( + _GETSTORAGECHANNELSTATUSREQUEST.fields_by_name['lock_generation']) +_GETSTORAGECHANNELSTATUSREQUEST.fields_by_name['lock_generation'].containing_oneof = _GETSTORAGECHANNELSTATUSREQUEST.oneofs_by_name['_lock_generation'] +_GETSTORAGECHANNELSTATUSRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_GETSTORAGECHANNELSTATUSRESULT.fields_by_name['storage_channel_info'].message_type = _STORAGECHANNELINFO +_CREATEVOLUMEREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_CREATEVOLUMEREQUEST.fields_by_name['storage_config'].message_type = _STORAGECONFIG +_CREATEVOLUMERESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_DROPVOLUMEREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_DROPVOLUMERESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_ALTERVOLUMEREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_ALTERVOLUMEREQUEST.fields_by_name['storage_config'].message_type = _STORAGECONFIG +_ALTERVOLUMERESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_DESCRIBEVOLUMEREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_DESCRIBEVOLUMERESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_LISTLOCALPARTITIONSREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_LISTLOCALPARTITIONSRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +DESCRIPTOR.message_types_by_name['StorageChannelInfo'] = _STORAGECHANNELINFO +DESCRIPTOR.message_types_by_name['Priorities'] = _PRIORITIES +DESCRIPTOR.message_types_by_name['StorageConfig'] = _STORAGECONFIG +DESCRIPTOR.message_types_by_name['KeyRange'] = _KEYRANGE +DESCRIPTOR.message_types_by_name['AcquireLockRequest'] = _ACQUIRELOCKREQUEST +DESCRIPTOR.message_types_by_name['AcquireLockResponse'] = _ACQUIRELOCKRESPONSE +DESCRIPTOR.message_types_by_name['AcquireLockResult'] = _ACQUIRELOCKRESULT +DESCRIPTOR.message_types_by_name['ExecuteTransactionRequest'] = _EXECUTETRANSACTIONREQUEST +DESCRIPTOR.message_types_by_name['ExecuteTransactionResponse'] = _EXECUTETRANSACTIONRESPONSE +DESCRIPTOR.message_types_by_name['ExecuteTransactionResult'] = _EXECUTETRANSACTIONRESULT +DESCRIPTOR.message_types_by_name['ReadRequest'] = _READREQUEST +DESCRIPTOR.message_types_by_name['ReadResponse'] = _READRESPONSE +DESCRIPTOR.message_types_by_name['ReadResult'] = _READRESULT +DESCRIPTOR.message_types_by_name['ReadRangeRequest'] = _READRANGEREQUEST +DESCRIPTOR.message_types_by_name['ReadRangeResponse'] = _READRANGERESPONSE +DESCRIPTOR.message_types_by_name['ReadRangeResult'] = _READRANGERESULT +DESCRIPTOR.message_types_by_name['ListRangeRequest'] = _LISTRANGEREQUEST +DESCRIPTOR.message_types_by_name['ListRangeResponse'] = _LISTRANGERESPONSE +DESCRIPTOR.message_types_by_name['ListRangeResult'] = _LISTRANGERESULT +DESCRIPTOR.message_types_by_name['GetStorageChannelStatusRequest'] = _GETSTORAGECHANNELSTATUSREQUEST +DESCRIPTOR.message_types_by_name['GetStorageChannelStatusResponse'] = _GETSTORAGECHANNELSTATUSRESPONSE +DESCRIPTOR.message_types_by_name['GetStorageChannelStatusResult'] = _GETSTORAGECHANNELSTATUSRESULT +DESCRIPTOR.message_types_by_name['CreateVolumeRequest'] = _CREATEVOLUMEREQUEST +DESCRIPTOR.message_types_by_name['CreateVolumeResponse'] = _CREATEVOLUMERESPONSE +DESCRIPTOR.message_types_by_name['CreateVolumeResult'] = _CREATEVOLUMERESULT +DESCRIPTOR.message_types_by_name['DropVolumeRequest'] = _DROPVOLUMEREQUEST +DESCRIPTOR.message_types_by_name['DropVolumeResponse'] = _DROPVOLUMERESPONSE +DESCRIPTOR.message_types_by_name['DropVolumeResult'] = _DROPVOLUMERESULT +DESCRIPTOR.message_types_by_name['AlterVolumeRequest'] = _ALTERVOLUMEREQUEST +DESCRIPTOR.message_types_by_name['AlterVolumeResponse'] = _ALTERVOLUMERESPONSE +DESCRIPTOR.message_types_by_name['AlterVolumeResult'] = _ALTERVOLUMERESULT +DESCRIPTOR.message_types_by_name['DescribeVolumeRequest'] = _DESCRIBEVOLUMEREQUEST +DESCRIPTOR.message_types_by_name['DescribeVolumeResponse'] = _DESCRIBEVOLUMERESPONSE +DESCRIPTOR.message_types_by_name['DescribeVolumeResult'] = _DESCRIBEVOLUMERESULT +DESCRIPTOR.message_types_by_name['ListLocalPartitionsRequest'] = _LISTLOCALPARTITIONSREQUEST +DESCRIPTOR.message_types_by_name['ListLocalPartitionsResponse'] = _LISTLOCALPARTITIONSRESPONSE +DESCRIPTOR.message_types_by_name['ListLocalPartitionsResult'] = _LISTLOCALPARTITIONSRESULT +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +StorageChannelInfo = _reflection.GeneratedProtocolMessageType('StorageChannelInfo', (_message.Message,), { + 'DESCRIPTOR' : _STORAGECHANNELINFO, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.StorageChannelInfo) + }) +_sym_db.RegisterMessage(StorageChannelInfo) + +Priorities = _reflection.GeneratedProtocolMessageType('Priorities', (_message.Message,), { + 'DESCRIPTOR' : _PRIORITIES, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.Priorities) + }) +_sym_db.RegisterMessage(Priorities) + +StorageConfig = _reflection.GeneratedProtocolMessageType('StorageConfig', (_message.Message,), { + + 'ChannelConfig' : _reflection.GeneratedProtocolMessageType('ChannelConfig', (_message.Message,), { + 'DESCRIPTOR' : _STORAGECONFIG_CHANNELCONFIG, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.StorageConfig.ChannelConfig) + }) + , + 'DESCRIPTOR' : _STORAGECONFIG, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.StorageConfig) + }) +_sym_db.RegisterMessage(StorageConfig) +_sym_db.RegisterMessage(StorageConfig.ChannelConfig) + +KeyRange = _reflection.GeneratedProtocolMessageType('KeyRange', (_message.Message,), { + 'DESCRIPTOR' : _KEYRANGE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.KeyRange) + }) +_sym_db.RegisterMessage(KeyRange) + +AcquireLockRequest = _reflection.GeneratedProtocolMessageType('AcquireLockRequest', (_message.Message,), { + 'DESCRIPTOR' : _ACQUIRELOCKREQUEST, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.AcquireLockRequest) + }) +_sym_db.RegisterMessage(AcquireLockRequest) + +AcquireLockResponse = _reflection.GeneratedProtocolMessageType('AcquireLockResponse', (_message.Message,), { + 'DESCRIPTOR' : _ACQUIRELOCKRESPONSE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.AcquireLockResponse) + }) +_sym_db.RegisterMessage(AcquireLockResponse) + +AcquireLockResult = _reflection.GeneratedProtocolMessageType('AcquireLockResult', (_message.Message,), { + 'DESCRIPTOR' : _ACQUIRELOCKRESULT, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.AcquireLockResult) + }) +_sym_db.RegisterMessage(AcquireLockResult) + +ExecuteTransactionRequest = _reflection.GeneratedProtocolMessageType('ExecuteTransactionRequest', (_message.Message,), { + + 'Command' : _reflection.GeneratedProtocolMessageType('Command', (_message.Message,), { + + 'Rename' : _reflection.GeneratedProtocolMessageType('Rename', (_message.Message,), { + 'DESCRIPTOR' : _EXECUTETRANSACTIONREQUEST_COMMAND_RENAME, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ExecuteTransactionRequest.Command.Rename) + }) + , + + 'Concat' : _reflection.GeneratedProtocolMessageType('Concat', (_message.Message,), { + 'DESCRIPTOR' : _EXECUTETRANSACTIONREQUEST_COMMAND_CONCAT, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ExecuteTransactionRequest.Command.Concat) + }) + , + + 'CopyRange' : _reflection.GeneratedProtocolMessageType('CopyRange', (_message.Message,), { + 'DESCRIPTOR' : _EXECUTETRANSACTIONREQUEST_COMMAND_COPYRANGE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ExecuteTransactionRequest.Command.CopyRange) + }) + , + + 'Write' : _reflection.GeneratedProtocolMessageType('Write', (_message.Message,), { + 'DESCRIPTOR' : _EXECUTETRANSACTIONREQUEST_COMMAND_WRITE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ExecuteTransactionRequest.Command.Write) + }) + , + + 'DeleteRange' : _reflection.GeneratedProtocolMessageType('DeleteRange', (_message.Message,), { + 'DESCRIPTOR' : _EXECUTETRANSACTIONREQUEST_COMMAND_DELETERANGE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ExecuteTransactionRequest.Command.DeleteRange) + }) + , + 'DESCRIPTOR' : _EXECUTETRANSACTIONREQUEST_COMMAND, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ExecuteTransactionRequest.Command) + }) + , + 'DESCRIPTOR' : _EXECUTETRANSACTIONREQUEST, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ExecuteTransactionRequest) + }) +_sym_db.RegisterMessage(ExecuteTransactionRequest) +_sym_db.RegisterMessage(ExecuteTransactionRequest.Command) +_sym_db.RegisterMessage(ExecuteTransactionRequest.Command.Rename) +_sym_db.RegisterMessage(ExecuteTransactionRequest.Command.Concat) +_sym_db.RegisterMessage(ExecuteTransactionRequest.Command.CopyRange) +_sym_db.RegisterMessage(ExecuteTransactionRequest.Command.Write) +_sym_db.RegisterMessage(ExecuteTransactionRequest.Command.DeleteRange) + +ExecuteTransactionResponse = _reflection.GeneratedProtocolMessageType('ExecuteTransactionResponse', (_message.Message,), { + 'DESCRIPTOR' : _EXECUTETRANSACTIONRESPONSE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ExecuteTransactionResponse) + }) +_sym_db.RegisterMessage(ExecuteTransactionResponse) + +ExecuteTransactionResult = _reflection.GeneratedProtocolMessageType('ExecuteTransactionResult', (_message.Message,), { + 'DESCRIPTOR' : _EXECUTETRANSACTIONRESULT, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ExecuteTransactionResult) + }) +_sym_db.RegisterMessage(ExecuteTransactionResult) + +ReadRequest = _reflection.GeneratedProtocolMessageType('ReadRequest', (_message.Message,), { + 'DESCRIPTOR' : _READREQUEST, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ReadRequest) + }) +_sym_db.RegisterMessage(ReadRequest) + +ReadResponse = _reflection.GeneratedProtocolMessageType('ReadResponse', (_message.Message,), { + 'DESCRIPTOR' : _READRESPONSE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ReadResponse) + }) +_sym_db.RegisterMessage(ReadResponse) + +ReadResult = _reflection.GeneratedProtocolMessageType('ReadResult', (_message.Message,), { + 'DESCRIPTOR' : _READRESULT, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ReadResult) + }) +_sym_db.RegisterMessage(ReadResult) + +ReadRangeRequest = _reflection.GeneratedProtocolMessageType('ReadRangeRequest', (_message.Message,), { + 'DESCRIPTOR' : _READRANGEREQUEST, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ReadRangeRequest) + }) +_sym_db.RegisterMessage(ReadRangeRequest) + +ReadRangeResponse = _reflection.GeneratedProtocolMessageType('ReadRangeResponse', (_message.Message,), { + 'DESCRIPTOR' : _READRANGERESPONSE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ReadRangeResponse) + }) +_sym_db.RegisterMessage(ReadRangeResponse) + +ReadRangeResult = _reflection.GeneratedProtocolMessageType('ReadRangeResult', (_message.Message,), { + + 'KeyValuePair' : _reflection.GeneratedProtocolMessageType('KeyValuePair', (_message.Message,), { + 'DESCRIPTOR' : _READRANGERESULT_KEYVALUEPAIR, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ReadRangeResult.KeyValuePair) + }) + , + 'DESCRIPTOR' : _READRANGERESULT, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ReadRangeResult) + }) +_sym_db.RegisterMessage(ReadRangeResult) +_sym_db.RegisterMessage(ReadRangeResult.KeyValuePair) + +ListRangeRequest = _reflection.GeneratedProtocolMessageType('ListRangeRequest', (_message.Message,), { + 'DESCRIPTOR' : _LISTRANGEREQUEST, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ListRangeRequest) + }) +_sym_db.RegisterMessage(ListRangeRequest) + +ListRangeResponse = _reflection.GeneratedProtocolMessageType('ListRangeResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTRANGERESPONSE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ListRangeResponse) + }) +_sym_db.RegisterMessage(ListRangeResponse) + +ListRangeResult = _reflection.GeneratedProtocolMessageType('ListRangeResult', (_message.Message,), { + + 'KeyInfo' : _reflection.GeneratedProtocolMessageType('KeyInfo', (_message.Message,), { + 'DESCRIPTOR' : _LISTRANGERESULT_KEYINFO, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ListRangeResult.KeyInfo) + }) + , + 'DESCRIPTOR' : _LISTRANGERESULT, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ListRangeResult) + }) +_sym_db.RegisterMessage(ListRangeResult) +_sym_db.RegisterMessage(ListRangeResult.KeyInfo) + +GetStorageChannelStatusRequest = _reflection.GeneratedProtocolMessageType('GetStorageChannelStatusRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETSTORAGECHANNELSTATUSREQUEST, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.GetStorageChannelStatusRequest) + }) +_sym_db.RegisterMessage(GetStorageChannelStatusRequest) + +GetStorageChannelStatusResponse = _reflection.GeneratedProtocolMessageType('GetStorageChannelStatusResponse', (_message.Message,), { + 'DESCRIPTOR' : _GETSTORAGECHANNELSTATUSRESPONSE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.GetStorageChannelStatusResponse) + }) +_sym_db.RegisterMessage(GetStorageChannelStatusResponse) + +GetStorageChannelStatusResult = _reflection.GeneratedProtocolMessageType('GetStorageChannelStatusResult', (_message.Message,), { + 'DESCRIPTOR' : _GETSTORAGECHANNELSTATUSRESULT, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.GetStorageChannelStatusResult) + }) +_sym_db.RegisterMessage(GetStorageChannelStatusResult) + +CreateVolumeRequest = _reflection.GeneratedProtocolMessageType('CreateVolumeRequest', (_message.Message,), { + 'DESCRIPTOR' : _CREATEVOLUMEREQUEST, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.CreateVolumeRequest) + }) +_sym_db.RegisterMessage(CreateVolumeRequest) + +CreateVolumeResponse = _reflection.GeneratedProtocolMessageType('CreateVolumeResponse', (_message.Message,), { + 'DESCRIPTOR' : _CREATEVOLUMERESPONSE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.CreateVolumeResponse) + }) +_sym_db.RegisterMessage(CreateVolumeResponse) + +CreateVolumeResult = _reflection.GeneratedProtocolMessageType('CreateVolumeResult', (_message.Message,), { + 'DESCRIPTOR' : _CREATEVOLUMERESULT, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.CreateVolumeResult) + }) +_sym_db.RegisterMessage(CreateVolumeResult) + +DropVolumeRequest = _reflection.GeneratedProtocolMessageType('DropVolumeRequest', (_message.Message,), { + 'DESCRIPTOR' : _DROPVOLUMEREQUEST, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.DropVolumeRequest) + }) +_sym_db.RegisterMessage(DropVolumeRequest) + +DropVolumeResponse = _reflection.GeneratedProtocolMessageType('DropVolumeResponse', (_message.Message,), { + 'DESCRIPTOR' : _DROPVOLUMERESPONSE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.DropVolumeResponse) + }) +_sym_db.RegisterMessage(DropVolumeResponse) + +DropVolumeResult = _reflection.GeneratedProtocolMessageType('DropVolumeResult', (_message.Message,), { + 'DESCRIPTOR' : _DROPVOLUMERESULT, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.DropVolumeResult) + }) +_sym_db.RegisterMessage(DropVolumeResult) + +AlterVolumeRequest = _reflection.GeneratedProtocolMessageType('AlterVolumeRequest', (_message.Message,), { + 'DESCRIPTOR' : _ALTERVOLUMEREQUEST, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.AlterVolumeRequest) + }) +_sym_db.RegisterMessage(AlterVolumeRequest) + +AlterVolumeResponse = _reflection.GeneratedProtocolMessageType('AlterVolumeResponse', (_message.Message,), { + 'DESCRIPTOR' : _ALTERVOLUMERESPONSE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.AlterVolumeResponse) + }) +_sym_db.RegisterMessage(AlterVolumeResponse) + +AlterVolumeResult = _reflection.GeneratedProtocolMessageType('AlterVolumeResult', (_message.Message,), { + 'DESCRIPTOR' : _ALTERVOLUMERESULT, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.AlterVolumeResult) + }) +_sym_db.RegisterMessage(AlterVolumeResult) + +DescribeVolumeRequest = _reflection.GeneratedProtocolMessageType('DescribeVolumeRequest', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEVOLUMEREQUEST, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.DescribeVolumeRequest) + }) +_sym_db.RegisterMessage(DescribeVolumeRequest) + +DescribeVolumeResponse = _reflection.GeneratedProtocolMessageType('DescribeVolumeResponse', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEVOLUMERESPONSE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.DescribeVolumeResponse) + }) +_sym_db.RegisterMessage(DescribeVolumeResponse) + +DescribeVolumeResult = _reflection.GeneratedProtocolMessageType('DescribeVolumeResult', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEVOLUMERESULT, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.DescribeVolumeResult) + }) +_sym_db.RegisterMessage(DescribeVolumeResult) + +ListLocalPartitionsRequest = _reflection.GeneratedProtocolMessageType('ListLocalPartitionsRequest', (_message.Message,), { + 'DESCRIPTOR' : _LISTLOCALPARTITIONSREQUEST, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ListLocalPartitionsRequest) + }) +_sym_db.RegisterMessage(ListLocalPartitionsRequest) + +ListLocalPartitionsResponse = _reflection.GeneratedProtocolMessageType('ListLocalPartitionsResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTLOCALPARTITIONSRESPONSE, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ListLocalPartitionsResponse) + }) +_sym_db.RegisterMessage(ListLocalPartitionsResponse) + +ListLocalPartitionsResult = _reflection.GeneratedProtocolMessageType('ListLocalPartitionsResult', (_message.Message,), { + 'DESCRIPTOR' : _LISTLOCALPARTITIONSRESULT, + '__module__' : 'draft.protos.ydb_keyvalue_pb2' + # @@protoc_insertion_point(class_scope:Ydb.KeyValue.ListLocalPartitionsResult) + }) +_sym_db.RegisterMessage(ListLocalPartitionsResult) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v3/draft/protos/ydb_keyvalue_pb2_grpc.py b/ydb/_grpc/v3/draft/protos/ydb_keyvalue_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v3/draft/protos/ydb_keyvalue_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v3/draft/protos/ydb_maintenance_pb2.py b/ydb/_grpc/v3/draft/protos/ydb_maintenance_pb2.py index d40cf041..ab0859d9 100644 --- a/ydb/_grpc/v3/draft/protos/ydb_maintenance_pb2.py +++ b/ydb/_grpc/v3/draft/protos/ydb_maintenance_pb2.py @@ -27,7 +27,7 @@ syntax='proto3', serialized_options=b'\n#tech.ydb.proto.draft.maintenance.v1ZDgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_Maintenance\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\"draft/protos/ydb_maintenance.proto\x12\x0fYdb.Maintenance\x1a#protos/annotations/validation.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1aprotos/ydb_discovery.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaf\x02\n\x04Node\x12\x0f\n\x07node_id\x18\x01 \x01(\r\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\r\x12-\n\x08location\x18\x04 \x01(\x0b\x32\x1b.Ydb.Discovery.NodeLocation\x12)\n\x05state\x18\x05 \x01(\x0e\x32\x1a.Ydb.Maintenance.ItemState\x12\x34\n\x07storage\x18\x06 \x01(\x0b\x32!.Ydb.Maintenance.Node.StorageNodeH\x00\x12\x34\n\x07\x64ynamic\x18\x07 \x01(\x0b\x32!.Ydb.Maintenance.Node.DynamicNodeH\x00\x1a\r\n\x0bStorageNode\x1a\x1d\n\x0b\x44ynamicNode\x12\x0e\n\x06tenant\x18\x01 \x01(\tB\x06\n\x04type\"T\n\x17ListClusterNodesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\">\n\x16ListClusterNodesResult\x12$\n\x05nodes\x18\x01 \x03(\x0b\x32\x15.Ydb.Maintenance.Node\"H\n\x18ListClusterNodesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa0\x01\n\x16MaintenanceTaskOptions\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1c\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12<\n\x11\x61vailability_mode\x18\x03 \x01(\x0e\x32!.Ydb.Maintenance.AvailabilityMode\x12\x0f\n\x07\x64ry_run\x18\x04 \x01(\x08\"B\n\x0b\x41\x63tionScope\x12\x11\n\x07node_id\x18\x01 \x01(\rH\x00\x12\x17\n\x04host\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xff\x01H\x00\x42\x07\n\x05scope\"f\n\nLockAction\x12+\n\x05scope\x18\x01 \x01(\x0b\x32\x1c.Ydb.Maintenance.ActionScope\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"F\n\x06\x41\x63tion\x12\x32\n\x0block_action\x18\x01 \x01(\x0b\x32\x1b.Ydb.Maintenance.LockActionH\x00\x42\x08\n\x06\x61\x63tion\"?\n\x0b\x41\x63tionGroup\x12\x30\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x17.Ydb.Maintenance.ActionB\x06\x9a\xe6*\x02(\x01\"\xd5\x01\n\x1c\x43reateMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12=\n\x0ctask_options\x18\x02 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12;\n\raction_groups\x18\x03 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionGroupB\x06\x9a\xe6*\x02(\x01\"u\n\x1dRefreshMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"]\n\tActionUid\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x08group_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1a\n\taction_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\xdc\x05\n\x0b\x41\x63tionState\x12\'\n\x06\x61\x63tion\x18\x01 \x01(\x0b\x32\x17.Ydb.Maintenance.Action\x12.\n\naction_uid\x18\x02 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12\x39\n\x06status\x18\x03 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionStatus\x12\x39\n\x06reason\x18\x04 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionReason\x12,\n\x08\x64\x65\x61\x64line\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x0c\x41\x63tionStatus\x12\x1d\n\x19\x41\x43TION_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41\x43TION_STATUS_PENDING\x10\x01\x12\x1b\n\x17\x41\x43TION_STATUS_PERFORMED\x10\x02\"\xe8\x02\n\x0c\x41\x63tionReason\x12\x1d\n\x19\x41\x43TION_REASON_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41\x43TION_REASON_OK\x10\x01\x12-\n)ACTION_REASON_TOO_MANY_UNAVAILABLE_VDISKS\x10\x02\x12:\n6ACTION_REASON_TOO_MANY_UNAVAILABLE_STATE_STORAGE_RINGS\x10\x03\x12.\n*ACTION_REASON_DISABLED_NODES_LIMIT_REACHED\x10\x04\x12\x35\n1ACTION_REASON_TENANT_DISABLED_NODES_LIMIT_REACHED\x10\x05\x12\x1f\n\x1b\x41\x43TION_REASON_WRONG_REQUEST\x10\x06\x12\x30\n,ACTION_REASON_SYS_TABLETS_NODE_LIMIT_REACHED\x10\x07\"H\n\x11\x41\x63tionGroupStates\x12\x33\n\raction_states\x18\x01 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionState\"\xb0\x01\n\x15MaintenanceTaskResult\x12\x10\n\x08task_uid\x18\x01 \x01(\t\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\x12\x34\n\x0bretry_after\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x42\x0e\n\x0c_retry_after\"G\n\x17MaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"q\n\x19GetMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\x9a\x01\n\x18GetMaintenanceTaskResult\x12=\n\x0ctask_options\x18\x01 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\"J\n\x1aGetMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"t\n\x1bListMaintenanceTasksRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x11\n\x04user\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_user\"0\n\x1aListMaintenanceTasksResult\x12\x12\n\ntasks_uids\x18\x01 \x03(\t\"L\n\x1cListMaintenanceTasksResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"r\n\x1a\x44ropMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"M\n\x1dManageMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x8b\x01\n\x15\x43ompleteActionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x37\n\x0b\x61\x63tion_uids\x18\x02 \x03(\x0b\x32\x1a.Ydb.Maintenance.ActionUidB\x06\x9a\xe6*\x02(\x01\"\xbe\x01\n\x12ManageActionResult\x12\x43\n\x0f\x61\x63tion_statuses\x18\x01 \x03(\x0b\x32*.Ydb.Maintenance.ManageActionResult.Status\x1a\x63\n\x06Status\x12.\n\naction_uid\x18\x01 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\"D\n\x14ManageActionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation*k\n\tItemState\x12\x1a\n\x16ITEM_STATE_UNSPECIFIED\x10\x00\x12\x11\n\rITEM_STATE_UP\x10\x01\x12\x1a\n\x16ITEM_STATE_MAINTENANCE\x10\x02\x12\x13\n\x0fITEM_STATE_DOWN\x10\x03*\x8c\x01\n\x10\x41vailabilityMode\x12!\n\x1d\x41VAILABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41VAILABILITY_MODE_STRONG\x10\x01\x12\x1a\n\x16\x41VAILABILITY_MODE_WEAK\x10\x02\x12\x1b\n\x17\x41VAILABILITY_MODE_FORCE\x10\x03\x42n\n#tech.ydb.proto.draft.maintenance.v1ZDgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_Maintenance\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\"draft/protos/ydb_maintenance.proto\x12\x0fYdb.Maintenance\x1a#protos/annotations/validation.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1aprotos/ydb_discovery.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf0\x02\n\x04Node\x12\x0f\n\x07node_id\x18\x01 \x01(\r\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\r\x12-\n\x08location\x18\x04 \x01(\x0b\x32\x1b.Ydb.Discovery.NodeLocation\x12)\n\x05state\x18\x05 \x01(\x0e\x32\x1a.Ydb.Maintenance.ItemState\x12\x34\n\x07storage\x18\x06 \x01(\x0b\x32!.Ydb.Maintenance.Node.StorageNodeH\x00\x12\x34\n\x07\x64ynamic\x18\x07 \x01(\x0b\x32!.Ydb.Maintenance.Node.DynamicNodeH\x00\x12.\n\nstart_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\t \x01(\t\x1a\r\n\x0bStorageNode\x1a\x1d\n\x0b\x44ynamicNode\x12\x0e\n\x06tenant\x18\x01 \x01(\tB\x06\n\x04type\"T\n\x17ListClusterNodesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\">\n\x16ListClusterNodesResult\x12$\n\x05nodes\x18\x01 \x03(\x0b\x32\x15.Ydb.Maintenance.Node\"H\n\x18ListClusterNodesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa0\x01\n\x16MaintenanceTaskOptions\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1c\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12<\n\x11\x61vailability_mode\x18\x03 \x01(\x0e\x32!.Ydb.Maintenance.AvailabilityMode\x12\x0f\n\x07\x64ry_run\x18\x04 \x01(\x08\"B\n\x0b\x41\x63tionScope\x12\x11\n\x07node_id\x18\x01 \x01(\rH\x00\x12\x17\n\x04host\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xff\x01H\x00\x42\x07\n\x05scope\"f\n\nLockAction\x12+\n\x05scope\x18\x01 \x01(\x0b\x32\x1c.Ydb.Maintenance.ActionScope\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"F\n\x06\x41\x63tion\x12\x32\n\x0block_action\x18\x01 \x01(\x0b\x32\x1b.Ydb.Maintenance.LockActionH\x00\x42\x08\n\x06\x61\x63tion\"?\n\x0b\x41\x63tionGroup\x12\x30\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x17.Ydb.Maintenance.ActionB\x06\x9a\xe6*\x02(\x01\"\xd5\x01\n\x1c\x43reateMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12=\n\x0ctask_options\x18\x02 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12;\n\raction_groups\x18\x03 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionGroupB\x06\x9a\xe6*\x02(\x01\"u\n\x1dRefreshMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"]\n\tActionUid\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x08group_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1a\n\taction_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\xdc\x05\n\x0b\x41\x63tionState\x12\'\n\x06\x61\x63tion\x18\x01 \x01(\x0b\x32\x17.Ydb.Maintenance.Action\x12.\n\naction_uid\x18\x02 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12\x39\n\x06status\x18\x03 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionStatus\x12\x39\n\x06reason\x18\x04 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionReason\x12,\n\x08\x64\x65\x61\x64line\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x0c\x41\x63tionStatus\x12\x1d\n\x19\x41\x43TION_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41\x43TION_STATUS_PENDING\x10\x01\x12\x1b\n\x17\x41\x43TION_STATUS_PERFORMED\x10\x02\"\xe8\x02\n\x0c\x41\x63tionReason\x12\x1d\n\x19\x41\x43TION_REASON_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41\x43TION_REASON_OK\x10\x01\x12-\n)ACTION_REASON_TOO_MANY_UNAVAILABLE_VDISKS\x10\x02\x12:\n6ACTION_REASON_TOO_MANY_UNAVAILABLE_STATE_STORAGE_RINGS\x10\x03\x12.\n*ACTION_REASON_DISABLED_NODES_LIMIT_REACHED\x10\x04\x12\x35\n1ACTION_REASON_TENANT_DISABLED_NODES_LIMIT_REACHED\x10\x05\x12\x1f\n\x1b\x41\x43TION_REASON_WRONG_REQUEST\x10\x06\x12\x30\n,ACTION_REASON_SYS_TABLETS_NODE_LIMIT_REACHED\x10\x07\"H\n\x11\x41\x63tionGroupStates\x12\x33\n\raction_states\x18\x01 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionState\"\xb0\x01\n\x15MaintenanceTaskResult\x12\x10\n\x08task_uid\x18\x01 \x01(\t\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\x12\x34\n\x0bretry_after\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x42\x0e\n\x0c_retry_after\"G\n\x17MaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"q\n\x19GetMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\x9a\x01\n\x18GetMaintenanceTaskResult\x12=\n\x0ctask_options\x18\x01 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\"J\n\x1aGetMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"t\n\x1bListMaintenanceTasksRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x11\n\x04user\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_user\"0\n\x1aListMaintenanceTasksResult\x12\x12\n\ntasks_uids\x18\x01 \x03(\t\"L\n\x1cListMaintenanceTasksResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"r\n\x1a\x44ropMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"M\n\x1dManageMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x8b\x01\n\x15\x43ompleteActionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x37\n\x0b\x61\x63tion_uids\x18\x02 \x03(\x0b\x32\x1a.Ydb.Maintenance.ActionUidB\x06\x9a\xe6*\x02(\x01\"\xbe\x01\n\x12ManageActionResult\x12\x43\n\x0f\x61\x63tion_statuses\x18\x01 \x03(\x0b\x32*.Ydb.Maintenance.ManageActionResult.Status\x1a\x63\n\x06Status\x12.\n\naction_uid\x18\x01 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\"D\n\x14ManageActionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation*k\n\tItemState\x12\x1a\n\x16ITEM_STATE_UNSPECIFIED\x10\x00\x12\x11\n\rITEM_STATE_UP\x10\x01\x12\x1a\n\x16ITEM_STATE_MAINTENANCE\x10\x02\x12\x13\n\x0fITEM_STATE_DOWN\x10\x03*\x8c\x01\n\x10\x41vailabilityMode\x12!\n\x1d\x41VAILABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41VAILABILITY_MODE_STRONG\x10\x01\x12\x1a\n\x16\x41VAILABILITY_MODE_WEAK\x10\x02\x12\x1b\n\x17\x41VAILABILITY_MODE_FORCE\x10\x03\x42n\n#tech.ydb.proto.draft.maintenance.v1ZDgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_Maintenance\xf8\x01\x01\x62\x06proto3' , dependencies=[protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__status__codes__pb2.DESCRIPTOR,protos_dot_ydb__discovery__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) @@ -61,8 +61,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3931, - serialized_end=4038, + serialized_start=3996, + serialized_end=4103, ) _sym_db.RegisterEnumDescriptor(_ITEMSTATE) @@ -97,8 +97,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=4041, - serialized_end=4181, + serialized_start=4106, + serialized_end=4246, ) _sym_db.RegisterEnumDescriptor(_AVAILABILITYMODE) @@ -138,8 +138,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1945, - serialized_end=2046, + serialized_start=2010, + serialized_end=2111, ) _sym_db.RegisterEnumDescriptor(_ACTIONSTATE_ACTIONSTATUS) @@ -193,8 +193,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2049, - serialized_end=2409, + serialized_start=2114, + serialized_end=2474, ) _sym_db.RegisterEnumDescriptor(_ACTIONSTATE_ACTIONREASON) @@ -219,8 +219,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=496, - serialized_end=509, + serialized_start=561, + serialized_end=574, ) _NODE_DYNAMICNODE = _descriptor.Descriptor( @@ -250,8 +250,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=511, - serialized_end=540, + serialized_start=576, + serialized_end=605, ) _NODE = _descriptor.Descriptor( @@ -311,6 +311,20 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='start_time', full_name='Ydb.Maintenance.Node.start_time', index=7, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='version', full_name='Ydb.Maintenance.Node.version', index=8, + number=9, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -329,7 +343,7 @@ fields=[]), ], serialized_start=245, - serialized_end=548, + serialized_end=613, ) @@ -360,8 +374,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=550, - serialized_end=634, + serialized_start=615, + serialized_end=699, ) @@ -392,8 +406,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=636, - serialized_end=698, + serialized_start=701, + serialized_end=763, ) @@ -424,8 +438,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=700, - serialized_end=772, + serialized_start=765, + serialized_end=837, ) @@ -477,8 +491,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=775, - serialized_end=935, + serialized_start=840, + serialized_end=1000, ) @@ -521,8 +535,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=937, - serialized_end=1003, + serialized_start=1002, + serialized_end=1068, ) @@ -560,8 +574,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1005, - serialized_end=1107, + serialized_start=1070, + serialized_end=1172, ) @@ -597,8 +611,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1109, - serialized_end=1179, + serialized_start=1174, + serialized_end=1244, ) @@ -629,8 +643,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1181, - serialized_end=1244, + serialized_start=1246, + serialized_end=1309, ) @@ -675,8 +689,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1247, - serialized_end=1460, + serialized_start=1312, + serialized_end=1525, ) @@ -714,8 +728,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1462, - serialized_end=1579, + serialized_start=1527, + serialized_end=1644, ) @@ -760,8 +774,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1581, - serialized_end=1674, + serialized_start=1646, + serialized_end=1739, ) @@ -822,8 +836,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1677, - serialized_end=2409, + serialized_start=1742, + serialized_end=2474, ) @@ -854,8 +868,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2411, - serialized_end=2483, + serialized_start=2476, + serialized_end=2548, ) @@ -905,8 +919,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=2486, - serialized_end=2662, + serialized_start=2551, + serialized_end=2727, ) @@ -937,8 +951,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2664, - serialized_end=2735, + serialized_start=2729, + serialized_end=2800, ) @@ -976,8 +990,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2737, - serialized_end=2850, + serialized_start=2802, + serialized_end=2915, ) @@ -1015,8 +1029,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2853, - serialized_end=3007, + serialized_start=2918, + serialized_end=3072, ) @@ -1047,8 +1061,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3009, - serialized_end=3083, + serialized_start=3074, + serialized_end=3148, ) @@ -1091,8 +1105,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=3085, - serialized_end=3201, + serialized_start=3150, + serialized_end=3266, ) @@ -1123,8 +1137,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3203, - serialized_end=3251, + serialized_start=3268, + serialized_end=3316, ) @@ -1155,8 +1169,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3253, - serialized_end=3329, + serialized_start=3318, + serialized_end=3394, ) @@ -1194,8 +1208,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3331, - serialized_end=3445, + serialized_start=3396, + serialized_end=3510, ) @@ -1226,8 +1240,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3447, - serialized_end=3524, + serialized_start=3512, + serialized_end=3589, ) @@ -1265,8 +1279,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3527, - serialized_end=3666, + serialized_start=3592, + serialized_end=3731, ) @@ -1304,8 +1318,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3760, - serialized_end=3859, + serialized_start=3825, + serialized_end=3924, ) _MANAGEACTIONRESULT = _descriptor.Descriptor( @@ -1335,8 +1349,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3669, - serialized_end=3859, + serialized_start=3734, + serialized_end=3924, ) @@ -1367,8 +1381,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3861, - serialized_end=3929, + serialized_start=3926, + serialized_end=3994, ) _NODE_STORAGENODE.containing_type = _NODE @@ -1377,6 +1391,7 @@ _NODE.fields_by_name['state'].enum_type = _ITEMSTATE _NODE.fields_by_name['storage'].message_type = _NODE_STORAGENODE _NODE.fields_by_name['dynamic'].message_type = _NODE_DYNAMICNODE +_NODE.fields_by_name['start_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _NODE.oneofs_by_name['type'].fields.append( _NODE.fields_by_name['storage']) _NODE.fields_by_name['storage'].containing_oneof = _NODE.oneofs_by_name['type'] diff --git a/ydb/_grpc/v3/draft/protos/ydb_object_storage_pb2.py b/ydb/_grpc/v3/draft/protos/ydb_object_storage_pb2.py new file mode 100644 index 00000000..bbe0130f --- /dev/null +++ b/ydb/_grpc/v3/draft/protos/ydb_object_storage_pb2.py @@ -0,0 +1,240 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/protos/ydb_object_storage.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v3.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 +from ydb._grpc.v3.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 +from ydb._grpc.v3.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='draft/protos/ydb_object_storage.proto', + package='Ydb.ObjectStorage', + syntax='proto3', + serialized_options=b'\n#tech.ydb.proto.draft.object_storageZFgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_ObjectStorage\370\001\001', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n%draft/protos/ydb_object_storage.proto\x12\x11Ydb.ObjectStorage\x1a\x1eprotos/ydb_issue_message.proto\x1a\x16protos/ydb_value.proto\x1a\x1dprotos/ydb_status_codes.proto\"\xd6\x02\n\x0eListingRequest\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12#\n\nkey_prefix\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x1a\n\x12path_column_prefix\x18\x03 \x01(\t\x12\x1d\n\x15path_column_delimiter\x18\x04 \x01(\t\x12\x1a\n\x12\x63ontinuation_token\x18\x05 \x01(\x0c\x12/\n\x16start_after_key_suffix\x18\x06 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x10\n\x08max_keys\x18\x07 \x01(\x05\x12\x19\n\x11\x63olumns_to_return\x18\x08 \x03(\t\x12(\n\x0fmatching_filter\x18\n \x01(\x0b\x32\x0f.Ydb.TypedValue\"&\n\nEMatchType\x12\t\n\x05\x45QUAL\x10\x00\x12\r\n\tNOT_EQUAL\x10\x01J\x04\x08\t\x10\n\"\xd7\x01\n\x0fListingResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x17\n\x0f\x63ommon_prefixes\x18\x03 \x03(\t\x12 \n\x08\x63ontents\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12\x14\n\x0cis_truncated\x18\x05 \x01(\x08\x12\x1f\n\x17next_continuation_token\x18\x06 \x01(\x0c\x42p\n#tech.ydb.proto.draft.object_storageZFgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_ObjectStorage\xf8\x01\x01\x62\x06proto3' + , + dependencies=[protos_dot_ydb__issue__message__pb2.DESCRIPTOR,protos_dot_ydb__value__pb2.DESCRIPTOR,protos_dot_ydb__status__codes__pb2.DESCRIPTOR,]) + + + +_LISTINGREQUEST_EMATCHTYPE = _descriptor.EnumDescriptor( + name='EMatchType', + full_name='Ydb.ObjectStorage.ListingRequest.EMatchType', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='EQUAL', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='NOT_EQUAL', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=446, + serialized_end=484, +) +_sym_db.RegisterEnumDescriptor(_LISTINGREQUEST_EMATCHTYPE) + + +_LISTINGREQUEST = _descriptor.Descriptor( + name='ListingRequest', + full_name='Ydb.ObjectStorage.ListingRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='table_name', full_name='Ydb.ObjectStorage.ListingRequest.table_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='key_prefix', full_name='Ydb.ObjectStorage.ListingRequest.key_prefix', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path_column_prefix', full_name='Ydb.ObjectStorage.ListingRequest.path_column_prefix', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path_column_delimiter', full_name='Ydb.ObjectStorage.ListingRequest.path_column_delimiter', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='continuation_token', full_name='Ydb.ObjectStorage.ListingRequest.continuation_token', index=4, + number=5, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='start_after_key_suffix', full_name='Ydb.ObjectStorage.ListingRequest.start_after_key_suffix', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='max_keys', full_name='Ydb.ObjectStorage.ListingRequest.max_keys', index=6, + number=7, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='columns_to_return', full_name='Ydb.ObjectStorage.ListingRequest.columns_to_return', index=7, + number=8, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='matching_filter', full_name='Ydb.ObjectStorage.ListingRequest.matching_filter', index=8, + number=10, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _LISTINGREQUEST_EMATCHTYPE, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=148, + serialized_end=490, +) + + +_LISTINGRESPONSE = _descriptor.Descriptor( + name='ListingResponse', + full_name='Ydb.ObjectStorage.ListingResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='status', full_name='Ydb.ObjectStorage.ListingResponse.status', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='issues', full_name='Ydb.ObjectStorage.ListingResponse.issues', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='common_prefixes', full_name='Ydb.ObjectStorage.ListingResponse.common_prefixes', index=2, + number=3, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='contents', full_name='Ydb.ObjectStorage.ListingResponse.contents', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='is_truncated', full_name='Ydb.ObjectStorage.ListingResponse.is_truncated', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='next_continuation_token', full_name='Ydb.ObjectStorage.ListingResponse.next_continuation_token', index=5, + number=6, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=493, + serialized_end=708, +) + +_LISTINGREQUEST.fields_by_name['key_prefix'].message_type = protos_dot_ydb__value__pb2._TYPEDVALUE +_LISTINGREQUEST.fields_by_name['start_after_key_suffix'].message_type = protos_dot_ydb__value__pb2._TYPEDVALUE +_LISTINGREQUEST.fields_by_name['matching_filter'].message_type = protos_dot_ydb__value__pb2._TYPEDVALUE +_LISTINGREQUEST_EMATCHTYPE.containing_type = _LISTINGREQUEST +_LISTINGRESPONSE.fields_by_name['status'].enum_type = protos_dot_ydb__status__codes__pb2._STATUSIDS_STATUSCODE +_LISTINGRESPONSE.fields_by_name['issues'].message_type = protos_dot_ydb__issue__message__pb2._ISSUEMESSAGE +_LISTINGRESPONSE.fields_by_name['contents'].message_type = protos_dot_ydb__value__pb2._RESULTSET +DESCRIPTOR.message_types_by_name['ListingRequest'] = _LISTINGREQUEST +DESCRIPTOR.message_types_by_name['ListingResponse'] = _LISTINGRESPONSE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +ListingRequest = _reflection.GeneratedProtocolMessageType('ListingRequest', (_message.Message,), { + 'DESCRIPTOR' : _LISTINGREQUEST, + '__module__' : 'draft.protos.ydb_object_storage_pb2' + # @@protoc_insertion_point(class_scope:Ydb.ObjectStorage.ListingRequest) + }) +_sym_db.RegisterMessage(ListingRequest) + +ListingResponse = _reflection.GeneratedProtocolMessageType('ListingResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTINGRESPONSE, + '__module__' : 'draft.protos.ydb_object_storage_pb2' + # @@protoc_insertion_point(class_scope:Ydb.ObjectStorage.ListingResponse) + }) +_sym_db.RegisterMessage(ListingResponse) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v3/draft/protos/ydb_object_storage_pb2_grpc.py b/ydb/_grpc/v3/draft/protos/ydb_object_storage_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v3/draft/protos/ydb_object_storage_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v3/draft/ydb_federated_query_v1_pb2.py b/ydb/_grpc/v3/draft/ydb_federated_query_v1_pb2.py new file mode 100644 index 00000000..43468b7a --- /dev/null +++ b/ydb/_grpc/v3/draft/ydb_federated_query_v1_pb2.py @@ -0,0 +1,260 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/ydb_federated_query_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v3.draft.protos import ydb_federated_query_pb2 as draft_dot_protos_dot_ydb__federated__query__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='draft/ydb_federated_query_v1.proto', + package='FederatedQuery.V1', + syntax='proto3', + serialized_options=b'\n\'tech.ydb.proto.draft.federated.query.v1ZCgithub.com/ydb-platform/ydb-go-genproto/draft/Ydb_FederatedQuery_V1', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\"draft/ydb_federated_query_v1.proto\x12\x11\x46\x65\x64\x65ratedQuery.V1\x1a&draft/protos/ydb_federated_query.proto2\xd6\x0f\n\x15\x46\x65\x64\x65ratedQueryService\x12V\n\x0b\x43reateQuery\x12\".FederatedQuery.CreateQueryRequest\x1a#.FederatedQuery.CreateQueryResponse\x12V\n\x0bListQueries\x12\".FederatedQuery.ListQueriesRequest\x1a#.FederatedQuery.ListQueriesResponse\x12\\\n\rDescribeQuery\x12$.FederatedQuery.DescribeQueryRequest\x1a%.FederatedQuery.DescribeQueryResponse\x12_\n\x0eGetQueryStatus\x12%.FederatedQuery.GetQueryStatusRequest\x1a&.FederatedQuery.GetQueryStatusResponse\x12V\n\x0bModifyQuery\x12\".FederatedQuery.ModifyQueryRequest\x1a#.FederatedQuery.ModifyQueryResponse\x12V\n\x0b\x44\x65leteQuery\x12\".FederatedQuery.DeleteQueryRequest\x1a#.FederatedQuery.DeleteQueryResponse\x12Y\n\x0c\x43ontrolQuery\x12#.FederatedQuery.ControlQueryRequest\x1a$.FederatedQuery.ControlQueryResponse\x12\\\n\rGetResultData\x12$.FederatedQuery.GetResultDataRequest\x1a%.FederatedQuery.GetResultDataResponse\x12M\n\x08ListJobs\x12\x1f.FederatedQuery.ListJobsRequest\x1a .FederatedQuery.ListJobsResponse\x12V\n\x0b\x44\x65scribeJob\x12\".FederatedQuery.DescribeJobRequest\x1a#.FederatedQuery.DescribeJobResponse\x12\x65\n\x10\x43reateConnection\x12\'.FederatedQuery.CreateConnectionRequest\x1a(.FederatedQuery.CreateConnectionResponse\x12\x62\n\x0fListConnections\x12&.FederatedQuery.ListConnectionsRequest\x1a\'.FederatedQuery.ListConnectionsResponse\x12k\n\x12\x44\x65scribeConnection\x12).FederatedQuery.DescribeConnectionRequest\x1a*.FederatedQuery.DescribeConnectionResponse\x12\x65\n\x10ModifyConnection\x12\'.FederatedQuery.ModifyConnectionRequest\x1a(.FederatedQuery.ModifyConnectionResponse\x12\x65\n\x10\x44\x65leteConnection\x12\'.FederatedQuery.DeleteConnectionRequest\x1a(.FederatedQuery.DeleteConnectionResponse\x12_\n\x0eTestConnection\x12%.FederatedQuery.TestConnectionRequest\x1a&.FederatedQuery.TestConnectionResponse\x12\\\n\rCreateBinding\x12$.FederatedQuery.CreateBindingRequest\x1a%.FederatedQuery.CreateBindingResponse\x12Y\n\x0cListBindings\x12#.FederatedQuery.ListBindingsRequest\x1a$.FederatedQuery.ListBindingsResponse\x12\x62\n\x0f\x44\x65scribeBinding\x12&.FederatedQuery.DescribeBindingRequest\x1a\'.FederatedQuery.DescribeBindingResponse\x12\\\n\rModifyBinding\x12$.FederatedQuery.ModifyBindingRequest\x1a%.FederatedQuery.ModifyBindingResponse\x12\\\n\rDeleteBinding\x12$.FederatedQuery.DeleteBindingRequest\x1a%.FederatedQuery.DeleteBindingResponseBn\n\'tech.ydb.proto.draft.federated.query.v1ZCgithub.com/ydb-platform/ydb-go-genproto/draft/Ydb_FederatedQuery_V1b\x06proto3' + , + dependencies=[draft_dot_protos_dot_ydb__federated__query__pb2.DESCRIPTOR,]) + + + +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + + +DESCRIPTOR._options = None + +_FEDERATEDQUERYSERVICE = _descriptor.ServiceDescriptor( + name='FederatedQueryService', + full_name='FederatedQuery.V1.FederatedQueryService', + file=DESCRIPTOR, + index=0, + serialized_options=None, + create_key=_descriptor._internal_create_key, + serialized_start=98, + serialized_end=2104, + methods=[ + _descriptor.MethodDescriptor( + name='CreateQuery', + full_name='FederatedQuery.V1.FederatedQueryService.CreateQuery', + index=0, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._CREATEQUERYREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._CREATEQUERYRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ListQueries', + full_name='FederatedQuery.V1.FederatedQueryService.ListQueries', + index=1, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._LISTQUERIESREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._LISTQUERIESRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='DescribeQuery', + full_name='FederatedQuery.V1.FederatedQueryService.DescribeQuery', + index=2, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._DESCRIBEQUERYREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._DESCRIBEQUERYRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='GetQueryStatus', + full_name='FederatedQuery.V1.FederatedQueryService.GetQueryStatus', + index=3, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._GETQUERYSTATUSREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._GETQUERYSTATUSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ModifyQuery', + full_name='FederatedQuery.V1.FederatedQueryService.ModifyQuery', + index=4, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._MODIFYQUERYREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._MODIFYQUERYRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='DeleteQuery', + full_name='FederatedQuery.V1.FederatedQueryService.DeleteQuery', + index=5, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._DELETEQUERYREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._DELETEQUERYRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ControlQuery', + full_name='FederatedQuery.V1.FederatedQueryService.ControlQuery', + index=6, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._CONTROLQUERYREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._CONTROLQUERYRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='GetResultData', + full_name='FederatedQuery.V1.FederatedQueryService.GetResultData', + index=7, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._GETRESULTDATAREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._GETRESULTDATARESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ListJobs', + full_name='FederatedQuery.V1.FederatedQueryService.ListJobs', + index=8, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._LISTJOBSREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._LISTJOBSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='DescribeJob', + full_name='FederatedQuery.V1.FederatedQueryService.DescribeJob', + index=9, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._DESCRIBEJOBREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._DESCRIBEJOBRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='CreateConnection', + full_name='FederatedQuery.V1.FederatedQueryService.CreateConnection', + index=10, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._CREATECONNECTIONREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._CREATECONNECTIONRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ListConnections', + full_name='FederatedQuery.V1.FederatedQueryService.ListConnections', + index=11, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._LISTCONNECTIONSREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._LISTCONNECTIONSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='DescribeConnection', + full_name='FederatedQuery.V1.FederatedQueryService.DescribeConnection', + index=12, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._DESCRIBECONNECTIONREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._DESCRIBECONNECTIONRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ModifyConnection', + full_name='FederatedQuery.V1.FederatedQueryService.ModifyConnection', + index=13, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._MODIFYCONNECTIONREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._MODIFYCONNECTIONRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='DeleteConnection', + full_name='FederatedQuery.V1.FederatedQueryService.DeleteConnection', + index=14, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._DELETECONNECTIONREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._DELETECONNECTIONRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='TestConnection', + full_name='FederatedQuery.V1.FederatedQueryService.TestConnection', + index=15, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._TESTCONNECTIONREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._TESTCONNECTIONRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='CreateBinding', + full_name='FederatedQuery.V1.FederatedQueryService.CreateBinding', + index=16, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._CREATEBINDINGREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._CREATEBINDINGRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ListBindings', + full_name='FederatedQuery.V1.FederatedQueryService.ListBindings', + index=17, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._LISTBINDINGSREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._LISTBINDINGSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='DescribeBinding', + full_name='FederatedQuery.V1.FederatedQueryService.DescribeBinding', + index=18, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._DESCRIBEBINDINGREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._DESCRIBEBINDINGRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ModifyBinding', + full_name='FederatedQuery.V1.FederatedQueryService.ModifyBinding', + index=19, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._MODIFYBINDINGREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._MODIFYBINDINGRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='DeleteBinding', + full_name='FederatedQuery.V1.FederatedQueryService.DeleteBinding', + index=20, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__federated__query__pb2._DELETEBINDINGREQUEST, + output_type=draft_dot_protos_dot_ydb__federated__query__pb2._DELETEBINDINGRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), +]) +_sym_db.RegisterServiceDescriptor(_FEDERATEDQUERYSERVICE) + +DESCRIPTOR.services_by_name['FederatedQueryService'] = _FEDERATEDQUERYSERVICE + +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v3/draft/ydb_federated_query_v1_pb2_grpc.py b/ydb/_grpc/v3/draft/ydb_federated_query_v1_pb2_grpc.py new file mode 100644 index 00000000..b614776c --- /dev/null +++ b/ydb/_grpc/v3/draft/ydb_federated_query_v1_pb2_grpc.py @@ -0,0 +1,755 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v3.draft.protos import ydb_federated_query_pb2 as draft_dot_protos_dot_ydb__federated__query__pb2 + + +class FederatedQueryServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/CreateQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryResponse.FromString, + ) + self.ListQueries = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ListQueries', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesResponse.FromString, + ) + self.DescribeQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DescribeQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryResponse.FromString, + ) + self.GetQueryStatus = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/GetQueryStatus', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusResponse.FromString, + ) + self.ModifyQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ModifyQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryResponse.FromString, + ) + self.DeleteQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DeleteQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryResponse.FromString, + ) + self.ControlQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ControlQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryResponse.FromString, + ) + self.GetResultData = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/GetResultData', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataResponse.FromString, + ) + self.ListJobs = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ListJobs', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsResponse.FromString, + ) + self.DescribeJob = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DescribeJob', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobResponse.FromString, + ) + self.CreateConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/CreateConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionResponse.FromString, + ) + self.ListConnections = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ListConnections', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsResponse.FromString, + ) + self.DescribeConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DescribeConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionResponse.FromString, + ) + self.ModifyConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ModifyConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionResponse.FromString, + ) + self.DeleteConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DeleteConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionResponse.FromString, + ) + self.TestConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/TestConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionResponse.FromString, + ) + self.CreateBinding = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/CreateBinding', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingResponse.FromString, + ) + self.ListBindings = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ListBindings', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsResponse.FromString, + ) + self.DescribeBinding = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DescribeBinding', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingResponse.FromString, + ) + self.ModifyBinding = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ModifyBinding', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingResponse.FromString, + ) + self.DeleteBinding = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DeleteBinding', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingResponse.FromString, + ) + + +class FederatedQueryServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def CreateQuery(self, request, context): + """Query + Query is the text of an SQL request, the results of the last run and the state after the last run (partitions offsets, consumer in YDS) + Create a query object with a given SQL + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListQueries(self, request, context): + """Get a list of brief queries objects + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeQuery(self, request, context): + """Get full information about the object of the query + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetQueryStatus(self, request, context): + """Get status of the query + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ModifyQuery(self, request, context): + """Change the attributes of the query (acl, name, ...) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteQuery(self, request, context): + """Completely delete the query + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ControlQuery(self, request, context): + """Change the state of the query lifecycle + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetResultData(self, request, context): + """Get a results page + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListJobs(self, request, context): + """Job + Job - appears immediately after starting the request and contains the request metadata + Get a list of jobs + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeJob(self, request, context): + """Get information about the job + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateConnection(self, request, context): + """Connection + Connection - entity that describes connection points. This can be imagined as an analogue of a network address. + Create a connection object (ObjectStorage, YDB, YDS, ...) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListConnections(self, request, context): + """Get a list of connections objects + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeConnection(self, request, context): + """Get information about the object of the connection + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ModifyConnection(self, request, context): + """Change the attributes of the connection + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteConnection(self, request, context): + """Completely delete the connection + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def TestConnection(self, request, context): + """Test the connection (permissions, network, ...) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateBinding(self, request, context): + """Binding + Binding - entity using which a schema is assigned to non-schematic data + Create a binding object - bind schema with ObjectStorage object or YDS stream + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListBindings(self, request, context): + """Get a list of bindings objects + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeBinding(self, request, context): + """Get information about the object of the binding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ModifyBinding(self, request, context): + """Change the attributes of the binding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteBinding(self, request, context): + """Completely delete the binding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_FederatedQueryServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateQuery': grpc.unary_unary_rpc_method_handler( + servicer.CreateQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryResponse.SerializeToString, + ), + 'ListQueries': grpc.unary_unary_rpc_method_handler( + servicer.ListQueries, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesResponse.SerializeToString, + ), + 'DescribeQuery': grpc.unary_unary_rpc_method_handler( + servicer.DescribeQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryResponse.SerializeToString, + ), + 'GetQueryStatus': grpc.unary_unary_rpc_method_handler( + servicer.GetQueryStatus, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusResponse.SerializeToString, + ), + 'ModifyQuery': grpc.unary_unary_rpc_method_handler( + servicer.ModifyQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryResponse.SerializeToString, + ), + 'DeleteQuery': grpc.unary_unary_rpc_method_handler( + servicer.DeleteQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryResponse.SerializeToString, + ), + 'ControlQuery': grpc.unary_unary_rpc_method_handler( + servicer.ControlQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryResponse.SerializeToString, + ), + 'GetResultData': grpc.unary_unary_rpc_method_handler( + servicer.GetResultData, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataResponse.SerializeToString, + ), + 'ListJobs': grpc.unary_unary_rpc_method_handler( + servicer.ListJobs, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsResponse.SerializeToString, + ), + 'DescribeJob': grpc.unary_unary_rpc_method_handler( + servicer.DescribeJob, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobResponse.SerializeToString, + ), + 'CreateConnection': grpc.unary_unary_rpc_method_handler( + servicer.CreateConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionResponse.SerializeToString, + ), + 'ListConnections': grpc.unary_unary_rpc_method_handler( + servicer.ListConnections, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsResponse.SerializeToString, + ), + 'DescribeConnection': grpc.unary_unary_rpc_method_handler( + servicer.DescribeConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionResponse.SerializeToString, + ), + 'ModifyConnection': grpc.unary_unary_rpc_method_handler( + servicer.ModifyConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionResponse.SerializeToString, + ), + 'DeleteConnection': grpc.unary_unary_rpc_method_handler( + servicer.DeleteConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionResponse.SerializeToString, + ), + 'TestConnection': grpc.unary_unary_rpc_method_handler( + servicer.TestConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionResponse.SerializeToString, + ), + 'CreateBinding': grpc.unary_unary_rpc_method_handler( + servicer.CreateBinding, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingResponse.SerializeToString, + ), + 'ListBindings': grpc.unary_unary_rpc_method_handler( + servicer.ListBindings, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsResponse.SerializeToString, + ), + 'DescribeBinding': grpc.unary_unary_rpc_method_handler( + servicer.DescribeBinding, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingResponse.SerializeToString, + ), + 'ModifyBinding': grpc.unary_unary_rpc_method_handler( + servicer.ModifyBinding, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingResponse.SerializeToString, + ), + 'DeleteBinding': grpc.unary_unary_rpc_method_handler( + servicer.DeleteBinding, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'FederatedQuery.V1.FederatedQueryService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class FederatedQueryService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def CreateQuery(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, '/FederatedQuery.V1.FederatedQueryService/CreateQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListQueries(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, '/FederatedQuery.V1.FederatedQueryService/ListQueries', + draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeQuery(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, '/FederatedQuery.V1.FederatedQueryService/DescribeQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetQueryStatus(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, '/FederatedQuery.V1.FederatedQueryService/GetQueryStatus', + draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ModifyQuery(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, '/FederatedQuery.V1.FederatedQueryService/ModifyQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteQuery(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, '/FederatedQuery.V1.FederatedQueryService/DeleteQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ControlQuery(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, '/FederatedQuery.V1.FederatedQueryService/ControlQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetResultData(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, '/FederatedQuery.V1.FederatedQueryService/GetResultData', + draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListJobs(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, '/FederatedQuery.V1.FederatedQueryService/ListJobs', + draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeJob(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, '/FederatedQuery.V1.FederatedQueryService/DescribeJob', + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateConnection(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, '/FederatedQuery.V1.FederatedQueryService/CreateConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListConnections(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, '/FederatedQuery.V1.FederatedQueryService/ListConnections', + draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeConnection(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, '/FederatedQuery.V1.FederatedQueryService/DescribeConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ModifyConnection(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, '/FederatedQuery.V1.FederatedQueryService/ModifyConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteConnection(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, '/FederatedQuery.V1.FederatedQueryService/DeleteConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def TestConnection(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, '/FederatedQuery.V1.FederatedQueryService/TestConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateBinding(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, '/FederatedQuery.V1.FederatedQueryService/CreateBinding', + draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListBindings(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, '/FederatedQuery.V1.FederatedQueryService/ListBindings', + draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeBinding(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, '/FederatedQuery.V1.FederatedQueryService/DescribeBinding', + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ModifyBinding(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, '/FederatedQuery.V1.FederatedQueryService/ModifyBinding', + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteBinding(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, '/FederatedQuery.V1.FederatedQueryService/DeleteBinding', + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v3/draft/ydb_keyvalue_v1_pb2.py b/ydb/_grpc/v3/draft/ydb_keyvalue_v1_pb2.py new file mode 100644 index 00000000..d8433083 --- /dev/null +++ b/ydb/_grpc/v3/draft/ydb_keyvalue_v1_pb2.py @@ -0,0 +1,160 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/ydb_keyvalue_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v3.draft.protos import ydb_keyvalue_pb2 as draft_dot_protos_dot_ydb__keyvalue__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='draft/ydb_keyvalue_v1.proto', + package='Ydb.KeyValue.V1', + syntax='proto3', + serialized_options=b'\n\035tech.ydb.proto.draft.keyvalueZ=github.com/ydb-platform/ydb-go-genproto/draft/Ydb_KeyValue_V1', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\x1b\x64raft/ydb_keyvalue_v1.proto\x12\x0fYdb.KeyValue.V1\x1a\x1f\x64raft/protos/ydb_keyvalue.proto2\xe6\x07\n\x0fKeyValueService\x12U\n\x0c\x43reateVolume\x12!.Ydb.KeyValue.CreateVolumeRequest\x1a\".Ydb.KeyValue.CreateVolumeResponse\x12O\n\nDropVolume\x12\x1f.Ydb.KeyValue.DropVolumeRequest\x1a .Ydb.KeyValue.DropVolumeResponse\x12R\n\x0b\x41lterVolume\x12 .Ydb.KeyValue.AlterVolumeRequest\x1a!.Ydb.KeyValue.AlterVolumeResponse\x12[\n\x0e\x44\x65scribeVolume\x12#.Ydb.KeyValue.DescribeVolumeRequest\x1a$.Ydb.KeyValue.DescribeVolumeResponse\x12j\n\x13ListLocalPartitions\x12(.Ydb.KeyValue.ListLocalPartitionsRequest\x1a).Ydb.KeyValue.ListLocalPartitionsResponse\x12R\n\x0b\x41\x63quireLock\x12 .Ydb.KeyValue.AcquireLockRequest\x1a!.Ydb.KeyValue.AcquireLockResponse\x12g\n\x12\x45xecuteTransaction\x12\'.Ydb.KeyValue.ExecuteTransactionRequest\x1a(.Ydb.KeyValue.ExecuteTransactionResponse\x12=\n\x04Read\x12\x19.Ydb.KeyValue.ReadRequest\x1a\x1a.Ydb.KeyValue.ReadResponse\x12L\n\tReadRange\x12\x1e.Ydb.KeyValue.ReadRangeRequest\x1a\x1f.Ydb.KeyValue.ReadRangeResponse\x12L\n\tListRange\x12\x1e.Ydb.KeyValue.ListRangeRequest\x1a\x1f.Ydb.KeyValue.ListRangeResponse\x12v\n\x17GetStorageChannelStatus\x12,.Ydb.KeyValue.GetStorageChannelStatusRequest\x1a-.Ydb.KeyValue.GetStorageChannelStatusResponseB^\n\x1dtech.ydb.proto.draft.keyvalueZ=github.com/ydb-platform/ydb-go-genproto/draft/Ydb_KeyValue_V1b\x06proto3' + , + dependencies=[draft_dot_protos_dot_ydb__keyvalue__pb2.DESCRIPTOR,]) + + + +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + + +DESCRIPTOR._options = None + +_KEYVALUESERVICE = _descriptor.ServiceDescriptor( + name='KeyValueService', + full_name='Ydb.KeyValue.V1.KeyValueService', + file=DESCRIPTOR, + index=0, + serialized_options=None, + create_key=_descriptor._internal_create_key, + serialized_start=82, + serialized_end=1080, + methods=[ + _descriptor.MethodDescriptor( + name='CreateVolume', + full_name='Ydb.KeyValue.V1.KeyValueService.CreateVolume', + index=0, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__keyvalue__pb2._CREATEVOLUMEREQUEST, + output_type=draft_dot_protos_dot_ydb__keyvalue__pb2._CREATEVOLUMERESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='DropVolume', + full_name='Ydb.KeyValue.V1.KeyValueService.DropVolume', + index=1, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__keyvalue__pb2._DROPVOLUMEREQUEST, + output_type=draft_dot_protos_dot_ydb__keyvalue__pb2._DROPVOLUMERESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='AlterVolume', + full_name='Ydb.KeyValue.V1.KeyValueService.AlterVolume', + index=2, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__keyvalue__pb2._ALTERVOLUMEREQUEST, + output_type=draft_dot_protos_dot_ydb__keyvalue__pb2._ALTERVOLUMERESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='DescribeVolume', + full_name='Ydb.KeyValue.V1.KeyValueService.DescribeVolume', + index=3, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__keyvalue__pb2._DESCRIBEVOLUMEREQUEST, + output_type=draft_dot_protos_dot_ydb__keyvalue__pb2._DESCRIBEVOLUMERESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ListLocalPartitions', + full_name='Ydb.KeyValue.V1.KeyValueService.ListLocalPartitions', + index=4, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__keyvalue__pb2._LISTLOCALPARTITIONSREQUEST, + output_type=draft_dot_protos_dot_ydb__keyvalue__pb2._LISTLOCALPARTITIONSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='AcquireLock', + full_name='Ydb.KeyValue.V1.KeyValueService.AcquireLock', + index=5, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__keyvalue__pb2._ACQUIRELOCKREQUEST, + output_type=draft_dot_protos_dot_ydb__keyvalue__pb2._ACQUIRELOCKRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ExecuteTransaction', + full_name='Ydb.KeyValue.V1.KeyValueService.ExecuteTransaction', + index=6, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__keyvalue__pb2._EXECUTETRANSACTIONREQUEST, + output_type=draft_dot_protos_dot_ydb__keyvalue__pb2._EXECUTETRANSACTIONRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='Read', + full_name='Ydb.KeyValue.V1.KeyValueService.Read', + index=7, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__keyvalue__pb2._READREQUEST, + output_type=draft_dot_protos_dot_ydb__keyvalue__pb2._READRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ReadRange', + full_name='Ydb.KeyValue.V1.KeyValueService.ReadRange', + index=8, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__keyvalue__pb2._READRANGEREQUEST, + output_type=draft_dot_protos_dot_ydb__keyvalue__pb2._READRANGERESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ListRange', + full_name='Ydb.KeyValue.V1.KeyValueService.ListRange', + index=9, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__keyvalue__pb2._LISTRANGEREQUEST, + output_type=draft_dot_protos_dot_ydb__keyvalue__pb2._LISTRANGERESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='GetStorageChannelStatus', + full_name='Ydb.KeyValue.V1.KeyValueService.GetStorageChannelStatus', + index=10, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__keyvalue__pb2._GETSTORAGECHANNELSTATUSREQUEST, + output_type=draft_dot_protos_dot_ydb__keyvalue__pb2._GETSTORAGECHANNELSTATUSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), +]) +_sym_db.RegisterServiceDescriptor(_KEYVALUESERVICE) + +DESCRIPTOR.services_by_name['KeyValueService'] = _KEYVALUESERVICE + +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v3/draft/ydb_keyvalue_v1_pb2_grpc.py b/ydb/_grpc/v3/draft/ydb_keyvalue_v1_pb2_grpc.py new file mode 100644 index 00000000..64714c10 --- /dev/null +++ b/ydb/_grpc/v3/draft/ydb_keyvalue_v1_pb2_grpc.py @@ -0,0 +1,419 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v3.draft.protos import ydb_keyvalue_pb2 as draft_dot_protos_dot_ydb__keyvalue__pb2 + + +class KeyValueServiceStub(object): + """KeyValue tablets provide a simple key-value storage in a low-overhead and easy-to-shoot-your-leg manner. + To use KeyValue tablets in an efficient way one must be familiar with the design of both the KeyValue tablet + and the Distributed Storage underneath it. + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateVolume = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/CreateVolume', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeResponse.FromString, + ) + self.DropVolume = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/DropVolume', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeResponse.FromString, + ) + self.AlterVolume = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/AlterVolume', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeResponse.FromString, + ) + self.DescribeVolume = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/DescribeVolume', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeResponse.FromString, + ) + self.ListLocalPartitions = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/ListLocalPartitions', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsResponse.FromString, + ) + self.AcquireLock = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/AcquireLock', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockResponse.FromString, + ) + self.ExecuteTransaction = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/ExecuteTransaction', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionResponse.FromString, + ) + self.Read = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/Read', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadResponse.FromString, + ) + self.ReadRange = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/ReadRange', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeResponse.FromString, + ) + self.ListRange = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/ListRange', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeResponse.FromString, + ) + self.GetStorageChannelStatus = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/GetStorageChannelStatus', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusResponse.FromString, + ) + + +class KeyValueServiceServicer(object): + """KeyValue tablets provide a simple key-value storage in a low-overhead and easy-to-shoot-your-leg manner. + To use KeyValue tablets in an efficient way one must be familiar with the design of both the KeyValue tablet + and the Distributed Storage underneath it. + + """ + + def CreateVolume(self, request, context): + """Create a volume by path and partition count + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DropVolume(self, request, context): + """Drop the volume by path + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AlterVolume(self, request, context): + """Alter the volume by path + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeVolume(self, request, context): + """Describe the volume by path + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListLocalPartitions(self, request, context): + """List partitions of a volume at the local node. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AcquireLock(self, request, context): + """Acquire an exclusive lock for the partition. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ExecuteTransaction(self, request, context): + """Perform list of commands to modify the state of the partition as an atomic transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Read(self, request, context): + """Read the value stored in the item with the key specified. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReadRange(self, request, context): + """Read items with keys in the specified range. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListRange(self, request, context): + """List keys and metadata of items with keys in the specified range. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetStorageChannelStatus(self, request, context): + """Get storage channel status of the partition. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_KeyValueServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateVolume': grpc.unary_unary_rpc_method_handler( + servicer.CreateVolume, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeResponse.SerializeToString, + ), + 'DropVolume': grpc.unary_unary_rpc_method_handler( + servicer.DropVolume, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeResponse.SerializeToString, + ), + 'AlterVolume': grpc.unary_unary_rpc_method_handler( + servicer.AlterVolume, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeResponse.SerializeToString, + ), + 'DescribeVolume': grpc.unary_unary_rpc_method_handler( + servicer.DescribeVolume, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeResponse.SerializeToString, + ), + 'ListLocalPartitions': grpc.unary_unary_rpc_method_handler( + servicer.ListLocalPartitions, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsResponse.SerializeToString, + ), + 'AcquireLock': grpc.unary_unary_rpc_method_handler( + servicer.AcquireLock, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockResponse.SerializeToString, + ), + 'ExecuteTransaction': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteTransaction, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionResponse.SerializeToString, + ), + 'Read': grpc.unary_unary_rpc_method_handler( + servicer.Read, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadResponse.SerializeToString, + ), + 'ReadRange': grpc.unary_unary_rpc_method_handler( + servicer.ReadRange, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeResponse.SerializeToString, + ), + 'ListRange': grpc.unary_unary_rpc_method_handler( + servicer.ListRange, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeResponse.SerializeToString, + ), + 'GetStorageChannelStatus': grpc.unary_unary_rpc_method_handler( + servicer.GetStorageChannelStatus, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.KeyValue.V1.KeyValueService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class KeyValueService(object): + """KeyValue tablets provide a simple key-value storage in a low-overhead and easy-to-shoot-your-leg manner. + To use KeyValue tablets in an efficient way one must be familiar with the design of both the KeyValue tablet + and the Distributed Storage underneath it. + + """ + + @staticmethod + def CreateVolume(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, '/Ydb.KeyValue.V1.KeyValueService/CreateVolume', + draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DropVolume(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, '/Ydb.KeyValue.V1.KeyValueService/DropVolume', + draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AlterVolume(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, '/Ydb.KeyValue.V1.KeyValueService/AlterVolume', + draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeVolume(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, '/Ydb.KeyValue.V1.KeyValueService/DescribeVolume', + draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListLocalPartitions(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, '/Ydb.KeyValue.V1.KeyValueService/ListLocalPartitions', + draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AcquireLock(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, '/Ydb.KeyValue.V1.KeyValueService/AcquireLock', + draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ExecuteTransaction(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, '/Ydb.KeyValue.V1.KeyValueService/ExecuteTransaction', + draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Read(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, '/Ydb.KeyValue.V1.KeyValueService/Read', + draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ReadResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReadRange(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, '/Ydb.KeyValue.V1.KeyValueService/ReadRange', + draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListRange(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, '/Ydb.KeyValue.V1.KeyValueService/ListRange', + draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetStorageChannelStatus(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, '/Ydb.KeyValue.V1.KeyValueService/GetStorageChannelStatus', + draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v3/draft/ydb_object_storage_v1_pb2.py b/ydb/_grpc/v3/draft/ydb_object_storage_v1_pb2.py new file mode 100644 index 00000000..78891777 --- /dev/null +++ b/ydb/_grpc/v3/draft/ydb_object_storage_v1_pb2.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/ydb_object_storage_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v3.draft.protos import ydb_object_storage_pb2 as draft_dot_protos_dot_ydb__object__storage__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='draft/ydb_object_storage_v1.proto', + package='Ydb.ObjectStorage.V1', + syntax='proto3', + serialized_options=b'\n&tech.ydb.proto.draft.object_storage.v1ZBgithub.com/ydb-platform/ydb-go-genproto/draft/Ydb_ObjectStorage_V1', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n!draft/ydb_object_storage_v1.proto\x12\x14Ydb.ObjectStorage.V1\x1a%draft/protos/ydb_object_storage.proto2e\n\x14ObjectStorageService\x12M\n\x04List\x12!.Ydb.ObjectStorage.ListingRequest\x1a\".Ydb.ObjectStorage.ListingResponseBl\n&tech.ydb.proto.draft.object_storage.v1ZBgithub.com/ydb-platform/ydb-go-genproto/draft/Ydb_ObjectStorage_V1b\x06proto3' + , + dependencies=[draft_dot_protos_dot_ydb__object__storage__pb2.DESCRIPTOR,]) + + + +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + + +DESCRIPTOR._options = None + +_OBJECTSTORAGESERVICE = _descriptor.ServiceDescriptor( + name='ObjectStorageService', + full_name='Ydb.ObjectStorage.V1.ObjectStorageService', + file=DESCRIPTOR, + index=0, + serialized_options=None, + create_key=_descriptor._internal_create_key, + serialized_start=98, + serialized_end=199, + methods=[ + _descriptor.MethodDescriptor( + name='List', + full_name='Ydb.ObjectStorage.V1.ObjectStorageService.List', + index=0, + containing_service=None, + input_type=draft_dot_protos_dot_ydb__object__storage__pb2._LISTINGREQUEST, + output_type=draft_dot_protos_dot_ydb__object__storage__pb2._LISTINGRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), +]) +_sym_db.RegisterServiceDescriptor(_OBJECTSTORAGESERVICE) + +DESCRIPTOR.services_by_name['ObjectStorageService'] = _OBJECTSTORAGESERVICE + +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v3/draft/ydb_object_storage_v1_pb2_grpc.py b/ydb/_grpc/v3/draft/ydb_object_storage_v1_pb2_grpc.py new file mode 100644 index 00000000..c62aba62 --- /dev/null +++ b/ydb/_grpc/v3/draft/ydb_object_storage_v1_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v3.draft.protos import ydb_object_storage_pb2 as draft_dot_protos_dot_ydb__object__storage__pb2 + + +class ObjectStorageServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.List = channel.unary_unary( + '/Ydb.ObjectStorage.V1.ObjectStorageService/List', + request_serializer=draft_dot_protos_dot_ydb__object__storage__pb2.ListingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__object__storage__pb2.ListingResponse.FromString, + ) + + +class ObjectStorageServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ObjectStorageServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=draft_dot_protos_dot_ydb__object__storage__pb2.ListingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__object__storage__pb2.ListingResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.ObjectStorage.V1.ObjectStorageService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ObjectStorageService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def List(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, '/Ydb.ObjectStorage.V1.ObjectStorageService/List', + draft_dot_protos_dot_ydb__object__storage__pb2.ListingRequest.SerializeToString, + draft_dot_protos_dot_ydb__object__storage__pb2.ListingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v3/protos/annotations/sensitive_pb2.py b/ydb/_grpc/v3/protos/annotations/sensitive_pb2.py new file mode 100644 index 00000000..ffa78b47 --- /dev/null +++ b/ydb/_grpc/v3/protos/annotations/sensitive_pb2.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/annotations/sensitive.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='protos/annotations/sensitive.proto', + package='Ydb', + syntax='proto3', + serialized_options=b'\n\016tech.ydb.protoZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\370\001\001', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\"protos/annotations/sensitive.proto\x12\x03Ydb\x1a google/protobuf/descriptor.proto:2\n\tsensitive\x12\x1d.google.protobuf.FieldOptions\x18\xe7\xac\x05 \x01(\x08\x42G\n\x0etech.ydb.protoZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3' + , + dependencies=[google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR,]) + + +SENSITIVE_FIELD_NUMBER = 87655 +sensitive = _descriptor.FieldDescriptor( + name='sensitive', full_name='Ydb.sensitive', index=0, + number=87655, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key) + +DESCRIPTOR.extensions_by_name['sensitive'] = sensitive +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(sensitive) + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v3/protos/annotations/sensitive_pb2_grpc.py b/ydb/_grpc/v3/protos/annotations/sensitive_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v3/protos/annotations/sensitive_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v3/protos/ydb_query_pb2.py b/ydb/_grpc/v3/protos/ydb_query_pb2.py index 05501e41..05e72e2d 100644 --- a/ydb/_grpc/v3/protos/ydb_query_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_query_pb2.py @@ -28,7 +28,7 @@ syntax='proto3', serialized_options=b'\n\024tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\x9a\x03\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\xe6\x01\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x8d\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\x9a\x03\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\x93\x02\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12+\n\x07tx_meta\x18\x06 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"\x8d\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3' , dependencies=[google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__issue__message__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,protos_dot_ydb__query__stats__pb2.DESCRIPTOR,protos_dot_ydb__status__codes__pb2.DESCRIPTOR,protos_dot_ydb__value__pb2.DESCRIPTOR,]) @@ -57,8 +57,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3881, - serialized_end=3947, + serialized_start=3926, + serialized_end=3992, ) _sym_db.RegisterEnumDescriptor(_SYNTAX) @@ -98,8 +98,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3950, - serialized_end=4084, + serialized_start=3995, + serialized_end=4129, ) _sym_db.RegisterEnumDescriptor(_EXECMODE) @@ -139,8 +139,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=4086, - serialized_end=4213, + serialized_start=4131, + serialized_end=4258, ) _sym_db.RegisterEnumDescriptor(_STATSMODE) @@ -185,8 +185,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=4216, - serialized_end=4386, + serialized_start=4261, + serialized_end=4431, ) _sym_db.RegisterEnumDescriptor(_EXECSTATUS) @@ -1153,6 +1153,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='tx_meta', full_name='Ydb.Query.ExecuteQueryResponsePart.tx_meta', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1166,7 +1173,7 @@ oneofs=[ ], serialized_start=2531, - serialized_end=2761, + serialized_end=2806, ) @@ -1270,8 +1277,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2764, - serialized_end=3161, + serialized_start=2809, + serialized_end=3206, ) @@ -1337,8 +1344,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3164, - serialized_end=3451, + serialized_start=3209, + serialized_end=3496, ) @@ -1390,8 +1397,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3454, - serialized_end=3598, + serialized_start=3499, + serialized_end=3643, ) @@ -1450,8 +1457,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3601, - serialized_end=3820, + serialized_start=3646, + serialized_end=3865, ) @@ -1482,8 +1489,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3822, - serialized_end=3879, + serialized_start=3867, + serialized_end=3924, ) _CREATESESSIONRESPONSE.fields_by_name['status'].enum_type = protos_dot_ydb__status__codes__pb2._STATUSIDS_STATUSCODE @@ -1539,6 +1546,7 @@ _EXECUTEQUERYRESPONSEPART.fields_by_name['issues'].message_type = protos_dot_ydb__issue__message__pb2._ISSUEMESSAGE _EXECUTEQUERYRESPONSEPART.fields_by_name['result_set'].message_type = protos_dot_ydb__value__pb2._RESULTSET _EXECUTEQUERYRESPONSEPART.fields_by_name['exec_stats'].message_type = protos_dot_ydb__query__stats__pb2._QUERYSTATS +_EXECUTEQUERYRESPONSEPART.fields_by_name['tx_meta'].message_type = _TRANSACTIONMETA _EXECUTESCRIPTREQUEST_PARAMETERSENTRY.fields_by_name['value'].message_type = protos_dot_ydb__value__pb2._TYPEDVALUE _EXECUTESCRIPTREQUEST_PARAMETERSENTRY.containing_type = _EXECUTESCRIPTREQUEST _EXECUTESCRIPTREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS diff --git a/ydb/_grpc/v3/protos/ydb_topic_pb2.py b/ydb/_grpc/v3/protos/ydb_topic_pb2.py index 444f01de..139e46c8 100644 --- a/ydb/_grpc/v3/protos/ydb_topic_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_topic_pb2.py @@ -17,7 +17,6 @@ from ydb._grpc.v3.protos import ydb_scheme_pb2 as protos_dot_ydb__scheme__pb2 from ydb._grpc.v3.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 from ydb._grpc.v3.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 -from ydb._grpc.v3.protos import ydb_table_pb2 as protos_dot_ydb__table__pb2 from ydb._grpc.v3.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 @@ -29,9 +28,9 @@ syntax='proto3', serialized_options=b'\n\024tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x16protos/ydb_table.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"#\n\x12UpdateTokenRequest\x12\r\n\x05token\x18\x01 \x01(\t\"\x15\n\x13UpdateTokenResponse\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\xcf\x11\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xa3\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x13\n\x0bproducer_id\x18\x02 \x01(\t\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12\x1a\n\x10message_group_id\x18\x04 \x01(\tH\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\xde\x02\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x1a\xf4\x01\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12\x1a\n\x10message_group_id\x18\x05 \x01(\tH\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioning\x1a\x81\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\x8e\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x42\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xca\x1d\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xea\x04\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xc4\x05\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x42\x10\n\x0eserver_message\x1a\xa4\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\xff\x05\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xd1\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12\x18\n\x10message_group_id\x18\x07 \x01(\t\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xc4\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x13\n\x0bproducer_id\x18\x02 \x01(\t\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xb6\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1ag\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x1a<\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\"\xd6\x03\n\x1e\x41\x64\x64OffsetsToTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Table.TransactionControl\x12\x46\n\x06topics\x18\x04 \x03(\x0b\x32\x36.Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x05 \x01(\t\x1a\xd7\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12[\n\npartitions\x18\x02 \x03(\x0b\x32G.Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"O\n\x1f\x41\x64\x64OffsetsToTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x1f\n\x1d\x41\x64\x64OffsetsToTransactionResult\"\x96\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xb3\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf3\x01\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"h\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbb\x01\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_partition_count_limit\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"v\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa2\x08\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xa4\x01\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\x8b\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xde\x06\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\x80\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x1a\xb3\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\x9c\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x19\n\x11partition_node_id\x18\x08 \x01(\x05\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"#\n\x12UpdateTokenRequest\x12\r\n\x05token\x18\x01 \x01(\t\"\x15\n\x13UpdateTokenResponse\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x87\x12\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xa3\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x13\n\x0bproducer_id\x18\x02 \x01(\t\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12\x1a\n\x10message_group_id\x18\x04 \x01(\tH\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\x96\x03\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x12/\n\x02tx\x18\x03 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentityH\x00\x88\x01\x01\x1a\xf4\x01\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12\x1a\n\x10message_group_id\x18\x05 \x01(\tH\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioningB\x05\n\x03_tx\x1a\x81\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\x8e\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x42\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xca\x1d\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xea\x04\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xc4\x05\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x42\x10\n\x0eserver_message\x1a\xa4\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\xff\x05\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xd1\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12\x18\n\x10message_group_id\x18\x07 \x01(\t\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xc4\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x13\n\x0bproducer_id\x18\x02 \x01(\t\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xb6\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1ag\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x1a<\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\"2\n\x13TransactionIdentity\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07session\x18\x02 \x01(\t\"\xc4\x03\n!UpdateOffsetsInTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12*\n\x02tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentity\x12I\n\x06topics\x18\x03 \x03(\x0b\x32\x39.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x1a\xda\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12^\n\npartitions\x18\x02 \x03(\x0b\x32J.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"R\n\"UpdateOffsetsInTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\"\n UpdateOffsetsInTransactionResult\"\x96\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xb3\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf3\x01\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"h\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbb\x01\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_partition_count_limit\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"v\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa2\x08\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xa4\x01\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\x8b\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xde\x06\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\x80\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x1a\xb3\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\x9c\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x19\n\x11partition_node_id\x18\x08 \x01(\x05\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3' , - dependencies=[protos_dot_ydb__operation__pb2.DESCRIPTOR,protos_dot_ydb__scheme__pb2.DESCRIPTOR,protos_dot_ydb__status__codes__pb2.DESCRIPTOR,protos_dot_ydb__issue__message__pb2.DESCRIPTOR,protos_dot_ydb__table__pb2.DESCRIPTOR,protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) + dependencies=[protos_dot_ydb__operation__pb2.DESCRIPTOR,protos_dot_ydb__scheme__pb2.DESCRIPTOR,protos_dot_ydb__status__codes__pb2.DESCRIPTOR,protos_dot_ydb__issue__message__pb2.DESCRIPTOR,protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) _CODEC = _descriptor.EnumDescriptor( name='Codec', @@ -73,8 +72,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=13142, - serialized_end=13273, + serialized_start=13214, + serialized_end=13345, ) _sym_db.RegisterEnumDescriptor(_CODEC) @@ -104,8 +103,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=13275, - serialized_end=13390, + serialized_start=13347, + serialized_end=13462, ) _sym_db.RegisterEnumDescriptor(_METERINGMODE) @@ -141,8 +140,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2352, - serialized_end=2412, + serialized_start=2384, + serialized_end=2444, ) _sym_db.RegisterEnumDescriptor(_STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON) @@ -174,8 +173,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=279, - serialized_end=334, + serialized_start=255, + serialized_end=310, ) @@ -213,8 +212,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=336, - serialized_end=378, + serialized_start=312, + serialized_end=354, ) @@ -245,8 +244,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=380, - serialized_end=415, + serialized_start=356, + serialized_end=391, ) @@ -270,8 +269,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=417, - serialized_end=438, + serialized_start=393, + serialized_end=414, ) @@ -309,8 +308,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=440, - serialized_end=482, + serialized_start=416, + serialized_end=458, ) @@ -360,8 +359,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=508, - serialized_end=737, + serialized_start=484, + serialized_end=713, ) _STREAMWRITEMESSAGE_FROMSERVER = _descriptor.Descriptor( @@ -424,8 +423,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=740, - serialized_end=1059, + serialized_start=716, + serialized_end=1035, ) _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY = _descriptor.Descriptor( @@ -462,8 +461,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1282, - serialized_end=1337, + serialized_start=1258, + serialized_end=1313, ) _STREAMWRITEMESSAGE_INITREQUEST = _descriptor.Descriptor( @@ -533,8 +532,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1062, - serialized_end=1353, + serialized_start=1038, + serialized_end=1329, ) _STREAMWRITEMESSAGE_INITRESPONSE = _descriptor.Descriptor( @@ -585,8 +584,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1356, - serialized_end=1487, + serialized_start=1332, + serialized_end=1463, ) _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA = _descriptor.Descriptor( @@ -663,8 +662,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1596, - serialized_end=1840, + serialized_start=1621, + serialized_end=1865, ) _STREAMWRITEMESSAGE_WRITEREQUEST = _descriptor.Descriptor( @@ -689,6 +688,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='tx', full_name='Ydb.Topic.StreamWriteMessage.WriteRequest.tx', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -700,9 +706,14 @@ syntax='proto3', extension_ranges=[], oneofs=[ + _descriptor.OneofDescriptor( + name='_tx', full_name='Ydb.Topic.StreamWriteMessage.WriteRequest._tx', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=1490, - serialized_end=1840, + serialized_start=1466, + serialized_end=1872, ) _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN = _descriptor.Descriptor( @@ -732,8 +743,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2228, - serialized_end=2253, + serialized_start=2260, + serialized_end=2285, ) _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED = _descriptor.Descriptor( @@ -764,8 +775,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2256, - serialized_end=2412, + serialized_start=2288, + serialized_end=2444, ) _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK = _descriptor.Descriptor( @@ -814,8 +825,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=2038, - serialized_end=2436, + serialized_start=2070, + serialized_end=2468, ) _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS = _descriptor.Descriptor( @@ -873,8 +884,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2439, - serialized_end=2740, + serialized_start=2471, + serialized_end=2772, ) _STREAMWRITEMESSAGE_WRITERESPONSE = _descriptor.Descriptor( @@ -918,8 +929,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1843, - serialized_end=2740, + serialized_start=1875, + serialized_end=2772, ) _STREAMWRITEMESSAGE = _descriptor.Descriptor( @@ -942,8 +953,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=485, - serialized_end=2740, + serialized_start=461, + serialized_end=2772, ) @@ -988,8 +999,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2764, - serialized_end=2848, + serialized_start=2796, + serialized_end=2880, ) _STREAMREADMESSAGE_FROMCLIENT = _descriptor.Descriptor( @@ -1066,8 +1077,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=2851, - serialized_end=3469, + serialized_start=2883, + serialized_end=3501, ) _STREAMREADMESSAGE_FROMSERVER = _descriptor.Descriptor( @@ -1158,8 +1169,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=3472, - serialized_end=4180, + serialized_start=3504, + serialized_end=4212, ) _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS = _descriptor.Descriptor( @@ -1210,8 +1221,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4328, - serialized_end=4475, + serialized_start=4360, + serialized_end=4507, ) _STREAMREADMESSAGE_INITREQUEST = _descriptor.Descriptor( @@ -1255,8 +1266,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4183, - serialized_end=4475, + serialized_start=4215, + serialized_end=4507, ) _STREAMREADMESSAGE_INITRESPONSE = _descriptor.Descriptor( @@ -1286,8 +1297,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4477, - serialized_end=4511, + serialized_start=4509, + serialized_end=4543, ) _STREAMREADMESSAGE_READREQUEST = _descriptor.Descriptor( @@ -1317,8 +1328,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4513, - serialized_end=4546, + serialized_start=4545, + serialized_end=4578, ) _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA = _descriptor.Descriptor( @@ -1390,8 +1401,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4667, - serialized_end=4876, + serialized_start=4699, + serialized_end=4908, ) _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY = _descriptor.Descriptor( @@ -1428,8 +1439,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1282, - serialized_end=1337, + serialized_start=1258, + serialized_end=1313, ) _STREAMREADMESSAGE_READRESPONSE_BATCH = _descriptor.Descriptor( @@ -1487,8 +1498,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4879, - serialized_end=5203, + serialized_start=4911, + serialized_end=5235, ) _STREAMREADMESSAGE_READRESPONSE_PARTITIONDATA = _descriptor.Descriptor( @@ -1525,8 +1536,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5205, - serialized_end=5316, + serialized_start=5237, + serialized_end=5348, ) _STREAMREADMESSAGE_READRESPONSE = _descriptor.Descriptor( @@ -1563,8 +1574,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4549, - serialized_end=5316, + serialized_start=4581, + serialized_end=5348, ) _STREAMREADMESSAGE_COMMITOFFSETREQUEST_PARTITIONCOMMITOFFSET = _descriptor.Descriptor( @@ -1601,8 +1612,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5438, - serialized_end=5533, + serialized_start=5470, + serialized_end=5565, ) _STREAMREADMESSAGE_COMMITOFFSETREQUEST = _descriptor.Descriptor( @@ -1632,8 +1643,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5319, - serialized_end=5533, + serialized_start=5351, + serialized_end=5565, ) _STREAMREADMESSAGE_COMMITOFFSETRESPONSE_PARTITIONCOMMITTEDOFFSET = _descriptor.Descriptor( @@ -1670,8 +1681,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5674, - serialized_end=5756, + serialized_start=5706, + serialized_end=5788, ) _STREAMREADMESSAGE_COMMITOFFSETRESPONSE = _descriptor.Descriptor( @@ -1701,8 +1712,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5536, - serialized_end=5756, + serialized_start=5568, + serialized_end=5788, ) _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST = _descriptor.Descriptor( @@ -1732,8 +1743,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5758, - serialized_end=5819, + serialized_start=5790, + serialized_end=5851, ) _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE = _descriptor.Descriptor( @@ -1784,8 +1795,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5822, - serialized_end=6025, + serialized_start=5854, + serialized_end=6057, ) _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST = _descriptor.Descriptor( @@ -1829,8 +1840,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6028, - serialized_end=6210, + serialized_start=6060, + serialized_end=6242, ) _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE = _descriptor.Descriptor( @@ -1884,8 +1895,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=6213, - serialized_end=6362, + serialized_start=6245, + serialized_end=6394, ) _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST = _descriptor.Descriptor( @@ -1929,8 +1940,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6364, - serialized_end=6467, + serialized_start=6396, + serialized_end=6499, ) _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE = _descriptor.Descriptor( @@ -1960,8 +1971,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6469, - serialized_end=6529, + serialized_start=6501, + serialized_end=6561, ) _STREAMREADMESSAGE = _descriptor.Descriptor( @@ -1984,28 +1995,67 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2743, - serialized_end=6529, + serialized_start=2775, + serialized_end=6561, +) + + +_TRANSACTIONIDENTITY = _descriptor.Descriptor( + name='TransactionIdentity', + full_name='Ydb.Topic.TransactionIdentity', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='Ydb.Topic.TransactionIdentity.id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='session', full_name='Ydb.Topic.TransactionIdentity.session', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=6563, + serialized_end=6613, ) -_ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS = _descriptor.Descriptor( +_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS = _descriptor.Descriptor( name='PartitionOffsets', - full_name='Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets', + full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='partition_id', full_name='Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets.partition_id', index=0, + name='partition_id', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets.partition_id', index=0, number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='partition_offsets', full_name='Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets.partition_offsets', index=1, + name='partition_offsets', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets.partition_offsets', index=1, number=2, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, @@ -2023,27 +2073,27 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6910, - serialized_end=7002, + serialized_start=6976, + serialized_end=7068, ) -_ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS = _descriptor.Descriptor( +_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS = _descriptor.Descriptor( name='TopicOffsets', - full_name='Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets', + full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='path', full_name='Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets.path', index=0, + name='path', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.path', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='partitions', full_name='Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets.partitions', index=1, + name='partitions', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.partitions', index=1, number=2, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, @@ -2052,7 +2102,7 @@ ], extensions=[ ], - nested_types=[_ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS, ], + nested_types=[_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS, ], enum_types=[ ], serialized_options=None, @@ -2061,49 +2111,42 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6787, - serialized_end=7002, + serialized_start=6850, + serialized_end=7068, ) -_ADDOFFSETSTOTRANSACTIONREQUEST = _descriptor.Descriptor( - name='AddOffsetsToTransactionRequest', - full_name='Ydb.Topic.AddOffsetsToTransactionRequest', +_UPDATEOFFSETSINTRANSACTIONREQUEST = _descriptor.Descriptor( + name='UpdateOffsetsInTransactionRequest', + full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='operation_params', full_name='Ydb.Topic.AddOffsetsToTransactionRequest.operation_params', index=0, + name='operation_params', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.operation_params', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='session_id', full_name='Ydb.Topic.AddOffsetsToTransactionRequest.session_id', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='tx_control', full_name='Ydb.Topic.AddOffsetsToTransactionRequest.tx_control', index=2, - number=3, type=11, cpp_type=10, label=1, + name='tx', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.tx', index=1, + number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='topics', full_name='Ydb.Topic.AddOffsetsToTransactionRequest.topics', index=3, - number=4, type=11, cpp_type=10, label=3, + name='topics', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.topics', index=2, + number=3, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='consumer', full_name='Ydb.Topic.AddOffsetsToTransactionRequest.consumer', index=4, - number=5, type=9, cpp_type=9, label=1, + name='consumer', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.consumer', index=3, + number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -2111,7 +2154,7 @@ ], extensions=[ ], - nested_types=[_ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS, ], + nested_types=[_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS, ], enum_types=[ ], serialized_options=None, @@ -2120,21 +2163,21 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6532, - serialized_end=7002, + serialized_start=6616, + serialized_end=7068, ) -_ADDOFFSETSTOTRANSACTIONRESPONSE = _descriptor.Descriptor( - name='AddOffsetsToTransactionResponse', - full_name='Ydb.Topic.AddOffsetsToTransactionResponse', +_UPDATEOFFSETSINTRANSACTIONRESPONSE = _descriptor.Descriptor( + name='UpdateOffsetsInTransactionResponse', + full_name='Ydb.Topic.UpdateOffsetsInTransactionResponse', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='operation', full_name='Ydb.Topic.AddOffsetsToTransactionResponse.operation', index=0, + name='operation', full_name='Ydb.Topic.UpdateOffsetsInTransactionResponse.operation', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -2152,14 +2195,14 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7004, - serialized_end=7083, + serialized_start=7070, + serialized_end=7152, ) -_ADDOFFSETSTOTRANSACTIONRESULT = _descriptor.Descriptor( - name='AddOffsetsToTransactionResult', - full_name='Ydb.Topic.AddOffsetsToTransactionResult', +_UPDATEOFFSETSINTRANSACTIONRESULT = _descriptor.Descriptor( + name='UpdateOffsetsInTransactionResult', + full_name='Ydb.Topic.UpdateOffsetsInTransactionResult', filename=None, file=DESCRIPTOR, containing_type=None, @@ -2177,8 +2220,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7085, - serialized_end=7116, + serialized_start=7154, + serialized_end=7188, ) @@ -2237,8 +2280,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7119, - serialized_end=7269, + serialized_start=7191, + serialized_end=7341, ) @@ -2269,8 +2312,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7271, - serialized_end=7339, + serialized_start=7343, + serialized_end=7411, ) @@ -2294,8 +2337,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7341, - serialized_end=7361, + serialized_start=7413, + serialized_end=7433, ) @@ -2340,8 +2383,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7363, - serialized_end=7439, + serialized_start=7435, + serialized_end=7511, ) @@ -2379,8 +2422,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7704, - serialized_end=7753, + serialized_start=7776, + serialized_end=7825, ) _CONSUMER_CONSUMERSTATS = _descriptor.Descriptor( @@ -2431,8 +2474,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7756, - serialized_end=7999, + serialized_start=7828, + serialized_end=8071, ) _CONSUMER = _descriptor.Descriptor( @@ -2497,8 +2540,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7442, - serialized_end=8005, + serialized_start=7514, + serialized_end=8077, ) @@ -2536,8 +2579,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8249, - serialized_end=8303, + serialized_start=8321, + serialized_end=8375, ) _ALTERCONSUMER = _descriptor.Descriptor( @@ -2600,8 +2643,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=8008, - serialized_end=8327, + serialized_start=8080, + serialized_end=8399, ) @@ -2639,8 +2682,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8329, - serialized_end=8433, + serialized_start=8401, + serialized_end=8505, ) @@ -2688,8 +2731,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=8436, - serialized_end=8623, + serialized_start=8508, + serialized_end=8695, ) @@ -2727,8 +2770,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7704, - serialized_end=7753, + serialized_start=7776, + serialized_end=7825, ) _CREATETOPICREQUEST = _descriptor.Descriptor( @@ -2828,8 +2871,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8626, - serialized_end=9256, + serialized_start=8698, + serialized_end=9328, ) @@ -2860,8 +2903,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9258, - serialized_end=9325, + serialized_start=9330, + serialized_end=9397, ) @@ -2885,8 +2928,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9327, - serialized_end=9346, + serialized_start=9399, + serialized_end=9418, ) @@ -2931,8 +2974,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9348, - serialized_end=9466, + serialized_start=9420, + serialized_end=9538, ) @@ -2963,8 +3006,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9468, - serialized_end=9537, + serialized_start=9540, + serialized_end=9609, ) @@ -3002,8 +3045,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7704, - serialized_end=7753, + serialized_start=7776, + serialized_end=7825, ) _DESCRIBETOPICRESULT_PARTITIONINFO = _descriptor.Descriptor( @@ -3061,8 +3104,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10220, - serialized_end=10384, + serialized_start=10292, + serialized_end=10456, ) _DESCRIBETOPICRESULT_TOPICSTATS = _descriptor.Descriptor( @@ -3113,8 +3156,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10387, - serialized_end=10592, + serialized_start=10459, + serialized_end=10664, ) _DESCRIBETOPICRESULT = _descriptor.Descriptor( @@ -3221,8 +3264,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9540, - serialized_end=10598, + serialized_start=9612, + serialized_end=10670, ) @@ -3274,8 +3317,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10601, - serialized_end=10740, + serialized_start=10673, + serialized_end=10812, ) @@ -3306,8 +3349,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10742, - serialized_end=10814, + serialized_start=10814, + serialized_end=10886, ) @@ -3373,8 +3416,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10985, - serialized_end=11241, + serialized_start=11057, + serialized_end=11313, ) _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS = _descriptor.Descriptor( @@ -3467,8 +3510,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11244, - serialized_end=11679, + serialized_start=11316, + serialized_end=11751, ) _DESCRIBECONSUMERRESULT = _descriptor.Descriptor( @@ -3512,8 +3555,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10817, - serialized_end=11679, + serialized_start=10889, + serialized_end=11751, ) @@ -3579,8 +3622,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11682, - serialized_end=11966, + serialized_start=11754, + serialized_end=12038, ) @@ -3618,8 +3661,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8249, - serialized_end=8303, + serialized_start=8321, + serialized_end=8375, ) _ALTERTOPICREQUEST = _descriptor.Descriptor( @@ -3748,8 +3791,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11969, - serialized_end=12872, + serialized_start=12041, + serialized_end=12944, ) @@ -3780,8 +3823,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12874, - serialized_end=12940, + serialized_start=12946, + serialized_end=13012, ) @@ -3805,8 +3848,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12942, - serialized_end=12960, + serialized_start=13014, + serialized_end=13032, ) @@ -3844,8 +3887,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12962, - serialized_end=13053, + serialized_start=13034, + serialized_end=13125, ) @@ -3876,8 +3919,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13055, - serialized_end=13120, + serialized_start=13127, + serialized_end=13192, ) @@ -3901,8 +3944,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13122, - serialized_end=13139, + serialized_start=13194, + serialized_end=13211, ) _STREAMWRITEMESSAGE_FROMCLIENT.fields_by_name['init_request'].message_type = _STREAMWRITEMESSAGE_INITREQUEST @@ -3954,7 +3997,11 @@ _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['partition_id']) _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['partition_id'].containing_oneof = _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.oneofs_by_name['partitioning'] _STREAMWRITEMESSAGE_WRITEREQUEST.fields_by_name['messages'].message_type = _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA +_STREAMWRITEMESSAGE_WRITEREQUEST.fields_by_name['tx'].message_type = _TRANSACTIONIDENTITY _STREAMWRITEMESSAGE_WRITEREQUEST.containing_type = _STREAMWRITEMESSAGE +_STREAMWRITEMESSAGE_WRITEREQUEST.oneofs_by_name['_tx'].fields.append( + _STREAMWRITEMESSAGE_WRITEREQUEST.fields_by_name['tx']) +_STREAMWRITEMESSAGE_WRITEREQUEST.fields_by_name['tx'].containing_oneof = _STREAMWRITEMESSAGE_WRITEREQUEST.oneofs_by_name['_tx'] _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN.containing_type = _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED.fields_by_name['reason'].enum_type = _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED.containing_type = _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK @@ -4080,14 +4127,14 @@ _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE.fields_by_name['commit_offset'].containing_oneof = _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE.oneofs_by_name['_commit_offset'] _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST.containing_type = _STREAMREADMESSAGE _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE.containing_type = _STREAMREADMESSAGE -_ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS.fields_by_name['partition_offsets'].message_type = _OFFSETSRANGE -_ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS.containing_type = _ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS -_ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS.fields_by_name['partitions'].message_type = _ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS -_ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS.containing_type = _ADDOFFSETSTOTRANSACTIONREQUEST -_ADDOFFSETSTOTRANSACTIONREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS -_ADDOFFSETSTOTRANSACTIONREQUEST.fields_by_name['tx_control'].message_type = protos_dot_ydb__table__pb2._TRANSACTIONCONTROL -_ADDOFFSETSTOTRANSACTIONREQUEST.fields_by_name['topics'].message_type = _ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS -_ADDOFFSETSTOTRANSACTIONRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS.fields_by_name['partition_offsets'].message_type = _OFFSETSRANGE +_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS.containing_type = _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS +_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS.fields_by_name['partitions'].message_type = _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS +_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS.containing_type = _UPDATEOFFSETSINTRANSACTIONREQUEST +_UPDATEOFFSETSINTRANSACTIONREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_UPDATEOFFSETSINTRANSACTIONREQUEST.fields_by_name['tx'].message_type = _TRANSACTIONIDENTITY +_UPDATEOFFSETSINTRANSACTIONREQUEST.fields_by_name['topics'].message_type = _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS +_UPDATEOFFSETSINTRANSACTIONRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION _COMMITOFFSETREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS _COMMITOFFSETRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION _CONSUMER_ATTRIBUTESENTRY.containing_type = _CONSUMER @@ -4186,9 +4233,10 @@ DESCRIPTOR.message_types_by_name['MetadataItem'] = _METADATAITEM DESCRIPTOR.message_types_by_name['StreamWriteMessage'] = _STREAMWRITEMESSAGE DESCRIPTOR.message_types_by_name['StreamReadMessage'] = _STREAMREADMESSAGE -DESCRIPTOR.message_types_by_name['AddOffsetsToTransactionRequest'] = _ADDOFFSETSTOTRANSACTIONREQUEST -DESCRIPTOR.message_types_by_name['AddOffsetsToTransactionResponse'] = _ADDOFFSETSTOTRANSACTIONRESPONSE -DESCRIPTOR.message_types_by_name['AddOffsetsToTransactionResult'] = _ADDOFFSETSTOTRANSACTIONRESULT +DESCRIPTOR.message_types_by_name['TransactionIdentity'] = _TRANSACTIONIDENTITY +DESCRIPTOR.message_types_by_name['UpdateOffsetsInTransactionRequest'] = _UPDATEOFFSETSINTRANSACTIONREQUEST +DESCRIPTOR.message_types_by_name['UpdateOffsetsInTransactionResponse'] = _UPDATEOFFSETSINTRANSACTIONRESPONSE +DESCRIPTOR.message_types_by_name['UpdateOffsetsInTransactionResult'] = _UPDATEOFFSETSINTRANSACTIONRESULT DESCRIPTOR.message_types_by_name['CommitOffsetRequest'] = _COMMITOFFSETREQUEST DESCRIPTOR.message_types_by_name['CommitOffsetResponse'] = _COMMITOFFSETRESPONSE DESCRIPTOR.message_types_by_name['CommitOffsetResult'] = _COMMITOFFSETRESULT @@ -4538,42 +4586,49 @@ _sym_db.RegisterMessage(StreamReadMessage.StopPartitionSessionRequest) _sym_db.RegisterMessage(StreamReadMessage.StopPartitionSessionResponse) -AddOffsetsToTransactionRequest = _reflection.GeneratedProtocolMessageType('AddOffsetsToTransactionRequest', (_message.Message,), { +TransactionIdentity = _reflection.GeneratedProtocolMessageType('TransactionIdentity', (_message.Message,), { + 'DESCRIPTOR' : _TRANSACTIONIDENTITY, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.TransactionIdentity) + }) +_sym_db.RegisterMessage(TransactionIdentity) + +UpdateOffsetsInTransactionRequest = _reflection.GeneratedProtocolMessageType('UpdateOffsetsInTransactionRequest', (_message.Message,), { 'TopicOffsets' : _reflection.GeneratedProtocolMessageType('TopicOffsets', (_message.Message,), { 'PartitionOffsets' : _reflection.GeneratedProtocolMessageType('PartitionOffsets', (_message.Message,), { - 'DESCRIPTOR' : _ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS, + 'DESCRIPTOR' : _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS, '__module__' : 'protos.ydb_topic_pb2' - # @@protoc_insertion_point(class_scope:Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets) + # @@protoc_insertion_point(class_scope:Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets) }) , - 'DESCRIPTOR' : _ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS, + 'DESCRIPTOR' : _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS, '__module__' : 'protos.ydb_topic_pb2' - # @@protoc_insertion_point(class_scope:Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets) + # @@protoc_insertion_point(class_scope:Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets) }) , - 'DESCRIPTOR' : _ADDOFFSETSTOTRANSACTIONREQUEST, + 'DESCRIPTOR' : _UPDATEOFFSETSINTRANSACTIONREQUEST, '__module__' : 'protos.ydb_topic_pb2' - # @@protoc_insertion_point(class_scope:Ydb.Topic.AddOffsetsToTransactionRequest) + # @@protoc_insertion_point(class_scope:Ydb.Topic.UpdateOffsetsInTransactionRequest) }) -_sym_db.RegisterMessage(AddOffsetsToTransactionRequest) -_sym_db.RegisterMessage(AddOffsetsToTransactionRequest.TopicOffsets) -_sym_db.RegisterMessage(AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets) +_sym_db.RegisterMessage(UpdateOffsetsInTransactionRequest) +_sym_db.RegisterMessage(UpdateOffsetsInTransactionRequest.TopicOffsets) +_sym_db.RegisterMessage(UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets) -AddOffsetsToTransactionResponse = _reflection.GeneratedProtocolMessageType('AddOffsetsToTransactionResponse', (_message.Message,), { - 'DESCRIPTOR' : _ADDOFFSETSTOTRANSACTIONRESPONSE, +UpdateOffsetsInTransactionResponse = _reflection.GeneratedProtocolMessageType('UpdateOffsetsInTransactionResponse', (_message.Message,), { + 'DESCRIPTOR' : _UPDATEOFFSETSINTRANSACTIONRESPONSE, '__module__' : 'protos.ydb_topic_pb2' - # @@protoc_insertion_point(class_scope:Ydb.Topic.AddOffsetsToTransactionResponse) + # @@protoc_insertion_point(class_scope:Ydb.Topic.UpdateOffsetsInTransactionResponse) }) -_sym_db.RegisterMessage(AddOffsetsToTransactionResponse) +_sym_db.RegisterMessage(UpdateOffsetsInTransactionResponse) -AddOffsetsToTransactionResult = _reflection.GeneratedProtocolMessageType('AddOffsetsToTransactionResult', (_message.Message,), { - 'DESCRIPTOR' : _ADDOFFSETSTOTRANSACTIONRESULT, +UpdateOffsetsInTransactionResult = _reflection.GeneratedProtocolMessageType('UpdateOffsetsInTransactionResult', (_message.Message,), { + 'DESCRIPTOR' : _UPDATEOFFSETSINTRANSACTIONRESULT, '__module__' : 'protos.ydb_topic_pb2' - # @@protoc_insertion_point(class_scope:Ydb.Topic.AddOffsetsToTransactionResult) + # @@protoc_insertion_point(class_scope:Ydb.Topic.UpdateOffsetsInTransactionResult) }) -_sym_db.RegisterMessage(AddOffsetsToTransactionResult) +_sym_db.RegisterMessage(UpdateOffsetsInTransactionResult) CommitOffsetRequest = _reflection.GeneratedProtocolMessageType('CommitOffsetRequest', (_message.Message,), { 'DESCRIPTOR' : _COMMITOFFSETREQUEST, diff --git a/ydb/_grpc/v3/ydb_topic_v1_pb2.py b/ydb/_grpc/v3/ydb_topic_v1_pb2.py index 2a630e35..be97258a 100644 --- a/ydb/_grpc/v3/ydb_topic_v1_pb2.py +++ b/ydb/_grpc/v3/ydb_topic_v1_pb2.py @@ -21,7 +21,7 @@ syntax='proto3', serialized_options=b'\n\027tech.ydb.proto.topic.v1Z4github.com/ydb-platform/ydb-go-genproto/Ydb_Topic_V1\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x12ydb_topic_v1.proto\x12\x0cYdb.Topic.V1\x1a\x16protos/ydb_topic.proto2\xbc\x05\n\x0cTopicService\x12\x65\n\x0bStreamWrite\x12(.Ydb.Topic.StreamWriteMessage.FromClient\x1a(.Ydb.Topic.StreamWriteMessage.FromServer(\x01\x30\x01\x12\x62\n\nStreamRead\x12\'.Ydb.Topic.StreamReadMessage.FromClient\x1a\'.Ydb.Topic.StreamReadMessage.FromServer(\x01\x30\x01\x12O\n\x0c\x43ommitOffset\x12\x1e.Ydb.Topic.CommitOffsetRequest\x1a\x1f.Ydb.Topic.CommitOffsetResponse\x12L\n\x0b\x43reateTopic\x12\x1d.Ydb.Topic.CreateTopicRequest\x1a\x1e.Ydb.Topic.CreateTopicResponse\x12R\n\rDescribeTopic\x12\x1f.Ydb.Topic.DescribeTopicRequest\x1a .Ydb.Topic.DescribeTopicResponse\x12[\n\x10\x44\x65scribeConsumer\x12\".Ydb.Topic.DescribeConsumerRequest\x1a#.Ydb.Topic.DescribeConsumerResponse\x12I\n\nAlterTopic\x12\x1c.Ydb.Topic.AlterTopicRequest\x1a\x1d.Ydb.Topic.AlterTopicResponse\x12\x46\n\tDropTopic\x12\x1b.Ydb.Topic.DropTopicRequest\x1a\x1c.Ydb.Topic.DropTopicResponseBR\n\x17tech.ydb.proto.topic.v1Z4github.com/ydb-platform/ydb-go-genproto/Ydb_Topic_V1\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x12ydb_topic_v1.proto\x12\x0cYdb.Topic.V1\x1a\x16protos/ydb_topic.proto2\xb7\x06\n\x0cTopicService\x12\x65\n\x0bStreamWrite\x12(.Ydb.Topic.StreamWriteMessage.FromClient\x1a(.Ydb.Topic.StreamWriteMessage.FromServer(\x01\x30\x01\x12\x62\n\nStreamRead\x12\'.Ydb.Topic.StreamReadMessage.FromClient\x1a\'.Ydb.Topic.StreamReadMessage.FromServer(\x01\x30\x01\x12O\n\x0c\x43ommitOffset\x12\x1e.Ydb.Topic.CommitOffsetRequest\x1a\x1f.Ydb.Topic.CommitOffsetResponse\x12y\n\x1aUpdateOffsetsInTransaction\x12,.Ydb.Topic.UpdateOffsetsInTransactionRequest\x1a-.Ydb.Topic.UpdateOffsetsInTransactionResponse\x12L\n\x0b\x43reateTopic\x12\x1d.Ydb.Topic.CreateTopicRequest\x1a\x1e.Ydb.Topic.CreateTopicResponse\x12R\n\rDescribeTopic\x12\x1f.Ydb.Topic.DescribeTopicRequest\x1a .Ydb.Topic.DescribeTopicResponse\x12[\n\x10\x44\x65scribeConsumer\x12\".Ydb.Topic.DescribeConsumerRequest\x1a#.Ydb.Topic.DescribeConsumerResponse\x12I\n\nAlterTopic\x12\x1c.Ydb.Topic.AlterTopicRequest\x1a\x1d.Ydb.Topic.AlterTopicResponse\x12\x46\n\tDropTopic\x12\x1b.Ydb.Topic.DropTopicRequest\x1a\x1c.Ydb.Topic.DropTopicResponseBR\n\x17tech.ydb.proto.topic.v1Z4github.com/ydb-platform/ydb-go-genproto/Ydb_Topic_V1\xf8\x01\x01\x62\x06proto3' , dependencies=[protos_dot_ydb__topic__pb2.DESCRIPTOR,]) @@ -40,7 +40,7 @@ serialized_options=None, create_key=_descriptor._internal_create_key, serialized_start=61, - serialized_end=761, + serialized_end=884, methods=[ _descriptor.MethodDescriptor( name='StreamWrite', @@ -72,10 +72,20 @@ serialized_options=None, create_key=_descriptor._internal_create_key, ), + _descriptor.MethodDescriptor( + name='UpdateOffsetsInTransaction', + full_name='Ydb.Topic.V1.TopicService.UpdateOffsetsInTransaction', + index=3, + containing_service=None, + input_type=protos_dot_ydb__topic__pb2._UPDATEOFFSETSINTRANSACTIONREQUEST, + output_type=protos_dot_ydb__topic__pb2._UPDATEOFFSETSINTRANSACTIONRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), _descriptor.MethodDescriptor( name='CreateTopic', full_name='Ydb.Topic.V1.TopicService.CreateTopic', - index=3, + index=4, containing_service=None, input_type=protos_dot_ydb__topic__pb2._CREATETOPICREQUEST, output_type=protos_dot_ydb__topic__pb2._CREATETOPICRESPONSE, @@ -85,7 +95,7 @@ _descriptor.MethodDescriptor( name='DescribeTopic', full_name='Ydb.Topic.V1.TopicService.DescribeTopic', - index=4, + index=5, containing_service=None, input_type=protos_dot_ydb__topic__pb2._DESCRIBETOPICREQUEST, output_type=protos_dot_ydb__topic__pb2._DESCRIBETOPICRESPONSE, @@ -95,7 +105,7 @@ _descriptor.MethodDescriptor( name='DescribeConsumer', full_name='Ydb.Topic.V1.TopicService.DescribeConsumer', - index=5, + index=6, containing_service=None, input_type=protos_dot_ydb__topic__pb2._DESCRIBECONSUMERREQUEST, output_type=protos_dot_ydb__topic__pb2._DESCRIBECONSUMERRESPONSE, @@ -105,7 +115,7 @@ _descriptor.MethodDescriptor( name='AlterTopic', full_name='Ydb.Topic.V1.TopicService.AlterTopic', - index=6, + index=7, containing_service=None, input_type=protos_dot_ydb__topic__pb2._ALTERTOPICREQUEST, output_type=protos_dot_ydb__topic__pb2._ALTERTOPICRESPONSE, @@ -115,7 +125,7 @@ _descriptor.MethodDescriptor( name='DropTopic', full_name='Ydb.Topic.V1.TopicService.DropTopic', - index=7, + index=8, containing_service=None, input_type=protos_dot_ydb__topic__pb2._DROPTOPICREQUEST, output_type=protos_dot_ydb__topic__pb2._DROPTOPICRESPONSE, diff --git a/ydb/_grpc/v3/ydb_topic_v1_pb2_grpc.py b/ydb/_grpc/v3/ydb_topic_v1_pb2_grpc.py index 84a80167..b1a892a7 100644 --- a/ydb/_grpc/v3/ydb_topic_v1_pb2_grpc.py +++ b/ydb/_grpc/v3/ydb_topic_v1_pb2_grpc.py @@ -29,6 +29,11 @@ def __init__(self, channel): request_serializer=protos_dot_ydb__topic__pb2.CommitOffsetRequest.SerializeToString, response_deserializer=protos_dot_ydb__topic__pb2.CommitOffsetResponse.FromString, ) + self.UpdateOffsetsInTransaction = channel.unary_unary( + '/Ydb.Topic.V1.TopicService/UpdateOffsetsInTransaction', + request_serializer=protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionResponse.FromString, + ) self.CreateTopic = channel.unary_unary( '/Ydb.Topic.V1.TopicService/CreateTopic', request_serializer=protos_dot_ydb__topic__pb2.CreateTopicRequest.SerializeToString, @@ -130,6 +135,13 @@ def CommitOffset(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def UpdateOffsetsInTransaction(self, request, context): + """Add information about offset ranges to the transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def CreateTopic(self, request, context): """Create topic command. """ @@ -183,6 +195,11 @@ def add_TopicServiceServicer_to_server(servicer, server): request_deserializer=protos_dot_ydb__topic__pb2.CommitOffsetRequest.FromString, response_serializer=protos_dot_ydb__topic__pb2.CommitOffsetResponse.SerializeToString, ), + 'UpdateOffsetsInTransaction': grpc.unary_unary_rpc_method_handler( + servicer.UpdateOffsetsInTransaction, + request_deserializer=protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionRequest.FromString, + response_serializer=protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionResponse.SerializeToString, + ), 'CreateTopic': grpc.unary_unary_rpc_method_handler( servicer.CreateTopic, request_deserializer=protos_dot_ydb__topic__pb2.CreateTopicRequest.FromString, @@ -269,6 +286,23 @@ def CommitOffset(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def UpdateOffsetsInTransaction(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, '/Ydb.Topic.V1.TopicService/UpdateOffsetsInTransaction', + protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionRequest.SerializeToString, + protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def CreateTopic(request, target, diff --git a/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.py b/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.py new file mode 100644 index 00000000..0de1cb16 --- /dev/null +++ b/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.py @@ -0,0 +1,499 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/protos/ydb_federated_query.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v4.protos.annotations import sensitive_pb2 as protos_dot_annotations_dot_sensitive__pb2 +from ydb._grpc.v4.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 +from ydb._grpc.v4.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 +from ydb._grpc.v4.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 +from ydb._grpc.v4.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&draft/protos/ydb_federated_query.proto\x12\x0e\x46\x65\x64\x65ratedQuery\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x16protos/ydb_value.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"{\n\x03\x41\x63l\x12\x32\n\nvisibility\x18\x01 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"@\n\nVisibility\x12\x1a\n\x16VISIBILITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\t\n\x05SCOPE\x10\x02\"\x83\x03\n\x06Limits\x12!\n\x0fvcpu_rate_limit\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0f\x66low_rate_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fvcpu_time_limit\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_size\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_rows\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1e\n\x0cmemory_limit\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\nresult_ttl\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x11\x65xecution_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x38\n\x12\x65xecution_deadline\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\t\n\x07timeout\"\xef\x03\n\x14StreamingDisposition\x12(\n\x06oldest\x18\x01 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\'\n\x05\x66resh\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x42\n\tfrom_time\x18\x03 \x01(\x0b\x32-.FederatedQuery.StreamingDisposition.FromTimeH\x00\x12@\n\x08time_ago\x18\x04 \x01(\x0b\x32,.FederatedQuery.StreamingDisposition.TimeAgoH\x00\x12W\n\x14\x66rom_last_checkpoint\x18\x05 \x01(\x0b\x32\x37.FederatedQuery.StreamingDisposition.FromLastCheckpointH\x00\x1a\x39\n\x08\x46romTime\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x36\n\x07TimeAgo\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a#\n\x12\x46romLastCheckpoint\x12\r\n\x05\x66orce\x18\x01 \x01(\x08\x42\r\n\x0b\x64isposition\"\xd4\x04\n\x0cQueryContent\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12&\n\x06limits\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Limits\x12\x1a\n\x04text\x18\x05 \x01(\tB\x0c\xa2\xe6*\x08\n\x06\x08\x01\x10\x80\xa0\x06\x12\x11\n\tautomatic\x18\x06 \x01(\x08\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\x12\x64\n\x12\x65xecution_settings\x18\n \x03(\x0b\x32\x33.FederatedQuery.QueryContent.ExecutionSettingsEntryB\x13\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x03\x18\x80 \x12\x38\n\x06syntax\x18\x0b \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\x1a\x38\n\x16\x45xecutionSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"E\n\tQueryType\x12\x1a\n\x16QUERY_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tANALYTICS\x10\x01\x12\r\n\tSTREAMING\x10\x02\"?\n\x0bQuerySyntax\x12\x1c\n\x18QUERY_SYNTAX_UNSPECIFIED\x10\x00\x12\n\n\x06YQL_V1\x10\x01\x12\x06\n\x02PG\x10\x02\"\xe5\x01\n\nCommonMeta\x12\x17\n\x02id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x1f\n\ncreated_by\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12 \n\x0bmodified_by\x18\x03 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12.\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bmodified_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x08revision\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbf\x06\n\tQueryMeta\x12*\n\x06\x63ommon\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x30\n\x0csubmitted_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstarted_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x37\n\x06status\x18\x05 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x1f\n\x17last_job_query_revision\x18\x06 \x01(\x03\x12\x13\n\x0blast_job_id\x18\x07 \x01(\t\x12-\n\texpire_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10result_expire_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nstarted_by\x18\n \x01(\t\x12\x14\n\naborted_by\x18\x0b \x01(\tH\x00\x12\x13\n\tpaused_by\x18\x0c \x01(\tH\x00\x12\x1d\n\x15has_saved_checkpoints\x18\r \x01(\x08\"\x83\x02\n\rComputeStatus\x12\x1e\n\x1a\x43OMPUTE_STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STARTING\x10\x01\x12\x13\n\x0f\x41\x42ORTED_BY_USER\x10\x02\x12\x15\n\x11\x41\x42ORTED_BY_SYSTEM\x10\x03\x12\x14\n\x10\x41\x42ORTING_BY_USER\x10\x04\x12\x16\n\x12\x41\x42ORTING_BY_SYSTEM\x10\x05\x12\x0c\n\x08RESUMING\x10\x06\x12\x0b\n\x07RUNNING\x10\x07\x12\r\n\tCOMPLETED\x10\x08\x12\x0e\n\nCOMPLETING\x10\x0c\x12\n\n\x06\x46\x41ILED\x10\t\x12\x0b\n\x07\x46\x41ILING\x10\r\x12\n\n\x06PAUSED\x10\x0b\x12\x0b\n\x07PAUSING\x10\nB\x08\n\x06\x61\x63tion\"\xc9\x01\n\nBriefQuery\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\'\n\x04meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x05 \x01(\x08\"\x19\n\tQueryPlan\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x18\n\x08QueryAst\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\t\"]\n\rResultSetMeta\x12\x1b\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x1c\n\nrows_count\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x11\n\ttruncated\x18\x03 \x01(\x08\"\xf6\x02\n\x05Query\x12\'\n\x04meta\x18\x01 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\'\n\x04plan\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x04 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x30\n\x0ftransient_issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\"\x1f\n\x0fQueryStatistics\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x8e\x02\n\x12\x43reateQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x04 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x43reateQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\".\n\x11\x43reateQueryResult\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x93\x04\n\x12ListQueriesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x39\n\x06\x66ilter\x18\x04 \x01(\x0b\x32).FederatedQuery.ListQueriesRequest.Filter\x1a\xcc\x02\n\x06\x46ilter\x12:\n\nquery_type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12?\n\x06status\x18\x02 \x03(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatusB\x06\x9a\xe6*\x02\x18\x14\x12\x31\n\x04mode\x18\x03 \x03(\x0e\x32\x1b.FederatedQuery.ExecuteModeB\x06\x9a\xe6*\x02\x18\x14\x12\x15\n\x04name\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x05 \x01(\x08\x12\x32\n\nvisibility\x18\x06 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x30\n\tautomatic\x18\x07 \x01(\x0e\x32\x1d.FederatedQuery.AutomaticType\"C\n\x13ListQueriesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"`\n\x11ListQueriesResult\x12)\n\x05query\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.BriefQuery\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"p\n\x14\x44\x65scribeQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"E\n\x15\x44\x65scribeQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\";\n\x13\x44\x65scribeQueryResult\x12$\n\x05query\x18\x01 \x01(\x0b\x32\x15.FederatedQuery.Query\"q\n\x15GetQueryStatusRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"F\n\x16GetQueryStatusResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"f\n\x14GetQueryStatusResult\x12\x37\n\x06status\x18\x01 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x15\n\rmeta_revision\x18\x02 \x01(\x03\"\xb5\x01\n\x12\x44\x65leteQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x44\x65leteQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x44\x65leteQueryResult\"\x8a\x03\n\x12ModifyQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12-\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x05 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12\x36\n\x0fstate_load_mode\x18\x06 \x01(\x0e\x32\x1d.FederatedQuery.StateLoadMode\x12#\n\x11previous_revision\x18\x07 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13ModifyQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11ModifyQueryResult\"\xe3\x01\n\x13\x43ontrolQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12+\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.QueryAction\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"D\n\x14\x43ontrolQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ontrolQueryResult\"\xed\x01\n\x08\x42riefJob\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x12\n\nquery_name\x18\t \x01(\t\x12\x32\n\nvisibility\x18\n \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x83\x04\n\x03Job\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x0c\n\x04text\x18\x02 \x01(\t\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\'\n\x04plan\x18\x04 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\x12\x12\n\nquery_name\x18\t \x01(\t\x12 \n\x03\x61\x63l\x18\n \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x06syntax\x18\r \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\"\x8c\x02\n\x0fListJobsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x10\n\x08query_id\x18\x05 \x01(\t\x12\x36\n\x06\x66ilter\x18\x04 \x01(\x0b\x32&.FederatedQuery.ListJobsRequest.Filter\x1a:\n\x06\x46ilter\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\"@\n\x10ListJobsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Y\n\x0eListJobsResult\x12%\n\x03job\x18\x01 \x03(\x0b\x32\x18.FederatedQuery.BriefJob\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"l\n\x12\x44\x65scribeJobRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\x06job_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"C\n\x13\x44\x65scribeJobResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"5\n\x11\x44\x65scribeJobResult\x12 \n\x03job\x18\x01 \x01(\x0b\x32\x13.FederatedQuery.Job\"\x15\n\x13\x43urrentIAMTokenAuth\"\n\n\x08NoneAuth\")\n\x12ServiceAccountAuth\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\xba\x01\n\x07IamAuth\x12:\n\x0b\x63urrent_iam\x18\x01 \x01(\x0b\x32#.FederatedQuery.CurrentIAMTokenAuthH\x00\x12=\n\x0fservice_account\x18\x02 \x01(\x0b\x32\".FederatedQuery.ServiceAccountAuthH\x00\x12(\n\x04none\x18\x03 \x01(\x0b\x32\x18.FederatedQuery.NoneAuthH\x00\x42\n\n\x08identity\"\x98\x01\n\x0b\x44\x61taStreams\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"g\n\nMonitoring\x12\x18\n\x07project\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12\x18\n\x07\x63luster\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12%\n\x04\x61uth\x18\x03 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x98\x01\n\x0bYdbDatabase\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"\xf8\x01\n\x11\x43lickHouseCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"Y\n\x17ObjectStorageConnection\x12\x17\n\x06\x62ucket\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x91\x02\n\x11PostgreSQLCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x17\n\x06schema\x18\t \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"\xae\x04\n\x11\x43onnectionSetting\x12\x33\n\x0cydb_database\x18\x01 \x01(\x0b\x32\x1b.FederatedQuery.YdbDatabaseH\x00\x12?\n\x12\x63lickhouse_cluster\x18\x02 \x01(\x0b\x32!.FederatedQuery.ClickHouseClusterH\x00\x12\x33\n\x0c\x64\x61ta_streams\x18\x03 \x01(\x0b\x32\x1b.FederatedQuery.DataStreamsH\x00\x12\x41\n\x0eobject_storage\x18\x04 \x01(\x0b\x32\'.FederatedQuery.ObjectStorageConnectionH\x00\x12\x30\n\nmonitoring\x18\x05 \x01(\x0b\x32\x1a.FederatedQuery.MonitoringH\x00\x12?\n\x12postgresql_cluster\x18\x06 \x01(\x0b\x32!.FederatedQuery.PostgreSQLClusterH\x00\"\xa9\x01\n\x0e\x43onnectionType\x12\x1f\n\x1b\x43ONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cYDB_DATABASE\x10\x01\x12\x16\n\x12\x43LICKHOUSE_CLUSTER\x10\x02\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x03\x12\x12\n\x0eOBJECT_STORAGE\x10\x04\x12\x0e\n\nMONITORING\x10\x05\x12\x16\n\x12POSTGRESQL_CLUSTER\x10\x06\x42\x0c\n\nconnection\"\xa2\x01\n\x11\x43onnectionContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"j\n\nConnection\x12\x32\n\x07\x63ontent\x18\x01 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xaa\x01\n\x17\x43reateConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x43reateConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"<\n\x16\x43reateConnectionResult\x12\"\n\rconnection_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\x84\x03\n\x16ListConnectionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12=\n\x06\x66ilter\x18\x04 \x01(\x0b\x32-.FederatedQuery.ListConnectionsRequest.Filter\x1a\xb5\x01\n\x06\x46ilter\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\x12I\n\x0f\x63onnection_type\x18\x03 \x01(\x0e\x32\x30.FederatedQuery.ConnectionSetting.ConnectionType\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"G\n\x17ListConnectionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"i\n\x15ListConnectionsResult\x12.\n\nconnection\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.Connection\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"z\n\x19\x44\x65scribeConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"J\n\x1a\x44\x65scribeConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"J\n\x18\x44\x65scribeConnectionResult\x12.\n\nconnection\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.Connection\"\xf3\x01\n\x17ModifyConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07\x63ontent\x18\x03 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18ModifyConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16ModifyConnectionResult\"\xbf\x01\n\x17\x44\x65leteConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x44\x65leteConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16\x44\x65leteConnectionResult\"\x86\x01\n\x15TestConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\"F\n\x16TestConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x16\n\x14TestConnectionResult\"\xcc\x01\n\x14GetResultDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\x10result_set_index\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12\x18\n\x06offset\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1c\n\x05limit\x18\x05 \x01(\x03\x42\r\xb2\xe6*\t[1; 1000]\"E\n\x15GetResultDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"9\n\x13GetResultDataResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\".\n\x06Schema\x12$\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.ColumnB\x07\x9a\xe6*\x03\x18\xe8\x07\"\xa2\x02\n\x12\x44\x61taStreamsBinding\x12 \n\x0bstream_name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x0b\x63ompression\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12U\n\x0e\x66ormat_setting\x18\x05 \x03(\x0b\x32\x35.FederatedQuery.DataStreamsBinding.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x92\x04\n\x14ObjectStorageBinding\x12;\n\x06subset\x18\x01 \x03(\x0b\x32+.FederatedQuery.ObjectStorageBinding.Subset\x1a\xbc\x03\n\x06Subset\x12!\n\x0cpath_pattern\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12^\n\x0e\x66ormat_setting\x18\x03 \x03(\x0b\x32>.FederatedQuery.ObjectStorageBinding.Subset.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x12\x1c\n\x0b\x63ompression\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x05 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12O\n\nprojection\x18\x06 \x03(\x0b\x32;.FederatedQuery.ObjectStorageBinding.Subset.ProjectionEntry\x12\x16\n\x0epartitioned_by\x18\x07 \x03(\t\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fProjectionEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xea\x01\n\x0e\x42indingSetting\x12:\n\x0c\x64\x61ta_streams\x18\x01 \x01(\x0b\x32\".FederatedQuery.DataStreamsBindingH\x00\x12>\n\x0eobject_storage\x18\x02 \x01(\x0b\x32$.FederatedQuery.ObjectStorageBindingH\x00\"Q\n\x0b\x42indingType\x12\x1c\n\x18\x42INDING_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x01\x12\x12\n\x0eOBJECT_STORAGE\x10\x02\x42\t\n\x07\x62inding\"\xe5\x01\n\x0c\x42riefBinding\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12(\n\x04meta\x18\x03 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x38\n\x04type\x18\x04 \x01(\x0e\x32*.FederatedQuery.BindingSetting.BindingType\x12\x32\n\nvisibility\x18\x05 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"\xc0\x01\n\x0e\x42indingContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07setting\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingSetting\x12 \n\x03\x61\x63l\x18\x04 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"d\n\x07\x42inding\x12/\n\x07\x63ontent\x18\x01 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xa4\x01\n\x14\x43reateBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12/\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x43reateBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"6\n\x13\x43reateBindingResult\x12\x1f\n\nbinding_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\xd3\x02\n\x13ListBindingsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12:\n\x06\x66ilter\x18\x04 \x01(\x0b\x32*.FederatedQuery.ListBindingsRequest.Filter\x1a\x8a\x01\n\x06\x46ilter\x12\x1e\n\rconnection_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x03 \x01(\x08\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"D\n\x14ListBindingsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"e\n\x12ListBindingsResult\x12-\n\x07\x62inding\x18\x01 \x03(\x0b\x32\x1c.FederatedQuery.BriefBinding\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"t\n\x16\x44\x65scribeBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"G\n\x17\x44\x65scribeBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"A\n\x15\x44\x65scribeBindingResult\x12(\n\x07\x62inding\x18\x01 \x01(\x0b\x32\x17.FederatedQuery.Binding\"\xea\x01\n\x14ModifyBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15ModifyBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13ModifyBindingResult\"\xb9\x01\n\x14\x44\x65leteBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x44\x65leteBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13\x44\x65leteBindingResult*q\n\x0b\x45xecuteMode\x12\x1c\n\x18\x45XECUTE_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04SAVE\x10\x01\x12\t\n\x05PARSE\x10\x02\x12\x0b\n\x07\x43OMPILE\x10\x03\x12\x0c\n\x08VALIDATE\x10\x04\x12\x0b\n\x07\x45XPLAIN\x10\x05\x12\x07\n\x03RUN\x10\x06*y\n\x0bQueryAction\x12\x1c\n\x18QUERY_ACTION_UNSPECIFIED\x10\x00\x12\t\n\x05PAUSE\x10\x01\x12\x14\n\x10PAUSE_GRACEFULLY\x10\x02\x12\t\n\x05\x41\x42ORT\x10\x03\x12\x14\n\x10\x41\x42ORT_GRACEFULLY\x10\x04\x12\n\n\x06RESUME\x10\x05*U\n\rStateLoadMode\x12\x1f\n\x1bSTATE_LOAD_MODE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45MPTY\x10\x01\x12\x18\n\x14\x46ROM_LAST_CHECKPOINT\x10\x02*Q\n\rAutomaticType\x12\x1e\n\x1a\x41UTOMATIC_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\x11\n\rNOT_AUTOMATIC\x10\x02\x42r\n$tech.ydb.proto.draft.federated.queryZGgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_FederatedQuery\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.protos.ydb_federated_query_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n$tech.ydb.proto.draft.federated.queryZGgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_FederatedQuery\370\001\001' + _LIMITS.fields_by_name['vcpu_rate_limit']._options = None + _LIMITS.fields_by_name['vcpu_rate_limit']._serialized_options = b'\262\346*\004>= 0' + _LIMITS.fields_by_name['flow_rate_limit']._options = None + _LIMITS.fields_by_name['flow_rate_limit']._serialized_options = b'\262\346*\004>= 0' + _LIMITS.fields_by_name['vcpu_time_limit']._options = None + _LIMITS.fields_by_name['vcpu_time_limit']._serialized_options = b'\262\346*\004>= 0' + _LIMITS.fields_by_name['max_result_size']._options = None + _LIMITS.fields_by_name['max_result_size']._serialized_options = b'\262\346*\004>= 0' + _LIMITS.fields_by_name['max_result_rows']._options = None + _LIMITS.fields_by_name['max_result_rows']._serialized_options = b'\262\346*\004>= 0' + _LIMITS.fields_by_name['memory_limit']._options = None + _LIMITS.fields_by_name['memory_limit']._serialized_options = b'\262\346*\004>= 0' + _QUERYCONTENT_EXECUTIONSETTINGSENTRY._options = None + _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_options = b'8\001' + _QUERYCONTENT.fields_by_name['name']._options = None + _QUERYCONTENT.fields_by_name['name']._serialized_options = b'\242\346*\003\030\200\010' + _QUERYCONTENT.fields_by_name['text']._options = None + _QUERYCONTENT.fields_by_name['text']._serialized_options = b'\242\346*\010\n\006\010\001\020\200\240\006' + _QUERYCONTENT.fields_by_name['description']._options = None + _QUERYCONTENT.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200P' + _QUERYCONTENT.fields_by_name['execution_settings']._options = None + _QUERYCONTENT.fields_by_name['execution_settings']._serialized_options = b'\252\346*\010\n\006\n\004\010\001\020d\242\346*\003\030\200 ' + _COMMONMETA.fields_by_name['id']._options = None + _COMMONMETA.fields_by_name['id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _COMMONMETA.fields_by_name['created_by']._options = None + _COMMONMETA.fields_by_name['created_by']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _COMMONMETA.fields_by_name['modified_by']._options = None + _COMMONMETA.fields_by_name['modified_by']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _COMMONMETA.fields_by_name['revision']._options = None + _COMMONMETA.fields_by_name['revision']._serialized_options = b'\262\346*\004>= 0' + _BRIEFQUERY.fields_by_name['name']._options = None + _BRIEFQUERY.fields_by_name['name']._serialized_options = b'\242\346*\003\030\200\010' + _RESULTSETMETA.fields_by_name['rows_count']._options = None + _RESULTSETMETA.fields_by_name['rows_count']._serialized_options = b'\262\346*\004>= 0' + _CREATEQUERYREQUEST.fields_by_name['idempotency_key']._options = None + _CREATEQUERYREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _CREATEQUERYRESULT.fields_by_name['query_id']._options = None + _CREATEQUERYRESULT.fields_by_name['query_id']._serialized_options = b'\242\346*\003\030\200\010' + _LISTQUERIESREQUEST_FILTER.fields_by_name['status']._options = None + _LISTQUERIESREQUEST_FILTER.fields_by_name['status']._serialized_options = b'\232\346*\002\030\024' + _LISTQUERIESREQUEST_FILTER.fields_by_name['mode']._options = None + _LISTQUERIESREQUEST_FILTER.fields_by_name['mode']._serialized_options = b'\232\346*\002\030\024' + _LISTQUERIESREQUEST_FILTER.fields_by_name['name']._options = None + _LISTQUERIESREQUEST_FILTER.fields_by_name['name']._serialized_options = b'\242\346*\003\030\200\010' + _LISTQUERIESREQUEST.fields_by_name['page_token']._options = None + _LISTQUERIESREQUEST.fields_by_name['page_token']._serialized_options = b'\242\346*\003\030\200\010' + _LISTQUERIESREQUEST.fields_by_name['limit']._options = None + _LISTQUERIESREQUEST.fields_by_name['limit']._serialized_options = b'\262\346*\010[1; 100]' + _LISTQUERIESRESULT.fields_by_name['next_page_token']._options = None + _LISTQUERIESRESULT.fields_by_name['next_page_token']._serialized_options = b'\242\346*\003\030\200\010' + _DESCRIBEQUERYREQUEST.fields_by_name['query_id']._options = None + _DESCRIBEQUERYREQUEST.fields_by_name['query_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _GETQUERYSTATUSREQUEST.fields_by_name['query_id']._options = None + _GETQUERYSTATUSREQUEST.fields_by_name['query_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _DELETEQUERYREQUEST.fields_by_name['query_id']._options = None + _DELETEQUERYREQUEST.fields_by_name['query_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _DELETEQUERYREQUEST.fields_by_name['previous_revision']._options = None + _DELETEQUERYREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' + _DELETEQUERYREQUEST.fields_by_name['idempotency_key']._options = None + _DELETEQUERYREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _MODIFYQUERYREQUEST.fields_by_name['query_id']._options = None + _MODIFYQUERYREQUEST.fields_by_name['query_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _MODIFYQUERYREQUEST.fields_by_name['previous_revision']._options = None + _MODIFYQUERYREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' + _MODIFYQUERYREQUEST.fields_by_name['idempotency_key']._options = None + _MODIFYQUERYREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _CONTROLQUERYREQUEST.fields_by_name['query_id']._options = None + _CONTROLQUERYREQUEST.fields_by_name['query_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _CONTROLQUERYREQUEST.fields_by_name['previous_revision']._options = None + _CONTROLQUERYREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' + _CONTROLQUERYREQUEST.fields_by_name['idempotency_key']._options = None + _CONTROLQUERYREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _LISTJOBSREQUEST_FILTER.fields_by_name['query_id']._options = None + _LISTJOBSREQUEST_FILTER.fields_by_name['query_id']._serialized_options = b'\242\346*\003\030\200\010' + _LISTJOBSREQUEST.fields_by_name['page_token']._options = None + _LISTJOBSREQUEST.fields_by_name['page_token']._serialized_options = b'\242\346*\003\030\200\010' + _LISTJOBSREQUEST.fields_by_name['limit']._options = None + _LISTJOBSREQUEST.fields_by_name['limit']._serialized_options = b'\262\346*\010[1; 100]' + _LISTJOBSRESULT.fields_by_name['next_page_token']._options = None + _LISTJOBSRESULT.fields_by_name['next_page_token']._serialized_options = b'\242\346*\003\030\200\010' + _DESCRIBEJOBREQUEST.fields_by_name['job_id']._options = None + _DESCRIBEJOBREQUEST.fields_by_name['job_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _SERVICEACCOUNTAUTH.fields_by_name['id']._options = None + _SERVICEACCOUNTAUTH.fields_by_name['id']._serialized_options = b'\242\346*\003\030\200\010' + _DATASTREAMS.fields_by_name['database_id']._options = None + _DATASTREAMS.fields_by_name['database_id']._serialized_options = b'\242\346*\003\030\200\010' + _DATASTREAMS.fields_by_name['endpoint']._options = None + _DATASTREAMS.fields_by_name['endpoint']._serialized_options = b'\242\346*\003\030\200\010' + _DATASTREAMS.fields_by_name['database']._options = None + _DATASTREAMS.fields_by_name['database']._serialized_options = b'\242\346*\003\030\200\010' + _MONITORING.fields_by_name['project']._options = None + _MONITORING.fields_by_name['project']._serialized_options = b'\242\346*\003\030\310\001' + _MONITORING.fields_by_name['cluster']._options = None + _MONITORING.fields_by_name['cluster']._serialized_options = b'\242\346*\003\030\310\001' + _YDBDATABASE.fields_by_name['database_id']._options = None + _YDBDATABASE.fields_by_name['database_id']._serialized_options = b'\242\346*\003\030\200\010' + _YDBDATABASE.fields_by_name['endpoint']._options = None + _YDBDATABASE.fields_by_name['endpoint']._serialized_options = b'\242\346*\003\030\200\010' + _YDBDATABASE.fields_by_name['database']._options = None + _YDBDATABASE.fields_by_name['database']._serialized_options = b'\242\346*\003\030\200\010' + _CLICKHOUSECLUSTER.fields_by_name['database_id']._options = None + _CLICKHOUSECLUSTER.fields_by_name['database_id']._serialized_options = b'\242\346*\003\030\200\010' + _CLICKHOUSECLUSTER.fields_by_name['database_name']._options = None + _CLICKHOUSECLUSTER.fields_by_name['database_name']._serialized_options = b'\242\346*\003\030\200\010' + _CLICKHOUSECLUSTER.fields_by_name['login']._options = None + _CLICKHOUSECLUSTER.fields_by_name['login']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _CLICKHOUSECLUSTER.fields_by_name['password']._options = None + _CLICKHOUSECLUSTER.fields_by_name['password']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _CLICKHOUSECLUSTER.fields_by_name['host']._options = None + _CLICKHOUSECLUSTER.fields_by_name['host']._serialized_options = b'\242\346*\003\030\200\010' + _CLICKHOUSECLUSTER.fields_by_name['port']._options = None + _CLICKHOUSECLUSTER.fields_by_name['port']._serialized_options = b'\262\346*\n[0; 65536]' + _OBJECTSTORAGECONNECTION.fields_by_name['bucket']._options = None + _OBJECTSTORAGECONNECTION.fields_by_name['bucket']._serialized_options = b'\242\346*\003\030\200\010' + _POSTGRESQLCLUSTER.fields_by_name['database_id']._options = None + _POSTGRESQLCLUSTER.fields_by_name['database_id']._serialized_options = b'\242\346*\003\030\200\010' + _POSTGRESQLCLUSTER.fields_by_name['database_name']._options = None + _POSTGRESQLCLUSTER.fields_by_name['database_name']._serialized_options = b'\242\346*\003\030\200\010' + _POSTGRESQLCLUSTER.fields_by_name['login']._options = None + _POSTGRESQLCLUSTER.fields_by_name['login']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _POSTGRESQLCLUSTER.fields_by_name['password']._options = None + _POSTGRESQLCLUSTER.fields_by_name['password']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _POSTGRESQLCLUSTER.fields_by_name['schema']._options = None + _POSTGRESQLCLUSTER.fields_by_name['schema']._serialized_options = b'\242\346*\003\030\200\010' + _POSTGRESQLCLUSTER.fields_by_name['host']._options = None + _POSTGRESQLCLUSTER.fields_by_name['host']._serialized_options = b'\242\346*\003\030\200\010' + _POSTGRESQLCLUSTER.fields_by_name['port']._options = None + _POSTGRESQLCLUSTER.fields_by_name['port']._serialized_options = b'\262\346*\n[0; 65536]' + _CONNECTIONCONTENT.fields_by_name['name']._options = None + _CONNECTIONCONTENT.fields_by_name['name']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _CONNECTIONCONTENT.fields_by_name['description']._options = None + _CONNECTIONCONTENT.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200P' + _CREATECONNECTIONREQUEST.fields_by_name['idempotency_key']._options = None + _CREATECONNECTIONREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _CREATECONNECTIONRESULT.fields_by_name['connection_id']._options = None + _CREATECONNECTIONRESULT.fields_by_name['connection_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _LISTCONNECTIONSREQUEST_FILTER.fields_by_name['name']._options = None + _LISTCONNECTIONSREQUEST_FILTER.fields_by_name['name']._serialized_options = b'\242\346*\003\030\200\010' + _LISTCONNECTIONSREQUEST.fields_by_name['page_token']._options = None + _LISTCONNECTIONSREQUEST.fields_by_name['page_token']._serialized_options = b'\242\346*\003\030\200\010' + _LISTCONNECTIONSREQUEST.fields_by_name['limit']._options = None + _LISTCONNECTIONSREQUEST.fields_by_name['limit']._serialized_options = b'\262\346*\010[1; 100]' + _LISTCONNECTIONSRESULT.fields_by_name['next_page_token']._options = None + _LISTCONNECTIONSRESULT.fields_by_name['next_page_token']._serialized_options = b'\242\346*\003\030\200\010' + _DESCRIBECONNECTIONREQUEST.fields_by_name['connection_id']._options = None + _DESCRIBECONNECTIONREQUEST.fields_by_name['connection_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _MODIFYCONNECTIONREQUEST.fields_by_name['connection_id']._options = None + _MODIFYCONNECTIONREQUEST.fields_by_name['connection_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _MODIFYCONNECTIONREQUEST.fields_by_name['previous_revision']._options = None + _MODIFYCONNECTIONREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' + _MODIFYCONNECTIONREQUEST.fields_by_name['idempotency_key']._options = None + _MODIFYCONNECTIONREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _DELETECONNECTIONREQUEST.fields_by_name['connection_id']._options = None + _DELETECONNECTIONREQUEST.fields_by_name['connection_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _DELETECONNECTIONREQUEST.fields_by_name['previous_revision']._options = None + _DELETECONNECTIONREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' + _DELETECONNECTIONREQUEST.fields_by_name['idempotency_key']._options = None + _DELETECONNECTIONREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _GETRESULTDATAREQUEST.fields_by_name['query_id']._options = None + _GETRESULTDATAREQUEST.fields_by_name['query_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _GETRESULTDATAREQUEST.fields_by_name['result_set_index']._options = None + _GETRESULTDATAREQUEST.fields_by_name['result_set_index']._serialized_options = b'\262\346*\004>= 0' + _GETRESULTDATAREQUEST.fields_by_name['offset']._options = None + _GETRESULTDATAREQUEST.fields_by_name['offset']._serialized_options = b'\262\346*\004>= 0' + _GETRESULTDATAREQUEST.fields_by_name['limit']._options = None + _GETRESULTDATAREQUEST.fields_by_name['limit']._serialized_options = b'\262\346*\t[1; 1000]' + _SCHEMA.fields_by_name['column']._options = None + _SCHEMA.fields_by_name['column']._serialized_options = b'\232\346*\003\030\350\007' + _DATASTREAMSBINDING_FORMATSETTINGENTRY._options = None + _DATASTREAMSBINDING_FORMATSETTINGENTRY._serialized_options = b'8\001' + _DATASTREAMSBINDING.fields_by_name['stream_name']._options = None + _DATASTREAMSBINDING.fields_by_name['stream_name']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _DATASTREAMSBINDING.fields_by_name['format']._options = None + _DATASTREAMSBINDING.fields_by_name['format']._serialized_options = b'\242\346*\003\030\200\010' + _DATASTREAMSBINDING.fields_by_name['compression']._options = None + _DATASTREAMSBINDING.fields_by_name['compression']._serialized_options = b'\242\346*\003\030\200\010' + _DATASTREAMSBINDING.fields_by_name['format_setting']._options = None + _DATASTREAMSBINDING.fields_by_name['format_setting']._serialized_options = b'\232\346*\002\030d' + _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._options = None + _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._serialized_options = b'8\001' + _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._options = None + _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._serialized_options = b'8\001' + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['path_pattern']._options = None + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['path_pattern']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['format']._options = None + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['format']._serialized_options = b'\242\346*\003\030\200\010' + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['format_setting']._options = None + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['format_setting']._serialized_options = b'\232\346*\002\030d' + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['compression']._options = None + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['compression']._serialized_options = b'\242\346*\003\030\200\010' + _BRIEFBINDING.fields_by_name['name']._options = None + _BRIEFBINDING.fields_by_name['name']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _BRIEFBINDING.fields_by_name['connection_id']._options = None + _BRIEFBINDING.fields_by_name['connection_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _BINDINGCONTENT.fields_by_name['name']._options = None + _BINDINGCONTENT.fields_by_name['name']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _BINDINGCONTENT.fields_by_name['connection_id']._options = None + _BINDINGCONTENT.fields_by_name['connection_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _BINDINGCONTENT.fields_by_name['description']._options = None + _BINDINGCONTENT.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200P' + _CREATEBINDINGREQUEST.fields_by_name['idempotency_key']._options = None + _CREATEBINDINGREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _CREATEBINDINGRESULT.fields_by_name['binding_id']._options = None + _CREATEBINDINGRESULT.fields_by_name['binding_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _LISTBINDINGSREQUEST_FILTER.fields_by_name['connection_id']._options = None + _LISTBINDINGSREQUEST_FILTER.fields_by_name['connection_id']._serialized_options = b'\242\346*\003\030\200\010' + _LISTBINDINGSREQUEST_FILTER.fields_by_name['name']._options = None + _LISTBINDINGSREQUEST_FILTER.fields_by_name['name']._serialized_options = b'\242\346*\003\030\200\010' + _LISTBINDINGSREQUEST.fields_by_name['page_token']._options = None + _LISTBINDINGSREQUEST.fields_by_name['page_token']._serialized_options = b'\242\346*\003\030\200\010' + _LISTBINDINGSREQUEST.fields_by_name['limit']._options = None + _LISTBINDINGSREQUEST.fields_by_name['limit']._serialized_options = b'\262\346*\010[1; 100]' + _LISTBINDINGSRESULT.fields_by_name['next_page_token']._options = None + _LISTBINDINGSRESULT.fields_by_name['next_page_token']._serialized_options = b'\242\346*\003\030\200\010' + _DESCRIBEBINDINGREQUEST.fields_by_name['binding_id']._options = None + _DESCRIBEBINDINGREQUEST.fields_by_name['binding_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _MODIFYBINDINGREQUEST.fields_by_name['binding_id']._options = None + _MODIFYBINDINGREQUEST.fields_by_name['binding_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _MODIFYBINDINGREQUEST.fields_by_name['previous_revision']._options = None + _MODIFYBINDINGREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' + _MODIFYBINDINGREQUEST.fields_by_name['idempotency_key']._options = None + _MODIFYBINDINGREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _DELETEBINDINGREQUEST.fields_by_name['binding_id']._options = None + _DELETEBINDINGREQUEST.fields_by_name['binding_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _DELETEBINDINGREQUEST.fields_by_name['previous_revision']._options = None + _DELETEBINDINGREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' + _DELETEBINDINGREQUEST.fields_by_name['idempotency_key']._options = None + _DELETEBINDINGREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _EXECUTEMODE._serialized_start=15700 + _EXECUTEMODE._serialized_end=15813 + _QUERYACTION._serialized_start=15815 + _QUERYACTION._serialized_end=15936 + _STATELOADMODE._serialized_start=15938 + _STATELOADMODE._serialized_end=16023 + _AUTOMATICTYPE._serialized_start=16025 + _AUTOMATICTYPE._serialized_end=16106 + _ACL._serialized_start=309 + _ACL._serialized_end=432 + _ACL_VISIBILITY._serialized_start=368 + _ACL_VISIBILITY._serialized_end=432 + _LIMITS._serialized_start=435 + _LIMITS._serialized_end=822 + _STREAMINGDISPOSITION._serialized_start=825 + _STREAMINGDISPOSITION._serialized_end=1320 + _STREAMINGDISPOSITION_FROMTIME._serialized_start=1155 + _STREAMINGDISPOSITION_FROMTIME._serialized_end=1212 + _STREAMINGDISPOSITION_TIMEAGO._serialized_start=1214 + _STREAMINGDISPOSITION_TIMEAGO._serialized_end=1268 + _STREAMINGDISPOSITION_FROMLASTCHECKPOINT._serialized_start=1270 + _STREAMINGDISPOSITION_FROMLASTCHECKPOINT._serialized_end=1305 + _QUERYCONTENT._serialized_start=1323 + _QUERYCONTENT._serialized_end=1919 + _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_start=1727 + _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_end=1783 + _QUERYCONTENT_QUERYTYPE._serialized_start=1785 + _QUERYCONTENT_QUERYTYPE._serialized_end=1854 + _QUERYCONTENT_QUERYSYNTAX._serialized_start=1856 + _QUERYCONTENT_QUERYSYNTAX._serialized_end=1919 + _COMMONMETA._serialized_start=1922 + _COMMONMETA._serialized_end=2151 + _QUERYMETA._serialized_start=2154 + _QUERYMETA._serialized_end=2985 + _QUERYMETA_COMPUTESTATUS._serialized_start=2716 + _QUERYMETA_COMPUTESTATUS._serialized_end=2975 + _BRIEFQUERY._serialized_start=2988 + _BRIEFQUERY._serialized_end=3189 + _QUERYPLAN._serialized_start=3191 + _QUERYPLAN._serialized_end=3216 + _QUERYAST._serialized_start=3218 + _QUERYAST._serialized_end=3242 + _RESULTSETMETA._serialized_start=3244 + _RESULTSETMETA._serialized_end=3337 + _QUERY._serialized_start=3340 + _QUERY._serialized_end=3714 + _QUERYSTATISTICS._serialized_start=3716 + _QUERYSTATISTICS._serialized_end=3747 + _CREATEQUERYREQUEST._serialized_start=3750 + _CREATEQUERYREQUEST._serialized_end=4020 + _CREATEQUERYRESPONSE._serialized_start=4022 + _CREATEQUERYRESPONSE._serialized_end=4089 + _CREATEQUERYRESULT._serialized_start=4091 + _CREATEQUERYRESULT._serialized_end=4137 + _LISTQUERIESREQUEST._serialized_start=4140 + _LISTQUERIESREQUEST._serialized_end=4671 + _LISTQUERIESREQUEST_FILTER._serialized_start=4339 + _LISTQUERIESREQUEST_FILTER._serialized_end=4671 + _LISTQUERIESRESPONSE._serialized_start=4673 + _LISTQUERIESRESPONSE._serialized_end=4740 + _LISTQUERIESRESULT._serialized_start=4742 + _LISTQUERIESRESULT._serialized_end=4838 + _DESCRIBEQUERYREQUEST._serialized_start=4840 + _DESCRIBEQUERYREQUEST._serialized_end=4952 + _DESCRIBEQUERYRESPONSE._serialized_start=4954 + _DESCRIBEQUERYRESPONSE._serialized_end=5023 + _DESCRIBEQUERYRESULT._serialized_start=5025 + _DESCRIBEQUERYRESULT._serialized_end=5084 + _GETQUERYSTATUSREQUEST._serialized_start=5086 + _GETQUERYSTATUSREQUEST._serialized_end=5199 + _GETQUERYSTATUSRESPONSE._serialized_start=5201 + _GETQUERYSTATUSRESPONSE._serialized_end=5271 + _GETQUERYSTATUSRESULT._serialized_start=5273 + _GETQUERYSTATUSRESULT._serialized_end=5375 + _DELETEQUERYREQUEST._serialized_start=5378 + _DELETEQUERYREQUEST._serialized_end=5559 + _DELETEQUERYRESPONSE._serialized_start=5561 + _DELETEQUERYRESPONSE._serialized_end=5628 + _DELETEQUERYRESULT._serialized_start=5630 + _DELETEQUERYRESULT._serialized_end=5649 + _MODIFYQUERYREQUEST._serialized_start=5652 + _MODIFYQUERYREQUEST._serialized_end=6046 + _MODIFYQUERYRESPONSE._serialized_start=6048 + _MODIFYQUERYRESPONSE._serialized_end=6115 + _MODIFYQUERYRESULT._serialized_start=6117 + _MODIFYQUERYRESULT._serialized_end=6136 + _CONTROLQUERYREQUEST._serialized_start=6139 + _CONTROLQUERYREQUEST._serialized_end=6366 + _CONTROLQUERYRESPONSE._serialized_start=6368 + _CONTROLQUERYRESPONSE._serialized_end=6436 + _CONTROLQUERYRESULT._serialized_start=6438 + _CONTROLQUERYRESULT._serialized_end=6458 + _BRIEFJOB._serialized_start=6461 + _BRIEFJOB._serialized_end=6698 + _JOB._serialized_start=6701 + _JOB._serialized_end=7216 + _LISTJOBSREQUEST._serialized_start=7219 + _LISTJOBSREQUEST._serialized_end=7487 + _LISTJOBSREQUEST_FILTER._serialized_start=7429 + _LISTJOBSREQUEST_FILTER._serialized_end=7487 + _LISTJOBSRESPONSE._serialized_start=7489 + _LISTJOBSRESPONSE._serialized_end=7553 + _LISTJOBSRESULT._serialized_start=7555 + _LISTJOBSRESULT._serialized_end=7644 + _DESCRIBEJOBREQUEST._serialized_start=7646 + _DESCRIBEJOBREQUEST._serialized_end=7754 + _DESCRIBEJOBRESPONSE._serialized_start=7756 + _DESCRIBEJOBRESPONSE._serialized_end=7823 + _DESCRIBEJOBRESULT._serialized_start=7825 + _DESCRIBEJOBRESULT._serialized_end=7878 + _CURRENTIAMTOKENAUTH._serialized_start=7880 + _CURRENTIAMTOKENAUTH._serialized_end=7901 + _NONEAUTH._serialized_start=7903 + _NONEAUTH._serialized_end=7913 + _SERVICEACCOUNTAUTH._serialized_start=7915 + _SERVICEACCOUNTAUTH._serialized_end=7956 + _IAMAUTH._serialized_start=7959 + _IAMAUTH._serialized_end=8145 + _DATASTREAMS._serialized_start=8148 + _DATASTREAMS._serialized_end=8300 + _MONITORING._serialized_start=8302 + _MONITORING._serialized_end=8405 + _YDBDATABASE._serialized_start=8408 + _YDBDATABASE._serialized_end=8560 + _CLICKHOUSECLUSTER._serialized_start=8563 + _CLICKHOUSECLUSTER._serialized_end=8811 + _OBJECTSTORAGECONNECTION._serialized_start=8813 + _OBJECTSTORAGECONNECTION._serialized_end=8902 + _POSTGRESQLCLUSTER._serialized_start=8905 + _POSTGRESQLCLUSTER._serialized_end=9178 + _CONNECTIONSETTING._serialized_start=9181 + _CONNECTIONSETTING._serialized_end=9739 + _CONNECTIONSETTING_CONNECTIONTYPE._serialized_start=9556 + _CONNECTIONSETTING_CONNECTIONTYPE._serialized_end=9725 + _CONNECTIONCONTENT._serialized_start=9742 + _CONNECTIONCONTENT._serialized_end=9904 + _CONNECTION._serialized_start=9906 + _CONNECTION._serialized_end=10012 + _CREATECONNECTIONREQUEST._serialized_start=10015 + _CREATECONNECTIONREQUEST._serialized_end=10185 + _CREATECONNECTIONRESPONSE._serialized_start=10187 + _CREATECONNECTIONRESPONSE._serialized_end=10259 + _CREATECONNECTIONRESULT._serialized_start=10261 + _CREATECONNECTIONRESULT._serialized_end=10321 + _LISTCONNECTIONSREQUEST._serialized_start=10324 + _LISTCONNECTIONSREQUEST._serialized_end=10712 + _LISTCONNECTIONSREQUEST_FILTER._serialized_start=10531 + _LISTCONNECTIONSREQUEST_FILTER._serialized_end=10712 + _LISTCONNECTIONSRESPONSE._serialized_start=10714 + _LISTCONNECTIONSRESPONSE._serialized_end=10785 + _LISTCONNECTIONSRESULT._serialized_start=10787 + _LISTCONNECTIONSRESULT._serialized_end=10892 + _DESCRIBECONNECTIONREQUEST._serialized_start=10894 + _DESCRIBECONNECTIONREQUEST._serialized_end=11016 + _DESCRIBECONNECTIONRESPONSE._serialized_start=11018 + _DESCRIBECONNECTIONRESPONSE._serialized_end=11092 + _DESCRIBECONNECTIONRESULT._serialized_start=11094 + _DESCRIBECONNECTIONRESULT._serialized_end=11168 + _MODIFYCONNECTIONREQUEST._serialized_start=11171 + _MODIFYCONNECTIONREQUEST._serialized_end=11414 + _MODIFYCONNECTIONRESPONSE._serialized_start=11416 + _MODIFYCONNECTIONRESPONSE._serialized_end=11488 + _MODIFYCONNECTIONRESULT._serialized_start=11490 + _MODIFYCONNECTIONRESULT._serialized_end=11514 + _DELETECONNECTIONREQUEST._serialized_start=11517 + _DELETECONNECTIONREQUEST._serialized_end=11708 + _DELETECONNECTIONRESPONSE._serialized_start=11710 + _DELETECONNECTIONRESPONSE._serialized_end=11782 + _DELETECONNECTIONRESULT._serialized_start=11784 + _DELETECONNECTIONRESULT._serialized_end=11808 + _TESTCONNECTIONREQUEST._serialized_start=11811 + _TESTCONNECTIONREQUEST._serialized_end=11945 + _TESTCONNECTIONRESPONSE._serialized_start=11947 + _TESTCONNECTIONRESPONSE._serialized_end=12017 + _TESTCONNECTIONRESULT._serialized_start=12019 + _TESTCONNECTIONRESULT._serialized_end=12041 + _GETRESULTDATAREQUEST._serialized_start=12044 + _GETRESULTDATAREQUEST._serialized_end=12248 + _GETRESULTDATARESPONSE._serialized_start=12250 + _GETRESULTDATARESPONSE._serialized_end=12319 + _GETRESULTDATARESULT._serialized_start=12321 + _GETRESULTDATARESULT._serialized_end=12378 + _SCHEMA._serialized_start=12380 + _SCHEMA._serialized_end=12426 + _DATASTREAMSBINDING._serialized_start=12429 + _DATASTREAMSBINDING._serialized_end=12719 + _DATASTREAMSBINDING_FORMATSETTINGENTRY._serialized_start=12667 + _DATASTREAMSBINDING_FORMATSETTINGENTRY._serialized_end=12719 + _OBJECTSTORAGEBINDING._serialized_start=12722 + _OBJECTSTORAGEBINDING._serialized_end=13252 + _OBJECTSTORAGEBINDING_SUBSET._serialized_start=12808 + _OBJECTSTORAGEBINDING_SUBSET._serialized_end=13252 + _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._serialized_start=12667 + _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._serialized_end=12719 + _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._serialized_start=13203 + _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._serialized_end=13252 + _BINDINGSETTING._serialized_start=13255 + _BINDINGSETTING._serialized_end=13489 + _BINDINGSETTING_BINDINGTYPE._serialized_start=13397 + _BINDINGSETTING_BINDINGTYPE._serialized_end=13478 + _BRIEFBINDING._serialized_start=13492 + _BRIEFBINDING._serialized_end=13721 + _BINDINGCONTENT._serialized_start=13724 + _BINDINGCONTENT._serialized_end=13916 + _BINDING._serialized_start=13918 + _BINDING._serialized_end=14018 + _CREATEBINDINGREQUEST._serialized_start=14021 + _CREATEBINDINGREQUEST._serialized_end=14185 + _CREATEBINDINGRESPONSE._serialized_start=14187 + _CREATEBINDINGRESPONSE._serialized_end=14256 + _CREATEBINDINGRESULT._serialized_start=14258 + _CREATEBINDINGRESULT._serialized_end=14312 + _LISTBINDINGSREQUEST._serialized_start=14315 + _LISTBINDINGSREQUEST._serialized_end=14654 + _LISTBINDINGSREQUEST_FILTER._serialized_start=14516 + _LISTBINDINGSREQUEST_FILTER._serialized_end=14654 + _LISTBINDINGSRESPONSE._serialized_start=14656 + _LISTBINDINGSRESPONSE._serialized_end=14724 + _LISTBINDINGSRESULT._serialized_start=14726 + _LISTBINDINGSRESULT._serialized_end=14827 + _DESCRIBEBINDINGREQUEST._serialized_start=14829 + _DESCRIBEBINDINGREQUEST._serialized_end=14945 + _DESCRIBEBINDINGRESPONSE._serialized_start=14947 + _DESCRIBEBINDINGRESPONSE._serialized_end=15018 + _DESCRIBEBINDINGRESULT._serialized_start=15020 + _DESCRIBEBINDINGRESULT._serialized_end=15085 + _MODIFYBINDINGREQUEST._serialized_start=15088 + _MODIFYBINDINGREQUEST._serialized_end=15322 + _MODIFYBINDINGRESPONSE._serialized_start=15324 + _MODIFYBINDINGRESPONSE._serialized_end=15393 + _MODIFYBINDINGRESULT._serialized_start=15395 + _MODIFYBINDINGRESULT._serialized_end=15416 + _DELETEBINDINGREQUEST._serialized_start=15419 + _DELETEBINDINGREQUEST._serialized_end=15604 + _DELETEBINDINGRESPONSE._serialized_start=15606 + _DELETEBINDINGRESPONSE._serialized_end=15675 + _DELETEBINDINGRESULT._serialized_start=15677 + _DELETEBINDINGRESULT._serialized_end=15698 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.pyi b/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.pyi new file mode 100644 index 00000000..bc950b0a --- /dev/null +++ b/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.pyi @@ -0,0 +1,1125 @@ +from protos.annotations import sensitive_pb2 as _sensitive_pb2 +from protos.annotations import validation_pb2 as _validation_pb2 +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from protos import ydb_value_pb2 as _ydb_value_pb2 +from protos import ydb_issue_message_pb2 as _ydb_issue_message_pb2 +from google.protobuf import duration_pb2 as _duration_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import empty_pb2 as _empty_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +ABORT: QueryAction +ABORT_GRACEFULLY: QueryAction +AUTOMATIC: AutomaticType +AUTOMATIC_TYPE_UNSPECIFIED: AutomaticType +COMPILE: ExecuteMode +DESCRIPTOR: _descriptor.FileDescriptor +EMPTY: StateLoadMode +EXECUTE_MODE_UNSPECIFIED: ExecuteMode +EXPLAIN: ExecuteMode +FROM_LAST_CHECKPOINT: StateLoadMode +NOT_AUTOMATIC: AutomaticType +PARSE: ExecuteMode +PAUSE: QueryAction +PAUSE_GRACEFULLY: QueryAction +QUERY_ACTION_UNSPECIFIED: QueryAction +RESUME: QueryAction +RUN: ExecuteMode +SAVE: ExecuteMode +STATE_LOAD_MODE_UNSPECIFIED: StateLoadMode +VALIDATE: ExecuteMode + +class Acl(_message.Message): + __slots__ = ["visibility"] + class Visibility(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + PRIVATE: Acl.Visibility + SCOPE: Acl.Visibility + VISIBILITY_FIELD_NUMBER: _ClassVar[int] + VISIBILITY_UNSPECIFIED: Acl.Visibility + visibility: Acl.Visibility + def __init__(self, visibility: _Optional[_Union[Acl.Visibility, str]] = ...) -> None: ... + +class Binding(_message.Message): + __slots__ = ["content", "meta"] + CONTENT_FIELD_NUMBER: _ClassVar[int] + META_FIELD_NUMBER: _ClassVar[int] + content: BindingContent + meta: CommonMeta + def __init__(self, content: _Optional[_Union[BindingContent, _Mapping]] = ..., meta: _Optional[_Union[CommonMeta, _Mapping]] = ...) -> None: ... + +class BindingContent(_message.Message): + __slots__ = ["acl", "connection_id", "description", "name", "setting"] + ACL_FIELD_NUMBER: _ClassVar[int] + CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + SETTING_FIELD_NUMBER: _ClassVar[int] + acl: Acl + connection_id: str + description: str + name: str + setting: BindingSetting + def __init__(self, name: _Optional[str] = ..., connection_id: _Optional[str] = ..., setting: _Optional[_Union[BindingSetting, _Mapping]] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., description: _Optional[str] = ...) -> None: ... + +class BindingSetting(_message.Message): + __slots__ = ["data_streams", "object_storage"] + class BindingType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + BINDING_TYPE_UNSPECIFIED: BindingSetting.BindingType + DATA_STREAMS: BindingSetting.BindingType + DATA_STREAMS_FIELD_NUMBER: _ClassVar[int] + OBJECT_STORAGE: BindingSetting.BindingType + OBJECT_STORAGE_FIELD_NUMBER: _ClassVar[int] + data_streams: DataStreamsBinding + object_storage: ObjectStorageBinding + def __init__(self, data_streams: _Optional[_Union[DataStreamsBinding, _Mapping]] = ..., object_storage: _Optional[_Union[ObjectStorageBinding, _Mapping]] = ...) -> None: ... + +class BriefBinding(_message.Message): + __slots__ = ["connection_id", "meta", "name", "type", "visibility"] + CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] + META_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + VISIBILITY_FIELD_NUMBER: _ClassVar[int] + connection_id: str + meta: CommonMeta + name: str + type: BindingSetting.BindingType + visibility: Acl.Visibility + def __init__(self, name: _Optional[str] = ..., connection_id: _Optional[str] = ..., meta: _Optional[_Union[CommonMeta, _Mapping]] = ..., type: _Optional[_Union[BindingSetting.BindingType, str]] = ..., visibility: _Optional[_Union[Acl.Visibility, str]] = ...) -> None: ... + +class BriefJob(_message.Message): + __slots__ = ["automatic", "expire_at", "meta", "query_meta", "query_name", "visibility"] + AUTOMATIC_FIELD_NUMBER: _ClassVar[int] + EXPIRE_AT_FIELD_NUMBER: _ClassVar[int] + META_FIELD_NUMBER: _ClassVar[int] + QUERY_META_FIELD_NUMBER: _ClassVar[int] + QUERY_NAME_FIELD_NUMBER: _ClassVar[int] + VISIBILITY_FIELD_NUMBER: _ClassVar[int] + automatic: bool + expire_at: _timestamp_pb2.Timestamp + meta: CommonMeta + query_meta: QueryMeta + query_name: str + visibility: Acl.Visibility + def __init__(self, meta: _Optional[_Union[CommonMeta, _Mapping]] = ..., query_meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., query_name: _Optional[str] = ..., visibility: _Optional[_Union[Acl.Visibility, str]] = ..., automatic: bool = ..., expire_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class BriefQuery(_message.Message): + __slots__ = ["automatic", "meta", "name", "type", "visibility"] + AUTOMATIC_FIELD_NUMBER: _ClassVar[int] + META_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + VISIBILITY_FIELD_NUMBER: _ClassVar[int] + automatic: bool + meta: QueryMeta + name: str + type: QueryContent.QueryType + visibility: Acl.Visibility + def __init__(self, type: _Optional[_Union[QueryContent.QueryType, str]] = ..., name: _Optional[str] = ..., meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., visibility: _Optional[_Union[Acl.Visibility, str]] = ..., automatic: bool = ...) -> None: ... + +class ClickHouseCluster(_message.Message): + __slots__ = ["auth", "database_id", "database_name", "host", "login", "password", "port", "secure"] + AUTH_FIELD_NUMBER: _ClassVar[int] + DATABASE_ID_FIELD_NUMBER: _ClassVar[int] + DATABASE_NAME_FIELD_NUMBER: _ClassVar[int] + HOST_FIELD_NUMBER: _ClassVar[int] + LOGIN_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + SECURE_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + database_id: str + database_name: str + host: str + login: str + password: str + port: int + secure: bool + def __init__(self, database_id: _Optional[str] = ..., database_name: _Optional[str] = ..., login: _Optional[str] = ..., password: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ..., host: _Optional[str] = ..., port: _Optional[int] = ..., secure: bool = ...) -> None: ... + +class CommonMeta(_message.Message): + __slots__ = ["created_at", "created_by", "id", "modified_at", "modified_by", "revision"] + CREATED_AT_FIELD_NUMBER: _ClassVar[int] + CREATED_BY_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + MODIFIED_AT_FIELD_NUMBER: _ClassVar[int] + MODIFIED_BY_FIELD_NUMBER: _ClassVar[int] + REVISION_FIELD_NUMBER: _ClassVar[int] + created_at: _timestamp_pb2.Timestamp + created_by: str + id: str + modified_at: _timestamp_pb2.Timestamp + modified_by: str + revision: int + def __init__(self, id: _Optional[str] = ..., created_by: _Optional[str] = ..., modified_by: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., modified_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., revision: _Optional[int] = ...) -> None: ... + +class Connection(_message.Message): + __slots__ = ["content", "meta"] + CONTENT_FIELD_NUMBER: _ClassVar[int] + META_FIELD_NUMBER: _ClassVar[int] + content: ConnectionContent + meta: CommonMeta + def __init__(self, content: _Optional[_Union[ConnectionContent, _Mapping]] = ..., meta: _Optional[_Union[CommonMeta, _Mapping]] = ...) -> None: ... + +class ConnectionContent(_message.Message): + __slots__ = ["acl", "description", "name", "setting"] + ACL_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + SETTING_FIELD_NUMBER: _ClassVar[int] + acl: Acl + description: str + name: str + setting: ConnectionSetting + def __init__(self, name: _Optional[str] = ..., setting: _Optional[_Union[ConnectionSetting, _Mapping]] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., description: _Optional[str] = ...) -> None: ... + +class ConnectionSetting(_message.Message): + __slots__ = ["clickhouse_cluster", "data_streams", "monitoring", "object_storage", "postgresql_cluster", "ydb_database"] + class ConnectionType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + CLICKHOUSE_CLUSTER: ConnectionSetting.ConnectionType + CLICKHOUSE_CLUSTER_FIELD_NUMBER: _ClassVar[int] + CONNECTION_TYPE_UNSPECIFIED: ConnectionSetting.ConnectionType + DATA_STREAMS: ConnectionSetting.ConnectionType + DATA_STREAMS_FIELD_NUMBER: _ClassVar[int] + MONITORING: ConnectionSetting.ConnectionType + MONITORING_FIELD_NUMBER: _ClassVar[int] + OBJECT_STORAGE: ConnectionSetting.ConnectionType + OBJECT_STORAGE_FIELD_NUMBER: _ClassVar[int] + POSTGRESQL_CLUSTER: ConnectionSetting.ConnectionType + POSTGRESQL_CLUSTER_FIELD_NUMBER: _ClassVar[int] + YDB_DATABASE: ConnectionSetting.ConnectionType + YDB_DATABASE_FIELD_NUMBER: _ClassVar[int] + clickhouse_cluster: ClickHouseCluster + data_streams: DataStreams + monitoring: Monitoring + object_storage: ObjectStorageConnection + postgresql_cluster: PostgreSQLCluster + ydb_database: YdbDatabase + def __init__(self, ydb_database: _Optional[_Union[YdbDatabase, _Mapping]] = ..., clickhouse_cluster: _Optional[_Union[ClickHouseCluster, _Mapping]] = ..., data_streams: _Optional[_Union[DataStreams, _Mapping]] = ..., object_storage: _Optional[_Union[ObjectStorageConnection, _Mapping]] = ..., monitoring: _Optional[_Union[Monitoring, _Mapping]] = ..., postgresql_cluster: _Optional[_Union[PostgreSQLCluster, _Mapping]] = ...) -> None: ... + +class ControlQueryRequest(_message.Message): + __slots__ = ["action", "idempotency_key", "operation_params", "previous_revision", "query_id"] + ACTION_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PREVIOUS_REVISION_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + action: QueryAction + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + previous_revision: int + query_id: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., query_id: _Optional[str] = ..., action: _Optional[_Union[QueryAction, str]] = ..., previous_revision: _Optional[int] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class ControlQueryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ControlQueryResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class CreateBindingRequest(_message.Message): + __slots__ = ["content", "idempotency_key", "operation_params"] + CONTENT_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + content: BindingContent + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., content: _Optional[_Union[BindingContent, _Mapping]] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class CreateBindingResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CreateBindingResult(_message.Message): + __slots__ = ["binding_id"] + BINDING_ID_FIELD_NUMBER: _ClassVar[int] + binding_id: str + def __init__(self, binding_id: _Optional[str] = ...) -> None: ... + +class CreateConnectionRequest(_message.Message): + __slots__ = ["content", "idempotency_key", "operation_params"] + CONTENT_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + content: ConnectionContent + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., content: _Optional[_Union[ConnectionContent, _Mapping]] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class CreateConnectionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CreateConnectionResult(_message.Message): + __slots__ = ["connection_id"] + CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] + connection_id: str + def __init__(self, connection_id: _Optional[str] = ...) -> None: ... + +class CreateQueryRequest(_message.Message): + __slots__ = ["content", "disposition", "execute_mode", "idempotency_key", "operation_params"] + CONTENT_FIELD_NUMBER: _ClassVar[int] + DISPOSITION_FIELD_NUMBER: _ClassVar[int] + EXECUTE_MODE_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + content: QueryContent + disposition: StreamingDisposition + execute_mode: ExecuteMode + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., content: _Optional[_Union[QueryContent, _Mapping]] = ..., execute_mode: _Optional[_Union[ExecuteMode, str]] = ..., disposition: _Optional[_Union[StreamingDisposition, _Mapping]] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class CreateQueryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CreateQueryResult(_message.Message): + __slots__ = ["query_id"] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + query_id: str + def __init__(self, query_id: _Optional[str] = ...) -> None: ... + +class CurrentIAMTokenAuth(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class DataStreams(_message.Message): + __slots__ = ["auth", "database", "database_id", "endpoint", "secure"] + AUTH_FIELD_NUMBER: _ClassVar[int] + DATABASE_FIELD_NUMBER: _ClassVar[int] + DATABASE_ID_FIELD_NUMBER: _ClassVar[int] + ENDPOINT_FIELD_NUMBER: _ClassVar[int] + SECURE_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + database: str + database_id: str + endpoint: str + secure: bool + def __init__(self, database_id: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ..., endpoint: _Optional[str] = ..., database: _Optional[str] = ..., secure: bool = ...) -> None: ... + +class DataStreamsBinding(_message.Message): + __slots__ = ["compression", "format", "format_setting", "schema", "stream_name"] + class FormatSettingEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + COMPRESSION_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + FORMAT_SETTING_FIELD_NUMBER: _ClassVar[int] + SCHEMA_FIELD_NUMBER: _ClassVar[int] + STREAM_NAME_FIELD_NUMBER: _ClassVar[int] + compression: str + format: str + format_setting: _containers.ScalarMap[str, str] + schema: Schema + stream_name: str + def __init__(self, stream_name: _Optional[str] = ..., format: _Optional[str] = ..., compression: _Optional[str] = ..., schema: _Optional[_Union[Schema, _Mapping]] = ..., format_setting: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class DeleteBindingRequest(_message.Message): + __slots__ = ["binding_id", "idempotency_key", "operation_params", "previous_revision"] + BINDING_ID_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PREVIOUS_REVISION_FIELD_NUMBER: _ClassVar[int] + binding_id: str + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + previous_revision: int + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., binding_id: _Optional[str] = ..., previous_revision: _Optional[int] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class DeleteBindingResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DeleteBindingResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class DeleteConnectionRequest(_message.Message): + __slots__ = ["connection_id", "idempotency_key", "operation_params", "previous_revision"] + CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PREVIOUS_REVISION_FIELD_NUMBER: _ClassVar[int] + connection_id: str + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + previous_revision: int + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., connection_id: _Optional[str] = ..., previous_revision: _Optional[int] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class DeleteConnectionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DeleteConnectionResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class DeleteQueryRequest(_message.Message): + __slots__ = ["idempotency_key", "operation_params", "previous_revision", "query_id"] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PREVIOUS_REVISION_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + previous_revision: int + query_id: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., query_id: _Optional[str] = ..., previous_revision: _Optional[int] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class DeleteQueryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DeleteQueryResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class DescribeBindingRequest(_message.Message): + __slots__ = ["binding_id", "operation_params"] + BINDING_ID_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + binding_id: str + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., binding_id: _Optional[str] = ...) -> None: ... + +class DescribeBindingResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeBindingResult(_message.Message): + __slots__ = ["binding"] + BINDING_FIELD_NUMBER: _ClassVar[int] + binding: Binding + def __init__(self, binding: _Optional[_Union[Binding, _Mapping]] = ...) -> None: ... + +class DescribeConnectionRequest(_message.Message): + __slots__ = ["connection_id", "operation_params"] + CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + connection_id: str + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., connection_id: _Optional[str] = ...) -> None: ... + +class DescribeConnectionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeConnectionResult(_message.Message): + __slots__ = ["connection"] + CONNECTION_FIELD_NUMBER: _ClassVar[int] + connection: Connection + def __init__(self, connection: _Optional[_Union[Connection, _Mapping]] = ...) -> None: ... + +class DescribeJobRequest(_message.Message): + __slots__ = ["job_id", "operation_params"] + JOB_ID_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + job_id: str + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., job_id: _Optional[str] = ...) -> None: ... + +class DescribeJobResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeJobResult(_message.Message): + __slots__ = ["job"] + JOB_FIELD_NUMBER: _ClassVar[int] + job: Job + def __init__(self, job: _Optional[_Union[Job, _Mapping]] = ...) -> None: ... + +class DescribeQueryRequest(_message.Message): + __slots__ = ["operation_params", "query_id"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + query_id: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., query_id: _Optional[str] = ...) -> None: ... + +class DescribeQueryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeQueryResult(_message.Message): + __slots__ = ["query"] + QUERY_FIELD_NUMBER: _ClassVar[int] + query: Query + def __init__(self, query: _Optional[_Union[Query, _Mapping]] = ...) -> None: ... + +class GetQueryStatusRequest(_message.Message): + __slots__ = ["operation_params", "query_id"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + query_id: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., query_id: _Optional[str] = ...) -> None: ... + +class GetQueryStatusResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class GetQueryStatusResult(_message.Message): + __slots__ = ["meta_revision", "status"] + META_REVISION_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + meta_revision: int + status: QueryMeta.ComputeStatus + def __init__(self, status: _Optional[_Union[QueryMeta.ComputeStatus, str]] = ..., meta_revision: _Optional[int] = ...) -> None: ... + +class GetResultDataRequest(_message.Message): + __slots__ = ["limit", "offset", "operation_params", "query_id", "result_set_index"] + LIMIT_FIELD_NUMBER: _ClassVar[int] + OFFSET_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_INDEX_FIELD_NUMBER: _ClassVar[int] + limit: int + offset: int + operation_params: _ydb_operation_pb2.OperationParams + query_id: str + result_set_index: int + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., query_id: _Optional[str] = ..., result_set_index: _Optional[int] = ..., offset: _Optional[int] = ..., limit: _Optional[int] = ...) -> None: ... + +class GetResultDataResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class GetResultDataResult(_message.Message): + __slots__ = ["result_set"] + RESULT_SET_FIELD_NUMBER: _ClassVar[int] + result_set: _ydb_value_pb2.ResultSet + def __init__(self, result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ...) -> None: ... + +class IamAuth(_message.Message): + __slots__ = ["current_iam", "none", "service_account"] + CURRENT_IAM_FIELD_NUMBER: _ClassVar[int] + NONE_FIELD_NUMBER: _ClassVar[int] + SERVICE_ACCOUNT_FIELD_NUMBER: _ClassVar[int] + current_iam: CurrentIAMTokenAuth + none: NoneAuth + service_account: ServiceAccountAuth + def __init__(self, current_iam: _Optional[_Union[CurrentIAMTokenAuth, _Mapping]] = ..., service_account: _Optional[_Union[ServiceAccountAuth, _Mapping]] = ..., none: _Optional[_Union[NoneAuth, _Mapping]] = ...) -> None: ... + +class Job(_message.Message): + __slots__ = ["acl", "ast", "automatic", "expire_at", "issue", "meta", "plan", "query_meta", "query_name", "result_set_meta", "statistics", "syntax", "text"] + ACL_FIELD_NUMBER: _ClassVar[int] + AST_FIELD_NUMBER: _ClassVar[int] + AUTOMATIC_FIELD_NUMBER: _ClassVar[int] + EXPIRE_AT_FIELD_NUMBER: _ClassVar[int] + ISSUE_FIELD_NUMBER: _ClassVar[int] + META_FIELD_NUMBER: _ClassVar[int] + PLAN_FIELD_NUMBER: _ClassVar[int] + QUERY_META_FIELD_NUMBER: _ClassVar[int] + QUERY_NAME_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_META_FIELD_NUMBER: _ClassVar[int] + STATISTICS_FIELD_NUMBER: _ClassVar[int] + SYNTAX_FIELD_NUMBER: _ClassVar[int] + TEXT_FIELD_NUMBER: _ClassVar[int] + acl: Acl + ast: QueryAst + automatic: bool + expire_at: _timestamp_pb2.Timestamp + issue: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + meta: CommonMeta + plan: QueryPlan + query_meta: QueryMeta + query_name: str + result_set_meta: _containers.RepeatedCompositeFieldContainer[ResultSetMeta] + statistics: QueryStatistics + syntax: QueryContent.QuerySyntax + text: str + def __init__(self, meta: _Optional[_Union[CommonMeta, _Mapping]] = ..., text: _Optional[str] = ..., query_meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., plan: _Optional[_Union[QueryPlan, _Mapping]] = ..., issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., statistics: _Optional[_Union[QueryStatistics, _Mapping]] = ..., result_set_meta: _Optional[_Iterable[_Union[ResultSetMeta, _Mapping]]] = ..., ast: _Optional[_Union[QueryAst, _Mapping]] = ..., query_name: _Optional[str] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., automatic: bool = ..., expire_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., syntax: _Optional[_Union[QueryContent.QuerySyntax, str]] = ...) -> None: ... + +class Limits(_message.Message): + __slots__ = ["execution_deadline", "execution_timeout", "flow_rate_limit", "max_result_rows", "max_result_size", "memory_limit", "result_ttl", "vcpu_rate_limit", "vcpu_time_limit"] + EXECUTION_DEADLINE_FIELD_NUMBER: _ClassVar[int] + EXECUTION_TIMEOUT_FIELD_NUMBER: _ClassVar[int] + FLOW_RATE_LIMIT_FIELD_NUMBER: _ClassVar[int] + MAX_RESULT_ROWS_FIELD_NUMBER: _ClassVar[int] + MAX_RESULT_SIZE_FIELD_NUMBER: _ClassVar[int] + MEMORY_LIMIT_FIELD_NUMBER: _ClassVar[int] + RESULT_TTL_FIELD_NUMBER: _ClassVar[int] + VCPU_RATE_LIMIT_FIELD_NUMBER: _ClassVar[int] + VCPU_TIME_LIMIT_FIELD_NUMBER: _ClassVar[int] + execution_deadline: _timestamp_pb2.Timestamp + execution_timeout: _duration_pb2.Duration + flow_rate_limit: int + max_result_rows: int + max_result_size: int + memory_limit: int + result_ttl: _duration_pb2.Duration + vcpu_rate_limit: int + vcpu_time_limit: int + def __init__(self, vcpu_rate_limit: _Optional[int] = ..., flow_rate_limit: _Optional[int] = ..., vcpu_time_limit: _Optional[int] = ..., max_result_size: _Optional[int] = ..., max_result_rows: _Optional[int] = ..., memory_limit: _Optional[int] = ..., result_ttl: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., execution_timeout: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., execution_deadline: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class ListBindingsRequest(_message.Message): + __slots__ = ["filter", "limit", "operation_params", "page_token"] + class Filter(_message.Message): + __slots__ = ["connection_id", "created_by_me", "name", "visibility"] + CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] + CREATED_BY_ME_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + VISIBILITY_FIELD_NUMBER: _ClassVar[int] + connection_id: str + created_by_me: bool + name: str + visibility: Acl.Visibility + def __init__(self, connection_id: _Optional[str] = ..., name: _Optional[str] = ..., created_by_me: bool = ..., visibility: _Optional[_Union[Acl.Visibility, str]] = ...) -> None: ... + FILTER_FIELD_NUMBER: _ClassVar[int] + LIMIT_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + filter: ListBindingsRequest.Filter + limit: int + operation_params: _ydb_operation_pb2.OperationParams + page_token: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., page_token: _Optional[str] = ..., limit: _Optional[int] = ..., filter: _Optional[_Union[ListBindingsRequest.Filter, _Mapping]] = ...) -> None: ... + +class ListBindingsResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListBindingsResult(_message.Message): + __slots__ = ["binding", "next_page_token"] + BINDING_FIELD_NUMBER: _ClassVar[int] + NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + binding: _containers.RepeatedCompositeFieldContainer[BriefBinding] + next_page_token: str + def __init__(self, binding: _Optional[_Iterable[_Union[BriefBinding, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ... + +class ListConnectionsRequest(_message.Message): + __slots__ = ["filter", "limit", "operation_params", "page_token"] + class Filter(_message.Message): + __slots__ = ["connection_type", "created_by_me", "name", "visibility"] + CONNECTION_TYPE_FIELD_NUMBER: _ClassVar[int] + CREATED_BY_ME_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + VISIBILITY_FIELD_NUMBER: _ClassVar[int] + connection_type: ConnectionSetting.ConnectionType + created_by_me: bool + name: str + visibility: Acl.Visibility + def __init__(self, name: _Optional[str] = ..., created_by_me: bool = ..., connection_type: _Optional[_Union[ConnectionSetting.ConnectionType, str]] = ..., visibility: _Optional[_Union[Acl.Visibility, str]] = ...) -> None: ... + FILTER_FIELD_NUMBER: _ClassVar[int] + LIMIT_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + filter: ListConnectionsRequest.Filter + limit: int + operation_params: _ydb_operation_pb2.OperationParams + page_token: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., page_token: _Optional[str] = ..., limit: _Optional[int] = ..., filter: _Optional[_Union[ListConnectionsRequest.Filter, _Mapping]] = ...) -> None: ... + +class ListConnectionsResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListConnectionsResult(_message.Message): + __slots__ = ["connection", "next_page_token"] + CONNECTION_FIELD_NUMBER: _ClassVar[int] + NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + connection: _containers.RepeatedCompositeFieldContainer[Connection] + next_page_token: str + def __init__(self, connection: _Optional[_Iterable[_Union[Connection, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ... + +class ListJobsRequest(_message.Message): + __slots__ = ["filter", "limit", "operation_params", "page_token", "query_id"] + class Filter(_message.Message): + __slots__ = ["created_by_me", "query_id"] + CREATED_BY_ME_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + created_by_me: bool + query_id: str + def __init__(self, query_id: _Optional[str] = ..., created_by_me: bool = ...) -> None: ... + FILTER_FIELD_NUMBER: _ClassVar[int] + LIMIT_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + filter: ListJobsRequest.Filter + limit: int + operation_params: _ydb_operation_pb2.OperationParams + page_token: str + query_id: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., page_token: _Optional[str] = ..., limit: _Optional[int] = ..., query_id: _Optional[str] = ..., filter: _Optional[_Union[ListJobsRequest.Filter, _Mapping]] = ...) -> None: ... + +class ListJobsResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListJobsResult(_message.Message): + __slots__ = ["job", "next_page_token"] + JOB_FIELD_NUMBER: _ClassVar[int] + NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + job: _containers.RepeatedCompositeFieldContainer[BriefJob] + next_page_token: str + def __init__(self, job: _Optional[_Iterable[_Union[BriefJob, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ... + +class ListQueriesRequest(_message.Message): + __slots__ = ["filter", "limit", "operation_params", "page_token"] + class Filter(_message.Message): + __slots__ = ["automatic", "created_by_me", "mode", "name", "query_type", "status", "visibility"] + AUTOMATIC_FIELD_NUMBER: _ClassVar[int] + CREATED_BY_ME_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + QUERY_TYPE_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + VISIBILITY_FIELD_NUMBER: _ClassVar[int] + automatic: AutomaticType + created_by_me: bool + mode: _containers.RepeatedScalarFieldContainer[ExecuteMode] + name: str + query_type: QueryContent.QueryType + status: _containers.RepeatedScalarFieldContainer[QueryMeta.ComputeStatus] + visibility: Acl.Visibility + def __init__(self, query_type: _Optional[_Union[QueryContent.QueryType, str]] = ..., status: _Optional[_Iterable[_Union[QueryMeta.ComputeStatus, str]]] = ..., mode: _Optional[_Iterable[_Union[ExecuteMode, str]]] = ..., name: _Optional[str] = ..., created_by_me: bool = ..., visibility: _Optional[_Union[Acl.Visibility, str]] = ..., automatic: _Optional[_Union[AutomaticType, str]] = ...) -> None: ... + FILTER_FIELD_NUMBER: _ClassVar[int] + LIMIT_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + filter: ListQueriesRequest.Filter + limit: int + operation_params: _ydb_operation_pb2.OperationParams + page_token: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., page_token: _Optional[str] = ..., limit: _Optional[int] = ..., filter: _Optional[_Union[ListQueriesRequest.Filter, _Mapping]] = ...) -> None: ... + +class ListQueriesResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListQueriesResult(_message.Message): + __slots__ = ["next_page_token", "query"] + NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + QUERY_FIELD_NUMBER: _ClassVar[int] + next_page_token: str + query: _containers.RepeatedCompositeFieldContainer[BriefQuery] + def __init__(self, query: _Optional[_Iterable[_Union[BriefQuery, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ... + +class ModifyBindingRequest(_message.Message): + __slots__ = ["binding_id", "content", "idempotency_key", "operation_params", "previous_revision"] + BINDING_ID_FIELD_NUMBER: _ClassVar[int] + CONTENT_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PREVIOUS_REVISION_FIELD_NUMBER: _ClassVar[int] + binding_id: str + content: BindingContent + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + previous_revision: int + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., binding_id: _Optional[str] = ..., content: _Optional[_Union[BindingContent, _Mapping]] = ..., previous_revision: _Optional[int] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class ModifyBindingResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ModifyBindingResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ModifyConnectionRequest(_message.Message): + __slots__ = ["connection_id", "content", "idempotency_key", "operation_params", "previous_revision"] + CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] + CONTENT_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PREVIOUS_REVISION_FIELD_NUMBER: _ClassVar[int] + connection_id: str + content: ConnectionContent + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + previous_revision: int + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., connection_id: _Optional[str] = ..., content: _Optional[_Union[ConnectionContent, _Mapping]] = ..., previous_revision: _Optional[int] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class ModifyConnectionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ModifyConnectionResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ModifyQueryRequest(_message.Message): + __slots__ = ["content", "disposition", "execute_mode", "idempotency_key", "operation_params", "previous_revision", "query_id", "state_load_mode"] + CONTENT_FIELD_NUMBER: _ClassVar[int] + DISPOSITION_FIELD_NUMBER: _ClassVar[int] + EXECUTE_MODE_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PREVIOUS_REVISION_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + STATE_LOAD_MODE_FIELD_NUMBER: _ClassVar[int] + content: QueryContent + disposition: StreamingDisposition + execute_mode: ExecuteMode + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + previous_revision: int + query_id: str + state_load_mode: StateLoadMode + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., query_id: _Optional[str] = ..., content: _Optional[_Union[QueryContent, _Mapping]] = ..., execute_mode: _Optional[_Union[ExecuteMode, str]] = ..., disposition: _Optional[_Union[StreamingDisposition, _Mapping]] = ..., state_load_mode: _Optional[_Union[StateLoadMode, str]] = ..., previous_revision: _Optional[int] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class ModifyQueryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ModifyQueryResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class Monitoring(_message.Message): + __slots__ = ["auth", "cluster", "project"] + AUTH_FIELD_NUMBER: _ClassVar[int] + CLUSTER_FIELD_NUMBER: _ClassVar[int] + PROJECT_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + cluster: str + project: str + def __init__(self, project: _Optional[str] = ..., cluster: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ...) -> None: ... + +class NoneAuth(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ObjectStorageBinding(_message.Message): + __slots__ = ["subset"] + class Subset(_message.Message): + __slots__ = ["compression", "format", "format_setting", "partitioned_by", "path_pattern", "projection", "schema"] + class FormatSettingEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + class ProjectionEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + COMPRESSION_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + FORMAT_SETTING_FIELD_NUMBER: _ClassVar[int] + PARTITIONED_BY_FIELD_NUMBER: _ClassVar[int] + PATH_PATTERN_FIELD_NUMBER: _ClassVar[int] + PROJECTION_FIELD_NUMBER: _ClassVar[int] + SCHEMA_FIELD_NUMBER: _ClassVar[int] + compression: str + format: str + format_setting: _containers.ScalarMap[str, str] + partitioned_by: _containers.RepeatedScalarFieldContainer[str] + path_pattern: str + projection: _containers.ScalarMap[str, str] + schema: Schema + def __init__(self, path_pattern: _Optional[str] = ..., format: _Optional[str] = ..., format_setting: _Optional[_Mapping[str, str]] = ..., compression: _Optional[str] = ..., schema: _Optional[_Union[Schema, _Mapping]] = ..., projection: _Optional[_Mapping[str, str]] = ..., partitioned_by: _Optional[_Iterable[str]] = ...) -> None: ... + SUBSET_FIELD_NUMBER: _ClassVar[int] + subset: _containers.RepeatedCompositeFieldContainer[ObjectStorageBinding.Subset] + def __init__(self, subset: _Optional[_Iterable[_Union[ObjectStorageBinding.Subset, _Mapping]]] = ...) -> None: ... + +class ObjectStorageConnection(_message.Message): + __slots__ = ["auth", "bucket"] + AUTH_FIELD_NUMBER: _ClassVar[int] + BUCKET_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + bucket: str + def __init__(self, bucket: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ...) -> None: ... + +class PostgreSQLCluster(_message.Message): + __slots__ = ["auth", "database_id", "database_name", "host", "login", "password", "port", "schema", "secure"] + AUTH_FIELD_NUMBER: _ClassVar[int] + DATABASE_ID_FIELD_NUMBER: _ClassVar[int] + DATABASE_NAME_FIELD_NUMBER: _ClassVar[int] + HOST_FIELD_NUMBER: _ClassVar[int] + LOGIN_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + SCHEMA_FIELD_NUMBER: _ClassVar[int] + SECURE_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + database_id: str + database_name: str + host: str + login: str + password: str + port: int + schema: str + secure: bool + def __init__(self, database_id: _Optional[str] = ..., database_name: _Optional[str] = ..., login: _Optional[str] = ..., password: _Optional[str] = ..., schema: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ..., host: _Optional[str] = ..., port: _Optional[int] = ..., secure: bool = ...) -> None: ... + +class Query(_message.Message): + __slots__ = ["ast", "content", "issue", "meta", "plan", "result_set_meta", "statistics", "transient_issue"] + AST_FIELD_NUMBER: _ClassVar[int] + CONTENT_FIELD_NUMBER: _ClassVar[int] + ISSUE_FIELD_NUMBER: _ClassVar[int] + META_FIELD_NUMBER: _ClassVar[int] + PLAN_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_META_FIELD_NUMBER: _ClassVar[int] + STATISTICS_FIELD_NUMBER: _ClassVar[int] + TRANSIENT_ISSUE_FIELD_NUMBER: _ClassVar[int] + ast: QueryAst + content: QueryContent + issue: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + meta: QueryMeta + plan: QueryPlan + result_set_meta: _containers.RepeatedCompositeFieldContainer[ResultSetMeta] + statistics: QueryStatistics + transient_issue: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + def __init__(self, meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., content: _Optional[_Union[QueryContent, _Mapping]] = ..., plan: _Optional[_Union[QueryPlan, _Mapping]] = ..., issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., transient_issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., statistics: _Optional[_Union[QueryStatistics, _Mapping]] = ..., result_set_meta: _Optional[_Iterable[_Union[ResultSetMeta, _Mapping]]] = ..., ast: _Optional[_Union[QueryAst, _Mapping]] = ...) -> None: ... + +class QueryAst(_message.Message): + __slots__ = ["data"] + DATA_FIELD_NUMBER: _ClassVar[int] + data: str + def __init__(self, data: _Optional[str] = ...) -> None: ... + +class QueryContent(_message.Message): + __slots__ = ["acl", "automatic", "description", "execution_settings", "limits", "name", "syntax", "text", "type"] + class QuerySyntax(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class QueryType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class ExecutionSettingsEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ACL_FIELD_NUMBER: _ClassVar[int] + ANALYTICS: QueryContent.QueryType + AUTOMATIC_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + EXECUTION_SETTINGS_FIELD_NUMBER: _ClassVar[int] + LIMITS_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + PG: QueryContent.QuerySyntax + QUERY_SYNTAX_UNSPECIFIED: QueryContent.QuerySyntax + QUERY_TYPE_UNSPECIFIED: QueryContent.QueryType + STREAMING: QueryContent.QueryType + SYNTAX_FIELD_NUMBER: _ClassVar[int] + TEXT_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + YQL_V1: QueryContent.QuerySyntax + acl: Acl + automatic: bool + description: str + execution_settings: _containers.ScalarMap[str, str] + limits: Limits + name: str + syntax: QueryContent.QuerySyntax + text: str + type: QueryContent.QueryType + def __init__(self, type: _Optional[_Union[QueryContent.QueryType, str]] = ..., name: _Optional[str] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., limits: _Optional[_Union[Limits, _Mapping]] = ..., text: _Optional[str] = ..., automatic: bool = ..., description: _Optional[str] = ..., execution_settings: _Optional[_Mapping[str, str]] = ..., syntax: _Optional[_Union[QueryContent.QuerySyntax, str]] = ...) -> None: ... + +class QueryMeta(_message.Message): + __slots__ = ["aborted_by", "common", "execute_mode", "expire_at", "finished_at", "has_saved_checkpoints", "last_job_id", "last_job_query_revision", "paused_by", "result_expire_at", "started_at", "started_by", "status", "submitted_at"] + class ComputeStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ABORTED_BY_FIELD_NUMBER: _ClassVar[int] + ABORTED_BY_SYSTEM: QueryMeta.ComputeStatus + ABORTED_BY_USER: QueryMeta.ComputeStatus + ABORTING_BY_SYSTEM: QueryMeta.ComputeStatus + ABORTING_BY_USER: QueryMeta.ComputeStatus + COMMON_FIELD_NUMBER: _ClassVar[int] + COMPLETED: QueryMeta.ComputeStatus + COMPLETING: QueryMeta.ComputeStatus + COMPUTE_STATUS_UNSPECIFIED: QueryMeta.ComputeStatus + EXECUTE_MODE_FIELD_NUMBER: _ClassVar[int] + EXPIRE_AT_FIELD_NUMBER: _ClassVar[int] + FAILED: QueryMeta.ComputeStatus + FAILING: QueryMeta.ComputeStatus + FINISHED_AT_FIELD_NUMBER: _ClassVar[int] + HAS_SAVED_CHECKPOINTS_FIELD_NUMBER: _ClassVar[int] + LAST_JOB_ID_FIELD_NUMBER: _ClassVar[int] + LAST_JOB_QUERY_REVISION_FIELD_NUMBER: _ClassVar[int] + PAUSED: QueryMeta.ComputeStatus + PAUSED_BY_FIELD_NUMBER: _ClassVar[int] + PAUSING: QueryMeta.ComputeStatus + RESULT_EXPIRE_AT_FIELD_NUMBER: _ClassVar[int] + RESUMING: QueryMeta.ComputeStatus + RUNNING: QueryMeta.ComputeStatus + STARTED_AT_FIELD_NUMBER: _ClassVar[int] + STARTED_BY_FIELD_NUMBER: _ClassVar[int] + STARTING: QueryMeta.ComputeStatus + STATUS_FIELD_NUMBER: _ClassVar[int] + SUBMITTED_AT_FIELD_NUMBER: _ClassVar[int] + aborted_by: str + common: CommonMeta + execute_mode: ExecuteMode + expire_at: _timestamp_pb2.Timestamp + finished_at: _timestamp_pb2.Timestamp + has_saved_checkpoints: bool + last_job_id: str + last_job_query_revision: int + paused_by: str + result_expire_at: _timestamp_pb2.Timestamp + started_at: _timestamp_pb2.Timestamp + started_by: str + status: QueryMeta.ComputeStatus + submitted_at: _timestamp_pb2.Timestamp + def __init__(self, common: _Optional[_Union[CommonMeta, _Mapping]] = ..., submitted_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., started_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., finished_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., execute_mode: _Optional[_Union[ExecuteMode, str]] = ..., status: _Optional[_Union[QueryMeta.ComputeStatus, str]] = ..., last_job_query_revision: _Optional[int] = ..., last_job_id: _Optional[str] = ..., expire_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., result_expire_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., started_by: _Optional[str] = ..., aborted_by: _Optional[str] = ..., paused_by: _Optional[str] = ..., has_saved_checkpoints: bool = ...) -> None: ... + +class QueryPlan(_message.Message): + __slots__ = ["json"] + JSON_FIELD_NUMBER: _ClassVar[int] + json: str + def __init__(self, json: _Optional[str] = ...) -> None: ... + +class QueryStatistics(_message.Message): + __slots__ = ["json"] + JSON_FIELD_NUMBER: _ClassVar[int] + json: str + def __init__(self, json: _Optional[str] = ...) -> None: ... + +class ResultSetMeta(_message.Message): + __slots__ = ["column", "rows_count", "truncated"] + COLUMN_FIELD_NUMBER: _ClassVar[int] + ROWS_COUNT_FIELD_NUMBER: _ClassVar[int] + TRUNCATED_FIELD_NUMBER: _ClassVar[int] + column: _containers.RepeatedCompositeFieldContainer[_ydb_value_pb2.Column] + rows_count: int + truncated: bool + def __init__(self, column: _Optional[_Iterable[_Union[_ydb_value_pb2.Column, _Mapping]]] = ..., rows_count: _Optional[int] = ..., truncated: bool = ...) -> None: ... + +class Schema(_message.Message): + __slots__ = ["column"] + COLUMN_FIELD_NUMBER: _ClassVar[int] + column: _containers.RepeatedCompositeFieldContainer[_ydb_value_pb2.Column] + def __init__(self, column: _Optional[_Iterable[_Union[_ydb_value_pb2.Column, _Mapping]]] = ...) -> None: ... + +class ServiceAccountAuth(_message.Message): + __slots__ = ["id"] + ID_FIELD_NUMBER: _ClassVar[int] + id: str + def __init__(self, id: _Optional[str] = ...) -> None: ... + +class StreamingDisposition(_message.Message): + __slots__ = ["fresh", "from_last_checkpoint", "from_time", "oldest", "time_ago"] + class FromLastCheckpoint(_message.Message): + __slots__ = ["force"] + FORCE_FIELD_NUMBER: _ClassVar[int] + force: bool + def __init__(self, force: bool = ...) -> None: ... + class FromTime(_message.Message): + __slots__ = ["timestamp"] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + timestamp: _timestamp_pb2.Timestamp + def __init__(self, timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + class TimeAgo(_message.Message): + __slots__ = ["duration"] + DURATION_FIELD_NUMBER: _ClassVar[int] + duration: _duration_pb2.Duration + def __init__(self, duration: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...) -> None: ... + FRESH_FIELD_NUMBER: _ClassVar[int] + FROM_LAST_CHECKPOINT_FIELD_NUMBER: _ClassVar[int] + FROM_TIME_FIELD_NUMBER: _ClassVar[int] + OLDEST_FIELD_NUMBER: _ClassVar[int] + TIME_AGO_FIELD_NUMBER: _ClassVar[int] + fresh: _empty_pb2.Empty + from_last_checkpoint: StreamingDisposition.FromLastCheckpoint + from_time: StreamingDisposition.FromTime + oldest: _empty_pb2.Empty + time_ago: StreamingDisposition.TimeAgo + def __init__(self, oldest: _Optional[_Union[_empty_pb2.Empty, _Mapping]] = ..., fresh: _Optional[_Union[_empty_pb2.Empty, _Mapping]] = ..., from_time: _Optional[_Union[StreamingDisposition.FromTime, _Mapping]] = ..., time_ago: _Optional[_Union[StreamingDisposition.TimeAgo, _Mapping]] = ..., from_last_checkpoint: _Optional[_Union[StreamingDisposition.FromLastCheckpoint, _Mapping]] = ...) -> None: ... + +class TestConnectionRequest(_message.Message): + __slots__ = ["operation_params", "setting"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SETTING_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + setting: ConnectionSetting + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., setting: _Optional[_Union[ConnectionSetting, _Mapping]] = ...) -> None: ... + +class TestConnectionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class TestConnectionResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class YdbDatabase(_message.Message): + __slots__ = ["auth", "database", "database_id", "endpoint", "secure"] + AUTH_FIELD_NUMBER: _ClassVar[int] + DATABASE_FIELD_NUMBER: _ClassVar[int] + DATABASE_ID_FIELD_NUMBER: _ClassVar[int] + ENDPOINT_FIELD_NUMBER: _ClassVar[int] + SECURE_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + database: str + database_id: str + endpoint: str + secure: bool + def __init__(self, database_id: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ..., endpoint: _Optional[str] = ..., database: _Optional[str] = ..., secure: bool = ...) -> None: ... + +class ExecuteMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class QueryAction(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class StateLoadMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class AutomaticType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] diff --git a/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2_grpc.py b/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v4/draft/protos/ydb_keyvalue_pb2.py b/ydb/_grpc/v4/draft/protos/ydb_keyvalue_pb2.py new file mode 100644 index 00000000..60f5b9b8 --- /dev/null +++ b/ydb/_grpc/v4/draft/protos/ydb_keyvalue_pb2.py @@ -0,0 +1,124 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/protos/ydb_keyvalue.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v4.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1f\x64raft/protos/ydb_keyvalue.proto\x12\x0cYdb.KeyValue\x1a\x1aprotos/ydb_operation.proto\"\xf0\x01\n\x12StorageChannelInfo\x12\x17\n\x0fstorage_channel\x18\x01 \x01(\r\x12@\n\x0bstatus_flag\x18\x02 \x01(\x0e\x32+.Ydb.KeyValue.StorageChannelInfo.StatusFlag\"\x7f\n\nStatusFlag\x12\x1b\n\x17STATUS_FLAG_UNSPECIFIED\x10\x00\x12\x15\n\x11STATUS_FLAG_GREEN\x10\n\x12\x1b\n\x17STATUS_FLAG_YELLOW_STOP\x10\x14\x12 \n\x1cSTATUS_FLAG_ORANGE_OUT_SPACE\x10\x1e\"b\n\nPriorities\"T\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x15\n\x11PRIORITY_REALTIME\x10\x01\x12\x17\n\x13PRIORITY_BACKGROUND\x10\x02\"k\n\rStorageConfig\x12:\n\x07\x63hannel\x18\x01 \x03(\x0b\x32).Ydb.KeyValue.StorageConfig.ChannelConfig\x1a\x1e\n\rChannelConfig\x12\r\n\x05media\x18\x01 \x01(\t\"\x98\x01\n\x08KeyRange\x12\x1c\n\x12\x66rom_key_inclusive\x18\x01 \x01(\tH\x00\x12\x1c\n\x12\x66rom_key_exclusive\x18\x02 \x01(\tH\x00\x12\x1a\n\x10to_key_inclusive\x18\x03 \x01(\tH\x01\x12\x1a\n\x10to_key_exclusive\x18\x04 \x01(\tH\x01\x42\x0c\n\nfrom_boundB\n\n\x08to_bound\"s\n\x12\x41\x63quireLockRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\"C\n\x13\x41\x63quireLockResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"=\n\x11\x41\x63quireLockResult\x12\x17\n\x0flock_generation\x18\x01 \x01(\x04\x12\x0f\n\x07node_id\x18\x02 \x01(\r\"\xac\t\n\x19\x45xecuteTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12\x41\n\x08\x63ommands\x18\x05 \x03(\x0b\x32/.Ydb.KeyValue.ExecuteTransactionRequest.Command\x1a\xba\x07\n\x07\x43ommand\x12S\n\x0c\x64\x65lete_range\x18\x01 \x01(\x0b\x32;.Ydb.KeyValue.ExecuteTransactionRequest.Command.DeleteRangeH\x00\x12H\n\x06rename\x18\x02 \x01(\x0b\x32\x36.Ydb.KeyValue.ExecuteTransactionRequest.Command.RenameH\x00\x12O\n\ncopy_range\x18\x03 \x01(\x0b\x32\x39.Ydb.KeyValue.ExecuteTransactionRequest.Command.CopyRangeH\x00\x12H\n\x06\x63oncat\x18\x04 \x01(\x0b\x32\x36.Ydb.KeyValue.ExecuteTransactionRequest.Command.ConcatH\x00\x12\x46\n\x05write\x18\x05 \x01(\x0b\x32\x35.Ydb.KeyValue.ExecuteTransactionRequest.Command.WriteH\x00\x1a*\n\x06Rename\x12\x0f\n\x07old_key\x18\x01 \x01(\t\x12\x0f\n\x07new_key\x18\x02 \x01(\t\x1a\x45\n\x06\x43oncat\x12\x12\n\ninput_keys\x18\x01 \x03(\t\x12\x12\n\noutput_key\x18\x02 \x01(\t\x12\x13\n\x0bkeep_inputs\x18\x03 \x01(\x08\x1a\x63\n\tCopyRange\x12%\n\x05range\x18\x01 \x01(\x0b\x32\x16.Ydb.KeyValue.KeyRange\x12\x18\n\x10prefix_to_remove\x18\x02 \x01(\t\x12\x15\n\rprefix_to_add\x18\x03 \x01(\t\x1a\x94\x02\n\x05Write\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\x12\x17\n\x0fstorage_channel\x18\x03 \x01(\r\x12\x33\n\x08priority\x18\x04 \x01(\x0e\x32!.Ydb.KeyValue.Priorities.Priority\x12L\n\x06tactic\x18\x05 \x01(\x0e\x32<.Ydb.KeyValue.ExecuteTransactionRequest.Command.Write.Tactic\"S\n\x06Tactic\x12\x16\n\x12TACTIC_UNSPECIFIED\x10\x00\x12\x19\n\x15TACTIC_MAX_THROUGHPUT\x10\x01\x12\x16\n\x12TACTIC_MIN_LATENCY\x10\x02\x1a\x34\n\x0b\x44\x65leteRange\x12%\n\x05range\x18\x01 \x01(\x0b\x32\x16.Ydb.KeyValue.KeyRangeB\x08\n\x06\x61\x63tionB\x12\n\x10_lock_generation\"J\n\x1a\x45xecuteTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"k\n\x18\x45xecuteTransactionResult\x12>\n\x14storage_channel_info\x18\x01 \x03(\x0b\x32 .Ydb.KeyValue.StorageChannelInfo\x12\x0f\n\x07node_id\x18\x02 \x01(\r\"\x93\x02\n\x0bReadRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12\x0b\n\x03key\x18\x05 \x01(\t\x12\x0e\n\x06offset\x18\x06 \x01(\x04\x12\x0c\n\x04size\x18\x07 \x01(\x04\x12\x13\n\x0blimit_bytes\x18\x08 \x01(\x04\x12\x33\n\x08priority\x18\t \x01(\x0e\x32!.Ydb.KeyValue.Priorities.PriorityB\x12\n\x10_lock_generation\"<\n\x0cReadResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x89\x01\n\nReadResult\x12\x15\n\rrequested_key\x18\x01 \x01(\t\x12\x18\n\x10requested_offset\x18\x02 \x01(\x04\x12\x16\n\x0erequested_size\x18\x03 \x01(\x04\x12\r\n\x05value\x18\x04 \x01(\x0c\x12\x12\n\nis_overrun\x18\x05 \x01(\x08\x12\x0f\n\x07node_id\x18\x06 \x01(\r\"\x94\x02\n\x10ReadRangeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12%\n\x05range\x18\x05 \x01(\x0b\x32\x16.Ydb.KeyValue.KeyRange\x12\x13\n\x0blimit_bytes\x18\x06 \x01(\x04\x12\x33\n\x08priority\x18\x07 \x01(\x0e\x32!.Ydb.KeyValue.Priorities.PriorityB\x12\n\x10_lock_generation\"A\n\x11ReadRangeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xd1\x01\n\x0fReadRangeResult\x12\x38\n\x04pair\x18\x01 \x03(\x0b\x32*.Ydb.KeyValue.ReadRangeResult.KeyValuePair\x12\x12\n\nis_overrun\x18\x02 \x01(\x08\x12\x0f\n\x07node_id\x18\x03 \x01(\r\x1a_\n\x0cKeyValuePair\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\x12\x1a\n\x12\x63reation_unix_time\x18\x04 \x01(\x04\x12\x17\n\x0fstorage_channel\x18\x05 \x01(\r\"\xdf\x01\n\x10ListRangeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12%\n\x05range\x18\x05 \x01(\x0b\x32\x16.Ydb.KeyValue.KeyRange\x12\x13\n\x0blimit_bytes\x18\x06 \x01(\x04\x42\x12\n\x10_lock_generation\"A\n\x11ListRangeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xcb\x01\n\x0fListRangeResult\x12\x32\n\x03key\x18\x01 \x03(\x0b\x32%.Ydb.KeyValue.ListRangeResult.KeyInfo\x12\x12\n\nis_overrun\x18\x02 \x01(\x08\x12\x0f\n\x07node_id\x18\x03 \x01(\r\x1a_\n\x07KeyInfo\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x12\n\nvalue_size\x18\x02 \x01(\r\x12\x1a\n\x12\x63reation_unix_time\x18\x03 \x01(\x04\x12\x17\n\x0fstorage_channel\x18\x04 \x01(\r\"\xca\x01\n\x1eGetStorageChannelStatusRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12\x17\n\x0fstorage_channel\x18\x05 \x03(\rB\x12\n\x10_lock_generation\"O\n\x1fGetStorageChannelStatusResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"p\n\x1dGetStorageChannelStatusResult\x12>\n\x14storage_channel_info\x18\x01 \x03(\x0b\x32 .Ydb.KeyValue.StorageChannelInfo\x12\x0f\n\x07node_id\x18\x02 \x01(\r\"\xac\x01\n\x13\x43reateVolumeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x17\n\x0fpartition_count\x18\x04 \x01(\r\x12\x33\n\x0estorage_config\x18\x05 \x01(\x0b\x32\x1b.Ydb.KeyValue.StorageConfig\"D\n\x14\x43reateVolumeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43reateVolumeResult\"\\\n\x11\x44ropVolumeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"B\n\x12\x44ropVolumeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x44ropVolumeResult\"\xb1\x01\n\x12\x41lterVolumeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x1d\n\x15\x61lter_partition_count\x18\x03 \x01(\r\x12\x33\n\x0estorage_config\x18\x04 \x01(\x0b\x32\x1b.Ydb.KeyValue.StorageConfig\"C\n\x13\x41lterVolumeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x41lterVolumeResult\"`\n\x15\x44\x65scribeVolumeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"F\n\x16\x44\x65scribeVolumeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"=\n\x14\x44\x65scribeVolumeResult\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x17\n\x0fpartition_count\x18\x02 \x01(\x04\"v\n\x1aListLocalPartitionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x0f\n\x07node_id\x18\x03 \x01(\x04\"K\n\x1bListLocalPartitionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Q\n\x19ListLocalPartitionsResult\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0f\n\x07node_id\x18\x02 \x01(\x04\x12\x15\n\rpartition_ids\x18\x03 \x03(\x04\x42h\n tech.ydb.proto.draft.keyvalue.v1ZAgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_KeyValue\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.protos.ydb_keyvalue_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n tech.ydb.proto.draft.keyvalue.v1ZAgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_KeyValue\370\001\001' + _STORAGECHANNELINFO._serialized_start=78 + _STORAGECHANNELINFO._serialized_end=318 + _STORAGECHANNELINFO_STATUSFLAG._serialized_start=191 + _STORAGECHANNELINFO_STATUSFLAG._serialized_end=318 + _PRIORITIES._serialized_start=320 + _PRIORITIES._serialized_end=418 + _PRIORITIES_PRIORITY._serialized_start=334 + _PRIORITIES_PRIORITY._serialized_end=418 + _STORAGECONFIG._serialized_start=420 + _STORAGECONFIG._serialized_end=527 + _STORAGECONFIG_CHANNELCONFIG._serialized_start=497 + _STORAGECONFIG_CHANNELCONFIG._serialized_end=527 + _KEYRANGE._serialized_start=530 + _KEYRANGE._serialized_end=682 + _ACQUIRELOCKREQUEST._serialized_start=684 + _ACQUIRELOCKREQUEST._serialized_end=799 + _ACQUIRELOCKRESPONSE._serialized_start=801 + _ACQUIRELOCKRESPONSE._serialized_end=868 + _ACQUIRELOCKRESULT._serialized_start=870 + _ACQUIRELOCKRESULT._serialized_end=931 + _EXECUTETRANSACTIONREQUEST._serialized_start=934 + _EXECUTETRANSACTIONREQUEST._serialized_end=2130 + _EXECUTETRANSACTIONREQUEST_COMMAND._serialized_start=1156 + _EXECUTETRANSACTIONREQUEST_COMMAND._serialized_end=2110 + _EXECUTETRANSACTIONREQUEST_COMMAND_RENAME._serialized_start=1553 + _EXECUTETRANSACTIONREQUEST_COMMAND_RENAME._serialized_end=1595 + _EXECUTETRANSACTIONREQUEST_COMMAND_CONCAT._serialized_start=1597 + _EXECUTETRANSACTIONREQUEST_COMMAND_CONCAT._serialized_end=1666 + _EXECUTETRANSACTIONREQUEST_COMMAND_COPYRANGE._serialized_start=1668 + _EXECUTETRANSACTIONREQUEST_COMMAND_COPYRANGE._serialized_end=1767 + _EXECUTETRANSACTIONREQUEST_COMMAND_WRITE._serialized_start=1770 + _EXECUTETRANSACTIONREQUEST_COMMAND_WRITE._serialized_end=2046 + _EXECUTETRANSACTIONREQUEST_COMMAND_WRITE_TACTIC._serialized_start=1963 + _EXECUTETRANSACTIONREQUEST_COMMAND_WRITE_TACTIC._serialized_end=2046 + _EXECUTETRANSACTIONREQUEST_COMMAND_DELETERANGE._serialized_start=2048 + _EXECUTETRANSACTIONREQUEST_COMMAND_DELETERANGE._serialized_end=2100 + _EXECUTETRANSACTIONRESPONSE._serialized_start=2132 + _EXECUTETRANSACTIONRESPONSE._serialized_end=2206 + _EXECUTETRANSACTIONRESULT._serialized_start=2208 + _EXECUTETRANSACTIONRESULT._serialized_end=2315 + _READREQUEST._serialized_start=2318 + _READREQUEST._serialized_end=2593 + _READRESPONSE._serialized_start=2595 + _READRESPONSE._serialized_end=2655 + _READRESULT._serialized_start=2658 + _READRESULT._serialized_end=2795 + _READRANGEREQUEST._serialized_start=2798 + _READRANGEREQUEST._serialized_end=3074 + _READRANGERESPONSE._serialized_start=3076 + _READRANGERESPONSE._serialized_end=3141 + _READRANGERESULT._serialized_start=3144 + _READRANGERESULT._serialized_end=3353 + _READRANGERESULT_KEYVALUEPAIR._serialized_start=3258 + _READRANGERESULT_KEYVALUEPAIR._serialized_end=3353 + _LISTRANGEREQUEST._serialized_start=3356 + _LISTRANGEREQUEST._serialized_end=3579 + _LISTRANGERESPONSE._serialized_start=3581 + _LISTRANGERESPONSE._serialized_end=3646 + _LISTRANGERESULT._serialized_start=3649 + _LISTRANGERESULT._serialized_end=3852 + _LISTRANGERESULT_KEYINFO._serialized_start=3757 + _LISTRANGERESULT_KEYINFO._serialized_end=3852 + _GETSTORAGECHANNELSTATUSREQUEST._serialized_start=3855 + _GETSTORAGECHANNELSTATUSREQUEST._serialized_end=4057 + _GETSTORAGECHANNELSTATUSRESPONSE._serialized_start=4059 + _GETSTORAGECHANNELSTATUSRESPONSE._serialized_end=4138 + _GETSTORAGECHANNELSTATUSRESULT._serialized_start=4140 + _GETSTORAGECHANNELSTATUSRESULT._serialized_end=4252 + _CREATEVOLUMEREQUEST._serialized_start=4255 + _CREATEVOLUMEREQUEST._serialized_end=4427 + _CREATEVOLUMERESPONSE._serialized_start=4429 + _CREATEVOLUMERESPONSE._serialized_end=4497 + _CREATEVOLUMERESULT._serialized_start=4499 + _CREATEVOLUMERESULT._serialized_end=4519 + _DROPVOLUMEREQUEST._serialized_start=4521 + _DROPVOLUMEREQUEST._serialized_end=4613 + _DROPVOLUMERESPONSE._serialized_start=4615 + _DROPVOLUMERESPONSE._serialized_end=4681 + _DROPVOLUMERESULT._serialized_start=4683 + _DROPVOLUMERESULT._serialized_end=4701 + _ALTERVOLUMEREQUEST._serialized_start=4704 + _ALTERVOLUMEREQUEST._serialized_end=4881 + _ALTERVOLUMERESPONSE._serialized_start=4883 + _ALTERVOLUMERESPONSE._serialized_end=4950 + _ALTERVOLUMERESULT._serialized_start=4952 + _ALTERVOLUMERESULT._serialized_end=4971 + _DESCRIBEVOLUMEREQUEST._serialized_start=4973 + _DESCRIBEVOLUMEREQUEST._serialized_end=5069 + _DESCRIBEVOLUMERESPONSE._serialized_start=5071 + _DESCRIBEVOLUMERESPONSE._serialized_end=5141 + _DESCRIBEVOLUMERESULT._serialized_start=5143 + _DESCRIBEVOLUMERESULT._serialized_end=5204 + _LISTLOCALPARTITIONSREQUEST._serialized_start=5206 + _LISTLOCALPARTITIONSREQUEST._serialized_end=5324 + _LISTLOCALPARTITIONSRESPONSE._serialized_start=5326 + _LISTLOCALPARTITIONSRESPONSE._serialized_end=5401 + _LISTLOCALPARTITIONSRESULT._serialized_start=5403 + _LISTLOCALPARTITIONSRESULT._serialized_end=5484 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/draft/protos/ydb_keyvalue_pb2.pyi b/ydb/_grpc/v4/draft/protos/ydb_keyvalue_pb2.pyi new file mode 100644 index 00000000..52e93e5b --- /dev/null +++ b/ydb/_grpc/v4/draft/protos/ydb_keyvalue_pb2.pyi @@ -0,0 +1,437 @@ +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class AcquireLockRequest(_message.Message): + __slots__ = ["operation_params", "partition_id", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ...) -> None: ... + +class AcquireLockResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class AcquireLockResult(_message.Message): + __slots__ = ["lock_generation", "node_id"] + LOCK_GENERATION_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + lock_generation: int + node_id: int + def __init__(self, lock_generation: _Optional[int] = ..., node_id: _Optional[int] = ...) -> None: ... + +class AlterVolumeRequest(_message.Message): + __slots__ = ["alter_partition_count", "operation_params", "path", "storage_config"] + ALTER_PARTITION_COUNT_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + STORAGE_CONFIG_FIELD_NUMBER: _ClassVar[int] + alter_partition_count: int + operation_params: _ydb_operation_pb2.OperationParams + path: str + storage_config: StorageConfig + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., alter_partition_count: _Optional[int] = ..., storage_config: _Optional[_Union[StorageConfig, _Mapping]] = ...) -> None: ... + +class AlterVolumeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class AlterVolumeResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class CreateVolumeRequest(_message.Message): + __slots__ = ["operation_params", "partition_count", "path", "storage_config"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_COUNT_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + STORAGE_CONFIG_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + partition_count: int + path: str + storage_config: StorageConfig + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_count: _Optional[int] = ..., storage_config: _Optional[_Union[StorageConfig, _Mapping]] = ...) -> None: ... + +class CreateVolumeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CreateVolumeResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class DescribeVolumeRequest(_message.Message): + __slots__ = ["operation_params", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ...) -> None: ... + +class DescribeVolumeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeVolumeResult(_message.Message): + __slots__ = ["partition_count", "path"] + PARTITION_COUNT_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + partition_count: int + path: str + def __init__(self, path: _Optional[str] = ..., partition_count: _Optional[int] = ...) -> None: ... + +class DropVolumeRequest(_message.Message): + __slots__ = ["operation_params", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ...) -> None: ... + +class DropVolumeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DropVolumeResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ExecuteTransactionRequest(_message.Message): + __slots__ = ["commands", "lock_generation", "operation_params", "partition_id", "path"] + class Command(_message.Message): + __slots__ = ["concat", "copy_range", "delete_range", "rename", "write"] + class Concat(_message.Message): + __slots__ = ["input_keys", "keep_inputs", "output_key"] + INPUT_KEYS_FIELD_NUMBER: _ClassVar[int] + KEEP_INPUTS_FIELD_NUMBER: _ClassVar[int] + OUTPUT_KEY_FIELD_NUMBER: _ClassVar[int] + input_keys: _containers.RepeatedScalarFieldContainer[str] + keep_inputs: bool + output_key: str + def __init__(self, input_keys: _Optional[_Iterable[str]] = ..., output_key: _Optional[str] = ..., keep_inputs: bool = ...) -> None: ... + class CopyRange(_message.Message): + __slots__ = ["prefix_to_add", "prefix_to_remove", "range"] + PREFIX_TO_ADD_FIELD_NUMBER: _ClassVar[int] + PREFIX_TO_REMOVE_FIELD_NUMBER: _ClassVar[int] + RANGE_FIELD_NUMBER: _ClassVar[int] + prefix_to_add: str + prefix_to_remove: str + range: KeyRange + def __init__(self, range: _Optional[_Union[KeyRange, _Mapping]] = ..., prefix_to_remove: _Optional[str] = ..., prefix_to_add: _Optional[str] = ...) -> None: ... + class DeleteRange(_message.Message): + __slots__ = ["range"] + RANGE_FIELD_NUMBER: _ClassVar[int] + range: KeyRange + def __init__(self, range: _Optional[_Union[KeyRange, _Mapping]] = ...) -> None: ... + class Rename(_message.Message): + __slots__ = ["new_key", "old_key"] + NEW_KEY_FIELD_NUMBER: _ClassVar[int] + OLD_KEY_FIELD_NUMBER: _ClassVar[int] + new_key: str + old_key: str + def __init__(self, old_key: _Optional[str] = ..., new_key: _Optional[str] = ...) -> None: ... + class Write(_message.Message): + __slots__ = ["key", "priority", "storage_channel", "tactic", "value"] + class Tactic(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + KEY_FIELD_NUMBER: _ClassVar[int] + PRIORITY_FIELD_NUMBER: _ClassVar[int] + STORAGE_CHANNEL_FIELD_NUMBER: _ClassVar[int] + TACTIC_FIELD_NUMBER: _ClassVar[int] + TACTIC_MAX_THROUGHPUT: ExecuteTransactionRequest.Command.Write.Tactic + TACTIC_MIN_LATENCY: ExecuteTransactionRequest.Command.Write.Tactic + TACTIC_UNSPECIFIED: ExecuteTransactionRequest.Command.Write.Tactic + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + priority: Priorities.Priority + storage_channel: int + tactic: ExecuteTransactionRequest.Command.Write.Tactic + value: bytes + def __init__(self, key: _Optional[str] = ..., value: _Optional[bytes] = ..., storage_channel: _Optional[int] = ..., priority: _Optional[_Union[Priorities.Priority, str]] = ..., tactic: _Optional[_Union[ExecuteTransactionRequest.Command.Write.Tactic, str]] = ...) -> None: ... + CONCAT_FIELD_NUMBER: _ClassVar[int] + COPY_RANGE_FIELD_NUMBER: _ClassVar[int] + DELETE_RANGE_FIELD_NUMBER: _ClassVar[int] + RENAME_FIELD_NUMBER: _ClassVar[int] + WRITE_FIELD_NUMBER: _ClassVar[int] + concat: ExecuteTransactionRequest.Command.Concat + copy_range: ExecuteTransactionRequest.Command.CopyRange + delete_range: ExecuteTransactionRequest.Command.DeleteRange + rename: ExecuteTransactionRequest.Command.Rename + write: ExecuteTransactionRequest.Command.Write + def __init__(self, delete_range: _Optional[_Union[ExecuteTransactionRequest.Command.DeleteRange, _Mapping]] = ..., rename: _Optional[_Union[ExecuteTransactionRequest.Command.Rename, _Mapping]] = ..., copy_range: _Optional[_Union[ExecuteTransactionRequest.Command.CopyRange, _Mapping]] = ..., concat: _Optional[_Union[ExecuteTransactionRequest.Command.Concat, _Mapping]] = ..., write: _Optional[_Union[ExecuteTransactionRequest.Command.Write, _Mapping]] = ...) -> None: ... + COMMANDS_FIELD_NUMBER: _ClassVar[int] + LOCK_GENERATION_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + commands: _containers.RepeatedCompositeFieldContainer[ExecuteTransactionRequest.Command] + lock_generation: int + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., lock_generation: _Optional[int] = ..., commands: _Optional[_Iterable[_Union[ExecuteTransactionRequest.Command, _Mapping]]] = ...) -> None: ... + +class ExecuteTransactionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ExecuteTransactionResult(_message.Message): + __slots__ = ["node_id", "storage_channel_info"] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + STORAGE_CHANNEL_INFO_FIELD_NUMBER: _ClassVar[int] + node_id: int + storage_channel_info: _containers.RepeatedCompositeFieldContainer[StorageChannelInfo] + def __init__(self, storage_channel_info: _Optional[_Iterable[_Union[StorageChannelInfo, _Mapping]]] = ..., node_id: _Optional[int] = ...) -> None: ... + +class GetStorageChannelStatusRequest(_message.Message): + __slots__ = ["lock_generation", "operation_params", "partition_id", "path", "storage_channel"] + LOCK_GENERATION_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + STORAGE_CHANNEL_FIELD_NUMBER: _ClassVar[int] + lock_generation: int + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + storage_channel: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., lock_generation: _Optional[int] = ..., storage_channel: _Optional[_Iterable[int]] = ...) -> None: ... + +class GetStorageChannelStatusResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class GetStorageChannelStatusResult(_message.Message): + __slots__ = ["node_id", "storage_channel_info"] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + STORAGE_CHANNEL_INFO_FIELD_NUMBER: _ClassVar[int] + node_id: int + storage_channel_info: _containers.RepeatedCompositeFieldContainer[StorageChannelInfo] + def __init__(self, storage_channel_info: _Optional[_Iterable[_Union[StorageChannelInfo, _Mapping]]] = ..., node_id: _Optional[int] = ...) -> None: ... + +class KeyRange(_message.Message): + __slots__ = ["from_key_exclusive", "from_key_inclusive", "to_key_exclusive", "to_key_inclusive"] + FROM_KEY_EXCLUSIVE_FIELD_NUMBER: _ClassVar[int] + FROM_KEY_INCLUSIVE_FIELD_NUMBER: _ClassVar[int] + TO_KEY_EXCLUSIVE_FIELD_NUMBER: _ClassVar[int] + TO_KEY_INCLUSIVE_FIELD_NUMBER: _ClassVar[int] + from_key_exclusive: str + from_key_inclusive: str + to_key_exclusive: str + to_key_inclusive: str + def __init__(self, from_key_inclusive: _Optional[str] = ..., from_key_exclusive: _Optional[str] = ..., to_key_inclusive: _Optional[str] = ..., to_key_exclusive: _Optional[str] = ...) -> None: ... + +class ListLocalPartitionsRequest(_message.Message): + __slots__ = ["node_id", "operation_params", "path"] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + node_id: int + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., node_id: _Optional[int] = ...) -> None: ... + +class ListLocalPartitionsResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListLocalPartitionsResult(_message.Message): + __slots__ = ["node_id", "partition_ids", "path"] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + node_id: int + partition_ids: _containers.RepeatedScalarFieldContainer[int] + path: str + def __init__(self, path: _Optional[str] = ..., node_id: _Optional[int] = ..., partition_ids: _Optional[_Iterable[int]] = ...) -> None: ... + +class ListRangeRequest(_message.Message): + __slots__ = ["limit_bytes", "lock_generation", "operation_params", "partition_id", "path", "range"] + LIMIT_BYTES_FIELD_NUMBER: _ClassVar[int] + LOCK_GENERATION_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + RANGE_FIELD_NUMBER: _ClassVar[int] + limit_bytes: int + lock_generation: int + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + range: KeyRange + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., lock_generation: _Optional[int] = ..., range: _Optional[_Union[KeyRange, _Mapping]] = ..., limit_bytes: _Optional[int] = ...) -> None: ... + +class ListRangeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListRangeResult(_message.Message): + __slots__ = ["is_overrun", "key", "node_id"] + class KeyInfo(_message.Message): + __slots__ = ["creation_unix_time", "key", "storage_channel", "value_size"] + CREATION_UNIX_TIME_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + STORAGE_CHANNEL_FIELD_NUMBER: _ClassVar[int] + VALUE_SIZE_FIELD_NUMBER: _ClassVar[int] + creation_unix_time: int + key: str + storage_channel: int + value_size: int + def __init__(self, key: _Optional[str] = ..., value_size: _Optional[int] = ..., creation_unix_time: _Optional[int] = ..., storage_channel: _Optional[int] = ...) -> None: ... + IS_OVERRUN_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + is_overrun: bool + key: _containers.RepeatedCompositeFieldContainer[ListRangeResult.KeyInfo] + node_id: int + def __init__(self, key: _Optional[_Iterable[_Union[ListRangeResult.KeyInfo, _Mapping]]] = ..., is_overrun: bool = ..., node_id: _Optional[int] = ...) -> None: ... + +class Priorities(_message.Message): + __slots__ = [] + class Priority(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + PRIORITY_BACKGROUND: Priorities.Priority + PRIORITY_REALTIME: Priorities.Priority + PRIORITY_UNSPECIFIED: Priorities.Priority + def __init__(self) -> None: ... + +class ReadRangeRequest(_message.Message): + __slots__ = ["limit_bytes", "lock_generation", "operation_params", "partition_id", "path", "priority", "range"] + LIMIT_BYTES_FIELD_NUMBER: _ClassVar[int] + LOCK_GENERATION_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + PRIORITY_FIELD_NUMBER: _ClassVar[int] + RANGE_FIELD_NUMBER: _ClassVar[int] + limit_bytes: int + lock_generation: int + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + priority: Priorities.Priority + range: KeyRange + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., lock_generation: _Optional[int] = ..., range: _Optional[_Union[KeyRange, _Mapping]] = ..., limit_bytes: _Optional[int] = ..., priority: _Optional[_Union[Priorities.Priority, str]] = ...) -> None: ... + +class ReadRangeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ReadRangeResult(_message.Message): + __slots__ = ["is_overrun", "node_id", "pair"] + class KeyValuePair(_message.Message): + __slots__ = ["creation_unix_time", "key", "storage_channel", "value"] + CREATION_UNIX_TIME_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + STORAGE_CHANNEL_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + creation_unix_time: int + key: str + storage_channel: int + value: bytes + def __init__(self, key: _Optional[str] = ..., value: _Optional[bytes] = ..., creation_unix_time: _Optional[int] = ..., storage_channel: _Optional[int] = ...) -> None: ... + IS_OVERRUN_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + PAIR_FIELD_NUMBER: _ClassVar[int] + is_overrun: bool + node_id: int + pair: _containers.RepeatedCompositeFieldContainer[ReadRangeResult.KeyValuePair] + def __init__(self, pair: _Optional[_Iterable[_Union[ReadRangeResult.KeyValuePair, _Mapping]]] = ..., is_overrun: bool = ..., node_id: _Optional[int] = ...) -> None: ... + +class ReadRequest(_message.Message): + __slots__ = ["key", "limit_bytes", "lock_generation", "offset", "operation_params", "partition_id", "path", "priority", "size"] + KEY_FIELD_NUMBER: _ClassVar[int] + LIMIT_BYTES_FIELD_NUMBER: _ClassVar[int] + LOCK_GENERATION_FIELD_NUMBER: _ClassVar[int] + OFFSET_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + PRIORITY_FIELD_NUMBER: _ClassVar[int] + SIZE_FIELD_NUMBER: _ClassVar[int] + key: str + limit_bytes: int + lock_generation: int + offset: int + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + priority: Priorities.Priority + size: int + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., lock_generation: _Optional[int] = ..., key: _Optional[str] = ..., offset: _Optional[int] = ..., size: _Optional[int] = ..., limit_bytes: _Optional[int] = ..., priority: _Optional[_Union[Priorities.Priority, str]] = ...) -> None: ... + +class ReadResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ReadResult(_message.Message): + __slots__ = ["is_overrun", "node_id", "requested_key", "requested_offset", "requested_size", "value"] + IS_OVERRUN_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + REQUESTED_KEY_FIELD_NUMBER: _ClassVar[int] + REQUESTED_OFFSET_FIELD_NUMBER: _ClassVar[int] + REQUESTED_SIZE_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + is_overrun: bool + node_id: int + requested_key: str + requested_offset: int + requested_size: int + value: bytes + def __init__(self, requested_key: _Optional[str] = ..., requested_offset: _Optional[int] = ..., requested_size: _Optional[int] = ..., value: _Optional[bytes] = ..., is_overrun: bool = ..., node_id: _Optional[int] = ...) -> None: ... + +class StorageChannelInfo(_message.Message): + __slots__ = ["status_flag", "storage_channel"] + class StatusFlag(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + STATUS_FLAG_FIELD_NUMBER: _ClassVar[int] + STATUS_FLAG_GREEN: StorageChannelInfo.StatusFlag + STATUS_FLAG_ORANGE_OUT_SPACE: StorageChannelInfo.StatusFlag + STATUS_FLAG_UNSPECIFIED: StorageChannelInfo.StatusFlag + STATUS_FLAG_YELLOW_STOP: StorageChannelInfo.StatusFlag + STORAGE_CHANNEL_FIELD_NUMBER: _ClassVar[int] + status_flag: StorageChannelInfo.StatusFlag + storage_channel: int + def __init__(self, storage_channel: _Optional[int] = ..., status_flag: _Optional[_Union[StorageChannelInfo.StatusFlag, str]] = ...) -> None: ... + +class StorageConfig(_message.Message): + __slots__ = ["channel"] + class ChannelConfig(_message.Message): + __slots__ = ["media"] + MEDIA_FIELD_NUMBER: _ClassVar[int] + media: str + def __init__(self, media: _Optional[str] = ...) -> None: ... + CHANNEL_FIELD_NUMBER: _ClassVar[int] + channel: _containers.RepeatedCompositeFieldContainer[StorageConfig.ChannelConfig] + def __init__(self, channel: _Optional[_Iterable[_Union[StorageConfig.ChannelConfig, _Mapping]]] = ...) -> None: ... diff --git a/ydb/_grpc/v4/draft/protos/ydb_keyvalue_pb2_grpc.py b/ydb/_grpc/v4/draft/protos/ydb_keyvalue_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v4/draft/protos/ydb_keyvalue_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.py b/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.py index 664a2b61..8648ef8c 100644 --- a/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.py +++ b/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.py @@ -20,7 +20,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"draft/protos/ydb_maintenance.proto\x12\x0fYdb.Maintenance\x1a#protos/annotations/validation.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1aprotos/ydb_discovery.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaf\x02\n\x04Node\x12\x0f\n\x07node_id\x18\x01 \x01(\r\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\r\x12-\n\x08location\x18\x04 \x01(\x0b\x32\x1b.Ydb.Discovery.NodeLocation\x12)\n\x05state\x18\x05 \x01(\x0e\x32\x1a.Ydb.Maintenance.ItemState\x12\x34\n\x07storage\x18\x06 \x01(\x0b\x32!.Ydb.Maintenance.Node.StorageNodeH\x00\x12\x34\n\x07\x64ynamic\x18\x07 \x01(\x0b\x32!.Ydb.Maintenance.Node.DynamicNodeH\x00\x1a\r\n\x0bStorageNode\x1a\x1d\n\x0b\x44ynamicNode\x12\x0e\n\x06tenant\x18\x01 \x01(\tB\x06\n\x04type\"T\n\x17ListClusterNodesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\">\n\x16ListClusterNodesResult\x12$\n\x05nodes\x18\x01 \x03(\x0b\x32\x15.Ydb.Maintenance.Node\"H\n\x18ListClusterNodesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa0\x01\n\x16MaintenanceTaskOptions\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1c\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12<\n\x11\x61vailability_mode\x18\x03 \x01(\x0e\x32!.Ydb.Maintenance.AvailabilityMode\x12\x0f\n\x07\x64ry_run\x18\x04 \x01(\x08\"B\n\x0b\x41\x63tionScope\x12\x11\n\x07node_id\x18\x01 \x01(\rH\x00\x12\x17\n\x04host\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xff\x01H\x00\x42\x07\n\x05scope\"f\n\nLockAction\x12+\n\x05scope\x18\x01 \x01(\x0b\x32\x1c.Ydb.Maintenance.ActionScope\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"F\n\x06\x41\x63tion\x12\x32\n\x0block_action\x18\x01 \x01(\x0b\x32\x1b.Ydb.Maintenance.LockActionH\x00\x42\x08\n\x06\x61\x63tion\"?\n\x0b\x41\x63tionGroup\x12\x30\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x17.Ydb.Maintenance.ActionB\x06\x9a\xe6*\x02(\x01\"\xd5\x01\n\x1c\x43reateMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12=\n\x0ctask_options\x18\x02 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12;\n\raction_groups\x18\x03 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionGroupB\x06\x9a\xe6*\x02(\x01\"u\n\x1dRefreshMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"]\n\tActionUid\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x08group_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1a\n\taction_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\xdc\x05\n\x0b\x41\x63tionState\x12\'\n\x06\x61\x63tion\x18\x01 \x01(\x0b\x32\x17.Ydb.Maintenance.Action\x12.\n\naction_uid\x18\x02 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12\x39\n\x06status\x18\x03 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionStatus\x12\x39\n\x06reason\x18\x04 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionReason\x12,\n\x08\x64\x65\x61\x64line\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x0c\x41\x63tionStatus\x12\x1d\n\x19\x41\x43TION_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41\x43TION_STATUS_PENDING\x10\x01\x12\x1b\n\x17\x41\x43TION_STATUS_PERFORMED\x10\x02\"\xe8\x02\n\x0c\x41\x63tionReason\x12\x1d\n\x19\x41\x43TION_REASON_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41\x43TION_REASON_OK\x10\x01\x12-\n)ACTION_REASON_TOO_MANY_UNAVAILABLE_VDISKS\x10\x02\x12:\n6ACTION_REASON_TOO_MANY_UNAVAILABLE_STATE_STORAGE_RINGS\x10\x03\x12.\n*ACTION_REASON_DISABLED_NODES_LIMIT_REACHED\x10\x04\x12\x35\n1ACTION_REASON_TENANT_DISABLED_NODES_LIMIT_REACHED\x10\x05\x12\x1f\n\x1b\x41\x43TION_REASON_WRONG_REQUEST\x10\x06\x12\x30\n,ACTION_REASON_SYS_TABLETS_NODE_LIMIT_REACHED\x10\x07\"H\n\x11\x41\x63tionGroupStates\x12\x33\n\raction_states\x18\x01 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionState\"\xb0\x01\n\x15MaintenanceTaskResult\x12\x10\n\x08task_uid\x18\x01 \x01(\t\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\x12\x34\n\x0bretry_after\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x42\x0e\n\x0c_retry_after\"G\n\x17MaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"q\n\x19GetMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\x9a\x01\n\x18GetMaintenanceTaskResult\x12=\n\x0ctask_options\x18\x01 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\"J\n\x1aGetMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"t\n\x1bListMaintenanceTasksRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x11\n\x04user\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_user\"0\n\x1aListMaintenanceTasksResult\x12\x12\n\ntasks_uids\x18\x01 \x03(\t\"L\n\x1cListMaintenanceTasksResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"r\n\x1a\x44ropMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"M\n\x1dManageMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x8b\x01\n\x15\x43ompleteActionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x37\n\x0b\x61\x63tion_uids\x18\x02 \x03(\x0b\x32\x1a.Ydb.Maintenance.ActionUidB\x06\x9a\xe6*\x02(\x01\"\xbe\x01\n\x12ManageActionResult\x12\x43\n\x0f\x61\x63tion_statuses\x18\x01 \x03(\x0b\x32*.Ydb.Maintenance.ManageActionResult.Status\x1a\x63\n\x06Status\x12.\n\naction_uid\x18\x01 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\"D\n\x14ManageActionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation*k\n\tItemState\x12\x1a\n\x16ITEM_STATE_UNSPECIFIED\x10\x00\x12\x11\n\rITEM_STATE_UP\x10\x01\x12\x1a\n\x16ITEM_STATE_MAINTENANCE\x10\x02\x12\x13\n\x0fITEM_STATE_DOWN\x10\x03*\x8c\x01\n\x10\x41vailabilityMode\x12!\n\x1d\x41VAILABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41VAILABILITY_MODE_STRONG\x10\x01\x12\x1a\n\x16\x41VAILABILITY_MODE_WEAK\x10\x02\x12\x1b\n\x17\x41VAILABILITY_MODE_FORCE\x10\x03\x42n\n#tech.ydb.proto.draft.maintenance.v1ZDgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_Maintenance\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"draft/protos/ydb_maintenance.proto\x12\x0fYdb.Maintenance\x1a#protos/annotations/validation.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1aprotos/ydb_discovery.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf0\x02\n\x04Node\x12\x0f\n\x07node_id\x18\x01 \x01(\r\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\r\x12-\n\x08location\x18\x04 \x01(\x0b\x32\x1b.Ydb.Discovery.NodeLocation\x12)\n\x05state\x18\x05 \x01(\x0e\x32\x1a.Ydb.Maintenance.ItemState\x12\x34\n\x07storage\x18\x06 \x01(\x0b\x32!.Ydb.Maintenance.Node.StorageNodeH\x00\x12\x34\n\x07\x64ynamic\x18\x07 \x01(\x0b\x32!.Ydb.Maintenance.Node.DynamicNodeH\x00\x12.\n\nstart_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\t \x01(\t\x1a\r\n\x0bStorageNode\x1a\x1d\n\x0b\x44ynamicNode\x12\x0e\n\x06tenant\x18\x01 \x01(\tB\x06\n\x04type\"T\n\x17ListClusterNodesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\">\n\x16ListClusterNodesResult\x12$\n\x05nodes\x18\x01 \x03(\x0b\x32\x15.Ydb.Maintenance.Node\"H\n\x18ListClusterNodesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa0\x01\n\x16MaintenanceTaskOptions\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1c\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12<\n\x11\x61vailability_mode\x18\x03 \x01(\x0e\x32!.Ydb.Maintenance.AvailabilityMode\x12\x0f\n\x07\x64ry_run\x18\x04 \x01(\x08\"B\n\x0b\x41\x63tionScope\x12\x11\n\x07node_id\x18\x01 \x01(\rH\x00\x12\x17\n\x04host\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xff\x01H\x00\x42\x07\n\x05scope\"f\n\nLockAction\x12+\n\x05scope\x18\x01 \x01(\x0b\x32\x1c.Ydb.Maintenance.ActionScope\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"F\n\x06\x41\x63tion\x12\x32\n\x0block_action\x18\x01 \x01(\x0b\x32\x1b.Ydb.Maintenance.LockActionH\x00\x42\x08\n\x06\x61\x63tion\"?\n\x0b\x41\x63tionGroup\x12\x30\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x17.Ydb.Maintenance.ActionB\x06\x9a\xe6*\x02(\x01\"\xd5\x01\n\x1c\x43reateMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12=\n\x0ctask_options\x18\x02 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12;\n\raction_groups\x18\x03 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionGroupB\x06\x9a\xe6*\x02(\x01\"u\n\x1dRefreshMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"]\n\tActionUid\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x08group_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1a\n\taction_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\xdc\x05\n\x0b\x41\x63tionState\x12\'\n\x06\x61\x63tion\x18\x01 \x01(\x0b\x32\x17.Ydb.Maintenance.Action\x12.\n\naction_uid\x18\x02 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12\x39\n\x06status\x18\x03 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionStatus\x12\x39\n\x06reason\x18\x04 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionReason\x12,\n\x08\x64\x65\x61\x64line\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x0c\x41\x63tionStatus\x12\x1d\n\x19\x41\x43TION_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41\x43TION_STATUS_PENDING\x10\x01\x12\x1b\n\x17\x41\x43TION_STATUS_PERFORMED\x10\x02\"\xe8\x02\n\x0c\x41\x63tionReason\x12\x1d\n\x19\x41\x43TION_REASON_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41\x43TION_REASON_OK\x10\x01\x12-\n)ACTION_REASON_TOO_MANY_UNAVAILABLE_VDISKS\x10\x02\x12:\n6ACTION_REASON_TOO_MANY_UNAVAILABLE_STATE_STORAGE_RINGS\x10\x03\x12.\n*ACTION_REASON_DISABLED_NODES_LIMIT_REACHED\x10\x04\x12\x35\n1ACTION_REASON_TENANT_DISABLED_NODES_LIMIT_REACHED\x10\x05\x12\x1f\n\x1b\x41\x43TION_REASON_WRONG_REQUEST\x10\x06\x12\x30\n,ACTION_REASON_SYS_TABLETS_NODE_LIMIT_REACHED\x10\x07\"H\n\x11\x41\x63tionGroupStates\x12\x33\n\raction_states\x18\x01 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionState\"\xb0\x01\n\x15MaintenanceTaskResult\x12\x10\n\x08task_uid\x18\x01 \x01(\t\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\x12\x34\n\x0bretry_after\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x42\x0e\n\x0c_retry_after\"G\n\x17MaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"q\n\x19GetMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\x9a\x01\n\x18GetMaintenanceTaskResult\x12=\n\x0ctask_options\x18\x01 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\"J\n\x1aGetMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"t\n\x1bListMaintenanceTasksRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x11\n\x04user\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_user\"0\n\x1aListMaintenanceTasksResult\x12\x12\n\ntasks_uids\x18\x01 \x03(\t\"L\n\x1cListMaintenanceTasksResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"r\n\x1a\x44ropMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"M\n\x1dManageMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x8b\x01\n\x15\x43ompleteActionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x37\n\x0b\x61\x63tion_uids\x18\x02 \x03(\x0b\x32\x1a.Ydb.Maintenance.ActionUidB\x06\x9a\xe6*\x02(\x01\"\xbe\x01\n\x12ManageActionResult\x12\x43\n\x0f\x61\x63tion_statuses\x18\x01 \x03(\x0b\x32*.Ydb.Maintenance.ManageActionResult.Status\x1a\x63\n\x06Status\x12.\n\naction_uid\x18\x01 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\"D\n\x14ManageActionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation*k\n\tItemState\x12\x1a\n\x16ITEM_STATE_UNSPECIFIED\x10\x00\x12\x11\n\rITEM_STATE_UP\x10\x01\x12\x1a\n\x16ITEM_STATE_MAINTENANCE\x10\x02\x12\x13\n\x0fITEM_STATE_DOWN\x10\x03*\x8c\x01\n\x10\x41vailabilityMode\x12!\n\x1d\x41VAILABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41VAILABILITY_MODE_STRONG\x10\x01\x12\x1a\n\x16\x41VAILABILITY_MODE_WEAK\x10\x02\x12\x1b\n\x17\x41VAILABILITY_MODE_FORCE\x10\x03\x42n\n#tech.ydb.proto.draft.maintenance.v1ZDgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_Maintenance\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.protos.ydb_maintenance_pb2', globals()) @@ -52,72 +52,72 @@ _DROPMAINTENANCETASKREQUEST.fields_by_name['task_uid']._serialized_options = b'\242\346*\003\030\200\001' _COMPLETEACTIONREQUEST.fields_by_name['action_uids']._options = None _COMPLETEACTIONREQUEST.fields_by_name['action_uids']._serialized_options = b'\232\346*\002(\001' - _ITEMSTATE._serialized_start=3931 - _ITEMSTATE._serialized_end=4038 - _AVAILABILITYMODE._serialized_start=4041 - _AVAILABILITYMODE._serialized_end=4181 + _ITEMSTATE._serialized_start=3996 + _ITEMSTATE._serialized_end=4103 + _AVAILABILITYMODE._serialized_start=4106 + _AVAILABILITYMODE._serialized_end=4246 _NODE._serialized_start=245 - _NODE._serialized_end=548 - _NODE_STORAGENODE._serialized_start=496 - _NODE_STORAGENODE._serialized_end=509 - _NODE_DYNAMICNODE._serialized_start=511 - _NODE_DYNAMICNODE._serialized_end=540 - _LISTCLUSTERNODESREQUEST._serialized_start=550 - _LISTCLUSTERNODESREQUEST._serialized_end=634 - _LISTCLUSTERNODESRESULT._serialized_start=636 - _LISTCLUSTERNODESRESULT._serialized_end=698 - _LISTCLUSTERNODESRESPONSE._serialized_start=700 - _LISTCLUSTERNODESRESPONSE._serialized_end=772 - _MAINTENANCETASKOPTIONS._serialized_start=775 - _MAINTENANCETASKOPTIONS._serialized_end=935 - _ACTIONSCOPE._serialized_start=937 - _ACTIONSCOPE._serialized_end=1003 - _LOCKACTION._serialized_start=1005 - _LOCKACTION._serialized_end=1107 - _ACTION._serialized_start=1109 - _ACTION._serialized_end=1179 - _ACTIONGROUP._serialized_start=1181 - _ACTIONGROUP._serialized_end=1244 - _CREATEMAINTENANCETASKREQUEST._serialized_start=1247 - _CREATEMAINTENANCETASKREQUEST._serialized_end=1460 - _REFRESHMAINTENANCETASKREQUEST._serialized_start=1462 - _REFRESHMAINTENANCETASKREQUEST._serialized_end=1579 - _ACTIONUID._serialized_start=1581 - _ACTIONUID._serialized_end=1674 - _ACTIONSTATE._serialized_start=1677 - _ACTIONSTATE._serialized_end=2409 - _ACTIONSTATE_ACTIONSTATUS._serialized_start=1945 - _ACTIONSTATE_ACTIONSTATUS._serialized_end=2046 - _ACTIONSTATE_ACTIONREASON._serialized_start=2049 - _ACTIONSTATE_ACTIONREASON._serialized_end=2409 - _ACTIONGROUPSTATES._serialized_start=2411 - _ACTIONGROUPSTATES._serialized_end=2483 - _MAINTENANCETASKRESULT._serialized_start=2486 - _MAINTENANCETASKRESULT._serialized_end=2662 - _MAINTENANCETASKRESPONSE._serialized_start=2664 - _MAINTENANCETASKRESPONSE._serialized_end=2735 - _GETMAINTENANCETASKREQUEST._serialized_start=2737 - _GETMAINTENANCETASKREQUEST._serialized_end=2850 - _GETMAINTENANCETASKRESULT._serialized_start=2853 - _GETMAINTENANCETASKRESULT._serialized_end=3007 - _GETMAINTENANCETASKRESPONSE._serialized_start=3009 - _GETMAINTENANCETASKRESPONSE._serialized_end=3083 - _LISTMAINTENANCETASKSREQUEST._serialized_start=3085 - _LISTMAINTENANCETASKSREQUEST._serialized_end=3201 - _LISTMAINTENANCETASKSRESULT._serialized_start=3203 - _LISTMAINTENANCETASKSRESULT._serialized_end=3251 - _LISTMAINTENANCETASKSRESPONSE._serialized_start=3253 - _LISTMAINTENANCETASKSRESPONSE._serialized_end=3329 - _DROPMAINTENANCETASKREQUEST._serialized_start=3331 - _DROPMAINTENANCETASKREQUEST._serialized_end=3445 - _MANAGEMAINTENANCETASKRESPONSE._serialized_start=3447 - _MANAGEMAINTENANCETASKRESPONSE._serialized_end=3524 - _COMPLETEACTIONREQUEST._serialized_start=3527 - _COMPLETEACTIONREQUEST._serialized_end=3666 - _MANAGEACTIONRESULT._serialized_start=3669 - _MANAGEACTIONRESULT._serialized_end=3859 - _MANAGEACTIONRESULT_STATUS._serialized_start=3760 - _MANAGEACTIONRESULT_STATUS._serialized_end=3859 - _MANAGEACTIONRESPONSE._serialized_start=3861 - _MANAGEACTIONRESPONSE._serialized_end=3929 + _NODE._serialized_end=613 + _NODE_STORAGENODE._serialized_start=561 + _NODE_STORAGENODE._serialized_end=574 + _NODE_DYNAMICNODE._serialized_start=576 + _NODE_DYNAMICNODE._serialized_end=605 + _LISTCLUSTERNODESREQUEST._serialized_start=615 + _LISTCLUSTERNODESREQUEST._serialized_end=699 + _LISTCLUSTERNODESRESULT._serialized_start=701 + _LISTCLUSTERNODESRESULT._serialized_end=763 + _LISTCLUSTERNODESRESPONSE._serialized_start=765 + _LISTCLUSTERNODESRESPONSE._serialized_end=837 + _MAINTENANCETASKOPTIONS._serialized_start=840 + _MAINTENANCETASKOPTIONS._serialized_end=1000 + _ACTIONSCOPE._serialized_start=1002 + _ACTIONSCOPE._serialized_end=1068 + _LOCKACTION._serialized_start=1070 + _LOCKACTION._serialized_end=1172 + _ACTION._serialized_start=1174 + _ACTION._serialized_end=1244 + _ACTIONGROUP._serialized_start=1246 + _ACTIONGROUP._serialized_end=1309 + _CREATEMAINTENANCETASKREQUEST._serialized_start=1312 + _CREATEMAINTENANCETASKREQUEST._serialized_end=1525 + _REFRESHMAINTENANCETASKREQUEST._serialized_start=1527 + _REFRESHMAINTENANCETASKREQUEST._serialized_end=1644 + _ACTIONUID._serialized_start=1646 + _ACTIONUID._serialized_end=1739 + _ACTIONSTATE._serialized_start=1742 + _ACTIONSTATE._serialized_end=2474 + _ACTIONSTATE_ACTIONSTATUS._serialized_start=2010 + _ACTIONSTATE_ACTIONSTATUS._serialized_end=2111 + _ACTIONSTATE_ACTIONREASON._serialized_start=2114 + _ACTIONSTATE_ACTIONREASON._serialized_end=2474 + _ACTIONGROUPSTATES._serialized_start=2476 + _ACTIONGROUPSTATES._serialized_end=2548 + _MAINTENANCETASKRESULT._serialized_start=2551 + _MAINTENANCETASKRESULT._serialized_end=2727 + _MAINTENANCETASKRESPONSE._serialized_start=2729 + _MAINTENANCETASKRESPONSE._serialized_end=2800 + _GETMAINTENANCETASKREQUEST._serialized_start=2802 + _GETMAINTENANCETASKREQUEST._serialized_end=2915 + _GETMAINTENANCETASKRESULT._serialized_start=2918 + _GETMAINTENANCETASKRESULT._serialized_end=3072 + _GETMAINTENANCETASKRESPONSE._serialized_start=3074 + _GETMAINTENANCETASKRESPONSE._serialized_end=3148 + _LISTMAINTENANCETASKSREQUEST._serialized_start=3150 + _LISTMAINTENANCETASKSREQUEST._serialized_end=3266 + _LISTMAINTENANCETASKSRESULT._serialized_start=3268 + _LISTMAINTENANCETASKSRESULT._serialized_end=3316 + _LISTMAINTENANCETASKSRESPONSE._serialized_start=3318 + _LISTMAINTENANCETASKSRESPONSE._serialized_end=3394 + _DROPMAINTENANCETASKREQUEST._serialized_start=3396 + _DROPMAINTENANCETASKREQUEST._serialized_end=3510 + _MANAGEMAINTENANCETASKRESPONSE._serialized_start=3512 + _MANAGEMAINTENANCETASKRESPONSE._serialized_end=3589 + _COMPLETEACTIONREQUEST._serialized_start=3592 + _COMPLETEACTIONREQUEST._serialized_end=3731 + _MANAGEACTIONRESULT._serialized_start=3734 + _MANAGEACTIONRESULT._serialized_end=3924 + _MANAGEACTIONRESULT_STATUS._serialized_start=3825 + _MANAGEACTIONRESULT_STATUS._serialized_end=3924 + _MANAGEACTIONRESPONSE._serialized_start=3926 + _MANAGEACTIONRESPONSE._serialized_end=3994 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.pyi b/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.pyi index e8f3bed5..45445843 100644 --- a/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.pyi +++ b/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.pyi @@ -233,7 +233,7 @@ class ManageMaintenanceTaskResponse(_message.Message): def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... class Node(_message.Message): - __slots__ = ["dynamic", "host", "location", "node_id", "port", "state", "storage"] + __slots__ = ["dynamic", "host", "location", "node_id", "port", "start_time", "state", "storage", "version"] class DynamicNode(_message.Message): __slots__ = ["tenant"] TENANT_FIELD_NUMBER: _ClassVar[int] @@ -247,16 +247,20 @@ class Node(_message.Message): LOCATION_FIELD_NUMBER: _ClassVar[int] NODE_ID_FIELD_NUMBER: _ClassVar[int] PORT_FIELD_NUMBER: _ClassVar[int] + START_TIME_FIELD_NUMBER: _ClassVar[int] STATE_FIELD_NUMBER: _ClassVar[int] STORAGE_FIELD_NUMBER: _ClassVar[int] + VERSION_FIELD_NUMBER: _ClassVar[int] dynamic: Node.DynamicNode host: str location: _ydb_discovery_pb2.NodeLocation node_id: int port: int + start_time: _timestamp_pb2.Timestamp state: ItemState storage: Node.StorageNode - def __init__(self, node_id: _Optional[int] = ..., host: _Optional[str] = ..., port: _Optional[int] = ..., location: _Optional[_Union[_ydb_discovery_pb2.NodeLocation, _Mapping]] = ..., state: _Optional[_Union[ItemState, str]] = ..., storage: _Optional[_Union[Node.StorageNode, _Mapping]] = ..., dynamic: _Optional[_Union[Node.DynamicNode, _Mapping]] = ...) -> None: ... + version: str + def __init__(self, node_id: _Optional[int] = ..., host: _Optional[str] = ..., port: _Optional[int] = ..., location: _Optional[_Union[_ydb_discovery_pb2.NodeLocation, _Mapping]] = ..., state: _Optional[_Union[ItemState, str]] = ..., storage: _Optional[_Union[Node.StorageNode, _Mapping]] = ..., dynamic: _Optional[_Union[Node.DynamicNode, _Mapping]] = ..., start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., version: _Optional[str] = ...) -> None: ... class RefreshMaintenanceTaskRequest(_message.Message): __slots__ = ["operation_params", "task_uid"] diff --git a/ydb/_grpc/v4/draft/protos/ydb_object_storage_pb2.py b/ydb/_grpc/v4/draft/protos/ydb_object_storage_pb2.py new file mode 100644 index 00000000..cea77193 --- /dev/null +++ b/ydb/_grpc/v4/draft/protos/ydb_object_storage_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/protos/ydb_object_storage.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v4.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 +from ydb._grpc.v4.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 +from ydb._grpc.v4.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%draft/protos/ydb_object_storage.proto\x12\x11Ydb.ObjectStorage\x1a\x1eprotos/ydb_issue_message.proto\x1a\x16protos/ydb_value.proto\x1a\x1dprotos/ydb_status_codes.proto\"\xd6\x02\n\x0eListingRequest\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12#\n\nkey_prefix\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x1a\n\x12path_column_prefix\x18\x03 \x01(\t\x12\x1d\n\x15path_column_delimiter\x18\x04 \x01(\t\x12\x1a\n\x12\x63ontinuation_token\x18\x05 \x01(\x0c\x12/\n\x16start_after_key_suffix\x18\x06 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x10\n\x08max_keys\x18\x07 \x01(\x05\x12\x19\n\x11\x63olumns_to_return\x18\x08 \x03(\t\x12(\n\x0fmatching_filter\x18\n \x01(\x0b\x32\x0f.Ydb.TypedValue\"&\n\nEMatchType\x12\t\n\x05\x45QUAL\x10\x00\x12\r\n\tNOT_EQUAL\x10\x01J\x04\x08\t\x10\n\"\xd7\x01\n\x0fListingResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x17\n\x0f\x63ommon_prefixes\x18\x03 \x03(\t\x12 \n\x08\x63ontents\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12\x14\n\x0cis_truncated\x18\x05 \x01(\x08\x12\x1f\n\x17next_continuation_token\x18\x06 \x01(\x0c\x42p\n#tech.ydb.proto.draft.object_storageZFgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_ObjectStorage\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.protos.ydb_object_storage_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n#tech.ydb.proto.draft.object_storageZFgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_ObjectStorage\370\001\001' + _LISTINGREQUEST._serialized_start=148 + _LISTINGREQUEST._serialized_end=490 + _LISTINGREQUEST_EMATCHTYPE._serialized_start=446 + _LISTINGREQUEST_EMATCHTYPE._serialized_end=484 + _LISTINGRESPONSE._serialized_start=493 + _LISTINGRESPONSE._serialized_end=708 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/draft/protos/ydb_object_storage_pb2.pyi b/ydb/_grpc/v4/draft/protos/ydb_object_storage_pb2.pyi new file mode 100644 index 00000000..3fabda60 --- /dev/null +++ b/ydb/_grpc/v4/draft/protos/ydb_object_storage_pb2.pyi @@ -0,0 +1,52 @@ +from protos import ydb_issue_message_pb2 as _ydb_issue_message_pb2 +from protos import ydb_value_pb2 as _ydb_value_pb2 +from protos import ydb_status_codes_pb2 as _ydb_status_codes_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ListingRequest(_message.Message): + __slots__ = ["columns_to_return", "continuation_token", "key_prefix", "matching_filter", "max_keys", "path_column_delimiter", "path_column_prefix", "start_after_key_suffix", "table_name"] + class EMatchType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + COLUMNS_TO_RETURN_FIELD_NUMBER: _ClassVar[int] + CONTINUATION_TOKEN_FIELD_NUMBER: _ClassVar[int] + EQUAL: ListingRequest.EMatchType + KEY_PREFIX_FIELD_NUMBER: _ClassVar[int] + MATCHING_FILTER_FIELD_NUMBER: _ClassVar[int] + MAX_KEYS_FIELD_NUMBER: _ClassVar[int] + NOT_EQUAL: ListingRequest.EMatchType + PATH_COLUMN_DELIMITER_FIELD_NUMBER: _ClassVar[int] + PATH_COLUMN_PREFIX_FIELD_NUMBER: _ClassVar[int] + START_AFTER_KEY_SUFFIX_FIELD_NUMBER: _ClassVar[int] + TABLE_NAME_FIELD_NUMBER: _ClassVar[int] + columns_to_return: _containers.RepeatedScalarFieldContainer[str] + continuation_token: bytes + key_prefix: _ydb_value_pb2.TypedValue + matching_filter: _ydb_value_pb2.TypedValue + max_keys: int + path_column_delimiter: str + path_column_prefix: str + start_after_key_suffix: _ydb_value_pb2.TypedValue + table_name: str + def __init__(self, table_name: _Optional[str] = ..., key_prefix: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ..., path_column_prefix: _Optional[str] = ..., path_column_delimiter: _Optional[str] = ..., continuation_token: _Optional[bytes] = ..., start_after_key_suffix: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ..., max_keys: _Optional[int] = ..., columns_to_return: _Optional[_Iterable[str]] = ..., matching_filter: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... + +class ListingResponse(_message.Message): + __slots__ = ["common_prefixes", "contents", "is_truncated", "issues", "next_continuation_token", "status"] + COMMON_PREFIXES_FIELD_NUMBER: _ClassVar[int] + CONTENTS_FIELD_NUMBER: _ClassVar[int] + ISSUES_FIELD_NUMBER: _ClassVar[int] + IS_TRUNCATED_FIELD_NUMBER: _ClassVar[int] + NEXT_CONTINUATION_TOKEN_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + common_prefixes: _containers.RepeatedScalarFieldContainer[str] + contents: _ydb_value_pb2.ResultSet + is_truncated: bool + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + next_continuation_token: bytes + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., common_prefixes: _Optional[_Iterable[str]] = ..., contents: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ..., is_truncated: bool = ..., next_continuation_token: _Optional[bytes] = ...) -> None: ... diff --git a/ydb/_grpc/v4/draft/protos/ydb_object_storage_pb2_grpc.py b/ydb/_grpc/v4/draft/protos/ydb_object_storage_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v4/draft/protos/ydb_object_storage_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v4/draft/ydb_federated_query_v1_pb2.py b/ydb/_grpc/v4/draft/ydb_federated_query_v1_pb2.py new file mode 100644 index 00000000..2586bd6b --- /dev/null +++ b/ydb/_grpc/v4/draft/ydb_federated_query_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/ydb_federated_query_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v4.draft.protos import ydb_federated_query_pb2 as draft_dot_protos_dot_ydb__federated__query__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"draft/ydb_federated_query_v1.proto\x12\x11\x46\x65\x64\x65ratedQuery.V1\x1a&draft/protos/ydb_federated_query.proto2\xd6\x0f\n\x15\x46\x65\x64\x65ratedQueryService\x12V\n\x0b\x43reateQuery\x12\".FederatedQuery.CreateQueryRequest\x1a#.FederatedQuery.CreateQueryResponse\x12V\n\x0bListQueries\x12\".FederatedQuery.ListQueriesRequest\x1a#.FederatedQuery.ListQueriesResponse\x12\\\n\rDescribeQuery\x12$.FederatedQuery.DescribeQueryRequest\x1a%.FederatedQuery.DescribeQueryResponse\x12_\n\x0eGetQueryStatus\x12%.FederatedQuery.GetQueryStatusRequest\x1a&.FederatedQuery.GetQueryStatusResponse\x12V\n\x0bModifyQuery\x12\".FederatedQuery.ModifyQueryRequest\x1a#.FederatedQuery.ModifyQueryResponse\x12V\n\x0b\x44\x65leteQuery\x12\".FederatedQuery.DeleteQueryRequest\x1a#.FederatedQuery.DeleteQueryResponse\x12Y\n\x0c\x43ontrolQuery\x12#.FederatedQuery.ControlQueryRequest\x1a$.FederatedQuery.ControlQueryResponse\x12\\\n\rGetResultData\x12$.FederatedQuery.GetResultDataRequest\x1a%.FederatedQuery.GetResultDataResponse\x12M\n\x08ListJobs\x12\x1f.FederatedQuery.ListJobsRequest\x1a .FederatedQuery.ListJobsResponse\x12V\n\x0b\x44\x65scribeJob\x12\".FederatedQuery.DescribeJobRequest\x1a#.FederatedQuery.DescribeJobResponse\x12\x65\n\x10\x43reateConnection\x12\'.FederatedQuery.CreateConnectionRequest\x1a(.FederatedQuery.CreateConnectionResponse\x12\x62\n\x0fListConnections\x12&.FederatedQuery.ListConnectionsRequest\x1a\'.FederatedQuery.ListConnectionsResponse\x12k\n\x12\x44\x65scribeConnection\x12).FederatedQuery.DescribeConnectionRequest\x1a*.FederatedQuery.DescribeConnectionResponse\x12\x65\n\x10ModifyConnection\x12\'.FederatedQuery.ModifyConnectionRequest\x1a(.FederatedQuery.ModifyConnectionResponse\x12\x65\n\x10\x44\x65leteConnection\x12\'.FederatedQuery.DeleteConnectionRequest\x1a(.FederatedQuery.DeleteConnectionResponse\x12_\n\x0eTestConnection\x12%.FederatedQuery.TestConnectionRequest\x1a&.FederatedQuery.TestConnectionResponse\x12\\\n\rCreateBinding\x12$.FederatedQuery.CreateBindingRequest\x1a%.FederatedQuery.CreateBindingResponse\x12Y\n\x0cListBindings\x12#.FederatedQuery.ListBindingsRequest\x1a$.FederatedQuery.ListBindingsResponse\x12\x62\n\x0f\x44\x65scribeBinding\x12&.FederatedQuery.DescribeBindingRequest\x1a\'.FederatedQuery.DescribeBindingResponse\x12\\\n\rModifyBinding\x12$.FederatedQuery.ModifyBindingRequest\x1a%.FederatedQuery.ModifyBindingResponse\x12\\\n\rDeleteBinding\x12$.FederatedQuery.DeleteBindingRequest\x1a%.FederatedQuery.DeleteBindingResponseBn\n\'tech.ydb.proto.draft.federated.query.v1ZCgithub.com/ydb-platform/ydb-go-genproto/draft/Ydb_FederatedQuery_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.ydb_federated_query_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\'tech.ydb.proto.draft.federated.query.v1ZCgithub.com/ydb-platform/ydb-go-genproto/draft/Ydb_FederatedQuery_V1' + _FEDERATEDQUERYSERVICE._serialized_start=98 + _FEDERATEDQUERYSERVICE._serialized_end=2104 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/draft/ydb_federated_query_v1_pb2.pyi b/ydb/_grpc/v4/draft/ydb_federated_query_v1_pb2.pyi new file mode 100644 index 00000000..786beec0 --- /dev/null +++ b/ydb/_grpc/v4/draft/ydb_federated_query_v1_pb2.pyi @@ -0,0 +1,5 @@ +from draft.protos import ydb_federated_query_pb2 as _ydb_federated_query_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v4/draft/ydb_federated_query_v1_pb2_grpc.py b/ydb/_grpc/v4/draft/ydb_federated_query_v1_pb2_grpc.py new file mode 100644 index 00000000..1257099b --- /dev/null +++ b/ydb/_grpc/v4/draft/ydb_federated_query_v1_pb2_grpc.py @@ -0,0 +1,755 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v4.draft.protos import ydb_federated_query_pb2 as draft_dot_protos_dot_ydb__federated__query__pb2 + + +class FederatedQueryServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/CreateQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryResponse.FromString, + ) + self.ListQueries = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ListQueries', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesResponse.FromString, + ) + self.DescribeQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DescribeQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryResponse.FromString, + ) + self.GetQueryStatus = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/GetQueryStatus', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusResponse.FromString, + ) + self.ModifyQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ModifyQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryResponse.FromString, + ) + self.DeleteQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DeleteQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryResponse.FromString, + ) + self.ControlQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ControlQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryResponse.FromString, + ) + self.GetResultData = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/GetResultData', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataResponse.FromString, + ) + self.ListJobs = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ListJobs', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsResponse.FromString, + ) + self.DescribeJob = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DescribeJob', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobResponse.FromString, + ) + self.CreateConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/CreateConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionResponse.FromString, + ) + self.ListConnections = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ListConnections', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsResponse.FromString, + ) + self.DescribeConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DescribeConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionResponse.FromString, + ) + self.ModifyConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ModifyConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionResponse.FromString, + ) + self.DeleteConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DeleteConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionResponse.FromString, + ) + self.TestConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/TestConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionResponse.FromString, + ) + self.CreateBinding = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/CreateBinding', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingResponse.FromString, + ) + self.ListBindings = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ListBindings', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsResponse.FromString, + ) + self.DescribeBinding = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DescribeBinding', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingResponse.FromString, + ) + self.ModifyBinding = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ModifyBinding', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingResponse.FromString, + ) + self.DeleteBinding = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DeleteBinding', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingResponse.FromString, + ) + + +class FederatedQueryServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def CreateQuery(self, request, context): + """Query + Query is the text of an SQL request, the results of the last run and the state after the last run (partitions offsets, consumer in YDS) + Create a query object with a given SQL + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListQueries(self, request, context): + """Get a list of brief queries objects + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeQuery(self, request, context): + """Get full information about the object of the query + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetQueryStatus(self, request, context): + """Get status of the query + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ModifyQuery(self, request, context): + """Change the attributes of the query (acl, name, ...) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteQuery(self, request, context): + """Completely delete the query + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ControlQuery(self, request, context): + """Change the state of the query lifecycle + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetResultData(self, request, context): + """Get a results page + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListJobs(self, request, context): + """Job + Job - appears immediately after starting the request and contains the request metadata + Get a list of jobs + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeJob(self, request, context): + """Get information about the job + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateConnection(self, request, context): + """Connection + Connection - entity that describes connection points. This can be imagined as an analogue of a network address. + Create a connection object (ObjectStorage, YDB, YDS, ...) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListConnections(self, request, context): + """Get a list of connections objects + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeConnection(self, request, context): + """Get information about the object of the connection + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ModifyConnection(self, request, context): + """Change the attributes of the connection + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteConnection(self, request, context): + """Completely delete the connection + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def TestConnection(self, request, context): + """Test the connection (permissions, network, ...) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateBinding(self, request, context): + """Binding + Binding - entity using which a schema is assigned to non-schematic data + Create a binding object - bind schema with ObjectStorage object or YDS stream + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListBindings(self, request, context): + """Get a list of bindings objects + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeBinding(self, request, context): + """Get information about the object of the binding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ModifyBinding(self, request, context): + """Change the attributes of the binding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteBinding(self, request, context): + """Completely delete the binding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_FederatedQueryServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateQuery': grpc.unary_unary_rpc_method_handler( + servicer.CreateQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryResponse.SerializeToString, + ), + 'ListQueries': grpc.unary_unary_rpc_method_handler( + servicer.ListQueries, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesResponse.SerializeToString, + ), + 'DescribeQuery': grpc.unary_unary_rpc_method_handler( + servicer.DescribeQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryResponse.SerializeToString, + ), + 'GetQueryStatus': grpc.unary_unary_rpc_method_handler( + servicer.GetQueryStatus, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusResponse.SerializeToString, + ), + 'ModifyQuery': grpc.unary_unary_rpc_method_handler( + servicer.ModifyQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryResponse.SerializeToString, + ), + 'DeleteQuery': grpc.unary_unary_rpc_method_handler( + servicer.DeleteQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryResponse.SerializeToString, + ), + 'ControlQuery': grpc.unary_unary_rpc_method_handler( + servicer.ControlQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryResponse.SerializeToString, + ), + 'GetResultData': grpc.unary_unary_rpc_method_handler( + servicer.GetResultData, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataResponse.SerializeToString, + ), + 'ListJobs': grpc.unary_unary_rpc_method_handler( + servicer.ListJobs, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsResponse.SerializeToString, + ), + 'DescribeJob': grpc.unary_unary_rpc_method_handler( + servicer.DescribeJob, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobResponse.SerializeToString, + ), + 'CreateConnection': grpc.unary_unary_rpc_method_handler( + servicer.CreateConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionResponse.SerializeToString, + ), + 'ListConnections': grpc.unary_unary_rpc_method_handler( + servicer.ListConnections, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsResponse.SerializeToString, + ), + 'DescribeConnection': grpc.unary_unary_rpc_method_handler( + servicer.DescribeConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionResponse.SerializeToString, + ), + 'ModifyConnection': grpc.unary_unary_rpc_method_handler( + servicer.ModifyConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionResponse.SerializeToString, + ), + 'DeleteConnection': grpc.unary_unary_rpc_method_handler( + servicer.DeleteConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionResponse.SerializeToString, + ), + 'TestConnection': grpc.unary_unary_rpc_method_handler( + servicer.TestConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionResponse.SerializeToString, + ), + 'CreateBinding': grpc.unary_unary_rpc_method_handler( + servicer.CreateBinding, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingResponse.SerializeToString, + ), + 'ListBindings': grpc.unary_unary_rpc_method_handler( + servicer.ListBindings, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsResponse.SerializeToString, + ), + 'DescribeBinding': grpc.unary_unary_rpc_method_handler( + servicer.DescribeBinding, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingResponse.SerializeToString, + ), + 'ModifyBinding': grpc.unary_unary_rpc_method_handler( + servicer.ModifyBinding, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingResponse.SerializeToString, + ), + 'DeleteBinding': grpc.unary_unary_rpc_method_handler( + servicer.DeleteBinding, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'FederatedQuery.V1.FederatedQueryService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class FederatedQueryService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def CreateQuery(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, '/FederatedQuery.V1.FederatedQueryService/CreateQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListQueries(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, '/FederatedQuery.V1.FederatedQueryService/ListQueries', + draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeQuery(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, '/FederatedQuery.V1.FederatedQueryService/DescribeQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetQueryStatus(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, '/FederatedQuery.V1.FederatedQueryService/GetQueryStatus', + draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ModifyQuery(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, '/FederatedQuery.V1.FederatedQueryService/ModifyQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteQuery(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, '/FederatedQuery.V1.FederatedQueryService/DeleteQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ControlQuery(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, '/FederatedQuery.V1.FederatedQueryService/ControlQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetResultData(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, '/FederatedQuery.V1.FederatedQueryService/GetResultData', + draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListJobs(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, '/FederatedQuery.V1.FederatedQueryService/ListJobs', + draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeJob(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, '/FederatedQuery.V1.FederatedQueryService/DescribeJob', + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateConnection(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, '/FederatedQuery.V1.FederatedQueryService/CreateConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListConnections(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, '/FederatedQuery.V1.FederatedQueryService/ListConnections', + draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeConnection(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, '/FederatedQuery.V1.FederatedQueryService/DescribeConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ModifyConnection(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, '/FederatedQuery.V1.FederatedQueryService/ModifyConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteConnection(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, '/FederatedQuery.V1.FederatedQueryService/DeleteConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def TestConnection(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, '/FederatedQuery.V1.FederatedQueryService/TestConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateBinding(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, '/FederatedQuery.V1.FederatedQueryService/CreateBinding', + draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListBindings(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, '/FederatedQuery.V1.FederatedQueryService/ListBindings', + draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeBinding(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, '/FederatedQuery.V1.FederatedQueryService/DescribeBinding', + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ModifyBinding(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, '/FederatedQuery.V1.FederatedQueryService/ModifyBinding', + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteBinding(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, '/FederatedQuery.V1.FederatedQueryService/DeleteBinding', + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v4/draft/ydb_keyvalue_v1_pb2.py b/ydb/_grpc/v4/draft/ydb_keyvalue_v1_pb2.py new file mode 100644 index 00000000..a4a1a3d8 --- /dev/null +++ b/ydb/_grpc/v4/draft/ydb_keyvalue_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/ydb_keyvalue_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v4.draft.protos import ydb_keyvalue_pb2 as draft_dot_protos_dot_ydb__keyvalue__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x64raft/ydb_keyvalue_v1.proto\x12\x0fYdb.KeyValue.V1\x1a\x1f\x64raft/protos/ydb_keyvalue.proto2\xe6\x07\n\x0fKeyValueService\x12U\n\x0c\x43reateVolume\x12!.Ydb.KeyValue.CreateVolumeRequest\x1a\".Ydb.KeyValue.CreateVolumeResponse\x12O\n\nDropVolume\x12\x1f.Ydb.KeyValue.DropVolumeRequest\x1a .Ydb.KeyValue.DropVolumeResponse\x12R\n\x0b\x41lterVolume\x12 .Ydb.KeyValue.AlterVolumeRequest\x1a!.Ydb.KeyValue.AlterVolumeResponse\x12[\n\x0e\x44\x65scribeVolume\x12#.Ydb.KeyValue.DescribeVolumeRequest\x1a$.Ydb.KeyValue.DescribeVolumeResponse\x12j\n\x13ListLocalPartitions\x12(.Ydb.KeyValue.ListLocalPartitionsRequest\x1a).Ydb.KeyValue.ListLocalPartitionsResponse\x12R\n\x0b\x41\x63quireLock\x12 .Ydb.KeyValue.AcquireLockRequest\x1a!.Ydb.KeyValue.AcquireLockResponse\x12g\n\x12\x45xecuteTransaction\x12\'.Ydb.KeyValue.ExecuteTransactionRequest\x1a(.Ydb.KeyValue.ExecuteTransactionResponse\x12=\n\x04Read\x12\x19.Ydb.KeyValue.ReadRequest\x1a\x1a.Ydb.KeyValue.ReadResponse\x12L\n\tReadRange\x12\x1e.Ydb.KeyValue.ReadRangeRequest\x1a\x1f.Ydb.KeyValue.ReadRangeResponse\x12L\n\tListRange\x12\x1e.Ydb.KeyValue.ListRangeRequest\x1a\x1f.Ydb.KeyValue.ListRangeResponse\x12v\n\x17GetStorageChannelStatus\x12,.Ydb.KeyValue.GetStorageChannelStatusRequest\x1a-.Ydb.KeyValue.GetStorageChannelStatusResponseB^\n\x1dtech.ydb.proto.draft.keyvalueZ=github.com/ydb-platform/ydb-go-genproto/draft/Ydb_KeyValue_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.ydb_keyvalue_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\035tech.ydb.proto.draft.keyvalueZ=github.com/ydb-platform/ydb-go-genproto/draft/Ydb_KeyValue_V1' + _KEYVALUESERVICE._serialized_start=82 + _KEYVALUESERVICE._serialized_end=1080 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/draft/ydb_keyvalue_v1_pb2.pyi b/ydb/_grpc/v4/draft/ydb_keyvalue_v1_pb2.pyi new file mode 100644 index 00000000..8780324b --- /dev/null +++ b/ydb/_grpc/v4/draft/ydb_keyvalue_v1_pb2.pyi @@ -0,0 +1,5 @@ +from draft.protos import ydb_keyvalue_pb2 as _ydb_keyvalue_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v4/draft/ydb_keyvalue_v1_pb2_grpc.py b/ydb/_grpc/v4/draft/ydb_keyvalue_v1_pb2_grpc.py new file mode 100644 index 00000000..c638dba9 --- /dev/null +++ b/ydb/_grpc/v4/draft/ydb_keyvalue_v1_pb2_grpc.py @@ -0,0 +1,419 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v4.draft.protos import ydb_keyvalue_pb2 as draft_dot_protos_dot_ydb__keyvalue__pb2 + + +class KeyValueServiceStub(object): + """KeyValue tablets provide a simple key-value storage in a low-overhead and easy-to-shoot-your-leg manner. + To use KeyValue tablets in an efficient way one must be familiar with the design of both the KeyValue tablet + and the Distributed Storage underneath it. + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateVolume = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/CreateVolume', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeResponse.FromString, + ) + self.DropVolume = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/DropVolume', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeResponse.FromString, + ) + self.AlterVolume = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/AlterVolume', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeResponse.FromString, + ) + self.DescribeVolume = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/DescribeVolume', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeResponse.FromString, + ) + self.ListLocalPartitions = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/ListLocalPartitions', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsResponse.FromString, + ) + self.AcquireLock = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/AcquireLock', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockResponse.FromString, + ) + self.ExecuteTransaction = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/ExecuteTransaction', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionResponse.FromString, + ) + self.Read = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/Read', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadResponse.FromString, + ) + self.ReadRange = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/ReadRange', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeResponse.FromString, + ) + self.ListRange = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/ListRange', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeResponse.FromString, + ) + self.GetStorageChannelStatus = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/GetStorageChannelStatus', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusResponse.FromString, + ) + + +class KeyValueServiceServicer(object): + """KeyValue tablets provide a simple key-value storage in a low-overhead and easy-to-shoot-your-leg manner. + To use KeyValue tablets in an efficient way one must be familiar with the design of both the KeyValue tablet + and the Distributed Storage underneath it. + + """ + + def CreateVolume(self, request, context): + """Create a volume by path and partition count + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DropVolume(self, request, context): + """Drop the volume by path + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AlterVolume(self, request, context): + """Alter the volume by path + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeVolume(self, request, context): + """Describe the volume by path + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListLocalPartitions(self, request, context): + """List partitions of a volume at the local node. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AcquireLock(self, request, context): + """Acquire an exclusive lock for the partition. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ExecuteTransaction(self, request, context): + """Perform list of commands to modify the state of the partition as an atomic transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Read(self, request, context): + """Read the value stored in the item with the key specified. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReadRange(self, request, context): + """Read items with keys in the specified range. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListRange(self, request, context): + """List keys and metadata of items with keys in the specified range. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetStorageChannelStatus(self, request, context): + """Get storage channel status of the partition. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_KeyValueServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateVolume': grpc.unary_unary_rpc_method_handler( + servicer.CreateVolume, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeResponse.SerializeToString, + ), + 'DropVolume': grpc.unary_unary_rpc_method_handler( + servicer.DropVolume, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeResponse.SerializeToString, + ), + 'AlterVolume': grpc.unary_unary_rpc_method_handler( + servicer.AlterVolume, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeResponse.SerializeToString, + ), + 'DescribeVolume': grpc.unary_unary_rpc_method_handler( + servicer.DescribeVolume, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeResponse.SerializeToString, + ), + 'ListLocalPartitions': grpc.unary_unary_rpc_method_handler( + servicer.ListLocalPartitions, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsResponse.SerializeToString, + ), + 'AcquireLock': grpc.unary_unary_rpc_method_handler( + servicer.AcquireLock, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockResponse.SerializeToString, + ), + 'ExecuteTransaction': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteTransaction, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionResponse.SerializeToString, + ), + 'Read': grpc.unary_unary_rpc_method_handler( + servicer.Read, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadResponse.SerializeToString, + ), + 'ReadRange': grpc.unary_unary_rpc_method_handler( + servicer.ReadRange, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeResponse.SerializeToString, + ), + 'ListRange': grpc.unary_unary_rpc_method_handler( + servicer.ListRange, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeResponse.SerializeToString, + ), + 'GetStorageChannelStatus': grpc.unary_unary_rpc_method_handler( + servicer.GetStorageChannelStatus, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.KeyValue.V1.KeyValueService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class KeyValueService(object): + """KeyValue tablets provide a simple key-value storage in a low-overhead and easy-to-shoot-your-leg manner. + To use KeyValue tablets in an efficient way one must be familiar with the design of both the KeyValue tablet + and the Distributed Storage underneath it. + + """ + + @staticmethod + def CreateVolume(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, '/Ydb.KeyValue.V1.KeyValueService/CreateVolume', + draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DropVolume(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, '/Ydb.KeyValue.V1.KeyValueService/DropVolume', + draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AlterVolume(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, '/Ydb.KeyValue.V1.KeyValueService/AlterVolume', + draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeVolume(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, '/Ydb.KeyValue.V1.KeyValueService/DescribeVolume', + draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListLocalPartitions(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, '/Ydb.KeyValue.V1.KeyValueService/ListLocalPartitions', + draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AcquireLock(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, '/Ydb.KeyValue.V1.KeyValueService/AcquireLock', + draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ExecuteTransaction(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, '/Ydb.KeyValue.V1.KeyValueService/ExecuteTransaction', + draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Read(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, '/Ydb.KeyValue.V1.KeyValueService/Read', + draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ReadResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReadRange(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, '/Ydb.KeyValue.V1.KeyValueService/ReadRange', + draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListRange(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, '/Ydb.KeyValue.V1.KeyValueService/ListRange', + draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetStorageChannelStatus(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, '/Ydb.KeyValue.V1.KeyValueService/GetStorageChannelStatus', + draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v4/draft/ydb_object_storage_v1_pb2.py b/ydb/_grpc/v4/draft/ydb_object_storage_v1_pb2.py new file mode 100644 index 00000000..5cdf0b95 --- /dev/null +++ b/ydb/_grpc/v4/draft/ydb_object_storage_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/ydb_object_storage_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v4.draft.protos import ydb_object_storage_pb2 as draft_dot_protos_dot_ydb__object__storage__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!draft/ydb_object_storage_v1.proto\x12\x14Ydb.ObjectStorage.V1\x1a%draft/protos/ydb_object_storage.proto2e\n\x14ObjectStorageService\x12M\n\x04List\x12!.Ydb.ObjectStorage.ListingRequest\x1a\".Ydb.ObjectStorage.ListingResponseBl\n&tech.ydb.proto.draft.object_storage.v1ZBgithub.com/ydb-platform/ydb-go-genproto/draft/Ydb_ObjectStorage_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.ydb_object_storage_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n&tech.ydb.proto.draft.object_storage.v1ZBgithub.com/ydb-platform/ydb-go-genproto/draft/Ydb_ObjectStorage_V1' + _OBJECTSTORAGESERVICE._serialized_start=98 + _OBJECTSTORAGESERVICE._serialized_end=199 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/draft/ydb_object_storage_v1_pb2.pyi b/ydb/_grpc/v4/draft/ydb_object_storage_v1_pb2.pyi new file mode 100644 index 00000000..bfdf7662 --- /dev/null +++ b/ydb/_grpc/v4/draft/ydb_object_storage_v1_pb2.pyi @@ -0,0 +1,5 @@ +from draft.protos import ydb_object_storage_pb2 as _ydb_object_storage_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v4/draft/ydb_object_storage_v1_pb2_grpc.py b/ydb/_grpc/v4/draft/ydb_object_storage_v1_pb2_grpc.py new file mode 100644 index 00000000..6eabf44e --- /dev/null +++ b/ydb/_grpc/v4/draft/ydb_object_storage_v1_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v4.draft.protos import ydb_object_storage_pb2 as draft_dot_protos_dot_ydb__object__storage__pb2 + + +class ObjectStorageServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.List = channel.unary_unary( + '/Ydb.ObjectStorage.V1.ObjectStorageService/List', + request_serializer=draft_dot_protos_dot_ydb__object__storage__pb2.ListingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__object__storage__pb2.ListingResponse.FromString, + ) + + +class ObjectStorageServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ObjectStorageServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=draft_dot_protos_dot_ydb__object__storage__pb2.ListingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__object__storage__pb2.ListingResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.ObjectStorage.V1.ObjectStorageService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ObjectStorageService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def List(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, '/Ydb.ObjectStorage.V1.ObjectStorageService/List', + draft_dot_protos_dot_ydb__object__storage__pb2.ListingRequest.SerializeToString, + draft_dot_protos_dot_ydb__object__storage__pb2.ListingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v4/protos/annotations/sensitive_pb2.py b/ydb/_grpc/v4/protos/annotations/sensitive_pb2.py new file mode 100644 index 00000000..0662aca4 --- /dev/null +++ b/ydb/_grpc/v4/protos/annotations/sensitive_pb2.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/annotations/sensitive.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"protos/annotations/sensitive.proto\x12\x03Ydb\x1a google/protobuf/descriptor.proto:2\n\tsensitive\x12\x1d.google.protobuf.FieldOptions\x18\xe7\xac\x05 \x01(\x08\x42G\n\x0etech.ydb.protoZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.annotations.sensitive_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(sensitive) + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\016tech.ydb.protoZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\370\001\001' +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/annotations/sensitive_pb2.pyi b/ydb/_grpc/v4/protos/annotations/sensitive_pb2.pyi new file mode 100644 index 00000000..bc158001 --- /dev/null +++ b/ydb/_grpc/v4/protos/annotations/sensitive_pb2.pyi @@ -0,0 +1,7 @@ +from google.protobuf import descriptor_pb2 as _descriptor_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor +SENSITIVE_FIELD_NUMBER: _ClassVar[int] +sensitive: _descriptor.FieldDescriptor diff --git a/ydb/_grpc/v4/protos/annotations/sensitive_pb2_grpc.py b/ydb/_grpc/v4/protos/annotations/sensitive_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v4/protos/annotations/sensitive_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v4/protos/ydb_query_pb2.py b/ydb/_grpc/v4/protos/ydb_query_pb2.py index a5f4210e..eae90c97 100644 --- a/ydb/_grpc/v4/protos/ydb_query_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_query_pb2.py @@ -21,7 +21,7 @@ from ydb._grpc.v4.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\x9a\x03\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\xe6\x01\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x8d\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\x9a\x03\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\x93\x02\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12+\n\x07tx_meta\x18\x06 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"\x8d\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_query_pb2', globals()) @@ -71,14 +71,14 @@ _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['result_set_index']._serialized_options = b'\262\346*\004>= 0' _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['next_fetch_token']._options = None _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['next_fetch_token']._serialized_options = b'\242\346*\003\030\200\010' - _SYNTAX._serialized_start=3881 - _SYNTAX._serialized_end=3947 - _EXECMODE._serialized_start=3950 - _EXECMODE._serialized_end=4084 - _STATSMODE._serialized_start=4086 - _STATSMODE._serialized_end=4213 - _EXECSTATUS._serialized_start=4216 - _EXECSTATUS._serialized_end=4386 + _SYNTAX._serialized_start=3926 + _SYNTAX._serialized_end=3992 + _EXECMODE._serialized_start=3995 + _EXECMODE._serialized_end=4129 + _STATSMODE._serialized_start=4131 + _STATSMODE._serialized_end=4258 + _EXECSTATUS._serialized_start=4261 + _EXECSTATUS._serialized_end=4431 _CREATESESSIONREQUEST._serialized_start=251 _CREATESESSIONREQUEST._serialized_end=273 _CREATESESSIONRESPONSE._serialized_start=276 @@ -126,17 +126,17 @@ _RESULTSETMETA._serialized_start=2483 _RESULTSETMETA._serialized_end=2528 _EXECUTEQUERYRESPONSEPART._serialized_start=2531 - _EXECUTEQUERYRESPONSEPART._serialized_end=2761 - _EXECUTESCRIPTREQUEST._serialized_start=2764 - _EXECUTESCRIPTREQUEST._serialized_end=3161 + _EXECUTEQUERYRESPONSEPART._serialized_end=2806 + _EXECUTESCRIPTREQUEST._serialized_start=2809 + _EXECUTESCRIPTREQUEST._serialized_end=3206 _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_start=2406 _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_end=2472 - _EXECUTESCRIPTMETADATA._serialized_start=3164 - _EXECUTESCRIPTMETADATA._serialized_end=3451 - _FETCHSCRIPTRESULTSREQUEST._serialized_start=3454 - _FETCHSCRIPTRESULTSREQUEST._serialized_end=3598 - _FETCHSCRIPTRESULTSRESPONSE._serialized_start=3601 - _FETCHSCRIPTRESULTSRESPONSE._serialized_end=3820 - _SCRIPT._serialized_start=3822 - _SCRIPT._serialized_end=3879 + _EXECUTESCRIPTMETADATA._serialized_start=3209 + _EXECUTESCRIPTMETADATA._serialized_end=3496 + _FETCHSCRIPTRESULTSREQUEST._serialized_start=3499 + _FETCHSCRIPTRESULTSREQUEST._serialized_end=3643 + _FETCHSCRIPTRESULTSRESPONSE._serialized_start=3646 + _FETCHSCRIPTRESULTSRESPONSE._serialized_end=3865 + _SCRIPT._serialized_start=3867 + _SCRIPT._serialized_end=3924 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_query_pb2.pyi b/ydb/_grpc/v4/protos/ydb_query_pb2.pyi index 6ae7f373..bd787a1d 100644 --- a/ydb/_grpc/v4/protos/ydb_query_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_query_pb2.pyi @@ -128,18 +128,20 @@ class ExecuteQueryRequest(_message.Message): def __init__(self, session_id: _Optional[str] = ..., exec_mode: _Optional[_Union[ExecMode, str]] = ..., tx_control: _Optional[_Union[TransactionControl, _Mapping]] = ..., query_content: _Optional[_Union[QueryContent, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., stats_mode: _Optional[_Union[StatsMode, str]] = ..., concurrent_result_sets: bool = ...) -> None: ... class ExecuteQueryResponsePart(_message.Message): - __slots__ = ["exec_stats", "issues", "result_set", "result_set_index", "status"] + __slots__ = ["exec_stats", "issues", "result_set", "result_set_index", "status", "tx_meta"] EXEC_STATS_FIELD_NUMBER: _ClassVar[int] ISSUES_FIELD_NUMBER: _ClassVar[int] RESULT_SET_FIELD_NUMBER: _ClassVar[int] RESULT_SET_INDEX_FIELD_NUMBER: _ClassVar[int] STATUS_FIELD_NUMBER: _ClassVar[int] + TX_META_FIELD_NUMBER: _ClassVar[int] exec_stats: _ydb_query_stats_pb2.QueryStats issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] result_set: _ydb_value_pb2.ResultSet result_set_index: int status: _ydb_status_codes_pb2.StatusIds.StatusCode - def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., result_set_index: _Optional[int] = ..., result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ..., exec_stats: _Optional[_Union[_ydb_query_stats_pb2.QueryStats, _Mapping]] = ...) -> None: ... + tx_meta: TransactionMeta + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., result_set_index: _Optional[int] = ..., result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ..., exec_stats: _Optional[_Union[_ydb_query_stats_pb2.QueryStats, _Mapping]] = ..., tx_meta: _Optional[_Union[TransactionMeta, _Mapping]] = ...) -> None: ... class ExecuteScriptMetadata(_message.Message): __slots__ = ["exec_mode", "exec_stats", "exec_status", "execution_id", "result_sets_meta", "script_content"] diff --git a/ydb/_grpc/v4/protos/ydb_topic_pb2.py b/ydb/_grpc/v4/protos/ydb_topic_pb2.py index d16eacaf..4c966188 100644 --- a/ydb/_grpc/v4/protos/ydb_topic_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_topic_pb2.py @@ -16,13 +16,12 @@ from ydb._grpc.v4.protos import ydb_scheme_pb2 as protos_dot_ydb__scheme__pb2 from ydb._grpc.v4.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 from ydb._grpc.v4.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 -from ydb._grpc.v4.protos import ydb_table_pb2 as protos_dot_ydb__table__pb2 from ydb._grpc.v4.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x16protos/ydb_table.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"#\n\x12UpdateTokenRequest\x12\r\n\x05token\x18\x01 \x01(\t\"\x15\n\x13UpdateTokenResponse\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\xcf\x11\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xa3\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x13\n\x0bproducer_id\x18\x02 \x01(\t\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12\x1a\n\x10message_group_id\x18\x04 \x01(\tH\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\xde\x02\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x1a\xf4\x01\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12\x1a\n\x10message_group_id\x18\x05 \x01(\tH\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioning\x1a\x81\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\x8e\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x42\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xca\x1d\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xea\x04\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xc4\x05\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x42\x10\n\x0eserver_message\x1a\xa4\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\xff\x05\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xd1\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12\x18\n\x10message_group_id\x18\x07 \x01(\t\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xc4\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x13\n\x0bproducer_id\x18\x02 \x01(\t\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xb6\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1ag\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x1a<\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\"\xd6\x03\n\x1e\x41\x64\x64OffsetsToTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Table.TransactionControl\x12\x46\n\x06topics\x18\x04 \x03(\x0b\x32\x36.Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x05 \x01(\t\x1a\xd7\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12[\n\npartitions\x18\x02 \x03(\x0b\x32G.Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"O\n\x1f\x41\x64\x64OffsetsToTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x1f\n\x1d\x41\x64\x64OffsetsToTransactionResult\"\x96\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xb3\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf3\x01\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"h\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbb\x01\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_partition_count_limit\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"v\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa2\x08\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xa4\x01\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\x8b\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xde\x06\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\x80\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x1a\xb3\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\x9c\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x19\n\x11partition_node_id\x18\x08 \x01(\x05\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"#\n\x12UpdateTokenRequest\x12\r\n\x05token\x18\x01 \x01(\t\"\x15\n\x13UpdateTokenResponse\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x87\x12\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xa3\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x13\n\x0bproducer_id\x18\x02 \x01(\t\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12\x1a\n\x10message_group_id\x18\x04 \x01(\tH\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\x96\x03\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x12/\n\x02tx\x18\x03 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentityH\x00\x88\x01\x01\x1a\xf4\x01\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12\x1a\n\x10message_group_id\x18\x05 \x01(\tH\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioningB\x05\n\x03_tx\x1a\x81\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\x8e\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x42\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xca\x1d\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xea\x04\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xc4\x05\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x42\x10\n\x0eserver_message\x1a\xa4\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\xff\x05\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xd1\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12\x18\n\x10message_group_id\x18\x07 \x01(\t\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xc4\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x13\n\x0bproducer_id\x18\x02 \x01(\t\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xb6\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1ag\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x1a<\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\"2\n\x13TransactionIdentity\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07session\x18\x02 \x01(\t\"\xc4\x03\n!UpdateOffsetsInTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12*\n\x02tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentity\x12I\n\x06topics\x18\x03 \x03(\x0b\x32\x39.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x1a\xda\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12^\n\npartitions\x18\x02 \x03(\x0b\x32J.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"R\n\"UpdateOffsetsInTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\"\n UpdateOffsetsInTransactionResult\"\x96\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xb3\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf3\x01\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"h\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbb\x01\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_partition_count_limit\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"v\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa2\x08\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xa4\x01\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\x8b\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xde\x06\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\x80\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x1a\xb3\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\x9c\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x19\n\x11partition_node_id\x18\x08 \x01(\x05\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_topic_pb2', globals()) @@ -76,170 +75,172 @@ _ALTERTOPICREQUEST.fields_by_name['drop_consumers']._serialized_options = b'\232\346*\003\030\270\027' _ALTERTOPICREQUEST.fields_by_name['alter_consumers']._options = None _ALTERTOPICREQUEST.fields_by_name['alter_consumers']._serialized_options = b'\232\346*\003\030\270\027' - _CODEC._serialized_start=13142 - _CODEC._serialized_end=13273 - _METERINGMODE._serialized_start=13275 - _METERINGMODE._serialized_end=13390 - _SUPPORTEDCODECS._serialized_start=279 - _SUPPORTEDCODECS._serialized_end=334 - _OFFSETSRANGE._serialized_start=336 - _OFFSETSRANGE._serialized_end=378 - _UPDATETOKENREQUEST._serialized_start=380 - _UPDATETOKENREQUEST._serialized_end=415 - _UPDATETOKENRESPONSE._serialized_start=417 - _UPDATETOKENRESPONSE._serialized_end=438 - _METADATAITEM._serialized_start=440 - _METADATAITEM._serialized_end=482 - _STREAMWRITEMESSAGE._serialized_start=485 - _STREAMWRITEMESSAGE._serialized_end=2740 - _STREAMWRITEMESSAGE_FROMCLIENT._serialized_start=508 - _STREAMWRITEMESSAGE_FROMCLIENT._serialized_end=737 - _STREAMWRITEMESSAGE_FROMSERVER._serialized_start=740 - _STREAMWRITEMESSAGE_FROMSERVER._serialized_end=1059 - _STREAMWRITEMESSAGE_INITREQUEST._serialized_start=1062 - _STREAMWRITEMESSAGE_INITREQUEST._serialized_end=1353 - _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._serialized_start=1282 - _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._serialized_end=1337 - _STREAMWRITEMESSAGE_INITRESPONSE._serialized_start=1356 - _STREAMWRITEMESSAGE_INITRESPONSE._serialized_end=1487 - _STREAMWRITEMESSAGE_WRITEREQUEST._serialized_start=1490 - _STREAMWRITEMESSAGE_WRITEREQUEST._serialized_end=1840 - _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA._serialized_start=1596 - _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA._serialized_end=1840 - _STREAMWRITEMESSAGE_WRITERESPONSE._serialized_start=1843 - _STREAMWRITEMESSAGE_WRITERESPONSE._serialized_end=2740 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK._serialized_start=2038 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK._serialized_end=2436 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN._serialized_start=2228 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN._serialized_end=2253 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED._serialized_start=2256 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED._serialized_end=2412 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON._serialized_start=2352 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON._serialized_end=2412 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS._serialized_start=2439 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS._serialized_end=2740 - _STREAMREADMESSAGE._serialized_start=2743 - _STREAMREADMESSAGE._serialized_end=6529 - _STREAMREADMESSAGE_PARTITIONSESSION._serialized_start=2764 - _STREAMREADMESSAGE_PARTITIONSESSION._serialized_end=2848 - _STREAMREADMESSAGE_FROMCLIENT._serialized_start=2851 - _STREAMREADMESSAGE_FROMCLIENT._serialized_end=3469 - _STREAMREADMESSAGE_FROMSERVER._serialized_start=3472 - _STREAMREADMESSAGE_FROMSERVER._serialized_end=4180 - _STREAMREADMESSAGE_INITREQUEST._serialized_start=4183 - _STREAMREADMESSAGE_INITREQUEST._serialized_end=4475 - _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS._serialized_start=4328 - _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS._serialized_end=4475 - _STREAMREADMESSAGE_INITRESPONSE._serialized_start=4477 - _STREAMREADMESSAGE_INITRESPONSE._serialized_end=4511 - _STREAMREADMESSAGE_READREQUEST._serialized_start=4513 - _STREAMREADMESSAGE_READREQUEST._serialized_end=4546 - _STREAMREADMESSAGE_READRESPONSE._serialized_start=4549 - _STREAMREADMESSAGE_READRESPONSE._serialized_end=5316 - _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA._serialized_start=4667 - _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA._serialized_end=4876 - _STREAMREADMESSAGE_READRESPONSE_BATCH._serialized_start=4879 - _STREAMREADMESSAGE_READRESPONSE_BATCH._serialized_end=5203 - _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._serialized_start=1282 - _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._serialized_end=1337 - _STREAMREADMESSAGE_READRESPONSE_PARTITIONDATA._serialized_start=5205 - _STREAMREADMESSAGE_READRESPONSE_PARTITIONDATA._serialized_end=5316 - _STREAMREADMESSAGE_COMMITOFFSETREQUEST._serialized_start=5319 - _STREAMREADMESSAGE_COMMITOFFSETREQUEST._serialized_end=5533 - _STREAMREADMESSAGE_COMMITOFFSETREQUEST_PARTITIONCOMMITOFFSET._serialized_start=5438 - _STREAMREADMESSAGE_COMMITOFFSETREQUEST_PARTITIONCOMMITOFFSET._serialized_end=5533 - _STREAMREADMESSAGE_COMMITOFFSETRESPONSE._serialized_start=5536 - _STREAMREADMESSAGE_COMMITOFFSETRESPONSE._serialized_end=5756 - _STREAMREADMESSAGE_COMMITOFFSETRESPONSE_PARTITIONCOMMITTEDOFFSET._serialized_start=5674 - _STREAMREADMESSAGE_COMMITOFFSETRESPONSE_PARTITIONCOMMITTEDOFFSET._serialized_end=5756 - _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST._serialized_start=5758 - _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST._serialized_end=5819 - _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE._serialized_start=5822 - _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE._serialized_end=6025 - _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST._serialized_start=6028 - _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST._serialized_end=6210 - _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE._serialized_start=6213 - _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE._serialized_end=6362 - _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST._serialized_start=6364 - _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST._serialized_end=6467 - _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE._serialized_start=6469 - _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE._serialized_end=6529 - _ADDOFFSETSTOTRANSACTIONREQUEST._serialized_start=6532 - _ADDOFFSETSTOTRANSACTIONREQUEST._serialized_end=7002 - _ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS._serialized_start=6787 - _ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS._serialized_end=7002 - _ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_start=6910 - _ADDOFFSETSTOTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_end=7002 - _ADDOFFSETSTOTRANSACTIONRESPONSE._serialized_start=7004 - _ADDOFFSETSTOTRANSACTIONRESPONSE._serialized_end=7083 - _ADDOFFSETSTOTRANSACTIONRESULT._serialized_start=7085 - _ADDOFFSETSTOTRANSACTIONRESULT._serialized_end=7116 - _COMMITOFFSETREQUEST._serialized_start=7119 - _COMMITOFFSETREQUEST._serialized_end=7269 - _COMMITOFFSETRESPONSE._serialized_start=7271 - _COMMITOFFSETRESPONSE._serialized_end=7339 - _COMMITOFFSETRESULT._serialized_start=7341 - _COMMITOFFSETRESULT._serialized_end=7361 - _MULTIPLEWINDOWSSTAT._serialized_start=7363 - _MULTIPLEWINDOWSSTAT._serialized_end=7439 - _CONSUMER._serialized_start=7442 - _CONSUMER._serialized_end=8005 - _CONSUMER_ATTRIBUTESENTRY._serialized_start=7704 - _CONSUMER_ATTRIBUTESENTRY._serialized_end=7753 - _CONSUMER_CONSUMERSTATS._serialized_start=7756 - _CONSUMER_CONSUMERSTATS._serialized_end=7999 - _ALTERCONSUMER._serialized_start=8008 - _ALTERCONSUMER._serialized_end=8327 - _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_start=8249 - _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_end=8303 - _PARTITIONINGSETTINGS._serialized_start=8329 - _PARTITIONINGSETTINGS._serialized_end=8433 - _ALTERPARTITIONINGSETTINGS._serialized_start=8436 - _ALTERPARTITIONINGSETTINGS._serialized_end=8623 - _CREATETOPICREQUEST._serialized_start=8626 - _CREATETOPICREQUEST._serialized_end=9256 - _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_start=7704 - _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_end=7753 - _CREATETOPICRESPONSE._serialized_start=9258 - _CREATETOPICRESPONSE._serialized_end=9325 - _CREATETOPICRESULT._serialized_start=9327 - _CREATETOPICRESULT._serialized_end=9346 - _DESCRIBETOPICREQUEST._serialized_start=9348 - _DESCRIBETOPICREQUEST._serialized_end=9466 - _DESCRIBETOPICRESPONSE._serialized_start=9468 - _DESCRIBETOPICRESPONSE._serialized_end=9537 - _DESCRIBETOPICRESULT._serialized_start=9540 - _DESCRIBETOPICRESULT._serialized_end=10598 - _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_start=7704 - _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_end=7753 - _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_start=10220 - _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_end=10384 - _DESCRIBETOPICRESULT_TOPICSTATS._serialized_start=10387 - _DESCRIBETOPICRESULT_TOPICSTATS._serialized_end=10592 - _DESCRIBECONSUMERREQUEST._serialized_start=10601 - _DESCRIBECONSUMERREQUEST._serialized_end=10740 - _DESCRIBECONSUMERRESPONSE._serialized_start=10742 - _DESCRIBECONSUMERRESPONSE._serialized_end=10814 - _DESCRIBECONSUMERRESULT._serialized_start=10817 - _DESCRIBECONSUMERRESULT._serialized_end=11679 - _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_start=10985 - _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_end=11241 - _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_start=11244 - _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_end=11679 - _PARTITIONSTATS._serialized_start=11682 - _PARTITIONSTATS._serialized_end=11966 - _ALTERTOPICREQUEST._serialized_start=11969 - _ALTERTOPICREQUEST._serialized_end=12872 - _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_start=8249 - _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_end=8303 - _ALTERTOPICRESPONSE._serialized_start=12874 - _ALTERTOPICRESPONSE._serialized_end=12940 - _ALTERTOPICRESULT._serialized_start=12942 - _ALTERTOPICRESULT._serialized_end=12960 - _DROPTOPICREQUEST._serialized_start=12962 - _DROPTOPICREQUEST._serialized_end=13053 - _DROPTOPICRESPONSE._serialized_start=13055 - _DROPTOPICRESPONSE._serialized_end=13120 - _DROPTOPICRESULT._serialized_start=13122 - _DROPTOPICRESULT._serialized_end=13139 + _CODEC._serialized_start=13214 + _CODEC._serialized_end=13345 + _METERINGMODE._serialized_start=13347 + _METERINGMODE._serialized_end=13462 + _SUPPORTEDCODECS._serialized_start=255 + _SUPPORTEDCODECS._serialized_end=310 + _OFFSETSRANGE._serialized_start=312 + _OFFSETSRANGE._serialized_end=354 + _UPDATETOKENREQUEST._serialized_start=356 + _UPDATETOKENREQUEST._serialized_end=391 + _UPDATETOKENRESPONSE._serialized_start=393 + _UPDATETOKENRESPONSE._serialized_end=414 + _METADATAITEM._serialized_start=416 + _METADATAITEM._serialized_end=458 + _STREAMWRITEMESSAGE._serialized_start=461 + _STREAMWRITEMESSAGE._serialized_end=2772 + _STREAMWRITEMESSAGE_FROMCLIENT._serialized_start=484 + _STREAMWRITEMESSAGE_FROMCLIENT._serialized_end=713 + _STREAMWRITEMESSAGE_FROMSERVER._serialized_start=716 + _STREAMWRITEMESSAGE_FROMSERVER._serialized_end=1035 + _STREAMWRITEMESSAGE_INITREQUEST._serialized_start=1038 + _STREAMWRITEMESSAGE_INITREQUEST._serialized_end=1329 + _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._serialized_start=1258 + _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._serialized_end=1313 + _STREAMWRITEMESSAGE_INITRESPONSE._serialized_start=1332 + _STREAMWRITEMESSAGE_INITRESPONSE._serialized_end=1463 + _STREAMWRITEMESSAGE_WRITEREQUEST._serialized_start=1466 + _STREAMWRITEMESSAGE_WRITEREQUEST._serialized_end=1872 + _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA._serialized_start=1621 + _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA._serialized_end=1865 + _STREAMWRITEMESSAGE_WRITERESPONSE._serialized_start=1875 + _STREAMWRITEMESSAGE_WRITERESPONSE._serialized_end=2772 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK._serialized_start=2070 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK._serialized_end=2468 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN._serialized_start=2260 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN._serialized_end=2285 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED._serialized_start=2288 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED._serialized_end=2444 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON._serialized_start=2384 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON._serialized_end=2444 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS._serialized_start=2471 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS._serialized_end=2772 + _STREAMREADMESSAGE._serialized_start=2775 + _STREAMREADMESSAGE._serialized_end=6561 + _STREAMREADMESSAGE_PARTITIONSESSION._serialized_start=2796 + _STREAMREADMESSAGE_PARTITIONSESSION._serialized_end=2880 + _STREAMREADMESSAGE_FROMCLIENT._serialized_start=2883 + _STREAMREADMESSAGE_FROMCLIENT._serialized_end=3501 + _STREAMREADMESSAGE_FROMSERVER._serialized_start=3504 + _STREAMREADMESSAGE_FROMSERVER._serialized_end=4212 + _STREAMREADMESSAGE_INITREQUEST._serialized_start=4215 + _STREAMREADMESSAGE_INITREQUEST._serialized_end=4507 + _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS._serialized_start=4360 + _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS._serialized_end=4507 + _STREAMREADMESSAGE_INITRESPONSE._serialized_start=4509 + _STREAMREADMESSAGE_INITRESPONSE._serialized_end=4543 + _STREAMREADMESSAGE_READREQUEST._serialized_start=4545 + _STREAMREADMESSAGE_READREQUEST._serialized_end=4578 + _STREAMREADMESSAGE_READRESPONSE._serialized_start=4581 + _STREAMREADMESSAGE_READRESPONSE._serialized_end=5348 + _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA._serialized_start=4699 + _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA._serialized_end=4908 + _STREAMREADMESSAGE_READRESPONSE_BATCH._serialized_start=4911 + _STREAMREADMESSAGE_READRESPONSE_BATCH._serialized_end=5235 + _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._serialized_start=1258 + _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._serialized_end=1313 + _STREAMREADMESSAGE_READRESPONSE_PARTITIONDATA._serialized_start=5237 + _STREAMREADMESSAGE_READRESPONSE_PARTITIONDATA._serialized_end=5348 + _STREAMREADMESSAGE_COMMITOFFSETREQUEST._serialized_start=5351 + _STREAMREADMESSAGE_COMMITOFFSETREQUEST._serialized_end=5565 + _STREAMREADMESSAGE_COMMITOFFSETREQUEST_PARTITIONCOMMITOFFSET._serialized_start=5470 + _STREAMREADMESSAGE_COMMITOFFSETREQUEST_PARTITIONCOMMITOFFSET._serialized_end=5565 + _STREAMREADMESSAGE_COMMITOFFSETRESPONSE._serialized_start=5568 + _STREAMREADMESSAGE_COMMITOFFSETRESPONSE._serialized_end=5788 + _STREAMREADMESSAGE_COMMITOFFSETRESPONSE_PARTITIONCOMMITTEDOFFSET._serialized_start=5706 + _STREAMREADMESSAGE_COMMITOFFSETRESPONSE_PARTITIONCOMMITTEDOFFSET._serialized_end=5788 + _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST._serialized_start=5790 + _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST._serialized_end=5851 + _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE._serialized_start=5854 + _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE._serialized_end=6057 + _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST._serialized_start=6060 + _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST._serialized_end=6242 + _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE._serialized_start=6245 + _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE._serialized_end=6394 + _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST._serialized_start=6396 + _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST._serialized_end=6499 + _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE._serialized_start=6501 + _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE._serialized_end=6561 + _TRANSACTIONIDENTITY._serialized_start=6563 + _TRANSACTIONIDENTITY._serialized_end=6613 + _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_start=6616 + _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_end=7068 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_start=6850 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_end=7068 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_start=6976 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_end=7068 + _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_start=7070 + _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_end=7152 + _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_start=7154 + _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_end=7188 + _COMMITOFFSETREQUEST._serialized_start=7191 + _COMMITOFFSETREQUEST._serialized_end=7341 + _COMMITOFFSETRESPONSE._serialized_start=7343 + _COMMITOFFSETRESPONSE._serialized_end=7411 + _COMMITOFFSETRESULT._serialized_start=7413 + _COMMITOFFSETRESULT._serialized_end=7433 + _MULTIPLEWINDOWSSTAT._serialized_start=7435 + _MULTIPLEWINDOWSSTAT._serialized_end=7511 + _CONSUMER._serialized_start=7514 + _CONSUMER._serialized_end=8077 + _CONSUMER_ATTRIBUTESENTRY._serialized_start=7776 + _CONSUMER_ATTRIBUTESENTRY._serialized_end=7825 + _CONSUMER_CONSUMERSTATS._serialized_start=7828 + _CONSUMER_CONSUMERSTATS._serialized_end=8071 + _ALTERCONSUMER._serialized_start=8080 + _ALTERCONSUMER._serialized_end=8399 + _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_start=8321 + _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_end=8375 + _PARTITIONINGSETTINGS._serialized_start=8401 + _PARTITIONINGSETTINGS._serialized_end=8505 + _ALTERPARTITIONINGSETTINGS._serialized_start=8508 + _ALTERPARTITIONINGSETTINGS._serialized_end=8695 + _CREATETOPICREQUEST._serialized_start=8698 + _CREATETOPICREQUEST._serialized_end=9328 + _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_start=7776 + _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_end=7825 + _CREATETOPICRESPONSE._serialized_start=9330 + _CREATETOPICRESPONSE._serialized_end=9397 + _CREATETOPICRESULT._serialized_start=9399 + _CREATETOPICRESULT._serialized_end=9418 + _DESCRIBETOPICREQUEST._serialized_start=9420 + _DESCRIBETOPICREQUEST._serialized_end=9538 + _DESCRIBETOPICRESPONSE._serialized_start=9540 + _DESCRIBETOPICRESPONSE._serialized_end=9609 + _DESCRIBETOPICRESULT._serialized_start=9612 + _DESCRIBETOPICRESULT._serialized_end=10670 + _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_start=7776 + _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_end=7825 + _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_start=10292 + _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_end=10456 + _DESCRIBETOPICRESULT_TOPICSTATS._serialized_start=10459 + _DESCRIBETOPICRESULT_TOPICSTATS._serialized_end=10664 + _DESCRIBECONSUMERREQUEST._serialized_start=10673 + _DESCRIBECONSUMERREQUEST._serialized_end=10812 + _DESCRIBECONSUMERRESPONSE._serialized_start=10814 + _DESCRIBECONSUMERRESPONSE._serialized_end=10886 + _DESCRIBECONSUMERRESULT._serialized_start=10889 + _DESCRIBECONSUMERRESULT._serialized_end=11751 + _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_start=11057 + _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_end=11313 + _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_start=11316 + _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_end=11751 + _PARTITIONSTATS._serialized_start=11754 + _PARTITIONSTATS._serialized_end=12038 + _ALTERTOPICREQUEST._serialized_start=12041 + _ALTERTOPICREQUEST._serialized_end=12944 + _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_start=8321 + _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_end=8375 + _ALTERTOPICRESPONSE._serialized_start=12946 + _ALTERTOPICRESPONSE._serialized_end=13012 + _ALTERTOPICRESULT._serialized_start=13014 + _ALTERTOPICRESULT._serialized_end=13032 + _DROPTOPICREQUEST._serialized_start=13034 + _DROPTOPICREQUEST._serialized_end=13125 + _DROPTOPICRESPONSE._serialized_start=13127 + _DROPTOPICRESPONSE._serialized_end=13192 + _DROPTOPICRESULT._serialized_start=13194 + _DROPTOPICRESULT._serialized_end=13211 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_topic_pb2.pyi b/ydb/_grpc/v4/protos/ydb_topic_pb2.pyi index b3d6c66c..4fb867d6 100644 --- a/ydb/_grpc/v4/protos/ydb_topic_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_topic_pb2.pyi @@ -2,7 +2,6 @@ from protos import ydb_operation_pb2 as _ydb_operation_pb2 from protos import ydb_scheme_pb2 as _ydb_scheme_pb2 from protos import ydb_status_codes_pb2 as _ydb_status_codes_pb2 from protos import ydb_issue_message_pb2 as _ydb_issue_message_pb2 -from protos import ydb_table_pb2 as _ydb_table_pb2 from protos.annotations import validation_pb2 as _validation_pb2 from google.protobuf import duration_pb2 as _duration_pb2 from google.protobuf import timestamp_pb2 as _timestamp_pb2 @@ -23,44 +22,6 @@ METERING_MODE_REQUEST_UNITS: MeteringMode METERING_MODE_RESERVED_CAPACITY: MeteringMode METERING_MODE_UNSPECIFIED: MeteringMode -class AddOffsetsToTransactionRequest(_message.Message): - __slots__ = ["consumer", "operation_params", "session_id", "topics", "tx_control"] - class TopicOffsets(_message.Message): - __slots__ = ["partitions", "path"] - class PartitionOffsets(_message.Message): - __slots__ = ["partition_id", "partition_offsets"] - PARTITION_ID_FIELD_NUMBER: _ClassVar[int] - PARTITION_OFFSETS_FIELD_NUMBER: _ClassVar[int] - partition_id: int - partition_offsets: _containers.RepeatedCompositeFieldContainer[OffsetsRange] - def __init__(self, partition_id: _Optional[int] = ..., partition_offsets: _Optional[_Iterable[_Union[OffsetsRange, _Mapping]]] = ...) -> None: ... - PARTITIONS_FIELD_NUMBER: _ClassVar[int] - PATH_FIELD_NUMBER: _ClassVar[int] - partitions: _containers.RepeatedCompositeFieldContainer[AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets] - path: str - def __init__(self, path: _Optional[str] = ..., partitions: _Optional[_Iterable[_Union[AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets, _Mapping]]] = ...) -> None: ... - CONSUMER_FIELD_NUMBER: _ClassVar[int] - OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] - SESSION_ID_FIELD_NUMBER: _ClassVar[int] - TOPICS_FIELD_NUMBER: _ClassVar[int] - TX_CONTROL_FIELD_NUMBER: _ClassVar[int] - consumer: str - operation_params: _ydb_operation_pb2.OperationParams - session_id: str - topics: _containers.RepeatedCompositeFieldContainer[AddOffsetsToTransactionRequest.TopicOffsets] - tx_control: _ydb_table_pb2.TransactionControl - def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., session_id: _Optional[str] = ..., tx_control: _Optional[_Union[_ydb_table_pb2.TransactionControl, _Mapping]] = ..., topics: _Optional[_Iterable[_Union[AddOffsetsToTransactionRequest.TopicOffsets, _Mapping]]] = ..., consumer: _Optional[str] = ...) -> None: ... - -class AddOffsetsToTransactionResponse(_message.Message): - __slots__ = ["operation"] - OPERATION_FIELD_NUMBER: _ClassVar[int] - operation: _ydb_operation_pb2.Operation - def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... - -class AddOffsetsToTransactionResult(_message.Message): - __slots__ = [] - def __init__(self) -> None: ... - class AlterConsumer(_message.Message): __slots__ = ["alter_attributes", "name", "set_important", "set_read_from", "set_supported_codecs"] class AlterAttributesEntry(_message.Message): @@ -709,7 +670,7 @@ class StreamWriteMessage(_message.Message): supported_codecs: SupportedCodecs def __init__(self, last_seq_no: _Optional[int] = ..., session_id: _Optional[str] = ..., partition_id: _Optional[int] = ..., supported_codecs: _Optional[_Union[SupportedCodecs, _Mapping]] = ...) -> None: ... class WriteRequest(_message.Message): - __slots__ = ["codec", "messages"] + __slots__ = ["codec", "messages", "tx"] class MessageData(_message.Message): __slots__ = ["created_at", "data", "message_group_id", "metadata_items", "partition_id", "seq_no", "uncompressed_size"] CREATED_AT_FIELD_NUMBER: _ClassVar[int] @@ -729,9 +690,11 @@ class StreamWriteMessage(_message.Message): def __init__(self, seq_no: _Optional[int] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., data: _Optional[bytes] = ..., uncompressed_size: _Optional[int] = ..., message_group_id: _Optional[str] = ..., partition_id: _Optional[int] = ..., metadata_items: _Optional[_Iterable[_Union[MetadataItem, _Mapping]]] = ...) -> None: ... CODEC_FIELD_NUMBER: _ClassVar[int] MESSAGES_FIELD_NUMBER: _ClassVar[int] + TX_FIELD_NUMBER: _ClassVar[int] codec: int messages: _containers.RepeatedCompositeFieldContainer[StreamWriteMessage.WriteRequest.MessageData] - def __init__(self, messages: _Optional[_Iterable[_Union[StreamWriteMessage.WriteRequest.MessageData, _Mapping]]] = ..., codec: _Optional[int] = ...) -> None: ... + tx: TransactionIdentity + def __init__(self, messages: _Optional[_Iterable[_Union[StreamWriteMessage.WriteRequest.MessageData, _Mapping]]] = ..., codec: _Optional[int] = ..., tx: _Optional[_Union[TransactionIdentity, _Mapping]] = ...) -> None: ... class WriteResponse(_message.Message): __slots__ = ["acks", "partition_id", "write_statistics"] class WriteAck(_message.Message): @@ -785,6 +748,50 @@ class SupportedCodecs(_message.Message): codecs: _containers.RepeatedScalarFieldContainer[int] def __init__(self, codecs: _Optional[_Iterable[int]] = ...) -> None: ... +class TransactionIdentity(_message.Message): + __slots__ = ["id", "session"] + ID_FIELD_NUMBER: _ClassVar[int] + SESSION_FIELD_NUMBER: _ClassVar[int] + id: str + session: str + def __init__(self, id: _Optional[str] = ..., session: _Optional[str] = ...) -> None: ... + +class UpdateOffsetsInTransactionRequest(_message.Message): + __slots__ = ["consumer", "operation_params", "topics", "tx"] + class TopicOffsets(_message.Message): + __slots__ = ["partitions", "path"] + class PartitionOffsets(_message.Message): + __slots__ = ["partition_id", "partition_offsets"] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_OFFSETS_FIELD_NUMBER: _ClassVar[int] + partition_id: int + partition_offsets: _containers.RepeatedCompositeFieldContainer[OffsetsRange] + def __init__(self, partition_id: _Optional[int] = ..., partition_offsets: _Optional[_Iterable[_Union[OffsetsRange, _Mapping]]] = ...) -> None: ... + PARTITIONS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + partitions: _containers.RepeatedCompositeFieldContainer[UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets] + path: str + def __init__(self, path: _Optional[str] = ..., partitions: _Optional[_Iterable[_Union[UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets, _Mapping]]] = ...) -> None: ... + CONSUMER_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + TOPICS_FIELD_NUMBER: _ClassVar[int] + TX_FIELD_NUMBER: _ClassVar[int] + consumer: str + operation_params: _ydb_operation_pb2.OperationParams + topics: _containers.RepeatedCompositeFieldContainer[UpdateOffsetsInTransactionRequest.TopicOffsets] + tx: TransactionIdentity + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., tx: _Optional[_Union[TransactionIdentity, _Mapping]] = ..., topics: _Optional[_Iterable[_Union[UpdateOffsetsInTransactionRequest.TopicOffsets, _Mapping]]] = ..., consumer: _Optional[str] = ...) -> None: ... + +class UpdateOffsetsInTransactionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class UpdateOffsetsInTransactionResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + class UpdateTokenRequest(_message.Message): __slots__ = ["token"] TOKEN_FIELD_NUMBER: _ClassVar[int] diff --git a/ydb/_grpc/v4/ydb_topic_v1_pb2.py b/ydb/_grpc/v4/ydb_topic_v1_pb2.py index 8209367f..919ea7a3 100644 --- a/ydb/_grpc/v4/ydb_topic_v1_pb2.py +++ b/ydb/_grpc/v4/ydb_topic_v1_pb2.py @@ -15,7 +15,7 @@ from ydb._grpc.v4.protos import ydb_topic_pb2 as protos_dot_ydb__topic__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12ydb_topic_v1.proto\x12\x0cYdb.Topic.V1\x1a\x16protos/ydb_topic.proto2\xbc\x05\n\x0cTopicService\x12\x65\n\x0bStreamWrite\x12(.Ydb.Topic.StreamWriteMessage.FromClient\x1a(.Ydb.Topic.StreamWriteMessage.FromServer(\x01\x30\x01\x12\x62\n\nStreamRead\x12\'.Ydb.Topic.StreamReadMessage.FromClient\x1a\'.Ydb.Topic.StreamReadMessage.FromServer(\x01\x30\x01\x12O\n\x0c\x43ommitOffset\x12\x1e.Ydb.Topic.CommitOffsetRequest\x1a\x1f.Ydb.Topic.CommitOffsetResponse\x12L\n\x0b\x43reateTopic\x12\x1d.Ydb.Topic.CreateTopicRequest\x1a\x1e.Ydb.Topic.CreateTopicResponse\x12R\n\rDescribeTopic\x12\x1f.Ydb.Topic.DescribeTopicRequest\x1a .Ydb.Topic.DescribeTopicResponse\x12[\n\x10\x44\x65scribeConsumer\x12\".Ydb.Topic.DescribeConsumerRequest\x1a#.Ydb.Topic.DescribeConsumerResponse\x12I\n\nAlterTopic\x12\x1c.Ydb.Topic.AlterTopicRequest\x1a\x1d.Ydb.Topic.AlterTopicResponse\x12\x46\n\tDropTopic\x12\x1b.Ydb.Topic.DropTopicRequest\x1a\x1c.Ydb.Topic.DropTopicResponseBR\n\x17tech.ydb.proto.topic.v1Z4github.com/ydb-platform/ydb-go-genproto/Ydb_Topic_V1\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12ydb_topic_v1.proto\x12\x0cYdb.Topic.V1\x1a\x16protos/ydb_topic.proto2\xb7\x06\n\x0cTopicService\x12\x65\n\x0bStreamWrite\x12(.Ydb.Topic.StreamWriteMessage.FromClient\x1a(.Ydb.Topic.StreamWriteMessage.FromServer(\x01\x30\x01\x12\x62\n\nStreamRead\x12\'.Ydb.Topic.StreamReadMessage.FromClient\x1a\'.Ydb.Topic.StreamReadMessage.FromServer(\x01\x30\x01\x12O\n\x0c\x43ommitOffset\x12\x1e.Ydb.Topic.CommitOffsetRequest\x1a\x1f.Ydb.Topic.CommitOffsetResponse\x12y\n\x1aUpdateOffsetsInTransaction\x12,.Ydb.Topic.UpdateOffsetsInTransactionRequest\x1a-.Ydb.Topic.UpdateOffsetsInTransactionResponse\x12L\n\x0b\x43reateTopic\x12\x1d.Ydb.Topic.CreateTopicRequest\x1a\x1e.Ydb.Topic.CreateTopicResponse\x12R\n\rDescribeTopic\x12\x1f.Ydb.Topic.DescribeTopicRequest\x1a .Ydb.Topic.DescribeTopicResponse\x12[\n\x10\x44\x65scribeConsumer\x12\".Ydb.Topic.DescribeConsumerRequest\x1a#.Ydb.Topic.DescribeConsumerResponse\x12I\n\nAlterTopic\x12\x1c.Ydb.Topic.AlterTopicRequest\x1a\x1d.Ydb.Topic.AlterTopicResponse\x12\x46\n\tDropTopic\x12\x1b.Ydb.Topic.DropTopicRequest\x1a\x1c.Ydb.Topic.DropTopicResponseBR\n\x17tech.ydb.proto.topic.v1Z4github.com/ydb-platform/ydb-go-genproto/Ydb_Topic_V1\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_topic_v1_pb2', globals()) @@ -24,5 +24,5 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\027tech.ydb.proto.topic.v1Z4github.com/ydb-platform/ydb-go-genproto/Ydb_Topic_V1\370\001\001' _TOPICSERVICE._serialized_start=61 - _TOPICSERVICE._serialized_end=761 + _TOPICSERVICE._serialized_end=884 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/ydb_topic_v1_pb2_grpc.py b/ydb/_grpc/v4/ydb_topic_v1_pb2_grpc.py index d02be2ad..6c58795b 100644 --- a/ydb/_grpc/v4/ydb_topic_v1_pb2_grpc.py +++ b/ydb/_grpc/v4/ydb_topic_v1_pb2_grpc.py @@ -29,6 +29,11 @@ def __init__(self, channel): request_serializer=protos_dot_ydb__topic__pb2.CommitOffsetRequest.SerializeToString, response_deserializer=protos_dot_ydb__topic__pb2.CommitOffsetResponse.FromString, ) + self.UpdateOffsetsInTransaction = channel.unary_unary( + '/Ydb.Topic.V1.TopicService/UpdateOffsetsInTransaction', + request_serializer=protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionResponse.FromString, + ) self.CreateTopic = channel.unary_unary( '/Ydb.Topic.V1.TopicService/CreateTopic', request_serializer=protos_dot_ydb__topic__pb2.CreateTopicRequest.SerializeToString, @@ -130,6 +135,13 @@ def CommitOffset(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def UpdateOffsetsInTransaction(self, request, context): + """Add information about offset ranges to the transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def CreateTopic(self, request, context): """Create topic command. """ @@ -183,6 +195,11 @@ def add_TopicServiceServicer_to_server(servicer, server): request_deserializer=protos_dot_ydb__topic__pb2.CommitOffsetRequest.FromString, response_serializer=protos_dot_ydb__topic__pb2.CommitOffsetResponse.SerializeToString, ), + 'UpdateOffsetsInTransaction': grpc.unary_unary_rpc_method_handler( + servicer.UpdateOffsetsInTransaction, + request_deserializer=protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionRequest.FromString, + response_serializer=protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionResponse.SerializeToString, + ), 'CreateTopic': grpc.unary_unary_rpc_method_handler( servicer.CreateTopic, request_deserializer=protos_dot_ydb__topic__pb2.CreateTopicRequest.FromString, @@ -269,6 +286,23 @@ def CommitOffset(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def UpdateOffsetsInTransaction(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, '/Ydb.Topic.V1.TopicService/UpdateOffsetsInTransaction', + protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionRequest.SerializeToString, + protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def CreateTopic(request, target, From f4ebefc932e59ec85b9732350ecf9fd099396f0f Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:25 +0300 Subject: [PATCH 036/429] Add query service to apis --- ydb/_apis.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ydb/_apis.py b/ydb/_apis.py index 8c0b1164..2a9a14e8 100644 --- a/ydb/_apis.py +++ b/ydb/_apis.py @@ -10,6 +10,7 @@ ydb_table_v1_pb2_grpc, ydb_operation_v1_pb2_grpc, ydb_topic_v1_pb2_grpc, + ydb_query_v1_pb2_grpc, ) from ._grpc.v4.protos import ( @@ -20,6 +21,7 @@ ydb_value_pb2, ydb_operation_pb2, ydb_common_pb2, + ydb_query_pb2, ) else: @@ -30,6 +32,7 @@ ydb_table_v1_pb2_grpc, ydb_operation_v1_pb2_grpc, ydb_topic_v1_pb2_grpc, + ydb_query_v1_pb2_grpc, ) from ._grpc.common.protos import ( @@ -40,6 +43,7 @@ ydb_value_pb2, ydb_operation_pb2, ydb_common_pb2, + ydb_query_pb2, ) @@ -51,6 +55,7 @@ ydb_table = ydb_table_pb2 ydb_discovery = ydb_discovery_pb2 ydb_operation = ydb_operation_pb2 +ydb_query = ydb_query_pb2 class CmsService(object): @@ -111,3 +116,19 @@ class TopicService(object): DropTopic = "DropTopic" StreamRead = "StreamRead" StreamWrite = "StreamWrite" + + +class QueryService(object): + Stub = ydb_query_v1_pb2_grpc.QueryServiceStub + + CreateSession = "CreateSession" + DeleteSession = "DeleteSession" + AttachSession = "AttachSession" + + BeginTransaction = "BeginTransaction" + CommitTransaction = "CommitTransaction" + RollbackTransaction = "RollbackTransaction" + + ExecuteQuery = "ExecuteQuery" + ExecuteScript = "ExecuteScript" + FetchScriptResults = "FetchScriptResults" From 4a576b927118b919ea13f5db71a8f8bd0ae71102 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:25 +0300 Subject: [PATCH 037/429] session create --- ydb/_grpc/grpcwrapper/common_utils.py | 13 ++++ ydb/_grpc/grpcwrapper/ydb_query.py | 40 ++++++++++++ ydb/query/__init__.py | 0 ydb/query/session.py | 93 +++++++++++++++++++++++++++ 4 files changed, 146 insertions(+) create mode 100644 ydb/_grpc/grpcwrapper/ydb_query.py create mode 100644 ydb/query/__init__.py create mode 100644 ydb/query/session.py diff --git a/ydb/_grpc/grpcwrapper/common_utils.py b/ydb/_grpc/grpcwrapper/common_utils.py index a7febd5b..966a1ada 100644 --- a/ydb/_grpc/grpcwrapper/common_utils.py +++ b/ydb/_grpc/grpcwrapper/common_utils.py @@ -256,6 +256,19 @@ def issue_to_str(cls, issue: ydb_issue_message_pb2.IssueMessage): return res +ResultType = typing.TypeVar("ResultType", bound=IFromProtoWithProtoType) + + +def create_result_wrapper( + result_type: typing.Type[ResultType], +) -> typing.Callable[[typing.Any, typing.Any, typing.Any], ResultType]: + def wrapper(rpc_state, response_pb, driver=None): + # issues._process_response(response_pb.operation) + return result_type.from_proto(response_pb) + + return wrapper + + def callback_from_asyncio(callback: Union[Callable, Coroutine]) -> [asyncio.Future, asyncio.Task]: loop = asyncio.get_running_loop() diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py new file mode 100644 index 00000000..bd58e147 --- /dev/null +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -0,0 +1,40 @@ +from dataclasses import dataclass +import typing +from typing import Optional + +from google.protobuf.message import Message + +# Workaround for good IDE and universal for runtime +if typing.TYPE_CHECKING: + from ..v4.protos import ydb_query_pb2 +else: + from ..common.protos import ydb_query_pb2 + +from .common_utils import ( + IFromProto, + IFromProtoWithProtoType, + IToProto, + IToPublic, + IFromPublic, + ServerStatus, + UnknownGrpcMessageError, + proto_duration_from_timedelta, + proto_timestamp_from_datetime, + datetime_from_proto_timestamp, + timedelta_from_proto_duration, +) + +@dataclass +class CreateSessionResponse(IFromProto): + status: Optional[ServerStatus] + session_id: str + node_id: int + + @staticmethod + def from_proto(msg: ydb_query_pb2.CreateSessionResponse) -> "CreateSessionResponse": + return CreateSessionResponse( + status=ServerStatus(msg.status, msg.issues), + session_id=msg.session_id, + node_id=msg.node_id, + ) + diff --git a/ydb/query/__init__.py b/ydb/query/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ydb/query/session.py b/ydb/query/session.py new file mode 100644 index 00000000..8bff8ff0 --- /dev/null +++ b/ydb/query/session.py @@ -0,0 +1,93 @@ +import abc +from abc import abstractmethod + +from .. import _apis, issues +from .._grpc.grpcwrapper import common_utils +from .._grpc.grpcwrapper import ydb_query as _ydb_query + + +class ISession(abc.ABC): + + @abc.abstractmethod + def create(self): + pass + + @abc.abstractmethod + def delete(self): + pass + + @property + @abstractmethod + def session_id(self): + pass + +class SessionState(object): + def __init__(self, settings=None): + self._settings = settings + self._session_id = None + self._node_id = None + self._is_closed = False + + @property + def session_id(self): + return self._session_id + + @property + def node_id(self): + return self._node_id + + def set_id(self, session_id): + self._session_id = session_id + return self + + def set_node_id(self, node_id): + self._node_id = node_id + return self + + + +class QuerySession(ISession): + def __init__(self, driver, settings=None): + self._driver = driver + self._state = SessionState(settings) + + @property + def session_id(self): + return self._state.session_id + + def create(self): + if self._state.session_id is not None: + return self + + # TODO: check what is settings + + res = self._driver( + _apis.ydb_query.CreateSessionRequest(), + _apis.QueryService.Stub, + _apis.QueryService.CreateSession, + common_utils.create_result_wrapper(_ydb_query.CreateSessionResponse), + ) + + self._state.set_id(res.session_id).set_node_id(res.node_id) + + return None + + def delete(self): + pass + + +if __name__ == "__main__": + + from ..driver import Driver + + endpoint = "grpc://localhost:2136" + database = "/local" + + with Driver(endpoint=endpoint, database=database) as driver: + driver.wait(timeout=5) + session = QuerySession(driver) + print(session.session_id) + + session.create() + + print(session.session_id) From 415c567132a5ae1ade8fa5602712af7fcf118ea2 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:25 +0300 Subject: [PATCH 038/429] session delete --- ydb/_grpc/grpcwrapper/ydb_query.py | 16 +++++++++++ ydb/query/session.py | 43 ++++++++++++++++++++++++++++-- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index bd58e147..70008b9e 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -38,3 +38,19 @@ def from_proto(msg: ydb_query_pb2.CreateSessionResponse) -> "CreateSessionRespon node_id=msg.node_id, ) + +@dataclass +class DeleteSessionRequest(IToProto): + session_id: str + + def to_proto(self) -> ydb_query_pb2.DeleteSessionRequest: + return ydb_query_pb2.DeleteSessionRequest(session_id=self.session_id) + + +@dataclass +class DeleteSessionResponse(IFromProto): + status: Optional[ServerStatus] + + @staticmethod + def from_proto(msg: ydb_query_pb2.DeleteSessionResponse) -> "DeleteSessionResponse": + return DeleteSessionResponse(status=ServerStatus(msg.status, msg.issues)) diff --git a/ydb/query/session.py b/ydb/query/session.py index 8bff8ff0..1e8f3384 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -1,11 +1,15 @@ import abc from abc import abstractmethod +import logging from .. import _apis, issues from .._grpc.grpcwrapper import common_utils from .._grpc.grpcwrapper import ydb_query as _ydb_query +logger = logging.getLogger(__name__) + + class ISession(abc.ABC): @abc.abstractmethod @@ -24,9 +28,12 @@ def session_id(self): class SessionState(object): def __init__(self, settings=None): self._settings = settings + self.reset() + + def reset(self): self._session_id = None self._node_id = None - self._is_closed = False + self._is_attached = False @property def session_id(self): @@ -44,6 +51,9 @@ def set_node_id(self, node_id): self._node_id = node_id return self + def attached(self): + return self._is_attached + class QuerySession(ISession): @@ -55,6 +65,10 @@ def __init__(self, driver, settings=None): def session_id(self): return self._state.session_id + @property + def node_id(self): + return self._state.node_id + def create(self): if self._state.session_id is not None: return self @@ -68,12 +82,29 @@ def create(self): common_utils.create_result_wrapper(_ydb_query.CreateSessionResponse), ) + logging.info("session.create: success") + self._state.set_id(res.session_id).set_node_id(res.node_id) return None def delete(self): - pass + + if self._state.session_id is None: + return None + + res = self._driver( + _apis.ydb_query.DeleteSessionRequest(session_id=self._state.session_id), + _apis.QueryService.Stub, + _apis.QueryService.DeleteSession, + common_utils.create_result_wrapper(_ydb_query.DeleteSessionResponse), + ) + logging.info("session.delete: success") + + self._state.reset() + + return None + if __name__ == "__main__": @@ -87,7 +118,15 @@ def delete(self): driver.wait(timeout=5) session = QuerySession(driver) print(session.session_id) + print(session.node_id) session.create() print(session.session_id) + print(session.node_id) + + session.delete() + + print(session.session_id) + print(session.node_id) + From 8f345ac27473337ba340cebe4e14a9896cea1358 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:25 +0300 Subject: [PATCH 039/429] temp --- ydb/_grpc/grpcwrapper/ydb_query.py | 10 +++++----- ydb/query/session.py | 19 ++++++++++++++++++- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index 70008b9e..a7bf8f4c 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -39,12 +39,12 @@ def from_proto(msg: ydb_query_pb2.CreateSessionResponse) -> "CreateSessionRespon ) -@dataclass -class DeleteSessionRequest(IToProto): - session_id: str +# @dataclass +# class DeleteSessionRequest(IToProto): +# session_id: str - def to_proto(self) -> ydb_query_pb2.DeleteSessionRequest: - return ydb_query_pb2.DeleteSessionRequest(session_id=self.session_id) +# def to_proto(self) -> ydb_query_pb2.DeleteSessionRequest: +# return ydb_query_pb2.DeleteSessionRequest(session_id=self.session_id) @dataclass diff --git a/ydb/query/session.py b/ydb/query/session.py index 1e8f3384..f025f10b 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -2,7 +2,7 @@ from abc import abstractmethod import logging -from .. import _apis, issues +from .. import _apis, issues, _utilities from .._grpc.grpcwrapper import common_utils from .._grpc.grpcwrapper import ydb_query as _ydb_query @@ -105,6 +105,23 @@ def delete(self): return None + # def attach(self): + # if self._state.attached(): + # return self + + # stream_it = self._driver( + # _apis.ydb_query.AttachSessionRequest(session_id=self._state.session_id), + # _apis.QueryService.Stub, + # _apis.QueryService.AttachSession, + # common_utils.create_result_wrapper(_ydb_query.AttachSessionResponse), + # ) + + # it = _utilities.SyncResponseIterator( + + # ) + + # return None + if __name__ == "__main__": From 0ffe5453f9d2c92ab9134672e05d4bdd35aa5b65 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:25 +0300 Subject: [PATCH 040/429] Refactor wrappers to split UnaryStream and StreamStream wrappers --- ydb/_grpc/grpcwrapper/common_utils.py | 74 ++++++++++++++++------- ydb/_topic_common/common_test.py | 8 +-- ydb/_topic_reader/topic_reader_asyncio.py | 4 +- ydb/_topic_writer/topic_writer_asyncio.py | 4 +- 4 files changed, 59 insertions(+), 31 deletions(-) diff --git a/ydb/_grpc/grpcwrapper/common_utils.py b/ydb/_grpc/grpcwrapper/common_utils.py index 966a1ada..5d71f4d0 100644 --- a/ydb/_grpc/grpcwrapper/common_utils.py +++ b/ydb/_grpc/grpcwrapper/common_utils.py @@ -145,7 +145,7 @@ def close(self): SupportedDriverType = Union[ydb.Driver, ydb.aio.Driver] -class GrpcWrapperAsyncIO(IGrpcWrapperAsyncIO): +class AbstractGrpcWrapperAsyncIO(IGrpcWrapperAsyncIO, abc.ABC): from_client_grpc: asyncio.Queue from_server_grpc: AsyncIterator convert_server_grpc_to_wrapper: Callable[[Any], Any] @@ -163,13 +163,6 @@ def __init__(self, convert_server_grpc_to_wrapper): def __del__(self): self._clean_executor(wait=False) - async def start(self, driver: SupportedDriverType, stub, method): - if asyncio.iscoroutinefunction(driver.__call__): - await self._start_asyncio_driver(driver, stub, method) - else: - await self._start_sync_driver(driver, stub, method) - self._connection_state = "started" - def close(self): self.from_client_grpc.put_nowait(_stop_grpc_connection_marker) if self._stream_call: @@ -181,6 +174,35 @@ def _clean_executor(self, wait: bool): if self._wait_executor: self._wait_executor.shutdown(wait) + async def receive(self) -> Any: + # todo handle grpc exceptions and convert it to internal exceptions + try: + grpc_message = await self.from_server_grpc.__anext__() + except (grpc.RpcError, grpc.aio.AioRpcError) as e: + raise connection._rpc_error_handler(self._connection_state, e) + + issues._process_response(grpc_message) + + if self._connection_state != "has_received_messages": + self._connection_state = "has_received_messages" + + # print("rekby, grpc, received", grpc_message) + return self.convert_server_grpc_to_wrapper(grpc_message) + + def write(self, wrap_message: IToProto): + grpc_message = wrap_message.to_proto() + # print("rekby, grpc, send", grpc_message) + self.from_client_grpc.put_nowait(grpc_message) + + +class GrpcWrapperStreamStreamAsyncIO(AbstractGrpcWrapperAsyncIO): + async def start(self, driver: SupportedDriverType, stub, method): + if asyncio.iscoroutinefunction(driver.__call__): + await self._start_asyncio_driver(driver, stub, method) + else: + await self._start_sync_driver(driver, stub, method) + self._connection_state = "started" + async def _start_asyncio_driver(self, driver: ydb.aio.Driver, stub, method): requests_iterator = QueueToIteratorAsyncIO(self.from_client_grpc) stream_call = await driver( @@ -199,25 +221,31 @@ async def _start_sync_driver(self, driver: ydb.Driver, stub, method): self._stream_call = stream_call self.from_server_grpc = SyncToAsyncIterator(stream_call.__iter__(), self._wait_executor) - async def receive(self) -> Any: - # todo handle grpc exceptions and convert it to internal exceptions - try: - grpc_message = await self.from_server_grpc.__anext__() - except (grpc.RpcError, grpc.aio.AioRpcError) as e: - raise connection._rpc_error_handler(self._connection_state, e) - issues._process_response(grpc_message) +class GrpcWrapperUnaryStreamAsyncIO(AbstractGrpcWrapperAsyncIO): + async def start(self, driver: SupportedDriverType, request, stub, method): + if asyncio.iscoroutinefunction(driver.__call__): + await self._start_asyncio_driver(driver, request, stub, method) + else: + await self._start_sync_driver(driver, request, stub, method) + self._connection_state = "started" - if self._connection_state != "has_received_messages": - self._connection_state = "has_received_messages" + async def _start_asyncio_driver(self, driver: ydb.aio.Driver, request, stub, method): + stream_call = await driver( + request, + stub, + method, + ) + self._stream_call = stream_call + self.from_server_grpc = stream_call.__aiter__() - # print("rekby, grpc, received", grpc_message) - return self.convert_server_grpc_to_wrapper(grpc_message) + async def _start_sync_driver(self, driver: ydb.Driver, request, stub, method): + self._wait_executor = concurrent.futures.ThreadPoolExecutor(max_workers=1) + + stream_call = await to_thread(driver, request, stub, method, executor=self._wait_executor) + self._stream_call = stream_call + self.from_server_grpc = SyncToAsyncIterator(stream_call.__iter__(), self._wait_executor) - def write(self, wrap_message: IToProto): - grpc_message = wrap_message.to_proto() - # print("rekby, grpc, send", grpc_message) - self.from_client_grpc.put_nowait(grpc_message) @dataclass(init=False) diff --git a/ydb/_topic_common/common_test.py b/ydb/_topic_common/common_test.py index b31f9af9..1dadaa04 100644 --- a/ydb/_topic_common/common_test.py +++ b/ydb/_topic_common/common_test.py @@ -8,7 +8,7 @@ from .common import CallFromSyncToAsync from .._grpc.grpcwrapper.common_utils import ( - GrpcWrapperAsyncIO, + GrpcWrapperStreamStreamAsyncIO, ServerStatus, callback_from_asyncio, ) @@ -77,7 +77,7 @@ async def async_failed(): @pytest.mark.asyncio -class TestGrpcWrapperAsyncIO: +class TestGrpcWrapperStreamStreamAsyncIO: async def test_convert_grpc_errors_to_ydb(self): class TestError(grpc.RpcError, grpc.Call): def __init__(self): @@ -93,7 +93,7 @@ class FromServerMock: async def __anext__(self): raise TestError() - wrapper = GrpcWrapperAsyncIO(lambda: None) + wrapper = GrpcWrapperStreamStreamAsyncIO(lambda: None) wrapper.from_server_grpc = FromServerMock() with pytest.raises(issues.Unauthenticated): @@ -107,7 +107,7 @@ async def __anext__(self): issues=[], ) - wrapper = GrpcWrapperAsyncIO(lambda: None) + wrapper = GrpcWrapperStreamStreamAsyncIO(lambda: None) wrapper.from_server_grpc = FromServerMock() with pytest.raises(issues.Overloaded): diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 81c6d9f4..8cc48a1d 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -18,7 +18,7 @@ from .._grpc.grpcwrapper.common_utils import ( IGrpcWrapperAsyncIO, SupportedDriverType, - GrpcWrapperAsyncIO, + GrpcWrapperStreamStreamAsyncIO, ) from .._grpc.grpcwrapper.ydb_topic import ( StreamReadMessage, @@ -308,7 +308,7 @@ async def create( driver: SupportedDriverType, settings: topic_reader.PublicReaderSettings, ) -> "ReaderStream": - stream = GrpcWrapperAsyncIO(StreamReadMessage.FromServer.from_proto) + stream = GrpcWrapperStreamStreamAsyncIO(StreamReadMessage.FromServer.from_proto) await stream.start(driver, _apis.TopicService.Stub, _apis.TopicService.StreamRead) diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index 007c8a54..064f19ce 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -39,7 +39,7 @@ from .._grpc.grpcwrapper.common_utils import ( IGrpcWrapperAsyncIO, SupportedDriverType, - GrpcWrapperAsyncIO, + GrpcWrapperStreamStreamAsyncIO, ) logger = logging.getLogger(__name__) @@ -613,7 +613,7 @@ async def create( init_request: StreamWriteMessage.InitRequest, update_token_interval: Optional[Union[int, float]] = None, ) -> "WriterAsyncIOStream": - stream = GrpcWrapperAsyncIO(StreamWriteMessage.FromServer.from_proto) + stream = GrpcWrapperStreamStreamAsyncIO(StreamWriteMessage.FromServer.from_proto) await stream.start(driver, _apis.TopicService.Stub, _apis.TopicService.StreamWrite) From f266cbb58a73ce92db6b7eca545f6a5c000e7684 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:25 +0300 Subject: [PATCH 041/429] attach session --- ydb/_grpc/grpcwrapper/ydb_query.py | 16 ++++ ydb/query/session.py | 133 ++++++++++++++++++++++------- 2 files changed, 119 insertions(+), 30 deletions(-) diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index a7bf8f4c..36ddfeba 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -54,3 +54,19 @@ class DeleteSessionResponse(IFromProto): @staticmethod def from_proto(msg: ydb_query_pb2.DeleteSessionResponse) -> "DeleteSessionResponse": return DeleteSessionResponse(status=ServerStatus(msg.status, msg.issues)) + + +@dataclass +class AttachSessionRequest(IToProto): + session_id: str + + def to_proto(self) -> ydb_query_pb2.AttachSessionRequest: + return ydb_query_pb2.AttachSessionRequest(session_id=self.session_id) + +# @dataclass +# class SessionState(IFromProto): +# status: Optional[ServerStatus] + +# @staticmethod +# def from_proto(msg: ydb_query_pb2.SessionState) -> "SessionState": +# return SessionState(status=ServerStatus(msg.status, msg.issues)) \ No newline at end of file diff --git a/ydb/query/session.py b/ydb/query/session.py index f025f10b..1667a943 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -1,6 +1,10 @@ import abc from abc import abstractmethod +import asyncio import logging +from typing import ( + Set, +) from .. import _apis, issues, _utilities from .._grpc.grpcwrapper import common_utils @@ -25,7 +29,7 @@ def delete(self): def session_id(self): pass -class SessionState(object): +class SessionState: def __init__(self, settings=None): self._settings = settings self.reset() @@ -51,6 +55,10 @@ def set_node_id(self, node_id): self._node_id = node_id return self + def set_attached(self, is_attached): + self._is_attached = is_attached + + @property def attached(self): return self._is_attached @@ -69,13 +77,13 @@ def session_id(self): def node_id(self): return self._state.node_id - def create(self): + async def create(self): if self._state.session_id is not None: return self # TODO: check what is settings - res = self._driver( + res = await self._driver( _apis.ydb_query.CreateSessionRequest(), _apis.QueryService.Stub, _apis.QueryService.CreateSession, @@ -88,12 +96,12 @@ def create(self): return None - def delete(self): + async def delete(self): if self._state.session_id is None: return None - res = self._driver( + res = await self._driver( _apis.ydb_query.DeleteSessionRequest(session_id=self._state.session_id), _apis.QueryService.Stub, _apis.QueryService.DeleteSession, @@ -102,48 +110,113 @@ def delete(self): logging.info("session.delete: success") self._state.reset() + if self._stream is not None: + await self._stream.close() + self._stream = None return None - # def attach(self): - # if self._state.attached(): - # return self + async def attach(self): + self._stream = await SessionStateReaderStream.create(self._driver, self._state) - # stream_it = self._driver( - # _apis.ydb_query.AttachSessionRequest(session_id=self._state.session_id), - # _apis.QueryService.Stub, - # _apis.QueryService.AttachSession, - # common_utils.create_result_wrapper(_ydb_query.AttachSessionResponse), - # ) + print(self._state.attached) - # it = _utilities.SyncResponseIterator( - # ) - # return None +class SessionStateReaderStream: + _started: bool + _stream: common_utils.IGrpcWrapperAsyncIO + _session: QuerySession + _background_tasks: Set[asyncio.Task] + def __init__(self, session_state: SessionState): + self._session_state = session_state + self._background_tasks = set() + self._started = False -if __name__ == "__main__": - from ..driver import Driver + @staticmethod + async def create(driver: common_utils.SupportedDriverType, session_state: SessionState): + stream = common_utils.GrpcWrapperUnaryStreamAsyncIO(common_utils.ServerStatus.from_proto) + await stream.start( + driver, + _ydb_query.AttachSessionRequest(session_id=session_state.session_id).to_proto(), + _apis.QueryService.Stub, + _apis.QueryService.AttachSession + ) + + reader = SessionStateReaderStream(session_state) + + await reader._start(stream) + + return reader + + async def _start(self, stream: common_utils.IGrpcWrapperAsyncIO): + if self._started: + return # TODO: error + + self._started = True + self._stream = stream + + response = await self._stream.receive() + + if response.is_success(): + self._session_state.set_attached(True) + else: + raise common_utils.YdbError(response.error) + + self._background_tasks.add(asyncio.create_task(self._update_session_state_loop(), name="update_session_state_loop")) + + return response + + async def _update_session_state_loop(self): + while True: + response = await self._stream.receive() + + if response.is_success(): + pass + else: + self._session_state.set_attached(False) + + async def close(self): + self._stream.close() + for task in self._background_tasks: + task.cancel() + + if self._background_tasks: + await asyncio.wait(self._background_tasks) + + +async def main(): + from ..aio.driver import Driver endpoint = "grpc://localhost:2136" database = "/local" - with Driver(endpoint=endpoint, database=database) as driver: - driver.wait(timeout=5) - session = QuerySession(driver) - print(session.session_id) - print(session.node_id) + driver = Driver(endpoint=endpoint, database=database) # Creating new database driver to execute queries - session.create() + await driver.wait(timeout=10) # Wait until driver can execute calls - print(session.session_id) - print(session.node_id) + session = QuerySession(driver) - session.delete() + print(session.session_id) + print(session.node_id) - print(session.session_id) - print(session.node_id) + await session.create() + + print(session.session_id) + print(session.node_id) + + + await session.attach() + + await session.delete() + + print(session.session_id) + print(session.node_id) + +if __name__ == "__main__": + import asyncio + asyncio.run(main()) From 1f9c7283532bf92af499f4b2c8de58015a1bf7f9 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:25 +0300 Subject: [PATCH 042/429] Added base module and wrappers --- ydb/_grpc/grpcwrapper/ydb_query.py | 64 +++++++++-- .../grpcwrapper/ydb_query_public_types.py | 68 +++++++++++ ydb/query/base.py | 106 ++++++++++++++++++ 3 files changed, 229 insertions(+), 9 deletions(-) create mode 100644 ydb/_grpc/grpcwrapper/ydb_query_public_types.py create mode 100644 ydb/query/base.py diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index 36ddfeba..49cae011 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -10,6 +10,8 @@ else: from ..common.protos import ydb_query_pb2 +from . import ydb_query_public_types as public_types + from .common_utils import ( IFromProto, IFromProtoWithProtoType, @@ -39,14 +41,6 @@ def from_proto(msg: ydb_query_pb2.CreateSessionResponse) -> "CreateSessionRespon ) -# @dataclass -# class DeleteSessionRequest(IToProto): -# session_id: str - -# def to_proto(self) -> ydb_query_pb2.DeleteSessionRequest: -# return ydb_query_pb2.DeleteSessionRequest(session_id=self.session_id) - - @dataclass class DeleteSessionResponse(IFromProto): status: Optional[ServerStatus] @@ -69,4 +63,56 @@ def to_proto(self) -> ydb_query_pb2.AttachSessionRequest: # @staticmethod # def from_proto(msg: ydb_query_pb2.SessionState) -> "SessionState": -# return SessionState(status=ServerStatus(msg.status, msg.issues)) \ No newline at end of file +# return SessionState(status=ServerStatus(msg.status, msg.issues)) + + +@dataclass +class TransactionMeta(IFromProto): + tx_id: str + + @staticmethod + def from_proto(msg: ydb_query_pb2.TransactionMeta) -> "TransactionMeta": + return TransactionMeta(tx_id=msg.id) + + +@dataclass +class TransactionSettings(IFromPublic, IToProto): + tx_mode: public_types.BaseQueryTxMode + + @staticmethod + def from_public(tx_mode: public_types.BaseQueryTxMode) -> "TransactionSettings": + return TransactionSettings(tx_mode=tx_mode) + + def to_proto(self) -> ydb_query_pb2.TransactionSettings: + if self.tx_mode.name == 'snapshot_read_only': + return ydb_query_pb2.TransactionSettings(snapshot_read_only=self.tx_mode.to_proto()) + if self.tx_mode.name == 'serializable_read_write': + return ydb_query_pb2.TransactionSettings(serializable_read_write=self.tx_mode.to_proto()) + if self.tx_mode.name == 'online_read_only': + return ydb_query_pb2.TransactionSettings(online_read_only=self.tx_mode.to_proto()) + if self.tx_mode.name == 'stale_read_only': + return ydb_query_pb2.TransactionSettings(stale_read_only=self.tx_mode.to_proto()) + # TODO: add exception + +@dataclass +class BeginTransactionRequest(IToProto): + session_id: str + tx_settings: TransactionSettings + + def to_proto(self) -> ydb_query_pb2.BeginTransactionRequest: + return ydb_query_pb2.BeginTransactionRequest( + session_id=self.session_id, + tx_settings=self.tx_settings + ) + +@dataclass +class BeginTransactionResponse(IFromProto): + status: Optional[ServerStatus] + tx_meta: TransactionMeta + + @staticmethod + def from_proto(msg: ydb_query_pb2.BeginTransactionResponse) -> "BeginTransactionResponse": + return BeginTransactionResponse( + status=ServerStatus(msg.status, msg.issues), + tx_meta=TransactionMeta.from_proto(msg.tx_meta), + ) \ No newline at end of file diff --git a/ydb/_grpc/grpcwrapper/ydb_query_public_types.py b/ydb/_grpc/grpcwrapper/ydb_query_public_types.py new file mode 100644 index 00000000..27d1e917 --- /dev/null +++ b/ydb/_grpc/grpcwrapper/ydb_query_public_types.py @@ -0,0 +1,68 @@ +import abc +import typing + +from google.protobuf.message import Message + +from .common_utils import IToProto + +# Workaround for good IDE and universal for runtime +if typing.TYPE_CHECKING: + from ..v4.protos import ydb_query_pb2 +else: + from ..common.protos import ydb_query_pb2 + + +class BaseQueryTxMode(IToProto): + @property + @abc.abstractmethod + def name(self) -> str: + pass + + +class QuerySnapshotReadOnly(BaseQueryTxMode): + def __init__(self): + self._name = "snapshot_read_only" + + @property + def name(self) -> str: + return self._name + + def to_proto(self) -> ydb_query_pb2.SnapshotModeSettings: + return ydb_query_pb2.SnapshotModeSettings() + + +class QuerySerializableReadWrite(BaseQueryTxMode): + def __init__(self): + self._name = "serializable_read_write" + + @property + def name(self) -> str: + return self._name + + def to_proto(self) -> ydb_query_pb2.SerializableModeSettings: + return ydb_query_pb2.SerializableModeSettings() + + +class QueryOnlineReadOnly(BaseQueryTxMode): + def __init__(self, allow_inconsistent_reads: bool = False): + self.allow_inconsistent_reads = allow_inconsistent_reads + self._name = "online_read_only" + + @property + def name(self): + return self._name + + def to_proto(self) -> ydb_query_pb2.OnlineModeSettings: + return ydb_query_pb2.OnlineModeSettings(allow_inconsistent_reads=self.allow_inconsistent_reads) + + +class QueryStaleReadOnly(BaseQueryTxMode): + def __init__(self): + self._name = "stale_read_only" + + @property + def name(self): + return self._name + + def to_proto(self) -> ydb_query_pb2.StaleModeSettings: + return ydb_query_pb2.StaleModeSettings() diff --git a/ydb/query/base.py b/ydb/query/base.py new file mode 100644 index 00000000..db4f36fd --- /dev/null +++ b/ydb/query/base.py @@ -0,0 +1,106 @@ +import abc + +from typing import ( + Optional, +) + +from .._grpc.grpcwrapper.common_utils import ( + SupportedDriverType, +) + + +class QueryClientSettings: ... + + +class IQueryTxContext: ... + + +class QuerySessionState: + _session_id: Optional[str] + _node_id: Optional[int] + _attached: bool = False + _settings: Optional[QueryClientSettings] + + def __init__(self, settings: QueryClientSettings = None): + self._settings = settings + self.reset() + + def reset(self) -> None: + self._session_id = None + self._node_id = None + self._attached = False + + @property + def session_id(self) -> Optional[str]: + return self._session_id + + def set_session_id(self, session_id: str) -> "QuerySessionState": + self._session_id = session_id + return self + + @property + def node_id(self) -> Optional[int]: + return self._node_id + + def set_node_id(self, node_id: int) -> "QuerySessionState": + self._node_id = node_id + return self + + @property + def attached(self) -> bool: + return self._attached + + def set_attached(self, attached: bool) -> None: + self._attached = attached + + +class IQuerySession(abc.ABC): + def __init__(self, driver: SupportedDriverType, settings: QueryClientSettings = None): + pass + + @abc.abstractmethod + def create(self) -> None: + pass + + @abc.abstractmethod + def delete(self) -> None: + pass + + @abc.abstractmethod + def transaction(self) -> IQueryTxContext: + pass + + +# class BaseQuerySession(IQuerySession): +# _driver: SupportedDriverType +# _session_state: QuerySessionState +# _settings = QueryClientSettings + +# def __init__(self, driver: SupportedDriverType, settings: QueryClientSettings = None): +# self._driver = driver +# self._session_state = QuerySessionState(settings) +# self._settings = settings + +# @abc.abstractmethod +# def create(self) -> None: +# pass + +# @abc.abstractmethod +# def delete(self) -> None: +# pass + +# @abc.abstractmethod +# def transaction(self) -> IQueryTxContext: +# pass + + +class IQueryClient(abc.ABC): + def __init__(self, driver: SupportedDriverType, query_client_settings: QueryClientSettings = None): + pass + + @abc.abstractmethod + def session(self) -> IQuerySession: + pass + + + From 1b0d58ee79307fa17cb83b7b53902be768e2ad11 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:25 +0300 Subject: [PATCH 043/429] refactor session --- ydb/query/base.py | 27 +---- ydb/query/session.py | 261 ++++++++++++++----------------------------- 2 files changed, 85 insertions(+), 203 deletions(-) diff --git a/ydb/query/base.py b/ydb/query/base.py index db4f36fd..6fcd6b63 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -8,6 +8,8 @@ SupportedDriverType, ) +from .._grpc.grpcwrapper.ydb_query_public_types import BaseQueryTxMode + class QueryClientSettings: ... @@ -67,33 +69,10 @@ def delete(self) -> None: pass @abc.abstractmethod - def transaction(self) -> IQueryTxContext: + def transaction(self, tx_mode: BaseQueryTxMode) -> IQueryTxContext: pass -# class BaseQuerySession(IQuerySession): -# _driver: SupportedDriverType -# _session_state: QuerySessionState -# _settings = QueryClientSettings - -# def __init__(self, driver: SupportedDriverType, settings: QueryClientSettings = None): -# self._driver = driver -# self._session_state = QuerySessionState(settings) -# self._settings = settings - -# @abc.abstractmethod -# def create(self) -> None: -# pass - -# @abc.abstractmethod -# def delete(self) -> None: -# pass - -# @abc.abstractmethod -# def transaction(self) -> IQueryTxContext: -# pass - - class IQueryClient(abc.ABC): def __init__(self, driver: SupportedDriverType, query_client_settings: QueryClientSettings = None): pass diff --git a/ydb/query/session.py b/ydb/query/session.py index 1667a943..013f108a 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -1,222 +1,125 @@ import abc from abc import abstractmethod import asyncio +import concurrent import logging +import threading from typing import ( + Any, + Optional, Set, ) +from . import base + from .. import _apis, issues, _utilities from .._grpc.grpcwrapper import common_utils from .._grpc.grpcwrapper import ydb_query as _ydb_query +from .transaction import BaseTxContext -logger = logging.getLogger(__name__) - - -class ISession(abc.ABC): - - @abc.abstractmethod - def create(self): - pass - - @abc.abstractmethod - def delete(self): - pass - - @property - @abstractmethod - def session_id(self): - pass -class SessionState: - def __init__(self, settings=None): - self._settings = settings - self.reset() - - def reset(self): - self._session_id = None - self._node_id = None - self._is_attached = False - - @property - def session_id(self): - return self._session_id - - @property - def node_id(self): - return self._node_id +logger = logging.getLogger(__name__) - def set_id(self, session_id): - self._session_id = session_id - return self - def set_node_id(self, node_id): - self._node_id = node_id - return self +def wrapper_create_session(rpc_state, response_pb, session_state, session): + #TODO: process response + message = _ydb_query.CreateSessionResponse.from_proto(response_pb) + session_state.set_id(message.session_id).set_node_id(message.node_id) + return session - def set_attached(self, is_attached): - self._is_attached = is_attached - @property - def attached(self): - return self._is_attached +def wrapper_delete_session(rpc_state, response_pb, session_state, session): + #TODO: process response + message = _ydb_query.DeleteSessionResponse.from_proto(response_pb) + session_state.reset() + return session +class BaseQuerySession(base.IQuerySession): + _driver: base.SupportedDriverType + _settings: Optional[base.QueryClientSettings] + _state: base.QuerySessionState -class QuerySession(ISession): - def __init__(self, driver, settings=None): + def __init__(self, driver: base.SupportedDriverType, settings: base.QueryClientSettings = None): self._driver = driver - self._state = SessionState(settings) - - @property - def session_id(self): - return self._state.session_id - - @property - def node_id(self): - return self._state.node_id - - async def create(self): - if self._state.session_id is not None: - return self - - # TODO: check what is settings + self._settings = settings + self._state = base.QuerySessionState(settings) - res = await self._driver( + def _create_call(self): + return self._driver( _apis.ydb_query.CreateSessionRequest(), _apis.QueryService.Stub, _apis.QueryService.CreateSession, - common_utils.create_result_wrapper(_ydb_query.CreateSessionResponse), + wrap_result=wrapper_create_session, + wrap_args=(self._state, self), ) - logging.info("session.create: success") - - self._state.set_id(res.session_id).set_node_id(res.node_id) - - return None - - async def delete(self): - - if self._state.session_id is None: - return None - - res = await self._driver( + def _delete_call(self): + return self._driver( _apis.ydb_query.DeleteSessionRequest(session_id=self._state.session_id), _apis.QueryService.Stub, _apis.QueryService.DeleteSession, - common_utils.create_result_wrapper(_ydb_query.DeleteSessionResponse), + wrap_result=wrapper_delete_session, + wrap_args=(self._state, self), ) - logging.info("session.delete: success") - - self._state.reset() - if self._stream is not None: - await self._stream.close() - self._stream = None - - return None - - async def attach(self): - self._stream = await SessionStateReaderStream.create(self._driver, self._state) - - print(self._state.attached) - - - -class SessionStateReaderStream: - _started: bool - _stream: common_utils.IGrpcWrapperAsyncIO - _session: QuerySession - _background_tasks: Set[asyncio.Task] - - def __init__(self, session_state: SessionState): - self._session_state = session_state - self._background_tasks = set() - self._started = False - - - @staticmethod - async def create(driver: common_utils.SupportedDriverType, session_state: SessionState): - stream = common_utils.GrpcWrapperUnaryStreamAsyncIO(common_utils.ServerStatus.from_proto) - await stream.start( - driver, - _ydb_query.AttachSessionRequest(session_id=session_state.session_id).to_proto(), + def _attach_call(self): + return self._driver( + _apis.ydb_query.AttachSessionRequest(session_id=self._state.session_id), _apis.QueryService.Stub, - _apis.QueryService.AttachSession + _apis.QueryService.AttachSession, ) - reader = SessionStateReaderStream(session_state) - - await reader._start(stream) - - return reader +class QuerySessionSync(BaseQuerySession): + _stream = None - async def _start(self, stream: common_utils.IGrpcWrapperAsyncIO): - if self._started: - return # TODO: error - - self._started = True - self._stream = stream - - response = await self._stream.receive() - - if response.is_success(): - self._session_state.set_attached(True) - else: - raise common_utils.YdbError(response.error) - - self._background_tasks.add(asyncio.create_task(self._update_session_state_loop(), name="update_session_state_loop")) - - return response - - async def _update_session_state_loop(self): - while True: - response = await self._stream.receive() + def _attach(self): + self._stream = self._attach_call() + status_stream = _utilities.SyncResponseIterator( + self._stream, + lambda response: common_utils.ServerStatus.from_proto(response), + ) - if response.is_success(): + first_response = next(status_stream) + if first_response.status != issues.StatusCode.SUCCESS: + pass + # raise common_utils.YdbStatusError(first_response) + + self._state.set_attached(True) + + threading.Thread( + target=self._chech_session_status_loop, + args=(status_stream,), + name="check session status thread", + daemon=True, + ).start() + + def _chech_session_status_loop(self, status_stream): + print("CHECK STATUS") + try: + for status in status_stream: + if status.status != issues.StatusCode.SUCCESS: + print("STATUS NOT SUCCESS") + self._state.reset(False) + except Exception as e: pass - else: - self._session_state.set_attached(False) - - async def close(self): - self._stream.close() - for task in self._background_tasks: - task.cancel() - - if self._background_tasks: - await asyncio.wait(self._background_tasks) - - -async def main(): - from ..aio.driver import Driver - - endpoint = "grpc://localhost:2136" - database = "/local" - - driver = Driver(endpoint=endpoint, database=database) # Creating new database driver to execute queries - - await driver.wait(timeout=10) # Wait until driver can execute calls - - session = QuerySession(driver) - - print(session.session_id) - print(session.node_id) - - await session.create() - - print(session.session_id) - print(session.node_id) - - - await session.attach() + print("CHECK STATUS STOP") - await session.delete() - print(session.session_id) - print(session.node_id) + def delete(self) -> None: + if not self._state.session_id: + return + self._delete_call() + self._stream.cancel() -if __name__ == "__main__": - import asyncio - asyncio.run(main()) + def create(self) -> None: + if self._state.session_id: + return + self._create_call() + self._attach() + def transaction(self, tx_mode: base.BaseQueryTxMode) -> base.IQueryTxContext: + if not self._state.session_id: + return + return BaseTxContext(tx_mode) From 8e80cac78d7ea312f50b23c79862eb4a30a8f6d6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:25 +0300 Subject: [PATCH 044/429] added basic test for session --- tests/query/__init__.py | 0 tests/query/test_query_session.py | 24 ++++++++++++++++++++++++ ydb/query/session.py | 6 +++--- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 tests/query/__init__.py create mode 100644 tests/query/test_query_session.py diff --git a/tests/query/__init__.py b/tests/query/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/query/test_query_session.py b/tests/query/test_query_session.py new file mode 100644 index 00000000..1bf713b9 --- /dev/null +++ b/tests/query/test_query_session.py @@ -0,0 +1,24 @@ +import pytest + +import ydb.query.session + +def _check_session_state_empty(session): + assert session._state.session_id == None + assert session._state.node_id == None + assert session._state.attached == False + +def _check_session_state_full(session): + assert session._state.session_id != None + assert session._state.node_id != None + assert session._state.attached == True + +class TestQuerySession: + def test_session_normal_lifecycle(self, driver_sync): + session = ydb.query.session.QuerySessionSync(driver_sync) + _check_session_state_empty(session) + + session.create() + _check_session_state_full(session) + + session.delete() + _check_session_state_empty(session) diff --git a/ydb/query/session.py b/ydb/query/session.py index 013f108a..6bd5bd39 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -22,14 +22,14 @@ logger = logging.getLogger(__name__) -def wrapper_create_session(rpc_state, response_pb, session_state, session): +def wrapper_create_session(rpc_state, response_pb, session_state: base.QuerySessionState, session): #TODO: process response message = _ydb_query.CreateSessionResponse.from_proto(response_pb) - session_state.set_id(message.session_id).set_node_id(message.node_id) + session_state.set_session_id(message.session_id).set_node_id(message.node_id) return session -def wrapper_delete_session(rpc_state, response_pb, session_state, session): +def wrapper_delete_session(rpc_state, response_pb, session_state: base.QuerySessionState, session): #TODO: process response message = _ydb_query.DeleteSessionResponse.from_proto(response_pb) session_state.reset() From c4fb819510681dec437e9da885a89194557d7901 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:25 +0300 Subject: [PATCH 045/429] added test to double session create --- tests/query/test_query_session.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/query/test_query_session.py b/tests/query/test_query_session.py index 1bf713b9..ef0c26f5 100644 --- a/tests/query/test_query_session.py +++ b/tests/query/test_query_session.py @@ -22,3 +22,17 @@ def test_session_normal_lifecycle(self, driver_sync): session.delete() _check_session_state_empty(session) + + def test_second_create_do_nothing(self, driver_sync): + session = ydb.query.session.QuerySessionSync(driver_sync) + session.create() + _check_session_state_full(session) + + session_id_before = session._state.session_id + node_id_before = session._state.node_id + + session.create() + _check_session_state_full(session) + + assert session._state.session_id == session_id_before + assert session._state.node_id == node_id_before From ff59697c8455bb22522d211e389a47d535b89f0c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:25 +0300 Subject: [PATCH 046/429] some more wrappers --- ydb/_grpc/grpcwrapper/ydb_query.py | 45 +++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index 49cae011..a5c4f78e 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -115,4 +115,47 @@ def from_proto(msg: ydb_query_pb2.BeginTransactionResponse) -> "BeginTransaction return BeginTransactionResponse( status=ServerStatus(msg.status, msg.issues), tx_meta=TransactionMeta.from_proto(msg.tx_meta), - ) \ No newline at end of file + ) + +@dataclass +class QueryContent(IFromPublic, IToProto): + text: str + syntax: Optional[str] + + @staticmethod + def from_public(query: str) -> "QueryContent": + return QueryContent(text=query) + + def to_proto(self) -> ydb_query_pb2.QueryContent: + return ydb_query_pb2.QueryContent(text=self.text, syntax=self.syntax) + + +@dataclass +class TransactionControl(IToProto): + begin_tx: Optional[TransactionSettings] + commit_tx: Optional[bool] + tx_id: Optional[str] + + def to_proto(self) -> ydb_query_pb2.TransactionControl: + if self.tx_id: + return ydb_query_pb2.TransactionControl( + tx_id=self.tx_id, + commit_tx=self.commit_tx, + ) + return ydb_query_pb2.TransactionControl( + begin_tx=self.begin_tx, + commit_tx=self.commit_tx + ) + + +@dataclass +class ExecuteQueryRequest: + exec_mode: Optional[str] + concurrent_result_sets: bool = False + parameters: Optional[dict] + query_content: QueryContent + session_id: str + stats_mode: Optional[str] + tx_control: TransactionControl + + From 7a4f4e73ec134da2009ced6209285054a487c68f Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:26 +0300 Subject: [PATCH 047/429] simple execute on session --- examples/query-service/basic_example.py | 30 +++++++++++++++++++++ ydb/_grpc/grpcwrapper/ydb_query.py | 36 +++++++++++++++---------- ydb/query/base.py | 27 ++++++++++++++++--- ydb/query/session.py | 32 +++++++++++++++++++--- 4 files changed, 104 insertions(+), 21 deletions(-) create mode 100644 examples/query-service/basic_example.py diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py new file mode 100644 index 00000000..584a5a05 --- /dev/null +++ b/examples/query-service/basic_example.py @@ -0,0 +1,30 @@ +import ydb + +from ydb.query.session import QuerySessionSync + + +def main(): + driver_config = ydb.DriverConfig( + endpoint="grpc://localhost:2136", + database="/local", + # credentials=ydb.credentials_from_env_variables(), + # root_certificates=ydb.load_ydb_root_certificate(), + ) + try: + driver = ydb.Driver(driver_config) + driver.wait(timeout=5) + except TimeoutError: + raise RuntimeError("Connect failed to YDB") + + session = QuerySessionSync(driver) + session.create() + + it = session.execute("select 1; select 2;") + for result_set in it: + print(f"columns: {str(result_set.columns)}") + print(f"rows: {str(result_set.rows)}") + + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index a5c4f78e..542aa158 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -92,7 +92,6 @@ def to_proto(self) -> ydb_query_pb2.TransactionSettings: return ydb_query_pb2.TransactionSettings(online_read_only=self.tx_mode.to_proto()) if self.tx_mode.name == 'stale_read_only': return ydb_query_pb2.TransactionSettings(stale_read_only=self.tx_mode.to_proto()) - # TODO: add exception @dataclass class BeginTransactionRequest(IToProto): @@ -102,7 +101,7 @@ class BeginTransactionRequest(IToProto): def to_proto(self) -> ydb_query_pb2.BeginTransactionRequest: return ydb_query_pb2.BeginTransactionRequest( session_id=self.session_id, - tx_settings=self.tx_settings + tx_settings=self.tx_settings.to_proto(), ) @dataclass @@ -120,7 +119,7 @@ def from_proto(msg: ydb_query_pb2.BeginTransactionResponse) -> "BeginTransaction @dataclass class QueryContent(IFromPublic, IToProto): text: str - syntax: Optional[str] + syntax: Optional[str] = None @staticmethod def from_public(query: str) -> "QueryContent": @@ -132,9 +131,9 @@ def to_proto(self) -> ydb_query_pb2.QueryContent: @dataclass class TransactionControl(IToProto): - begin_tx: Optional[TransactionSettings] - commit_tx: Optional[bool] - tx_id: Optional[str] + begin_tx: Optional[TransactionSettings] = None + commit_tx: Optional[bool] = None + tx_id: Optional[str] = None def to_proto(self) -> ydb_query_pb2.TransactionControl: if self.tx_id: @@ -143,19 +142,28 @@ def to_proto(self) -> ydb_query_pb2.TransactionControl: commit_tx=self.commit_tx, ) return ydb_query_pb2.TransactionControl( - begin_tx=self.begin_tx, + begin_tx=self.begin_tx.to_proto(), commit_tx=self.commit_tx ) @dataclass -class ExecuteQueryRequest: - exec_mode: Optional[str] - concurrent_result_sets: bool = False - parameters: Optional[dict] - query_content: QueryContent +class ExecuteQueryRequest(IToProto): session_id: str - stats_mode: Optional[str] + query_content: QueryContent tx_control: TransactionControl + concurrent_result_sets: Optional[bool] = False + exec_mode: Optional[str] = None + parameters: Optional[dict] = None + stats_mode: Optional[str] = None - + def to_proto(self) -> ydb_query_pb2.ExecuteQueryRequest: + return ydb_query_pb2.ExecuteQueryRequest( + session_id=self.session_id, + tx_control=self.tx_control.to_proto(), + query_content=self.query_content.to_proto(), + exec_mode=ydb_query_pb2.EXEC_MODE_EXECUTE, + stats_mode=self.stats_mode, + concurrent_result_sets=self.concurrent_result_sets, + parameters=self.parameters, + ) diff --git a/ydb/query/base.py b/ydb/query/base.py index 6fcd6b63..a494ad9d 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -7,9 +7,12 @@ from .._grpc.grpcwrapper.common_utils import ( SupportedDriverType, ) - -from .._grpc.grpcwrapper.ydb_query_public_types import BaseQueryTxMode - +from .._grpc.grpcwrapper import ydb_query +from .._grpc.grpcwrapper.ydb_query_public_types import ( + BaseQueryTxMode, + QuerySerializableReadWrite +) +from .. import convert class QueryClientSettings: ... @@ -82,4 +85,22 @@ def session(self) -> IQuerySession: pass +def create_execute_query_request(query: str, session_id: str, commit_tx: bool): + req = ydb_query.ExecuteQueryRequest( + session_id=session_id, + query_content=ydb_query.QueryContent.from_public( + query=query, + ), + tx_control=ydb_query.TransactionControl( + begin_tx=ydb_query.TransactionSettings( + tx_mode=QuerySerializableReadWrite(), + ), + commit_tx=commit_tx + ), + ) + + return req.to_proto() + +def wrap_execute_query_response(rpc_state, response_pb): + return convert.ResultSet.from_message(response_pb.result_set) diff --git a/ydb/query/session.py b/ydb/query/session.py index 6bd5bd39..461180ef 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -71,6 +71,19 @@ def _attach_call(self): _apis.QueryService.AttachSession, ) + def _execute_call(self, query: str, commit_tx: bool): + request = base.create_execute_query_request( + query=query, + session_id=self._state.session_id, + commit_tx=commit_tx + ) + return self._driver( + request, + _apis.QueryService.Stub, + _apis.QueryService.ExecuteQuery, + # base.wrap_execute_query_response + ) + class QuerySessionSync(BaseQuerySession): _stream = None @@ -96,7 +109,6 @@ def _attach(self): ).start() def _chech_session_status_loop(self, status_stream): - print("CHECK STATUS") try: for status in status_stream: if status.status != issues.StatusCode.SUCCESS: @@ -104,7 +116,6 @@ def _chech_session_status_loop(self, status_stream): self._state.reset(False) except Exception as e: pass - print("CHECK STATUS STOP") def delete(self) -> None: @@ -119,7 +130,20 @@ def create(self) -> None: self._create_call() self._attach() - def transaction(self, tx_mode: base.BaseQueryTxMode) -> base.IQueryTxContext: + def transaction(self, tx_mode: base.BaseQueryTxMode = None) -> base.IQueryTxContext: if not self._state.session_id: return - return BaseTxContext(tx_mode) + return BaseTxContext( + self._driver, + self._state, + self, + tx_mode, + ) + + def execute(self, query: str, commit_tx: bool = True): + stream_it = self._execute_call(query, commit_tx) + + return _utilities.SyncResponseIterator( + stream_it, + lambda resp: base.wrap_execute_query_response(rpc_state=None, response_pb=resp), + ) \ No newline at end of file From 5eaeddca60ce5326367788ab96b6ff596d8a320a Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:26 +0300 Subject: [PATCH 048/429] temp --- docker-compose.yml | 2 +- examples/query-service/basic_example.py | 7 +- tests/query/test_query_transaction.py | 17 ++ ydb/query/base.py | 2 + ydb/query/transaction.py | 212 ++++++++++++++++++++++++ 5 files changed, 236 insertions(+), 4 deletions(-) create mode 100644 tests/query/test_query_transaction.py create mode 100644 ydb/query/transaction.py diff --git a/docker-compose.yml b/docker-compose.yml index edbd56d1..50a31f12 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.3" services: ydb: - image: cr.yandex/yc/yandex-docker-local-ydb:latest + image: ydbplatform/local-ydb:latest restart: always ports: - 2136:2136 diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index 584a5a05..4c107c1a 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -19,10 +19,11 @@ def main(): session = QuerySessionSync(driver) session.create() - it = session.execute("select 1; select 2;") + it = session.execute("select 1; select 2;", commit_tx=False) for result_set in it: - print(f"columns: {str(result_set.columns)}") - print(f"rows: {str(result_set.rows)}") + pass + # print(f"columns: {str(result_set.columns)}") + # print(f"rows: {str(result_set.rows)}") diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py new file mode 100644 index 00000000..9877499c --- /dev/null +++ b/tests/query/test_query_transaction.py @@ -0,0 +1,17 @@ +import pytest + +import ydb.query.session + +class TestQuerySession: + def test_transaction_begin(self, driver_sync): + session = ydb.query.session.QuerySessionSync(driver_sync) + + session.create() + + tx = session.transaction() + + assert tx._tx_state.tx_id == None + + tx.begin() + + assert tx._tx_state.tx_id != None diff --git a/ydb/query/base.py b/ydb/query/base.py index a494ad9d..859738fe 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -103,4 +103,6 @@ def create_execute_query_request(query: str, session_id: str, commit_tx: bool): def wrap_execute_query_response(rpc_state, response_pb): + print(response_pb) + return convert.ResultSet.from_message(response_pb.result_set) diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py new file mode 100644 index 00000000..1fb8a74e --- /dev/null +++ b/ydb/query/transaction.py @@ -0,0 +1,212 @@ +import abc +import logging + +from .. import ( + _apis, + issues, + _utilities, +) +from .._grpc.grpcwrapper import ydb_query as _ydb_query +from .._grpc.grpcwrapper import ydb_query_public_types as _ydb_query_public + +from .._tx_ctx_impl import TxState, reset_tx_id_handler +from .._session_impl import bad_session_handler +from ..table import ( + AbstractTransactionModeBuilder, + ITxContext, + SerializableReadWrite +) + +logger = logging.getLogger(__name__) + +def patch_table_service_tx_mode_to_query_service(tx_mode: AbstractTransactionModeBuilder): + if tx_mode.name == 'snapshot_read_only': + tx_mode = _ydb_query_public.QuerySnapshotReadOnly() + elif tx_mode.name == 'serializable_read_write': + tx_mode = _ydb_query_public.QuerySerializableReadWrite() + elif tx_mode.name =='online_read_only': + tx_mode = _ydb_query_public.QueryOnlineReadOnly() + elif tx_mode.name == 'stale_read_only': + tx_mode = _ydb_query_public.QueryStaleReadOnly() + else: + raise issues.YDBInvalidArgumentError(f'Unknown transaction mode: {tx_mode.name}') + + return tx_mode + + +def _construct_tx_settings(tx_state): + tx_settings = _ydb_query.TransactionSettings.from_public(tx_state.tx_mode) + return tx_settings + + +def _create_begin_transaction_request(session_state, tx_state): + request = _ydb_query.BeginTransactionRequest( + session_id=session_state.session_id, + tx_settings=_construct_tx_settings(tx_state), + ).to_proto() + + print(request) + + return request + + +def _create_commit_transaction_request(session_state, tx_state): + request = _apis.ydb_query.CommitTransactionRequest() + request.tx_id = tx_state.tx_id + request.session_id = session_state.session_id + return request + +def _create_rollback_transaction_request(session_state, tx_state): + request = _apis.ydb_query.RollbackTransactionRequest() + request.tx_id = tx_state.tx_id + request.session_id = session_state.session_id + return request + + +@bad_session_handler +def wrap_tx_begin_response(rpc_state, response_pb, session_state, tx_state, tx): + # session_state.complete_query() + # issues._process_response(response_pb.operation) + print("wrap result") + message = _ydb_query.BeginTransactionResponse.from_proto(response_pb) + tx_state.tx_id = message.tx_meta.id + return tx + + +@bad_session_handler +@reset_tx_id_handler +def wrap_result_on_rollback_or_commit_tx(rpc_state, response_pb, session_state, tx_state, tx): + + # issues._process_response(response_pb.operation) + # transaction successfully committed or rolled back + tx_state.tx_id = None + return tx + + +class BaseTxContext(ITxContext): + + _COMMIT = "commit" + _ROLLBACK = "rollback" + + def __init__(self, driver, session_state, session, tx_mode=None): + """ + An object that provides a simple transaction context manager that allows statements execution + in a transaction. You don't have to open transaction explicitly, because context manager encapsulates + transaction control logic, and opens new transaction if: + + 1) By explicit .begin() and .async_begin() methods; + 2) On execution of a first statement, which is strictly recommended method, because that avoids useless round trip + + This context manager is not thread-safe, so you should not manipulate on it concurrently. + + :param driver: A driver instance + :param session_state: A state of session + :param tx_mode: A transaction mode, which is a one from the following choices: + 1) SerializableReadWrite() which is default mode; + 2) OnlineReadOnly(); + 3) StaleReadOnly(). + """ + self._driver = driver + if tx_mode is None: + tx_mode = patch_table_service_tx_mode_to_query_service(SerializableReadWrite()) + else: + tx_mode = patch_table_service_tx_mode_to_query_service(tx_mode) + self._tx_state = TxState(tx_mode) + self._session_state = session_state + self.session = session + self._finished = "" + + def __enter__(self): + """ + Enters a context manager and returns a session + + :return: A session instance + """ + return self + + def __exit__(self, *args, **kwargs): + """ + Closes a transaction context manager and rollbacks transaction if + it is not rolled back explicitly + """ + if self._tx_state.tx_id is not None: + # It's strictly recommended to close transactions directly + # by using commit_tx=True flag while executing statement or by + # .commit() or .rollback() methods, but here we trying to do best + # effort to avoid useless open transactions + logger.warning("Potentially leaked tx: %s", self._tx_state.tx_id) + try: + self.rollback() + except issues.Error: + logger.warning("Failed to rollback leaked tx: %s", self._tx_state.tx_id) + + self._tx_state.tx_id = None + + @property + def session_id(self): + """ + A transaction's session id + + :return: A transaction's session id + """ + return self._session_state.session_id + + @property + def tx_id(self): + """ + Returns a id of open transaction or None otherwise + + :return: A id of open transaction or None otherwise + """ + return self._tx_state.tx_id + + def begin(self, settings=None): + """ + Explicitly begins a transaction + + :param settings: A request settings + + :return: An open transaction + """ + if self._tx_state.tx_id is not None: + return self + + print('try to begin tx') + + return self._driver( + _create_begin_transaction_request(self._session_state, self._tx_state), + _apis.QueryService.Stub, + _apis.QueryService.BeginTransaction, + wrap_result=wrap_tx_begin_response, + wrap_args=(self._session_state, self._tx_state, self), + ) + + def commit(self, settings=None): + """ + Calls commit on a transaction if it is open otherwise is no-op. If transaction execution + failed then this method raises PreconditionFailed. + + :param settings: A request settings + + :return: A committed transaction or exception if commit is failed + """ + + self._set_finish(self._COMMIT) + + if self._tx_state.tx_id is None and not self._tx_state.dead: + return self + + return self._driver( + _create_commit_transaction_request(self._session_state, self._tx_state), + _apis.QueryService.Stub, + _apis.QueryService.CommitTransaction, + wrap_result_on_rollback_or_commit_tx, + settings, + (self._session_state, self._tx_state, self), + ) + + def rollback(self, settings=None): + pass + + def execute(self, query, parameters=None, commit_tx=False, settings=None): + pass \ No newline at end of file From 4c85d7613c04435b9338ebd28b8ba4df09845e69 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:26 +0300 Subject: [PATCH 049/429] wow tx begin works --- examples/query-service/basic_example.py | 6 +-- tests/query/test_query_transaction.py | 4 +- ydb/query/base.py | 52 ++++++++++++++++++++++--- ydb/query/session.py | 1 + ydb/query/transaction.py | 39 ++++++++----------- 5 files changed, 70 insertions(+), 32 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index 4c107c1a..e4af2c8e 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -21,9 +21,9 @@ def main(): it = session.execute("select 1; select 2;", commit_tx=False) for result_set in it: - pass - # print(f"columns: {str(result_set.columns)}") - # print(f"rows: {str(result_set.rows)}") + # pass + print(f"columns: {str(result_set.columns)}") + print(f"rows: {str(result_set.rows)}") diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 9877499c..71d9ac7f 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -10,8 +10,8 @@ def test_transaction_begin(self, driver_sync): tx = session.transaction() - assert tx._tx_state.tx_id == None + assert tx.tx_id == None tx.begin() - assert tx._tx_state.tx_id != None + assert tx.tx_id != None diff --git a/ydb/query/base.py b/ydb/query/base.py index 859738fe..92023eaf 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -17,9 +17,6 @@ class QueryClientSettings: ... -class IQueryTxContext: ... - - class QuerySessionState: _session_id: Optional[str] _node_id: Optional[int] @@ -60,6 +57,7 @@ def set_attached(self, attached: bool) -> None: class IQuerySession(abc.ABC): + @abc.abstractmethod def __init__(self, driver: SupportedDriverType, settings: QueryClientSettings = None): pass @@ -72,7 +70,48 @@ def delete(self) -> None: pass @abc.abstractmethod - def transaction(self, tx_mode: BaseQueryTxMode) -> IQueryTxContext: + def transaction(self, tx_mode: BaseQueryTxMode) -> "IQueryTxContext": + pass + + +class IQueryTxContext(abc.ABC): + + @abc.abstractmethod + def __init__(self, driver: SupportedDriverType, session_state: QuerySessionState, session: IQuerySession, tx_mode: BaseQueryTxMode = None): + pass + + @abc.abstractmethod + def __enter__(self): + pass + + @abc.abstractmethod + def __exit__(self, *args, **kwargs): + pass + + @property + @abc.abstractmethod + def session_id(self): + pass + + @property + @abc.abstractmethod + def tx_id(self): + pass + + @abc.abstractmethod + def begin(): + pass + + @abc.abstractmethod + def commit(): + pass + + @abc.abstractmethod + def rollback(): + pass + + @abc.abstractmethod + def execute(query: str): pass @@ -103,6 +142,9 @@ def create_execute_query_request(query: str, session_id: str, commit_tx: bool): def wrap_execute_query_response(rpc_state, response_pb): - print(response_pb) + # print("RESP:") + # print(f"meta: {response_pb.tx_meta}") + # print(response_pb) + return convert.ResultSet.from_message(response_pb.result_set) diff --git a/ydb/query/session.py b/ydb/query/session.py index 461180ef..8aee19b4 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -77,6 +77,7 @@ def _execute_call(self, query: str, commit_tx: bool): session_id=self._state.session_id, commit_tx=commit_tx ) + print(request) return self._driver( request, _apis.QueryService.Stub, diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 1fb8a74e..14c5a039 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -11,27 +11,23 @@ from .._tx_ctx_impl import TxState, reset_tx_id_handler from .._session_impl import bad_session_handler -from ..table import ( - AbstractTransactionModeBuilder, - ITxContext, - SerializableReadWrite -) +from . import base logger = logging.getLogger(__name__) -def patch_table_service_tx_mode_to_query_service(tx_mode: AbstractTransactionModeBuilder): - if tx_mode.name == 'snapshot_read_only': - tx_mode = _ydb_query_public.QuerySnapshotReadOnly() - elif tx_mode.name == 'serializable_read_write': - tx_mode = _ydb_query_public.QuerySerializableReadWrite() - elif tx_mode.name =='online_read_only': - tx_mode = _ydb_query_public.QueryOnlineReadOnly() - elif tx_mode.name == 'stale_read_only': - tx_mode = _ydb_query_public.QueryStaleReadOnly() - else: - raise issues.YDBInvalidArgumentError(f'Unknown transaction mode: {tx_mode.name}') +# def patch_table_service_tx_mode_to_query_service(tx_mode: AbstractTransactionModeBuilder): +# if tx_mode.name == 'snapshot_read_only': +# tx_mode = _ydb_query_public.QuerySnapshotReadOnly() +# elif tx_mode.name == 'serializable_read_write': +# tx_mode = _ydb_query_public.QuerySerializableReadWrite() +# elif tx_mode.name =='online_read_only': +# tx_mode = _ydb_query_public.QueryOnlineReadOnly() +# elif tx_mode.name == 'stale_read_only': +# tx_mode = _ydb_query_public.QueryStaleReadOnly() +# else: +# raise issues.YDBInvalidArgumentError(f'Unknown transaction mode: {tx_mode.name}') - return tx_mode +# return tx_mode def _construct_tx_settings(tx_state): @@ -69,7 +65,8 @@ def wrap_tx_begin_response(rpc_state, response_pb, session_state, tx_state, tx): # issues._process_response(response_pb.operation) print("wrap result") message = _ydb_query.BeginTransactionResponse.from_proto(response_pb) - tx_state.tx_id = message.tx_meta.id + + tx_state.tx_id = message.tx_meta.tx_id return tx @@ -83,7 +80,7 @@ def wrap_result_on_rollback_or_commit_tx(rpc_state, response_pb, session_state, return tx -class BaseTxContext(ITxContext): +class BaseTxContext(base.IQueryTxContext): _COMMIT = "commit" _ROLLBACK = "rollback" @@ -108,9 +105,7 @@ def __init__(self, driver, session_state, session, tx_mode=None): """ self._driver = driver if tx_mode is None: - tx_mode = patch_table_service_tx_mode_to_query_service(SerializableReadWrite()) - else: - tx_mode = patch_table_service_tx_mode_to_query_service(tx_mode) + tx_mode = _ydb_query_public.QuerySerializableReadWrite() self._tx_state = TxState(tx_mode) self._session_state = session_state self.session = session From 2ce3d6e4b46558a2c2860e39257e92237bdf17a1 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:26 +0300 Subject: [PATCH 050/429] tx state handler --- ydb/_grpc/grpcwrapper/ydb_query.py | 23 +++++++ ydb/query/base.py | 74 ++++++++++++++++++++--- ydb/query/transaction.py | 97 +++++++++++++++++++++--------- 3 files changed, 157 insertions(+), 37 deletions(-) diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index 542aa158..0bfdf792 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -116,6 +116,29 @@ def from_proto(msg: ydb_query_pb2.BeginTransactionResponse) -> "BeginTransaction tx_meta=TransactionMeta.from_proto(msg.tx_meta), ) + +@dataclass +class CommitTransactionResponse(IFromProto): + status: Optional[ServerStatus] + + @staticmethod + def from_proto(msg: ydb_query_pb2.CommitTransactionResponse) -> "CommitTransactionResponse": + return CommitTransactionResponse( + status=ServerStatus(msg.status, msg.issues), + ) + + +@dataclass +class RollbackTransactionResponse(IFromProto): + status: Optional[ServerStatus] + + @staticmethod + def from_proto(msg: ydb_query_pb2.RollbackTransactionResponse) -> "RollbackTransactionResponse": + return RollbackTransactionResponse( + status=ServerStatus(msg.status, msg.issues), + ) + + @dataclass class QueryContent(IFromPublic, IToProto): text: str diff --git a/ydb/query/base.py b/ydb/query/base.py index 92023eaf..40e562b3 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -1,4 +1,6 @@ import abc +import enum +import functools from typing import ( Optional, @@ -13,10 +15,51 @@ QuerySerializableReadWrite ) from .. import convert +from .. import issues class QueryClientSettings: ... +class QuerySessionStateEnum(enum.Enum): + NOT_INITIALIZED = "NOT_INITIALIZED" + CREATED = "CREATED" + CLOSED = "CLOSED" + + +class QuerySessionStateHelper(abc.ABC): + _VALID_TRANSITIONS = { + QuerySessionStateEnum.NOT_INITIALIZED: [QuerySessionStateEnum.CREATED], + QuerySessionStateEnum.CREATED: [QuerySessionStateEnum.CLOSED], + QuerySessionStateEnum.CLOSED: [] + } + + @classmethod + def valid_transition(cls, before: QuerySessionStateEnum, after: QuerySessionStateEnum) -> bool: + return after in cls._VALID_TRANSITIONS[before] + + +class QueryTxStateEnum(enum.Enum): + NOT_INITIALIZED = "NOT_INITIALIZED" + BEGINED = "BEGINED" + COMMITTED = "COMMITTED" + ROLLBACKED = "ROLLBACKED" + DEAD = "DEAD" + + +class QueryTxStateHelper(abc.ABC): + _VALID_TRANSITIONS = { + QueryTxStateEnum.NOT_INITIALIZED: [QueryTxStateEnum.BEGINED, QueryTxStateEnum.DEAD], + QueryTxStateEnum.BEGINED: [QueryTxStateEnum.COMMITTED, QueryTxStateEnum.ROLLBACKED, QueryTxStateEnum.DEAD], + QueryTxStateEnum.COMMITTED: [], + QueryTxStateEnum.ROLLBACKED: [], + QueryTxStateEnum.DEAD: [], + } + + @classmethod + def valid_transition(cls, before: QueryTxStateEnum, after: QueryTxStateEnum) -> bool: + return after in cls._VALID_TRANSITIONS[before] + + class QuerySessionState: _session_id: Optional[str] _node_id: Optional[int] @@ -99,15 +142,15 @@ def tx_id(self): pass @abc.abstractmethod - def begin(): + def begin(settings: QueryClientSettings = None): pass @abc.abstractmethod - def commit(): + def commit(settings: QueryClientSettings = None): pass @abc.abstractmethod - def rollback(): + def rollback(settings: QueryClientSettings = None): pass @abc.abstractmethod @@ -142,9 +185,26 @@ def create_execute_query_request(query: str, session_id: str, commit_tx: bool): def wrap_execute_query_response(rpc_state, response_pb): - # print("RESP:") - # print(f"meta: {response_pb.tx_meta}") - # print(response_pb) + return convert.ResultSet.from_message(response_pb.result_set) +X_YDB_SERVER_HINTS = "x-ydb-server-hints" +X_YDB_SESSION_CLOSE = "session-close" - return convert.ResultSet.from_message(response_pb.result_set) + +def _check_session_is_closing(rpc_state, session_state): + metadata = rpc_state.trailing_metadata() + if X_YDB_SESSION_CLOSE in metadata.get(X_YDB_SERVER_HINTS, []): + session_state.set_closing() + + +def bad_session_handler(func): + @functools.wraps(func) + def decorator(rpc_state, response_pb, session_state, *args, **kwargs): + try: + _check_session_is_closing(rpc_state, session_state) + return func(rpc_state, response_pb, session_state, *args, **kwargs) + except issues.BadSession: + session_state.reset() + raise + + return decorator \ No newline at end of file diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 14c5a039..fd3e26e8 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -1,5 +1,7 @@ import abc import logging +import enum +import functools from .. import ( _apis, @@ -9,8 +11,6 @@ from .._grpc.grpcwrapper import ydb_query as _ydb_query from .._grpc.grpcwrapper import ydb_query_public_types as _ydb_query_public -from .._tx_ctx_impl import TxState, reset_tx_id_handler -from .._session_impl import bad_session_handler from . import base logger = logging.getLogger(__name__) @@ -30,6 +30,38 @@ # return tx_mode +def reset_tx_id_handler(func): + @functools.wraps(func) + def decorator(rpc_state, response_pb, session_state, tx_state, *args, **kwargs): + try: + return func(rpc_state, response_pb, session_state, tx_state, *args, **kwargs) + except issues.Error: + tx_state.change_state(base.QueryTxStateEnum.DEAD) + tx_state.tx_id = None + raise + + return decorator + + +class QueryTxState: + def __init__(self, tx_mode: base.BaseQueryTxMode): + """ + Holds transaction context manager info + :param tx_mode: A mode of transaction + """ + self.tx_id = None + self.tx_mode = tx_mode + self._state = base.QueryTxStateEnum.NOT_INITIALIZED + + def check_invalid_transition(self, target: base.QueryTxStateEnum): + if not base.QueryTxStateHelper.is_valid_transition(self._state, target): + raise RuntimeError(f"Transaction could not be moved from {self._state.value} to {target.value}") + + def change_state(self, target: base.QueryTxStateEnum): + self.check_invalid_transition(target) + self._state = target + + def _construct_tx_settings(tx_state): tx_settings = _ydb_query.TransactionSettings.from_public(tx_state.tx_mode) return tx_settings @@ -41,8 +73,6 @@ def _create_begin_transaction_request(session_state, tx_state): tx_settings=_construct_tx_settings(tx_state), ).to_proto() - print(request) - return request @@ -59,32 +89,35 @@ def _create_rollback_transaction_request(session_state, tx_state): return request -@bad_session_handler +@base.bad_session_handler def wrap_tx_begin_response(rpc_state, response_pb, session_state, tx_state, tx): - # session_state.complete_query() - # issues._process_response(response_pb.operation) - print("wrap result") message = _ydb_query.BeginTransactionResponse.from_proto(response_pb) - + issues._process_response(message.status) + tx_state.change_state(base.QueryTxStateEnum.BEGINED) tx_state.tx_id = message.tx_meta.tx_id return tx -@bad_session_handler +@base.bad_session_handler @reset_tx_id_handler -def wrap_result_on_rollback_or_commit_tx(rpc_state, response_pb, session_state, tx_state, tx): +def wrap_tx_commit_response(rpc_state, response_pb, session_state, tx_state, tx): + message = _ydb_query.CommitTransactionResponse(response_pb) + issues._process_response(message.status) + tx_state.tx_id = None + tx_state.change_state(base.QueryTxStateEnum.COMMITTED) + return tx - # issues._process_response(response_pb.operation) - # transaction successfully committed or rolled back +@base.bad_session_handler +@reset_tx_id_handler +def wrap_tx_rollback_response(rpc_state, response_pb, session_state, tx_state, tx): + message = _ydb_query.RollbackTransactionResponse(response_pb) + issues._process_response(message.status) tx_state.tx_id = None + tx_state.change_state(base.QueryTxStateEnum.ROLLBACKED) return tx class BaseTxContext(base.IQueryTxContext): - - _COMMIT = "commit" - _ROLLBACK = "rollback" - def __init__(self, driver, session_state, session, tx_mode=None): """ An object that provides a simple transaction context manager that allows statements execution @@ -106,7 +139,7 @@ def __init__(self, driver, session_state, session, tx_mode=None): self._driver = driver if tx_mode is None: tx_mode = _ydb_query_public.QuerySerializableReadWrite() - self._tx_state = TxState(tx_mode) + self._tx_state = QueryTxState(tx_mode) self._session_state = session_state self.session = session self._finished = "" @@ -163,17 +196,15 @@ def begin(self, settings=None): :return: An open transaction """ - if self._tx_state.tx_id is not None: - return self - - print('try to begin tx') + self._tx_state.check_invalid_transition(base.QueryTxStateEnum.BEGINED) return self._driver( _create_begin_transaction_request(self._session_state, self._tx_state), _apis.QueryService.Stub, _apis.QueryService.BeginTransaction, - wrap_result=wrap_tx_begin_response, - wrap_args=(self._session_state, self._tx_state, self), + wrap_tx_begin_response, + settings, + (self._session_state, self._tx_state, self), ) def commit(self, settings=None): @@ -186,22 +217,28 @@ def commit(self, settings=None): :return: A committed transaction or exception if commit is failed """ - self._set_finish(self._COMMIT) - - if self._tx_state.tx_id is None and not self._tx_state.dead: - return self + self._tx_state.check_invalid_transition(base.QueryTxStateEnum.COMMITTED) return self._driver( _create_commit_transaction_request(self._session_state, self._tx_state), _apis.QueryService.Stub, _apis.QueryService.CommitTransaction, - wrap_result_on_rollback_or_commit_tx, + wrap_tx_commit_response, settings, (self._session_state, self._tx_state, self), ) def rollback(self, settings=None): - pass + self._tx_state.check_invalid_transition(base.QueryTxStateEnum.ROLLBACKED) + + return self._driver( + _create_rollback_transaction_request(self._session_state, self._tx_state), + _apis.QueryService.Stub, + _apis.QueryService.RollbackTransaction, + wrap_tx_rollback_response, + settings, + (self._session_state, self._tx_state, self), + ) def execute(self, query, parameters=None, commit_tx=False, settings=None): pass \ No newline at end of file From 75ea82d6e7f30217ed0873a48e817414f12816aa Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:26 +0300 Subject: [PATCH 051/429] refactor session --- tests/query/conftest.py | 27 +++++++ tests/query/test_query_session.py | 60 +++++++++++++-- ydb/query/base.py | 87 ++++++--------------- ydb/query/session.py | 123 +++++++++++++++++++++++++----- 4 files changed, 209 insertions(+), 88 deletions(-) create mode 100644 tests/query/conftest.py diff --git a/tests/query/conftest.py b/tests/query/conftest.py new file mode 100644 index 00000000..c098c631 --- /dev/null +++ b/tests/query/conftest.py @@ -0,0 +1,27 @@ +import pytest +from ydb.query.session import QuerySessionSync + + +@pytest.fixture +def session(driver_sync): + session = QuerySessionSync(driver_sync) + + yield session + + try: + session.delete() + except BaseException: + pass + +@pytest.fixture +def transaction(session): + session.create() + transaction = session.transaction() + + yield transaction + + try: + transaction.rollback() + except BaseException: + pass + diff --git a/tests/query/test_query_session.py b/tests/query/test_query_session.py index ef0c26f5..71e06b37 100644 --- a/tests/query/test_query_session.py +++ b/tests/query/test_query_session.py @@ -1,7 +1,5 @@ import pytest -import ydb.query.session - def _check_session_state_empty(session): assert session._state.session_id == None assert session._state.node_id == None @@ -13,8 +11,7 @@ def _check_session_state_full(session): assert session._state.attached == True class TestQuerySession: - def test_session_normal_lifecycle(self, driver_sync): - session = ydb.query.session.QuerySessionSync(driver_sync) + def test_session_normal_lifecycle(self, session): _check_session_state_empty(session) session.create() @@ -23,8 +20,7 @@ def test_session_normal_lifecycle(self, driver_sync): session.delete() _check_session_state_empty(session) - def test_second_create_do_nothing(self, driver_sync): - session = ydb.query.session.QuerySessionSync(driver_sync) + def test_second_create_do_nothing(self, session): session.create() _check_session_state_full(session) @@ -36,3 +32,55 @@ def test_second_create_do_nothing(self, driver_sync): assert session._state.session_id == session_id_before assert session._state.node_id == node_id_before + + def test_second_delete_do_nothing(self, session): + session.create() + + session.delete() + session.delete() + + def test_delete_before_create_not_possible(self, session): + with pytest.raises(RuntimeError): + session.delete() + + def test_create_after_delete_not_possible(self, session): + session.create() + session.delete() + with pytest.raises(RuntimeError): + session.create() + + def test_transaction_before_create_raises(self, session): + with pytest.raises(RuntimeError): + session.transaction() + + def test_transaction_after_delete_raises(self, session): + session.create() + + session.delete() + + with pytest.raises(RuntimeError): + session.transaction() + + def test_transaction_after_create_not_raises(self, session): + session.create() + session.transaction() + + def test_execute_before_create_raises(self, session): + with pytest.raises(RuntimeError): + session.execute("select 1;") + + def test_execute_after_delete_raises(self, session): + session.create() + session.delete() + with pytest.raises(RuntimeError): + session.execute("select 1;") + + def test_basic_execute(self, session): + session.create() + it = session.execute("select 1;") + result_sets = [result_set for result_set in it] + + assert len(result_sets) == 1 + assert len(result_sets[0].rows) == 1 + assert len(result_sets[0].columns) == 1 + assert list(result_sets[0].rows[0].values()) == [1] \ No newline at end of file diff --git a/ydb/query/base.py b/ydb/query/base.py index 40e562b3..7db6a5de 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -20,83 +20,40 @@ class QueryClientSettings: ... -class QuerySessionStateEnum(enum.Enum): - NOT_INITIALIZED = "NOT_INITIALIZED" - CREATED = "CREATED" - CLOSED = "CLOSED" - - -class QuerySessionStateHelper(abc.ABC): - _VALID_TRANSITIONS = { - QuerySessionStateEnum.NOT_INITIALIZED: [QuerySessionStateEnum.CREATED], - QuerySessionStateEnum.CREATED: [QuerySessionStateEnum.CLOSED], - QuerySessionStateEnum.CLOSED: [] - } - - @classmethod - def valid_transition(cls, before: QuerySessionStateEnum, after: QuerySessionStateEnum) -> bool: - return after in cls._VALID_TRANSITIONS[before] - - -class QueryTxStateEnum(enum.Enum): - NOT_INITIALIZED = "NOT_INITIALIZED" - BEGINED = "BEGINED" - COMMITTED = "COMMITTED" - ROLLBACKED = "ROLLBACKED" - DEAD = "DEAD" - - -class QueryTxStateHelper(abc.ABC): - _VALID_TRANSITIONS = { - QueryTxStateEnum.NOT_INITIALIZED: [QueryTxStateEnum.BEGINED, QueryTxStateEnum.DEAD], - QueryTxStateEnum.BEGINED: [QueryTxStateEnum.COMMITTED, QueryTxStateEnum.ROLLBACKED, QueryTxStateEnum.DEAD], - QueryTxStateEnum.COMMITTED: [], - QueryTxStateEnum.ROLLBACKED: [], - QueryTxStateEnum.DEAD: [], - } - - @classmethod - def valid_transition(cls, before: QueryTxStateEnum, after: QueryTxStateEnum) -> bool: - return after in cls._VALID_TRANSITIONS[before] - - -class QuerySessionState: - _session_id: Optional[str] - _node_id: Optional[int] - _attached: bool = False - _settings: Optional[QueryClientSettings] - +class IQuerySessionState(abc.ABC): def __init__(self, settings: QueryClientSettings = None): - self._settings = settings - self.reset() + pass + @abc.abstractmethod def reset(self) -> None: - self._session_id = None - self._node_id = None - self._attached = False + pass @property + @abc.abstractmethod def session_id(self) -> Optional[str]: - return self._session_id + pass - def set_session_id(self, session_id: str) -> "QuerySessionState": - self._session_id = session_id - return self + @abc.abstractmethod + def set_session_id(self, session_id: str) -> "IQuerySessionState": + pass @property + @abc.abstractmethod def node_id(self) -> Optional[int]: - return self._node_id + pass - def set_node_id(self, node_id: int) -> "QuerySessionState": - self._node_id = node_id - return self + @abc.abstractmethod + def set_node_id(self, node_id: int) -> "IQuerySessionState": + pass @property + @abc.abstractmethod def attached(self) -> bool: - return self._attached + pass - def set_attached(self, attached: bool) -> None: - self._attached = attached + @abc.abstractmethod + def set_attached(self, attached: bool) -> "IQuerySessionState": + pass class IQuerySession(abc.ABC): @@ -120,7 +77,7 @@ def transaction(self, tx_mode: BaseQueryTxMode) -> "IQueryTxContext": class IQueryTxContext(abc.ABC): @abc.abstractmethod - def __init__(self, driver: SupportedDriverType, session_state: QuerySessionState, session: IQuerySession, tx_mode: BaseQueryTxMode = None): + def __init__(self, driver: SupportedDriverType, session_state: IQuerySessionState, session: IQuerySession, tx_mode: BaseQueryTxMode = None): pass @abc.abstractmethod @@ -184,9 +141,9 @@ def create_execute_query_request(query: str, session_id: str, commit_tx: bool): return req.to_proto() def wrap_execute_query_response(rpc_state, response_pb): - return convert.ResultSet.from_message(response_pb.result_set) + X_YDB_SERVER_HINTS = "x-ydb-server-hints" X_YDB_SESSION_CLOSE = "session-close" @@ -194,7 +151,7 @@ def wrap_execute_query_response(rpc_state, response_pb): def _check_session_is_closing(rpc_state, session_state): metadata = rpc_state.trailing_metadata() if X_YDB_SESSION_CLOSE in metadata.get(X_YDB_SERVER_HINTS, []): - session_state.set_closing() + session_state.set_closing() # TODO: clarify & implement def bad_session_handler(func): diff --git a/ydb/query/session.py b/ydb/query/session.py index 8aee19b4..e59a8acd 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -2,6 +2,7 @@ from abc import abstractmethod import asyncio import concurrent +import enum import logging import threading from typing import ( @@ -22,29 +23,112 @@ logger = logging.getLogger(__name__) -def wrapper_create_session(rpc_state, response_pb, session_state: base.QuerySessionState, session): - #TODO: process response +class QuerySessionStateEnum(enum.Enum): + NOT_INITIALIZED = "NOT_INITIALIZED" + CREATED = "CREATED" + CLOSED = "CLOSED" + + +class QuerySessionStateHelper(abc.ABC): + _VALID_TRANSITIONS = { + QuerySessionStateEnum.NOT_INITIALIZED: [QuerySessionStateEnum.CREATED], + QuerySessionStateEnum.CREATED: [QuerySessionStateEnum.CLOSED], + QuerySessionStateEnum.CLOSED: [] + } + + _READY_TO_USE = [ + QuerySessionStateEnum.CREATED + ] + + @classmethod + def valid_transition(cls, before: QuerySessionStateEnum, after: QuerySessionStateEnum) -> bool: + return after in cls._VALID_TRANSITIONS[before] + + @classmethod + def ready_to_use(cls, state: QuerySessionStateEnum) -> bool: + return state in cls._READY_TO_USE + + +class QuerySessionState(base.IQuerySessionState): + _session_id: Optional[str] + _node_id: Optional[int] + _attached: bool = False + _settings: Optional[base.QueryClientSettings] + _state: QuerySessionStateEnum + + def __init__(self, settings: base.QueryClientSettings = None): + self._settings = settings + self._state = QuerySessionStateEnum.NOT_INITIALIZED + self.reset() + + def reset(self) -> None: + self._session_id = None + self._node_id = None + self._attached = False + + @property + def session_id(self) -> Optional[str]: + return self._session_id + + def set_session_id(self, session_id: str) -> "QuerySessionState": + self._session_id = session_id + return self + + @property + def node_id(self) -> Optional[int]: + return self._node_id + + def set_node_id(self, node_id: int) -> "QuerySessionState": + self._node_id = node_id + return self + + @property + def attached(self) -> bool: + return self._attached + + def set_attached(self, attached: bool) -> "QuerySessionState": + self._attached = attached + + def _check_invalid_transition(self, target: QuerySessionStateEnum): + if not QuerySessionStateHelper.valid_transition(self._state, target): + raise RuntimeError(f"Session could not be moved from {self._state.value} to {target.value}") + + def _change_state(self, target: QuerySessionStateEnum): + self._check_invalid_transition(target) + self._state = target + + def _check_session_ready_to_use(self): + if not QuerySessionStateHelper.ready_to_use(self._state): + raise RuntimeError(f"Session is not ready to use, current state: {self._state.value}") + + def _already_in(self, target): + return self._state == target + + +def wrapper_create_session(rpc_state, response_pb, session_state: QuerySessionState, session): message = _ydb_query.CreateSessionResponse.from_proto(response_pb) + issues._process_response(message.status) session_state.set_session_id(message.session_id).set_node_id(message.node_id) return session -def wrapper_delete_session(rpc_state, response_pb, session_state: base.QuerySessionState, session): - #TODO: process response +def wrapper_delete_session(rpc_state, response_pb, session_state: QuerySessionState, session): message = _ydb_query.DeleteSessionResponse.from_proto(response_pb) + issues._process_response(message.status) session_state.reset() + session_state._change_state(QuerySessionStateEnum.CLOSED) return session class BaseQuerySession(base.IQuerySession): _driver: base.SupportedDriverType _settings: Optional[base.QueryClientSettings] - _state: base.QuerySessionState + _state: QuerySessionState def __init__(self, driver: base.SupportedDriverType, settings: base.QueryClientSettings = None): self._driver = driver self._settings = settings - self._state = base.QuerySessionState(settings) + self._state = QuerySessionState(settings) def _create_call(self): return self._driver( @@ -77,12 +161,11 @@ def _execute_call(self, query: str, commit_tx: bool): session_id=self._state.session_id, commit_tx=commit_tx ) - print(request) + return self._driver( request, _apis.QueryService.Stub, _apis.QueryService.ExecuteQuery, - # base.wrap_execute_query_response ) class QuerySessionSync(BaseQuerySession): @@ -98,9 +181,9 @@ def _attach(self): first_response = next(status_stream) if first_response.status != issues.StatusCode.SUCCESS: pass - # raise common_utils.YdbStatusError(first_response) self._state.set_attached(True) + self._state._change_state(QuerySessionStateEnum.CREATED) threading.Thread( target=self._chech_session_status_loop, @@ -113,27 +196,31 @@ def _chech_session_status_loop(self, status_stream): try: for status in status_stream: if status.status != issues.StatusCode.SUCCESS: - print("STATUS NOT SUCCESS") - self._state.reset(False) + self._state.reset() + self._state._change_state(QuerySessionStateEnum.CLOSED) except Exception as e: pass def delete(self) -> None: - if not self._state.session_id: + if self._state._already_in(QuerySessionStateEnum.CLOSED): return + + self._state._check_invalid_transition(QuerySessionStateEnum.CLOSED) self._delete_call() self._stream.cancel() def create(self) -> None: - if self._state.session_id: + if self._state._already_in(QuerySessionStateEnum.CREATED): return + + self._state._check_invalid_transition(QuerySessionStateEnum.CREATED) self._create_call() self._attach() def transaction(self, tx_mode: base.BaseQueryTxMode = None) -> base.IQueryTxContext: - if not self._state.session_id: - return + self._state._check_session_ready_to_use() + return BaseTxContext( self._driver, self._state, @@ -141,8 +228,10 @@ def transaction(self, tx_mode: base.BaseQueryTxMode = None) -> base.IQueryTxCont tx_mode, ) - def execute(self, query: str, commit_tx: bool = True): - stream_it = self._execute_call(query, commit_tx) + def execute(self, query: str, parameters=None): + self._state._check_session_ready_to_use() + + stream_it = self._execute_call(query, commit_tx=True) return _utilities.SyncResponseIterator( stream_it, From d9a0424d7a26dc3b9ea3e9397db09da42fbbd817 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 15:46:26 +0300 Subject: [PATCH 052/429] refactor transaction --- docker-compose.yml | 2 +- tests/query/conftest.py | 2 +- tests/query/test_query_transaction.py | 43 ++++++++--- ydb/query/base.py | 47 +++++++----- ydb/query/transaction.py | 100 +++++++++++++++++++------- 5 files changed, 141 insertions(+), 53 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 50a31f12..cb37a377 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.3" services: ydb: - image: ydbplatform/local-ydb:latest + image: ydbplatform/local-ydb:trunk restart: always ports: - 2136:2136 diff --git a/tests/query/conftest.py b/tests/query/conftest.py index c098c631..1c1cf333 100644 --- a/tests/query/conftest.py +++ b/tests/query/conftest.py @@ -14,7 +14,7 @@ def session(driver_sync): pass @pytest.fixture -def transaction(session): +def tx(session): session.create() transaction = session.transaction() diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 71d9ac7f..0731882a 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -1,17 +1,44 @@ import pytest -import ydb.query.session +class TestQueryTransaction: + def test_tx_begin(self, tx): + assert tx.tx_id == None -class TestQuerySession: - def test_transaction_begin(self, driver_sync): - session = ydb.query.session.QuerySessionSync(driver_sync) + tx.begin() + assert tx.tx_id != None - session.create() + def test_tx_allow_double_commit(self, tx): + tx.begin() + tx.commit() + tx.commit() - tx = session.transaction() + def test_tx_allow_double_rollback(self, tx): + tx.begin() + tx.rollback() + tx.rollback() - assert tx.tx_id == None + def test_tx_commit_raises_before_begin(self, tx): + with pytest.raises(RuntimeError): + tx.commit() + def test_tx_rollback_raises_before_begin(self, tx): + with pytest.raises(RuntimeError): + tx.rollback() + + # def test_tx_execute_raises_before_begin(self, tx): + # with pytest.raises(RuntimeError): + # tx.execute("select 1;") + + def text_tx_execute_raises_after_commit(self, tx): tx.begin() + tx.commit() + with pytest.raises(RuntimeError): + tx.execute("select 1;") + + def text_tx_execute_raises_after_rollback(self, tx): + tx.begin() + tx.rollback() + with pytest.raises(RuntimeError): + tx.execute("select 1;") + - assert tx.tx_id != None diff --git a/ydb/query/base.py b/ydb/query/base.py index 7db6a5de..44cc94fd 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -124,19 +124,32 @@ def session(self) -> IQuerySession: pass -def create_execute_query_request(query: str, session_id: str, commit_tx: bool): - req = ydb_query.ExecuteQueryRequest( - session_id=session_id, - query_content=ydb_query.QueryContent.from_public( - query=query, - ), - tx_control=ydb_query.TransactionControl( - begin_tx=ydb_query.TransactionSettings( - tx_mode=QuerySerializableReadWrite(), +def create_execute_query_request(query: str, session_id: str, tx_id: str = None, commit_tx: bool = False, tx_mode: BaseQueryTxMode = None): + if tx_id: + req = ydb_query.ExecuteQueryRequest( + session_id=session_id, + query_content=ydb_query.QueryContent.from_public( + query=query, ), - commit_tx=commit_tx - ), - ) + tx_control=ydb_query.TransactionControl( + tx_id=tx_id, + commit_tx=commit_tx + ), + ) + else: + tx_mode = tx_mode if tx_mode is not None else QuerySerializableReadWrite() + req = ydb_query.ExecuteQueryRequest( + session_id=session_id, + query_content=ydb_query.QueryContent.from_public( + query=query, + ), + tx_control=ydb_query.TransactionControl( + begin_tx=ydb_query.TransactionSettings( + tx_mode=tx_mode, + ), + commit_tx=commit_tx + ), + ) return req.to_proto() @@ -148,17 +161,17 @@ def wrap_execute_query_response(rpc_state, response_pb): X_YDB_SESSION_CLOSE = "session-close" -def _check_session_is_closing(rpc_state, session_state): - metadata = rpc_state.trailing_metadata() - if X_YDB_SESSION_CLOSE in metadata.get(X_YDB_SERVER_HINTS, []): - session_state.set_closing() # TODO: clarify & implement +# def _check_session_is_closing(rpc_state, session_state): +# metadata = rpc_state.trailing_metadata() +# if X_YDB_SESSION_CLOSE in metadata.get(X_YDB_SERVER_HINTS, []): +# session_state.set_closing() # TODO: clarify & implement def bad_session_handler(func): @functools.wraps(func) def decorator(rpc_state, response_pb, session_state, *args, **kwargs): try: - _check_session_is_closing(rpc_state, session_state) + # _check_session_is_closing(rpc_state, session_state) return func(rpc_state, response_pb, session_state, *args, **kwargs) except issues.BadSession: session_state.reset() diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index fd3e26e8..90f5f681 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -15,19 +15,37 @@ logger = logging.getLogger(__name__) -# def patch_table_service_tx_mode_to_query_service(tx_mode: AbstractTransactionModeBuilder): -# if tx_mode.name == 'snapshot_read_only': -# tx_mode = _ydb_query_public.QuerySnapshotReadOnly() -# elif tx_mode.name == 'serializable_read_write': -# tx_mode = _ydb_query_public.QuerySerializableReadWrite() -# elif tx_mode.name =='online_read_only': -# tx_mode = _ydb_query_public.QueryOnlineReadOnly() -# elif tx_mode.name == 'stale_read_only': -# tx_mode = _ydb_query_public.QueryStaleReadOnly() -# else: -# raise issues.YDBInvalidArgumentError(f'Unknown transaction mode: {tx_mode.name}') -# return tx_mode +class QueryTxStateEnum(enum.Enum): + NOT_INITIALIZED = "NOT_INITIALIZED" + BEGINED = "BEGINED" + COMMITTED = "COMMITTED" + ROLLBACKED = "ROLLBACKED" + DEAD = "DEAD" + + +class QueryTxStateHelper(abc.ABC): + _VALID_TRANSITIONS = { + QueryTxStateEnum.NOT_INITIALIZED: [QueryTxStateEnum.BEGINED, QueryTxStateEnum.DEAD], + QueryTxStateEnum.BEGINED: [QueryTxStateEnum.COMMITTED, QueryTxStateEnum.ROLLBACKED, QueryTxStateEnum.DEAD], + QueryTxStateEnum.COMMITTED: [], + QueryTxStateEnum.ROLLBACKED: [], + QueryTxStateEnum.DEAD: [], + } + + _TERMINAL_STATES = [ + QueryTxStateEnum.COMMITTED, + QueryTxStateEnum.ROLLBACKED, + QueryTxStateEnum.DEAD, + ] + + @classmethod + def valid_transition(cls, before: QueryTxStateEnum, after: QueryTxStateEnum) -> bool: + return after in cls._VALID_TRANSITIONS[before] + + @classmethod + def terminal(cls, state: QueryTxStateEnum) -> bool: + return state in cls._TERMINAL_STATES def reset_tx_id_handler(func): @@ -36,7 +54,7 @@ def decorator(rpc_state, response_pb, session_state, tx_state, *args, **kwargs): try: return func(rpc_state, response_pb, session_state, tx_state, *args, **kwargs) except issues.Error: - tx_state.change_state(base.QueryTxStateEnum.DEAD) + tx_state._change_state(QueryTxStateEnum.DEAD) tx_state.tx_id = None raise @@ -51,16 +69,23 @@ def __init__(self, tx_mode: base.BaseQueryTxMode): """ self.tx_id = None self.tx_mode = tx_mode - self._state = base.QueryTxStateEnum.NOT_INITIALIZED + self._state = QueryTxStateEnum.NOT_INITIALIZED - def check_invalid_transition(self, target: base.QueryTxStateEnum): - if not base.QueryTxStateHelper.is_valid_transition(self._state, target): + def _check_invalid_transition(self, target: QueryTxStateEnum): + if not QueryTxStateHelper.valid_transition(self._state, target): raise RuntimeError(f"Transaction could not be moved from {self._state.value} to {target.value}") - def change_state(self, target: base.QueryTxStateEnum): - self.check_invalid_transition(target) + def _change_state(self, target: QueryTxStateEnum): + self._check_invalid_transition(target) self._state = target + def _check_tx_not_terminal(self): + if QueryTxStateHelper.terminal(self._state): + raise RuntimeError(f"Transaction is in terminal state: {self._state.value}") + + def _already_in(self, target: QueryTxStateEnum): + return self._state == target + def _construct_tx_settings(tx_state): tx_settings = _ydb_query.TransactionSettings.from_public(tx_state.tx_mode) @@ -93,7 +118,7 @@ def _create_rollback_transaction_request(session_state, tx_state): def wrap_tx_begin_response(rpc_state, response_pb, session_state, tx_state, tx): message = _ydb_query.BeginTransactionResponse.from_proto(response_pb) issues._process_response(message.status) - tx_state.change_state(base.QueryTxStateEnum.BEGINED) + tx_state._change_state(QueryTxStateEnum.BEGINED) tx_state.tx_id = message.tx_meta.tx_id return tx @@ -104,7 +129,7 @@ def wrap_tx_commit_response(rpc_state, response_pb, session_state, tx_state, tx) message = _ydb_query.CommitTransactionResponse(response_pb) issues._process_response(message.status) tx_state.tx_id = None - tx_state.change_state(base.QueryTxStateEnum.COMMITTED) + tx_state._change_state(QueryTxStateEnum.COMMITTED) return tx @base.bad_session_handler @@ -113,7 +138,7 @@ def wrap_tx_rollback_response(rpc_state, response_pb, session_state, tx_state, t message = _ydb_query.RollbackTransactionResponse(response_pb) issues._process_response(message.status) tx_state.tx_id = None - tx_state.change_state(base.QueryTxStateEnum.ROLLBACKED) + tx_state._change_state(QueryTxStateEnum.ROLLBACKED) return tx @@ -196,7 +221,7 @@ def begin(self, settings=None): :return: An open transaction """ - self._tx_state.check_invalid_transition(base.QueryTxStateEnum.BEGINED) + self._tx_state._check_invalid_transition(QueryTxStateEnum.BEGINED) return self._driver( _create_begin_transaction_request(self._session_state, self._tx_state), @@ -216,8 +241,9 @@ def commit(self, settings=None): :return: A committed transaction or exception if commit is failed """ - - self._tx_state.check_invalid_transition(base.QueryTxStateEnum.COMMITTED) + if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): + return + self._tx_state._check_invalid_transition(QueryTxStateEnum.COMMITTED) return self._driver( _create_commit_transaction_request(self._session_state, self._tx_state), @@ -229,7 +255,10 @@ def commit(self, settings=None): ) def rollback(self, settings=None): - self._tx_state.check_invalid_transition(base.QueryTxStateEnum.ROLLBACKED) + if self._tx_state._already_in(QueryTxStateEnum.ROLLBACKED): + return + + self._tx_state._check_invalid_transition(QueryTxStateEnum.ROLLBACKED) return self._driver( _create_rollback_transaction_request(self._session_state, self._tx_state), @@ -240,5 +269,24 @@ def rollback(self, settings=None): (self._session_state, self._tx_state, self), ) + def _execute_call(self, query: str, commit_tx: bool): + request = base.create_execute_query_request( + query=query, + session_id=self._session_state.session_id, + commit_tx=commit_tx + ) + return self._driver( + request, + _apis.QueryService.Stub, + _apis.QueryService.ExecuteQuery, + ) + def execute(self, query, parameters=None, commit_tx=False, settings=None): - pass \ No newline at end of file + self._tx_state._check_tx_not_terminal() + + stream_it = self._execute_call(query, commit_tx) + + return _utilities.SyncResponseIterator( + stream_it, + lambda resp: base.wrap_execute_query_response(rpc_state=None, response_pb=resp), + ) From e82076426b0c69c26015d531a57680f62945fd91 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 16:05:43 +0300 Subject: [PATCH 053/429] codestyles fixes --- examples/query-service/basic_example.py | 3 +-- tests/query/conftest.py | 2 +- tests/query/test_query_session.py | 17 ++++++++++------- tests/query/test_query_transaction.py | 6 ++---- ydb/_grpc/grpcwrapper/common_utils.py | 1 - ydb/_grpc/grpcwrapper/ydb_query.py | 18 ++---------------- .../grpcwrapper/ydb_query_public_types.py | 2 -- ydb/query/base.py | 8 +++++--- ydb/query/session.py | 8 ++------ ydb/query/transaction.py | 2 ++ 10 files changed, 25 insertions(+), 42 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index e4af2c8e..d0987cd9 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -26,6 +26,5 @@ def main(): print(f"rows: {str(result_set.rows)}") - if __name__ == '__main__': - main() \ No newline at end of file + main() diff --git a/tests/query/conftest.py b/tests/query/conftest.py index 1c1cf333..a7f0c34c 100644 --- a/tests/query/conftest.py +++ b/tests/query/conftest.py @@ -13,6 +13,7 @@ def session(driver_sync): except BaseException: pass + @pytest.fixture def tx(session): session.create() @@ -24,4 +25,3 @@ def tx(session): transaction.rollback() except BaseException: pass - diff --git a/tests/query/test_query_session.py b/tests/query/test_query_session.py index 71e06b37..dc0b7664 100644 --- a/tests/query/test_query_session.py +++ b/tests/query/test_query_session.py @@ -1,14 +1,17 @@ import pytest + def _check_session_state_empty(session): - assert session._state.session_id == None - assert session._state.node_id == None - assert session._state.attached == False + assert session._state.session_id is None + assert session._state.node_id is None + assert not session._state.attached + def _check_session_state_full(session): - assert session._state.session_id != None - assert session._state.node_id != None - assert session._state.attached == True + assert session._state.session_id is not None + assert session._state.node_id is not None + assert session._state.attached + class TestQuerySession: def test_session_normal_lifecycle(self, session): @@ -83,4 +86,4 @@ def test_basic_execute(self, session): assert len(result_sets) == 1 assert len(result_sets[0].rows) == 1 assert len(result_sets[0].columns) == 1 - assert list(result_sets[0].rows[0].values()) == [1] \ No newline at end of file + assert list(result_sets[0].rows[0].values()) == [1] diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 0731882a..0cde7d47 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -2,10 +2,10 @@ class TestQueryTransaction: def test_tx_begin(self, tx): - assert tx.tx_id == None + assert tx.tx_id is None tx.begin() - assert tx.tx_id != None + assert tx.tx_id is not None def test_tx_allow_double_commit(self, tx): tx.begin() @@ -40,5 +40,3 @@ def text_tx_execute_raises_after_rollback(self, tx): tx.rollback() with pytest.raises(RuntimeError): tx.execute("select 1;") - - diff --git a/ydb/_grpc/grpcwrapper/common_utils.py b/ydb/_grpc/grpcwrapper/common_utils.py index 5d71f4d0..895d4036 100644 --- a/ydb/_grpc/grpcwrapper/common_utils.py +++ b/ydb/_grpc/grpcwrapper/common_utils.py @@ -247,7 +247,6 @@ async def _start_sync_driver(self, driver: ydb.Driver, request, stub, method): self.from_server_grpc = SyncToAsyncIterator(stream_call.__iter__(), self._wait_executor) - @dataclass(init=False) class ServerStatus(IFromProto): __slots__ = ("_grpc_status_code", "_issues") diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index 0bfdf792..0026f050 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -2,7 +2,6 @@ import typing from typing import Optional -from google.protobuf.message import Message # Workaround for good IDE and universal for runtime if typing.TYPE_CHECKING: @@ -14,16 +13,9 @@ from .common_utils import ( IFromProto, - IFromProtoWithProtoType, IToProto, - IToPublic, IFromPublic, ServerStatus, - UnknownGrpcMessageError, - proto_duration_from_timedelta, - proto_timestamp_from_datetime, - datetime_from_proto_timestamp, - timedelta_from_proto_duration, ) @dataclass @@ -57,14 +49,6 @@ class AttachSessionRequest(IToProto): def to_proto(self) -> ydb_query_pb2.AttachSessionRequest: return ydb_query_pb2.AttachSessionRequest(session_id=self.session_id) -# @dataclass -# class SessionState(IFromProto): -# status: Optional[ServerStatus] - -# @staticmethod -# def from_proto(msg: ydb_query_pb2.SessionState) -> "SessionState": -# return SessionState(status=ServerStatus(msg.status, msg.issues)) - @dataclass class TransactionMeta(IFromProto): @@ -93,6 +77,7 @@ def to_proto(self) -> ydb_query_pb2.TransactionSettings: if self.tx_mode.name == 'stale_read_only': return ydb_query_pb2.TransactionSettings(stale_read_only=self.tx_mode.to_proto()) + @dataclass class BeginTransactionRequest(IToProto): session_id: str @@ -104,6 +89,7 @@ def to_proto(self) -> ydb_query_pb2.BeginTransactionRequest: tx_settings=self.tx_settings.to_proto(), ) + @dataclass class BeginTransactionResponse(IFromProto): status: Optional[ServerStatus] diff --git a/ydb/_grpc/grpcwrapper/ydb_query_public_types.py b/ydb/_grpc/grpcwrapper/ydb_query_public_types.py index 27d1e917..d79a2967 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query_public_types.py +++ b/ydb/_grpc/grpcwrapper/ydb_query_public_types.py @@ -1,8 +1,6 @@ import abc import typing -from google.protobuf.message import Message - from .common_utils import IToProto # Workaround for good IDE and universal for runtime diff --git a/ydb/query/base.py b/ydb/query/base.py index 44cc94fd..5895db73 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -1,5 +1,4 @@ import abc -import enum import functools from typing import ( @@ -17,7 +16,9 @@ from .. import convert from .. import issues -class QueryClientSettings: ... + +class QueryClientSettings: + pass class IQuerySessionState(abc.ABC): @@ -153,6 +154,7 @@ def create_execute_query_request(query: str, session_id: str, tx_id: str = None, return req.to_proto() + def wrap_execute_query_response(rpc_state, response_pb): return convert.ResultSet.from_message(response_pb.result_set) @@ -177,4 +179,4 @@ def decorator(rpc_state, response_pb, session_state, *args, **kwargs): session_state.reset() raise - return decorator \ No newline at end of file + return decorator diff --git a/ydb/query/session.py b/ydb/query/session.py index e59a8acd..9c8ed1ce 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -1,14 +1,9 @@ import abc -from abc import abstractmethod -import asyncio -import concurrent import enum import logging import threading from typing import ( - Any, Optional, - Set, ) from . import base @@ -168,6 +163,7 @@ def _execute_call(self, query: str, commit_tx: bool): _apis.QueryService.ExecuteQuery, ) + class QuerySessionSync(BaseQuerySession): _stream = None @@ -236,4 +232,4 @@ def execute(self, query: str, parameters=None): return _utilities.SyncResponseIterator( stream_it, lambda resp: base.wrap_execute_query_response(rpc_state=None, response_pb=resp), - ) \ No newline at end of file + ) diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 90f5f681..067707bc 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -107,6 +107,7 @@ def _create_commit_transaction_request(session_state, tx_state): request.session_id = session_state.session_id return request + def _create_rollback_transaction_request(session_state, tx_state): request = _apis.ydb_query.RollbackTransactionRequest() request.tx_id = tx_state.tx_id @@ -132,6 +133,7 @@ def wrap_tx_commit_response(rpc_state, response_pb, session_state, tx_state, tx) tx_state._change_state(QueryTxStateEnum.COMMITTED) return tx + @base.bad_session_handler @reset_tx_id_handler def wrap_tx_rollback_response(rpc_state, response_pb, session_state, tx_state, tx): From 779950fa38bdf2c0ae40a04456e448f63f4f3907 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 16:17:23 +0300 Subject: [PATCH 054/429] codestyle fixes --- examples/query-service/basic_example.py | 2 +- tests/query/test_query_transaction.py | 1 + ydb/_grpc/grpcwrapper/ydb_query.py | 21 ++++++++------------- ydb/query/base.py | 18 +++++++++++++----- ydb/query/session.py | 18 +++++++++--------- ydb/query/transaction.py | 2 +- 6 files changed, 33 insertions(+), 29 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index d0987cd9..cc93332a 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -26,5 +26,5 @@ def main(): print(f"rows: {str(result_set.rows)}") -if __name__ == '__main__': +if __name__ == "__main__": main() diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 0cde7d47..1b0d865a 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -1,5 +1,6 @@ import pytest + class TestQueryTransaction: def test_tx_begin(self, tx): assert tx.tx_id is None diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index 0026f050..f5e16664 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -18,6 +18,7 @@ ServerStatus, ) + @dataclass class CreateSessionResponse(IFromProto): status: Optional[ServerStatus] @@ -68,13 +69,13 @@ def from_public(tx_mode: public_types.BaseQueryTxMode) -> "TransactionSettings": return TransactionSettings(tx_mode=tx_mode) def to_proto(self) -> ydb_query_pb2.TransactionSettings: - if self.tx_mode.name == 'snapshot_read_only': + if self.tx_mode.name == "snapshot_read_only": return ydb_query_pb2.TransactionSettings(snapshot_read_only=self.tx_mode.to_proto()) - if self.tx_mode.name == 'serializable_read_write': + if self.tx_mode.name == "serializable_read_write": return ydb_query_pb2.TransactionSettings(serializable_read_write=self.tx_mode.to_proto()) - if self.tx_mode.name == 'online_read_only': + if self.tx_mode.name == "online_read_only": return ydb_query_pb2.TransactionSettings(online_read_only=self.tx_mode.to_proto()) - if self.tx_mode.name == 'stale_read_only': + if self.tx_mode.name == "stale_read_only": return ydb_query_pb2.TransactionSettings(stale_read_only=self.tx_mode.to_proto()) @@ -87,7 +88,7 @@ def to_proto(self) -> ydb_query_pb2.BeginTransactionRequest: return ydb_query_pb2.BeginTransactionRequest( session_id=self.session_id, tx_settings=self.tx_settings.to_proto(), - ) + ) @dataclass @@ -146,14 +147,8 @@ class TransactionControl(IToProto): def to_proto(self) -> ydb_query_pb2.TransactionControl: if self.tx_id: - return ydb_query_pb2.TransactionControl( - tx_id=self.tx_id, - commit_tx=self.commit_tx, - ) - return ydb_query_pb2.TransactionControl( - begin_tx=self.begin_tx.to_proto(), - commit_tx=self.commit_tx - ) + return ydb_query_pb2.TransactionControl(tx_id=self.tx_id,commit_tx=self.commit_tx) + return ydb_query_pb2.TransactionControl(begin_tx=self.begin_tx.to_proto(), commit_tx=self.commit_tx) @dataclass diff --git a/ydb/query/base.py b/ydb/query/base.py index 5895db73..d3bfddae 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -11,7 +11,7 @@ from .._grpc.grpcwrapper import ydb_query from .._grpc.grpcwrapper.ydb_query_public_types import ( BaseQueryTxMode, - QuerySerializableReadWrite + QuerySerializableReadWrite, ) from .. import convert from .. import issues @@ -78,7 +78,13 @@ def transaction(self, tx_mode: BaseQueryTxMode) -> "IQueryTxContext": class IQueryTxContext(abc.ABC): @abc.abstractmethod - def __init__(self, driver: SupportedDriverType, session_state: IQuerySessionState, session: IQuerySession, tx_mode: BaseQueryTxMode = None): + def __init__( + self, + driver: SupportedDriverType, + session_state: IQuerySessionState, + session: IQuerySession, + tx_mode: BaseQueryTxMode = None + ): pass @abc.abstractmethod @@ -125,7 +131,9 @@ def session(self) -> IQuerySession: pass -def create_execute_query_request(query: str, session_id: str, tx_id: str = None, commit_tx: bool = False, tx_mode: BaseQueryTxMode = None): +def create_execute_query_request( + query: str, session_id: str, tx_id: str = None, commit_tx: bool = False, tx_mode: BaseQueryTxMode = None +): if tx_id: req = ydb_query.ExecuteQueryRequest( session_id=session_id, @@ -134,7 +142,7 @@ def create_execute_query_request(query: str, session_id: str, tx_id: str = None, ), tx_control=ydb_query.TransactionControl( tx_id=tx_id, - commit_tx=commit_tx + commit_tx=commit_tx, ), ) else: @@ -148,7 +156,7 @@ def create_execute_query_request(query: str, session_id: str, tx_id: str = None, begin_tx=ydb_query.TransactionSettings( tx_mode=tx_mode, ), - commit_tx=commit_tx + commit_tx=commit_tx, ), ) diff --git a/ydb/query/session.py b/ydb/query/session.py index 9c8ed1ce..d0ebeebc 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -32,7 +32,7 @@ class QuerySessionStateHelper(abc.ABC): } _READY_TO_USE = [ - QuerySessionStateEnum.CREATED + QuerySessionStateEnum.CREATED, ] @classmethod @@ -154,7 +154,7 @@ def _execute_call(self, query: str, commit_tx: bool): request = base.create_execute_query_request( query=query, session_id=self._state.session_id, - commit_tx=commit_tx + commit_tx=commit_tx, ) return self._driver( @@ -189,13 +189,13 @@ def _attach(self): ).start() def _chech_session_status_loop(self, status_stream): - try: - for status in status_stream: - if status.status != issues.StatusCode.SUCCESS: - self._state.reset() - self._state._change_state(QuerySessionStateEnum.CLOSED) - except Exception as e: - pass + try: + for status in status_stream: + if status.status != issues.StatusCode.SUCCESS: + self._state.reset() + self._state._change_state(QuerySessionStateEnum.CLOSED) + except Exception as e: + pass def delete(self) -> None: diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 067707bc..77ff467f 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -275,7 +275,7 @@ def _execute_call(self, query: str, commit_tx: bool): request = base.create_execute_query_request( query=query, session_id=self._session_state.session_id, - commit_tx=commit_tx + commit_tx=commit_tx, ) return self._driver( request, From 66bfe0975aba95bcd5c7def4027049574d3401d6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 16:21:04 +0300 Subject: [PATCH 055/429] more style fixes --- ydb/_grpc/grpcwrapper/ydb_query.py | 10 ++++++++-- ydb/query/base.py | 4 ++-- ydb/query/session.py | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index f5e16664..0a49ac74 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -147,8 +147,14 @@ class TransactionControl(IToProto): def to_proto(self) -> ydb_query_pb2.TransactionControl: if self.tx_id: - return ydb_query_pb2.TransactionControl(tx_id=self.tx_id,commit_tx=self.commit_tx) - return ydb_query_pb2.TransactionControl(begin_tx=self.begin_tx.to_proto(), commit_tx=self.commit_tx) + return ydb_query_pb2.TransactionControl( + tx_id=self.tx_id, + commit_tx=self.commit_tx, + ) + return ydb_query_pb2.TransactionControl( + begin_tx=self.begin_tx.to_proto(), + commit_tx=self.commit_tx, + ) @dataclass diff --git a/ydb/query/base.py b/ydb/query/base.py index d3bfddae..368d15c2 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -83,7 +83,7 @@ def __init__( driver: SupportedDriverType, session_state: IQuerySessionState, session: IQuerySession, - tx_mode: BaseQueryTxMode = None + tx_mode: BaseQueryTxMode = None, ): pass @@ -132,7 +132,7 @@ def session(self) -> IQuerySession: def create_execute_query_request( - query: str, session_id: str, tx_id: str = None, commit_tx: bool = False, tx_mode: BaseQueryTxMode = None + query: str, session_id: str, tx_id: str = None, commit_tx: bool = False, tx_mode: BaseQueryTxMode = None ): if tx_id: req = ydb_query.ExecuteQueryRequest( diff --git a/ydb/query/session.py b/ydb/query/session.py index d0ebeebc..1638ab4f 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -28,7 +28,7 @@ class QuerySessionStateHelper(abc.ABC): _VALID_TRANSITIONS = { QuerySessionStateEnum.NOT_INITIALIZED: [QuerySessionStateEnum.CREATED], QuerySessionStateEnum.CREATED: [QuerySessionStateEnum.CLOSED], - QuerySessionStateEnum.CLOSED: [] + QuerySessionStateEnum.CLOSED: [], } _READY_TO_USE = [ From 1195c4f4ca103ae85beb0b4eb9ddacca9a9fc8d6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 17 Jul 2024 16:23:18 +0300 Subject: [PATCH 056/429] please tox im tired --- ydb/query/base.py | 1 - ydb/query/session.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ydb/query/base.py b/ydb/query/base.py index 368d15c2..dea5ff66 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -76,7 +76,6 @@ def transaction(self, tx_mode: BaseQueryTxMode) -> "IQueryTxContext": class IQueryTxContext(abc.ABC): - @abc.abstractmethod def __init__( self, diff --git a/ydb/query/session.py b/ydb/query/session.py index 1638ab4f..32c0b79e 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -194,10 +194,9 @@ def _chech_session_status_loop(self, status_stream): if status.status != issues.StatusCode.SUCCESS: self._state.reset() self._state._change_state(QuerySessionStateEnum.CLOSED) - except Exception as e: + except Exception: pass - def delete(self) -> None: if self._state._already_in(QuerySessionStateEnum.CLOSED): return From 802c8414b73447350944f869f75b56d6154ceded Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 19 Jul 2024 14:29:19 +0300 Subject: [PATCH 057/429] basic pool & retries & example --- examples/query-service/basic_example.py | 59 +++++++++-- ydb/__init__.py | 1 + ydb/_grpc/grpcwrapper/ydb_query.py | 12 +-- ydb/query/__init__.py | 25 +++++ ydb/query/base.py | 41 +++++++- ydb/query/pool.py | 132 ++++++++++++++++++++++++ ydb/query/session.py | 4 +- ydb/query/transaction.py | 60 +++++++++-- 8 files changed, 307 insertions(+), 27 deletions(-) create mode 100644 ydb/query/pool.py diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index cc93332a..d0140494 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -1,7 +1,5 @@ import ydb -from ydb.query.session import QuerySessionSync - def main(): driver_config = ydb.DriverConfig( @@ -16,14 +14,57 @@ def main(): except TimeoutError: raise RuntimeError("Connect failed to YDB") - session = QuerySessionSync(driver) - session.create() + # client = ydb.QueryClientSync(driver) + # session = client.session().create() + pool = ydb.QuerySessionPool(driver) + # with pool.checkout() as session: + def callee(session): + print("="*50) + print("BEFORE ACTION") + it = session.execute("""SELECT COUNT(*) FROM example;""") + for result_set in it: + print(f"rows: {str(result_set.rows)}") + + print("="*50) + print("INSERT WITH COMMIT TX") + tx = session.transaction() + + tx.begin() + + tx.execute("""INSERT INTO example (key, value) VALUES (0033, "onepieceisreal");""") + + for result_set in tx.execute("""SELECT COUNT(*) FROM example;"""): + print(f"rows: {str(result_set.rows)}") + + tx.commit() + + print("="*50) + print("AFTER COMMIT TX") + + for result_set in session.execute("""SELECT COUNT(*) FROM example;"""): + print(f"rows: {str(result_set.rows)}") + + print("="*50) + print("INSERT WITH ROLLBACK TX") + + tx = session.transaction() + + tx.begin() + + tx.execute("""INSERT INTO example (key, value) VALUES (0044, "onepieceisreal");""") + + for result_set in tx.execute("""SELECT COUNT(*) FROM example;"""): + print(f"rows: {str(result_set.rows)}") + + tx.rollback() + + print("="*50) + print("AFTER ROLLBACK TX") + + for result_set in session.execute("""SELECT COUNT(*) FROM example;"""): + print(f"rows: {str(result_set.rows)}") - it = session.execute("select 1; select 2;", commit_tx=False) - for result_set in it: - # pass - print(f"columns: {str(result_set.columns)}") - print(f"rows: {str(result_set.rows)}") + pool.retry_operation_sync(callee) if __name__ == "__main__": diff --git a/ydb/__init__.py b/ydb/__init__.py index 0a09834b..fc911a44 100644 --- a/ydb/__init__.py +++ b/ydb/__init__.py @@ -19,6 +19,7 @@ from .tracing import * # noqa from .topic import * # noqa from .draft import * # noqa +from .query import * # noqa try: import ydb.aio as aio # noqa diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index 0a49ac74..7196ec04 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -129,11 +129,11 @@ def from_proto(msg: ydb_query_pb2.RollbackTransactionResponse) -> "RollbackTrans @dataclass class QueryContent(IFromPublic, IToProto): text: str - syntax: Optional[str] = None + syntax: Optional[int] = None @staticmethod - def from_public(query: str) -> "QueryContent": - return QueryContent(text=query) + def from_public(query: str, syntax: int = None) -> "QueryContent": + return QueryContent(text=query, syntax=syntax) def to_proto(self) -> ydb_query_pb2.QueryContent: return ydb_query_pb2.QueryContent(text=self.text, syntax=self.syntax) @@ -163,16 +163,16 @@ class ExecuteQueryRequest(IToProto): query_content: QueryContent tx_control: TransactionControl concurrent_result_sets: Optional[bool] = False - exec_mode: Optional[str] = None + exec_mode: Optional[int] = None parameters: Optional[dict] = None - stats_mode: Optional[str] = None + stats_mode: Optional[int] = None def to_proto(self) -> ydb_query_pb2.ExecuteQueryRequest: return ydb_query_pb2.ExecuteQueryRequest( session_id=self.session_id, tx_control=self.tx_control.to_proto(), query_content=self.query_content.to_proto(), - exec_mode=ydb_query_pb2.EXEC_MODE_EXECUTE, + exec_mode=self.exec_mode, stats_mode=self.stats_mode, concurrent_result_sets=self.concurrent_result_sets, parameters=self.parameters, diff --git a/ydb/query/__init__.py b/ydb/query/__init__.py index e69de29b..e7e33d66 100644 --- a/ydb/query/__init__.py +++ b/ydb/query/__init__.py @@ -0,0 +1,25 @@ +from .base import ( + IQueryClient, + SupportedDriverType, + QueryClientSettings, +) + +from .session import QuerySessionSync + +from .._grpc.grpcwrapper.ydb_query_public_types import ( + QueryOnlineReadOnly, + QuerySerializableReadWrite, + QuerySnapshotReadOnly, + QueryStaleReadOnly, +) + +from .pool import QuerySessionPool + + +class QueryClientSync(IQueryClient): + def __init__(self, driver: SupportedDriverType, query_client_settings: QueryClientSettings = None): + self._driver = driver + self._settings = query_client_settings + + def session(self) -> QuerySessionSync: + return QuerySessionSync(self._driver, self._settings) diff --git a/ydb/query/base.py b/ydb/query/base.py index dea5ff66..e19b1826 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -1,4 +1,5 @@ import abc +import enum import functools from typing import ( @@ -63,7 +64,7 @@ def __init__(self, driver: SupportedDriverType, settings: QueryClientSettings = pass @abc.abstractmethod - def create(self) -> None: + def create(self) -> "IQuerySession": pass @abc.abstractmethod @@ -117,7 +118,7 @@ def rollback(settings: QueryClientSettings = None): pass @abc.abstractmethod - def execute(query: str): + def execute(query: str, commit_tx=False): pass @@ -130,19 +131,48 @@ def session(self) -> IQuerySession: pass +class QuerySyntax(enum.IntEnum): + UNSPECIFIED = 0 + YQL_V1 = 1 + PG = 2 + + +class QueryExecMode(enum.IntEnum): + UNSPECIFIED = 0 + PARSE = 10 + VALIDATE = 20 + EXPLAIN = 30 + EXECUTE = 50 + + def create_execute_query_request( - query: str, session_id: str, tx_id: str = None, commit_tx: bool = False, tx_mode: BaseQueryTxMode = None + query: str, + session_id: str, + tx_id: str = None, + commit_tx: bool = False, + tx_mode: BaseQueryTxMode = None, + syntax: QuerySyntax = None, + exec_mode: QueryExecMode = None, + parameters: dict = None, + concurrent_result_sets: bool = False, + ): + syntax = QuerySyntax.YQL_V1 if not syntax else syntax + exec_mode = QueryExecMode.EXECUTE if not exec_mode else exec_mode if tx_id: req = ydb_query.ExecuteQueryRequest( session_id=session_id, query_content=ydb_query.QueryContent.from_public( query=query, + syntax=syntax, ), tx_control=ydb_query.TransactionControl( tx_id=tx_id, commit_tx=commit_tx, ), + exec_mode=exec_mode, + parameters=parameters, + concurrent_result_sets=concurrent_result_sets, ) else: tx_mode = tx_mode if tx_mode is not None else QuerySerializableReadWrite() @@ -150,6 +180,7 @@ def create_execute_query_request( session_id=session_id, query_content=ydb_query.QueryContent.from_public( query=query, + syntax=syntax, ), tx_control=ydb_query.TransactionControl( begin_tx=ydb_query.TransactionSettings( @@ -157,12 +188,16 @@ def create_execute_query_request( ), commit_tx=commit_tx, ), + exec_mode=exec_mode, + parameters=parameters, + concurrent_result_sets=concurrent_result_sets, ) return req.to_proto() def wrap_execute_query_response(rpc_state, response_pb): + issues._process_response(response_pb) return convert.ResultSet.from_message(response_pb.result_set) diff --git a/ydb/query/pool.py b/ydb/query/pool.py new file mode 100644 index 00000000..229158ff --- /dev/null +++ b/ydb/query/pool.py @@ -0,0 +1,132 @@ +import abc +import time +from typing import Callable + +from . import base +from .session import ( + QuerySessionSync, + BaseQuerySession, +) +from .. import issues +from .._errors import check_retriable_error + + +class RetrySettings(object): + def __init__( + self, + max_retries: int = 10, + max_session_acquire_timeout: int = None, + on_ydb_error_callback: Callable = None, + idempotent: bool = False, + ): + self.max_retries = max_retries + self.max_session_acquire_timeout = max_session_acquire_timeout + self.on_ydb_error_callback = (lambda e: None) if on_ydb_error_callback is None else on_ydb_error_callback + self.retry_not_found = True + self.idempotent = idempotent + self.retry_internal_error = True + self.unknown_error_handler = lambda e: None + + +class YdbRetryOperationSleepOpt: + def __init__(self, timeout): + self.timeout = timeout + + def __eq__(self, other): + return type(self) == type(other) and self.timeout == other.timeout + + def __repr__(self): + return "YdbRetryOperationSleepOpt(%s)" % self.timeout + + +class YdbRetryOperationFinalResult: + def __init__(self, result): + self.result = result + self.exc = None + + def __eq__(self, other): + return type(self) == type(other) and self.result == other.result and self.exc == other.exc + + def __repr__(self): + return "YdbRetryOperationFinalResult(%s, exc=%s)" % (self.result, self.exc) + + def set_exception(self, exc): + self.exc = exc + + +def retry_operation_impl(callee: Callable, retry_settings: RetrySettings = None, *args, **kwargs): + retry_settings = RetrySettings() if retry_settings is None else retry_settings + status = None + + for attempt in range(retry_settings.max_retries + 1): + try: + result = YdbRetryOperationFinalResult(callee(*args, **kwargs)) + yield result + + if result.exc is not None: + raise result.exc + + except issues.Error as e: + status = e + retry_settings.on_ydb_error_callback(e) + + retriable_info = check_retriable_error(e, retry_settings, attempt) + if not retriable_info.is_retriable: + raise + + skip_yield_error_types = [ + issues.Aborted, + issues.BadSession, + issues.NotFound, + issues.InternalError, + ] + + yield_sleep = True + for t in skip_yield_error_types: + if isinstance(e, t): + yield_sleep = False + + if yield_sleep: + yield YdbRetryOperationSleepOpt(retriable_info.sleep_timeout_seconds) + + except Exception as e: + # you should provide your own handler you want + retry_settings.unknown_error_handler(e) + raise + + raise status + + +class QuerySessionPool: + def __init__(self, driver: base.SupportedDriverType): + self._driver = driver + + def checkout(self): + return SimpleQuerySessionCheckout(self) + + def retry_operation_sync(self, callee: Callable, retry_settings: RetrySettings = None, *args, **kwargs): + retry_settings = RetrySettings() if retry_settings is None else retry_settings + + def wrapped_callee(): + with self.checkout() as session: + return callee(session, *args, **kwargs) + + opt_generator = retry_operation_impl(wrapped_callee, retry_settings, *args, **kwargs) + for next_opt in opt_generator: + if isinstance(next_opt, YdbRetryOperationSleepOpt): + time.sleep(next_opt.timeout) + else: + return next_opt.result + + +class SimpleQuerySessionCheckout: + def __init__(self, pool: QuerySessionPool): + self._pool = pool + self._session = QuerySessionSync(pool._driver) + + def __enter__(self): + self._session.create() + return self._session + + def __exit__(self, exc_type, exc_val, exc_tb): + self._session.delete() diff --git a/ydb/query/session.py b/ydb/query/session.py index 32c0b79e..4926b0bb 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -205,7 +205,7 @@ def delete(self) -> None: self._delete_call() self._stream.cancel() - def create(self) -> None: + def create(self) -> "QuerySessionSync": if self._state._already_in(QuerySessionStateEnum.CREATED): return @@ -213,6 +213,8 @@ def create(self) -> None: self._create_call() self._attach() + return self + def transaction(self, tx_mode: base.BaseQueryTxMode = None) -> base.IQueryTxContext: self._state._check_session_ready_to_use() diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 77ff467f..df71d62c 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -97,7 +97,6 @@ def _create_begin_transaction_request(session_state, tx_state): session_id=session_state.session_id, tx_settings=_construct_tx_settings(tx_state), ).to_proto() - return request @@ -127,7 +126,7 @@ def wrap_tx_begin_response(rpc_state, response_pb, session_state, tx_state, tx): @base.bad_session_handler @reset_tx_id_handler def wrap_tx_commit_response(rpc_state, response_pb, session_state, tx_state, tx): - message = _ydb_query.CommitTransactionResponse(response_pb) + message = _ydb_query.CommitTransactionResponse.from_proto(response_pb) issues._process_response(message.status) tx_state.tx_id = None tx_state._change_state(QueryTxStateEnum.COMMITTED) @@ -137,7 +136,7 @@ def wrap_tx_commit_response(rpc_state, response_pb, session_state, tx_state, tx) @base.bad_session_handler @reset_tx_id_handler def wrap_tx_rollback_response(rpc_state, response_pb, session_state, tx_state, tx): - message = _ydb_query.RollbackTransactionResponse(response_pb) + message = _ydb_query.RollbackTransactionResponse.from_proto(response_pb) issues._process_response(message.status) tx_state.tx_id = None tx_state._change_state(QueryTxStateEnum.ROLLBACKED) @@ -170,6 +169,7 @@ def __init__(self, driver, session_state, session, tx_mode=None): self._session_state = session_state self.session = session self._finished = "" + self._prev_stream = None def __enter__(self): """ @@ -247,6 +247,8 @@ def commit(self, settings=None): return self._tx_state._check_invalid_transition(QueryTxStateEnum.COMMITTED) + self._ensure_prev_stream_finished() + return self._driver( _create_commit_transaction_request(self._session_state, self._tx_state), _apis.QueryService.Stub, @@ -262,6 +264,8 @@ def rollback(self, settings=None): self._tx_state._check_invalid_transition(QueryTxStateEnum.ROLLBACKED) + self._ensure_prev_stream_finished() + return self._driver( _create_rollback_transaction_request(self._session_state, self._tx_state), _apis.QueryService.Stub, @@ -271,24 +275,64 @@ def rollback(self, settings=None): (self._session_state, self._tx_state, self), ) - def _execute_call(self, query: str, commit_tx: bool): + def _execute_call( + self, + query: str, + commit_tx: bool = False, + tx_mode: base.BaseQueryTxMode = None, + syntax: base.QuerySyntax = None, + exec_mode: base.QueryExecMode = None, + parameters: dict = None, + concurrent_result_sets: bool = False, + ): request = base.create_execute_query_request( query=query, session_id=self._session_state.session_id, commit_tx=commit_tx, + tx_id=self._tx_state.tx_id, + tx_mode=tx_mode, + syntax=syntax, + exec_mode=exec_mode, + parameters=parameters, + concurrent_result_sets=concurrent_result_sets, ) + return self._driver( request, _apis.QueryService.Stub, _apis.QueryService.ExecuteQuery, ) - def execute(self, query, parameters=None, commit_tx=False, settings=None): + def _ensure_prev_stream_finished(self): + if self._prev_stream is not None: + for _ in self._prev_stream: + pass + self._prev_stream = None + + def execute( + self, + query: str, + commit_tx: bool = False, + tx_mode: base.BaseQueryTxMode = None, + syntax: base.QuerySyntax = None, + exec_mode: base.QueryExecMode = None, + parameters: dict = None, + concurrent_result_sets: bool = False, + ): self._tx_state._check_tx_not_terminal() + self._ensure_prev_stream_finished() - stream_it = self._execute_call(query, commit_tx) - - return _utilities.SyncResponseIterator( + stream_it = self._execute_call( + query=query, + commit_tx=commit_tx, + tx_mode=tx_mode, + syntax=syntax, + exec_mode=exec_mode, + parameters=parameters, + concurrent_result_sets=concurrent_result_sets, + ) + self._prev_stream = _utilities.SyncResponseIterator( stream_it, lambda resp: base.wrap_execute_query_response(rpc_state=None, response_pb=resp), ) + return self._prev_stream From 16c1c0656fe2b422755115064a696980aa3ccd90 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 19 Jul 2024 14:32:23 +0300 Subject: [PATCH 058/429] style fixes --- examples/query-service/basic_example.py | 10 +++++----- ydb/__init__.py | 2 +- ydb/query/base.py | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index d0140494..9947a3ff 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -19,13 +19,13 @@ def main(): pool = ydb.QuerySessionPool(driver) # with pool.checkout() as session: def callee(session): - print("="*50) + print("=" * 50) print("BEFORE ACTION") it = session.execute("""SELECT COUNT(*) FROM example;""") for result_set in it: print(f"rows: {str(result_set.rows)}") - print("="*50) + print("=" * 50) print("INSERT WITH COMMIT TX") tx = session.transaction() @@ -38,13 +38,13 @@ def callee(session): tx.commit() - print("="*50) + print("=" * 50) print("AFTER COMMIT TX") for result_set in session.execute("""SELECT COUNT(*) FROM example;"""): print(f"rows: {str(result_set.rows)}") - print("="*50) + print("=" * 50) print("INSERT WITH ROLLBACK TX") tx = session.transaction() @@ -58,7 +58,7 @@ def callee(session): tx.rollback() - print("="*50) + print("=" * 50) print("AFTER ROLLBACK TX") for result_set in session.execute("""SELECT COUNT(*) FROM example;"""): diff --git a/ydb/__init__.py b/ydb/__init__.py index fc911a44..1caaaa02 100644 --- a/ydb/__init__.py +++ b/ydb/__init__.py @@ -19,7 +19,7 @@ from .tracing import * # noqa from .topic import * # noqa from .draft import * # noqa -from .query import * # noqa +from .query import * # noqa try: import ydb.aio as aio # noqa diff --git a/ydb/query/base.py b/ydb/query/base.py index e19b1826..97a8d56c 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -155,7 +155,6 @@ def create_execute_query_request( exec_mode: QueryExecMode = None, parameters: dict = None, concurrent_result_sets: bool = False, - ): syntax = QuerySyntax.YQL_V1 if not syntax else syntax exec_mode = QueryExecMode.EXECUTE if not exec_mode else exec_mode From a11e42af16ac8776f60e4311d981be488c78d3ee Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 19 Jul 2024 14:36:50 +0300 Subject: [PATCH 059/429] style fixes --- examples/query-service/basic_example.py | 1 + ydb/query/__init__.py | 10 +++++----- ydb/query/pool.py | 2 -- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index 9947a3ff..1ff264f1 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -18,6 +18,7 @@ def main(): # session = client.session().create() pool = ydb.QuerySessionPool(driver) # with pool.checkout() as session: + def callee(session): print("=" * 50) print("BEFORE ACTION") diff --git a/ydb/query/__init__.py b/ydb/query/__init__.py index e7e33d66..11660a33 100644 --- a/ydb/query/__init__.py +++ b/ydb/query/__init__.py @@ -7,13 +7,13 @@ from .session import QuerySessionSync from .._grpc.grpcwrapper.ydb_query_public_types import ( - QueryOnlineReadOnly, - QuerySerializableReadWrite, - QuerySnapshotReadOnly, - QueryStaleReadOnly, + QueryOnlineReadOnly, # noqa + QuerySerializableReadWrite, # noqa + QuerySnapshotReadOnly, # noqa + QueryStaleReadOnly, # noqa ) -from .pool import QuerySessionPool +from .pool import QuerySessionPool # noqa class QueryClientSync(IQueryClient): diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 229158ff..010b5faa 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -1,11 +1,9 @@ -import abc import time from typing import Callable from . import base from .session import ( QuerySessionSync, - BaseQuerySession, ) from .. import issues from .._errors import check_retriable_error From f27658f7fcc12f56416d247ad3ee149c53ff2093 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 19 Jul 2024 14:38:29 +0300 Subject: [PATCH 060/429] style fixes --- examples/query-service/basic_example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index 1ff264f1..8b0ea193 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -18,7 +18,7 @@ def main(): # session = client.session().create() pool = ydb.QuerySessionPool(driver) # with pool.checkout() as session: - + def callee(session): print("=" * 50) print("BEFORE ACTION") From e580dc242f53cd8ff38937b276e8f0909510a206 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 19 Jul 2024 14:47:10 +0300 Subject: [PATCH 061/429] add dunder all to query module --- examples/query-service/basic_example.py | 4 ++-- ydb/query/__init__.py | 19 ++++++++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index 8b0ea193..eb21fa99 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -32,7 +32,7 @@ def callee(session): tx.begin() - tx.execute("""INSERT INTO example (key, value) VALUES (0033, "onepieceisreal");""") + tx.execute("""INSERT INTO example (key, value) VALUES (0055, "onepieceisreal");""") for result_set in tx.execute("""SELECT COUNT(*) FROM example;"""): print(f"rows: {str(result_set.rows)}") @@ -52,7 +52,7 @@ def callee(session): tx.begin() - tx.execute("""INSERT INTO example (key, value) VALUES (0044, "onepieceisreal");""") + tx.execute("""INSERT INTO example (key, value) VALUES (0066, "onepieceisreal");""") for result_set in tx.execute("""SELECT COUNT(*) FROM example;"""): print(f"rows: {str(result_set.rows)}") diff --git a/ydb/query/__init__.py b/ydb/query/__init__.py index 11660a33..3b504b0f 100644 --- a/ydb/query/__init__.py +++ b/ydb/query/__init__.py @@ -1,3 +1,12 @@ +__all__ = [ + "QueryOnlineReadOnly", + "QuerySerializableReadWrite", + "QuerySnapshotReadOnly", + "QueryStaleReadOnly", + "QuerySessionPool", + "QueryClientSync" +] + from .base import ( IQueryClient, SupportedDriverType, @@ -7,13 +16,13 @@ from .session import QuerySessionSync from .._grpc.grpcwrapper.ydb_query_public_types import ( - QueryOnlineReadOnly, # noqa - QuerySerializableReadWrite, # noqa - QuerySnapshotReadOnly, # noqa - QueryStaleReadOnly, # noqa + QueryOnlineReadOnly, + QuerySerializableReadWrite, + QuerySnapshotReadOnly, + QueryStaleReadOnly, ) -from .pool import QuerySessionPool # noqa +from .pool import QuerySessionPool class QueryClientSync(IQueryClient): From 424f8319419d439032439ee8ad2828b996c5572e Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 19 Jul 2024 14:48:49 +0300 Subject: [PATCH 062/429] style fix --- ydb/query/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/query/__init__.py b/ydb/query/__init__.py index 3b504b0f..fbdfa7dd 100644 --- a/ydb/query/__init__.py +++ b/ydb/query/__init__.py @@ -4,7 +4,7 @@ "QuerySnapshotReadOnly", "QueryStaleReadOnly", "QuerySessionPool", - "QueryClientSync" + "QueryClientSync", ] from .base import ( From c90ccf48643e4925d3dd10c41c4923005eadea17 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 22 Jul 2024 15:56:08 +0300 Subject: [PATCH 063/429] ability to execute ddl queries --- examples/query-service/basic_example.py | 23 +++++++---- ydb/_grpc/grpcwrapper/ydb_query.py | 5 ++- ydb/query/base.py | 53 ++++++++++++------------- ydb/query/pool.py | 18 ++++++++- ydb/query/session.py | 40 +++++++++++++++++-- 5 files changed, 96 insertions(+), 43 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index eb21fa99..e589eba6 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -14,15 +14,22 @@ def main(): except TimeoutError: raise RuntimeError("Connect failed to YDB") - # client = ydb.QueryClientSync(driver) - # session = client.session().create() pool = ydb.QuerySessionPool(driver) - # with pool.checkout() as session: + + print("=" * 50) + print("DELETE TABLE IF EXISTS") + pool.execute_with_retries("drop table if exists example;", ddl=True) + + print("=" * 50) + print("CREATE TABLE") + pool.execute_with_retries("CREATE TABLE example(key UInt64, value String, PRIMARY KEY (key));", ddl=True) def callee(session): print("=" * 50) + session.execute("""delete from example;""") + print("BEFORE ACTION") - it = session.execute("""SELECT COUNT(*) FROM example;""") + it = session.execute("""SELECT COUNT(*) as rows_count FROM example;""") for result_set in it: print(f"rows: {str(result_set.rows)}") @@ -34,7 +41,7 @@ def callee(session): tx.execute("""INSERT INTO example (key, value) VALUES (0055, "onepieceisreal");""") - for result_set in tx.execute("""SELECT COUNT(*) FROM example;"""): + for result_set in tx.execute("""SELECT COUNT(*) as rows_count FROM example;"""): print(f"rows: {str(result_set.rows)}") tx.commit() @@ -42,7 +49,7 @@ def callee(session): print("=" * 50) print("AFTER COMMIT TX") - for result_set in session.execute("""SELECT COUNT(*) FROM example;"""): + for result_set in session.execute("""SELECT COUNT(*) as rows_count FROM example;"""): print(f"rows: {str(result_set.rows)}") print("=" * 50) @@ -54,7 +61,7 @@ def callee(session): tx.execute("""INSERT INTO example (key, value) VALUES (0066, "onepieceisreal");""") - for result_set in tx.execute("""SELECT COUNT(*) FROM example;"""): + for result_set in tx.execute("""SELECT COUNT(*) as rows_count FROM example;"""): print(f"rows: {str(result_set.rows)}") tx.rollback() @@ -62,7 +69,7 @@ def callee(session): print("=" * 50) print("AFTER ROLLBACK TX") - for result_set in session.execute("""SELECT COUNT(*) FROM example;"""): + for result_set in session.execute("""SELECT COUNT(*) as rows_count FROM example;"""): print(f"rows: {str(result_set.rows)}") pool.retry_operation_sync(callee) diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index 7196ec04..343ef8b8 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -161,16 +161,17 @@ def to_proto(self) -> ydb_query_pb2.TransactionControl: class ExecuteQueryRequest(IToProto): session_id: str query_content: QueryContent - tx_control: TransactionControl + tx_control: Optional[TransactionControl] = None concurrent_result_sets: Optional[bool] = False exec_mode: Optional[int] = None parameters: Optional[dict] = None stats_mode: Optional[int] = None def to_proto(self) -> ydb_query_pb2.ExecuteQueryRequest: + tx_control = self.tx_control.to_proto() if self.tx_control is not None else self.tx_control return ydb_query_pb2.ExecuteQueryRequest( session_id=self.session_id, - tx_control=self.tx_control.to_proto(), + tx_control=tx_control, query_content=self.query_content.to_proto(), exec_mode=self.exec_mode, stats_mode=self.stats_mode, diff --git a/ydb/query/base.py b/ydb/query/base.py index 97a8d56c..98a02a42 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -155,43 +155,40 @@ def create_execute_query_request( exec_mode: QueryExecMode = None, parameters: dict = None, concurrent_result_sets: bool = False, + empty_tx_control: bool = False, ): syntax = QuerySyntax.YQL_V1 if not syntax else syntax exec_mode = QueryExecMode.EXECUTE if not exec_mode else exec_mode - if tx_id: - req = ydb_query.ExecuteQueryRequest( - session_id=session_id, - query_content=ydb_query.QueryContent.from_public( - query=query, - syntax=syntax, - ), - tx_control=ydb_query.TransactionControl( - tx_id=tx_id, - commit_tx=commit_tx, - ), - exec_mode=exec_mode, - parameters=parameters, - concurrent_result_sets=concurrent_result_sets, + + tx_control = None + if empty_tx_control: + tx_control = None + elif tx_id: + tx_control = ydb_query.TransactionControl( + tx_id=tx_id, + commit_tx=commit_tx, ) else: tx_mode = tx_mode if tx_mode is not None else QuerySerializableReadWrite() - req = ydb_query.ExecuteQueryRequest( - session_id=session_id, - query_content=ydb_query.QueryContent.from_public( - query=query, - syntax=syntax, + tx_control = ydb_query.TransactionControl( + begin_tx=ydb_query.TransactionSettings( + tx_mode=tx_mode, ), - tx_control=ydb_query.TransactionControl( - begin_tx=ydb_query.TransactionSettings( - tx_mode=tx_mode, - ), - commit_tx=commit_tx, - ), - exec_mode=exec_mode, - parameters=parameters, - concurrent_result_sets=concurrent_result_sets, + commit_tx=commit_tx, ) + req = ydb_query.ExecuteQueryRequest( + session_id=session_id, + query_content=ydb_query.QueryContent.from_public( + query=query, + syntax=syntax, + ), + tx_control=tx_control, + exec_mode=exec_mode, + parameters=parameters, + concurrent_result_sets=concurrent_result_sets, + ) + return req.to_proto() diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 010b5faa..d227a0b0 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -91,8 +91,8 @@ def retry_operation_impl(callee: Callable, retry_settings: RetrySettings = None, # you should provide your own handler you want retry_settings.unknown_error_handler(e) raise - - raise status + if status: + raise status class QuerySessionPool: @@ -116,6 +116,20 @@ def wrapped_callee(): else: return next_opt.result + def execute_with_retries(self, query: str, ddl: bool = False, retry_settings: RetrySettings = None, *args, **kwargs): + retry_settings = RetrySettings() if retry_settings is None else retry_settings + with self.checkout() as session: + def wrapped_callee(): + it = session.execute(query, empty_tx_control=ddl) + return [result_set for result_set in it] + + opt_generator = retry_operation_impl(wrapped_callee, retry_settings, *args, **kwargs) + for next_opt in opt_generator: + if isinstance(next_opt, YdbRetryOperationSleepOpt): + time.sleep(next_opt.timeout) + else: + return next_opt.result + class SimpleQuerySessionCheckout: def __init__(self, pool: QuerySessionPool): diff --git a/ydb/query/session.py b/ydb/query/session.py index 4926b0bb..25d5658f 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -150,11 +150,27 @@ def _attach_call(self): _apis.QueryService.AttachSession, ) - def _execute_call(self, query: str, commit_tx: bool): + def _execute_call( + self, + query: str, + commit_tx: bool = False, + tx_mode: base.BaseQueryTxMode = None, + syntax: base.QuerySyntax = None, + exec_mode: base.QueryExecMode = None, + parameters: dict = None, + concurrent_result_sets: bool = False, + empty_tx_control: bool = False, + ): request = base.create_execute_query_request( query=query, session_id=self._state.session_id, commit_tx=commit_tx, + tx_mode=tx_mode, + syntax=syntax, + exec_mode=exec_mode, + parameters=parameters, + concurrent_result_sets=concurrent_result_sets, + empty_tx_control=empty_tx_control, ) return self._driver( @@ -225,10 +241,28 @@ def transaction(self, tx_mode: base.BaseQueryTxMode = None) -> base.IQueryTxCont tx_mode, ) - def execute(self, query: str, parameters=None): + def execute( + self, + query: str, + tx_mode: base.BaseQueryTxMode = None, + syntax: base.QuerySyntax = None, + exec_mode: base.QueryExecMode = None, + parameters: dict = None, + concurrent_result_sets: bool = False, + empty_tx_control: bool = False + ): self._state._check_session_ready_to_use() - stream_it = self._execute_call(query, commit_tx=True) + stream_it = self._execute_call( + query=query, + commit_tx=True, + tx_mode=tx_mode, + syntax=syntax, + exec_mode=exec_mode, + parameters=parameters, + concurrent_result_sets=concurrent_result_sets, + empty_tx_control=empty_tx_control, + ) return _utilities.SyncResponseIterator( stream_it, From 6a740e4eb8ab9340a53bbb03fcc2d30bd127ccab Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 22 Jul 2024 15:57:56 +0300 Subject: [PATCH 064/429] Revert "Refactor wrappers to split UnaryStream and StreamStream wrappers" This reverts commit 0ffe5453f9d2c92ab9134672e05d4bdd35aa5b65. --- ydb/_grpc/grpcwrapper/common_utils.py | 86 ++++++----------------- ydb/_topic_common/common_test.py | 8 +-- ydb/_topic_reader/topic_reader_asyncio.py | 4 +- ydb/_topic_writer/topic_writer_asyncio.py | 4 +- 4 files changed, 31 insertions(+), 71 deletions(-) diff --git a/ydb/_grpc/grpcwrapper/common_utils.py b/ydb/_grpc/grpcwrapper/common_utils.py index 895d4036..a7febd5b 100644 --- a/ydb/_grpc/grpcwrapper/common_utils.py +++ b/ydb/_grpc/grpcwrapper/common_utils.py @@ -145,7 +145,7 @@ def close(self): SupportedDriverType = Union[ydb.Driver, ydb.aio.Driver] -class AbstractGrpcWrapperAsyncIO(IGrpcWrapperAsyncIO, abc.ABC): +class GrpcWrapperAsyncIO(IGrpcWrapperAsyncIO): from_client_grpc: asyncio.Queue from_server_grpc: AsyncIterator convert_server_grpc_to_wrapper: Callable[[Any], Any] @@ -163,6 +163,13 @@ def __init__(self, convert_server_grpc_to_wrapper): def __del__(self): self._clean_executor(wait=False) + async def start(self, driver: SupportedDriverType, stub, method): + if asyncio.iscoroutinefunction(driver.__call__): + await self._start_asyncio_driver(driver, stub, method) + else: + await self._start_sync_driver(driver, stub, method) + self._connection_state = "started" + def close(self): self.from_client_grpc.put_nowait(_stop_grpc_connection_marker) if self._stream_call: @@ -174,35 +181,6 @@ def _clean_executor(self, wait: bool): if self._wait_executor: self._wait_executor.shutdown(wait) - async def receive(self) -> Any: - # todo handle grpc exceptions and convert it to internal exceptions - try: - grpc_message = await self.from_server_grpc.__anext__() - except (grpc.RpcError, grpc.aio.AioRpcError) as e: - raise connection._rpc_error_handler(self._connection_state, e) - - issues._process_response(grpc_message) - - if self._connection_state != "has_received_messages": - self._connection_state = "has_received_messages" - - # print("rekby, grpc, received", grpc_message) - return self.convert_server_grpc_to_wrapper(grpc_message) - - def write(self, wrap_message: IToProto): - grpc_message = wrap_message.to_proto() - # print("rekby, grpc, send", grpc_message) - self.from_client_grpc.put_nowait(grpc_message) - - -class GrpcWrapperStreamStreamAsyncIO(AbstractGrpcWrapperAsyncIO): - async def start(self, driver: SupportedDriverType, stub, method): - if asyncio.iscoroutinefunction(driver.__call__): - await self._start_asyncio_driver(driver, stub, method) - else: - await self._start_sync_driver(driver, stub, method) - self._connection_state = "started" - async def _start_asyncio_driver(self, driver: ydb.aio.Driver, stub, method): requests_iterator = QueueToIteratorAsyncIO(self.from_client_grpc) stream_call = await driver( @@ -221,30 +199,25 @@ async def _start_sync_driver(self, driver: ydb.Driver, stub, method): self._stream_call = stream_call self.from_server_grpc = SyncToAsyncIterator(stream_call.__iter__(), self._wait_executor) + async def receive(self) -> Any: + # todo handle grpc exceptions and convert it to internal exceptions + try: + grpc_message = await self.from_server_grpc.__anext__() + except (grpc.RpcError, grpc.aio.AioRpcError) as e: + raise connection._rpc_error_handler(self._connection_state, e) -class GrpcWrapperUnaryStreamAsyncIO(AbstractGrpcWrapperAsyncIO): - async def start(self, driver: SupportedDriverType, request, stub, method): - if asyncio.iscoroutinefunction(driver.__call__): - await self._start_asyncio_driver(driver, request, stub, method) - else: - await self._start_sync_driver(driver, request, stub, method) - self._connection_state = "started" + issues._process_response(grpc_message) - async def _start_asyncio_driver(self, driver: ydb.aio.Driver, request, stub, method): - stream_call = await driver( - request, - stub, - method, - ) - self._stream_call = stream_call - self.from_server_grpc = stream_call.__aiter__() + if self._connection_state != "has_received_messages": + self._connection_state = "has_received_messages" - async def _start_sync_driver(self, driver: ydb.Driver, request, stub, method): - self._wait_executor = concurrent.futures.ThreadPoolExecutor(max_workers=1) + # print("rekby, grpc, received", grpc_message) + return self.convert_server_grpc_to_wrapper(grpc_message) - stream_call = await to_thread(driver, request, stub, method, executor=self._wait_executor) - self._stream_call = stream_call - self.from_server_grpc = SyncToAsyncIterator(stream_call.__iter__(), self._wait_executor) + def write(self, wrap_message: IToProto): + grpc_message = wrap_message.to_proto() + # print("rekby, grpc, send", grpc_message) + self.from_client_grpc.put_nowait(grpc_message) @dataclass(init=False) @@ -283,19 +256,6 @@ def issue_to_str(cls, issue: ydb_issue_message_pb2.IssueMessage): return res -ResultType = typing.TypeVar("ResultType", bound=IFromProtoWithProtoType) - - -def create_result_wrapper( - result_type: typing.Type[ResultType], -) -> typing.Callable[[typing.Any, typing.Any, typing.Any], ResultType]: - def wrapper(rpc_state, response_pb, driver=None): - # issues._process_response(response_pb.operation) - return result_type.from_proto(response_pb) - - return wrapper - - def callback_from_asyncio(callback: Union[Callable, Coroutine]) -> [asyncio.Future, asyncio.Task]: loop = asyncio.get_running_loop() diff --git a/ydb/_topic_common/common_test.py b/ydb/_topic_common/common_test.py index 1dadaa04..b31f9af9 100644 --- a/ydb/_topic_common/common_test.py +++ b/ydb/_topic_common/common_test.py @@ -8,7 +8,7 @@ from .common import CallFromSyncToAsync from .._grpc.grpcwrapper.common_utils import ( - GrpcWrapperStreamStreamAsyncIO, + GrpcWrapperAsyncIO, ServerStatus, callback_from_asyncio, ) @@ -77,7 +77,7 @@ async def async_failed(): @pytest.mark.asyncio -class TestGrpcWrapperStreamStreamAsyncIO: +class TestGrpcWrapperAsyncIO: async def test_convert_grpc_errors_to_ydb(self): class TestError(grpc.RpcError, grpc.Call): def __init__(self): @@ -93,7 +93,7 @@ class FromServerMock: async def __anext__(self): raise TestError() - wrapper = GrpcWrapperStreamStreamAsyncIO(lambda: None) + wrapper = GrpcWrapperAsyncIO(lambda: None) wrapper.from_server_grpc = FromServerMock() with pytest.raises(issues.Unauthenticated): @@ -107,7 +107,7 @@ async def __anext__(self): issues=[], ) - wrapper = GrpcWrapperStreamStreamAsyncIO(lambda: None) + wrapper = GrpcWrapperAsyncIO(lambda: None) wrapper.from_server_grpc = FromServerMock() with pytest.raises(issues.Overloaded): diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 8cc48a1d..81c6d9f4 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -18,7 +18,7 @@ from .._grpc.grpcwrapper.common_utils import ( IGrpcWrapperAsyncIO, SupportedDriverType, - GrpcWrapperStreamStreamAsyncIO, + GrpcWrapperAsyncIO, ) from .._grpc.grpcwrapper.ydb_topic import ( StreamReadMessage, @@ -308,7 +308,7 @@ async def create( driver: SupportedDriverType, settings: topic_reader.PublicReaderSettings, ) -> "ReaderStream": - stream = GrpcWrapperStreamStreamAsyncIO(StreamReadMessage.FromServer.from_proto) + stream = GrpcWrapperAsyncIO(StreamReadMessage.FromServer.from_proto) await stream.start(driver, _apis.TopicService.Stub, _apis.TopicService.StreamRead) diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index 064f19ce..007c8a54 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -39,7 +39,7 @@ from .._grpc.grpcwrapper.common_utils import ( IGrpcWrapperAsyncIO, SupportedDriverType, - GrpcWrapperStreamStreamAsyncIO, + GrpcWrapperAsyncIO, ) logger = logging.getLogger(__name__) @@ -613,7 +613,7 @@ async def create( init_request: StreamWriteMessage.InitRequest, update_token_interval: Optional[Union[int, float]] = None, ) -> "WriterAsyncIOStream": - stream = GrpcWrapperStreamStreamAsyncIO(StreamWriteMessage.FromServer.from_proto) + stream = GrpcWrapperAsyncIO(StreamWriteMessage.FromServer.from_proto) await stream.start(driver, _apis.TopicService.Stub, _apis.TopicService.StreamWrite) From 825c4626ef855167df2a91f9177656e352456bc9 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 22 Jul 2024 16:04:45 +0300 Subject: [PATCH 065/429] new details to example --- examples/query-service/basic_example.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index e589eba6..a43bfa9a 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -24,9 +24,13 @@ def main(): print("CREATE TABLE") pool.execute_with_retries("CREATE TABLE example(key UInt64, value String, PRIMARY KEY (key));", ddl=True) + pool.execute_with_retries("INSERT INTO example (key, value) VALUES (1, 'onepieceisreal');") + + def callee(session): print("=" * 50) - session.execute("""delete from example;""") + for _ in session.execute("""delete from example;"""): + pass print("BEFORE ACTION") it = session.execute("""SELECT COUNT(*) as rows_count FROM example;""") @@ -39,7 +43,7 @@ def callee(session): tx.begin() - tx.execute("""INSERT INTO example (key, value) VALUES (0055, "onepieceisreal");""") + tx.execute("""INSERT INTO example (key, value) VALUES (1, "onepieceisreal");""") for result_set in tx.execute("""SELECT COUNT(*) as rows_count FROM example;"""): print(f"rows: {str(result_set.rows)}") @@ -59,7 +63,7 @@ def callee(session): tx.begin() - tx.execute("""INSERT INTO example (key, value) VALUES (0066, "onepieceisreal");""") + tx.execute("""INSERT INTO example (key, value) VALUES (2, "onepieceisreal");""") for result_set in tx.execute("""SELECT COUNT(*) as rows_count FROM example;"""): print(f"rows: {str(result_set.rows)}") From 49cdce00fb94ef991881cd2a6f3972a37bb4fb5c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 22 Jul 2024 16:08:42 +0300 Subject: [PATCH 066/429] style fixes --- ydb/query/pool.py | 5 ++++- ydb/query/session.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ydb/query/pool.py b/ydb/query/pool.py index d227a0b0..6c2fc60b 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -116,9 +116,12 @@ def wrapped_callee(): else: return next_opt.result - def execute_with_retries(self, query: str, ddl: bool = False, retry_settings: RetrySettings = None, *args, **kwargs): + def execute_with_retries( + self, query: str, ddl: bool = False, retry_settings: RetrySettings = None, *args, **kwargs + ): retry_settings = RetrySettings() if retry_settings is None else retry_settings with self.checkout() as session: + def wrapped_callee(): it = session.execute(query, empty_tx_control=ddl) return [result_set for result_set in it] diff --git a/ydb/query/session.py b/ydb/query/session.py index 25d5658f..8288aa57 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -249,7 +249,7 @@ def execute( exec_mode: base.QueryExecMode = None, parameters: dict = None, concurrent_result_sets: bool = False, - empty_tx_control: bool = False + empty_tx_control: bool = False, ): self._state._check_session_ready_to_use() From daea8a91192a6b58af8fc12505f0558a7454604b Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 22 Jul 2024 16:15:17 +0300 Subject: [PATCH 067/429] style fixes --- examples/query-service/basic_example.py | 1 - ydb/query/pool.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index a43bfa9a..47a8a0d9 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -26,7 +26,6 @@ def main(): pool.execute_with_retries("INSERT INTO example (key, value) VALUES (1, 'onepieceisreal');") - def callee(session): print("=" * 50) for _ in session.execute("""delete from example;"""): diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 6c2fc60b..bc3007d4 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -117,7 +117,7 @@ def wrapped_callee(): return next_opt.result def execute_with_retries( - self, query: str, ddl: bool = False, retry_settings: RetrySettings = None, *args, **kwargs + self, query: str, ddl: bool = False, retry_settings: RetrySettings = None, *args, **kwargs ): retry_settings = RetrySettings() if retry_settings is None else retry_settings with self.checkout() as session: From 89846fd82cc442ed85baa427c68e5bbece6cfa29 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 22 Jul 2024 16:30:28 +0300 Subject: [PATCH 068/429] omit flag in client side --- examples/query-service/basic_example.py | 4 ++-- ydb/query/pool.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index 47a8a0d9..f5c91d4a 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -18,11 +18,11 @@ def main(): print("=" * 50) print("DELETE TABLE IF EXISTS") - pool.execute_with_retries("drop table if exists example;", ddl=True) + pool.execute_with_retries("drop table if exists example;") print("=" * 50) print("CREATE TABLE") - pool.execute_with_retries("CREATE TABLE example(key UInt64, value String, PRIMARY KEY (key));", ddl=True) + pool.execute_with_retries("CREATE TABLE example(key UInt64, value String, PRIMARY KEY (key));") pool.execute_with_retries("INSERT INTO example (key, value) VALUES (1, 'onepieceisreal');") diff --git a/ydb/query/pool.py b/ydb/query/pool.py index bc3007d4..f1c52757 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -117,13 +117,13 @@ def wrapped_callee(): return next_opt.result def execute_with_retries( - self, query: str, ddl: bool = False, retry_settings: RetrySettings = None, *args, **kwargs + self, query: str, retry_settings: RetrySettings = None, *args, **kwargs ): retry_settings = RetrySettings() if retry_settings is None else retry_settings with self.checkout() as session: def wrapped_callee(): - it = session.execute(query, empty_tx_control=ddl) + it = session.execute(query, empty_tx_control=True) return [result_set for result_set in it] opt_generator = retry_operation_impl(wrapped_callee, retry_settings, *args, **kwargs) From 199e8d7900399082518ffd0cb89180f81aa3d693 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 22 Jul 2024 16:32:29 +0300 Subject: [PATCH 069/429] pass args to session execute --- ydb/query/pool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ydb/query/pool.py b/ydb/query/pool.py index f1c52757..4552e319 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -123,10 +123,10 @@ def execute_with_retries( with self.checkout() as session: def wrapped_callee(): - it = session.execute(query, empty_tx_control=True) + it = session.execute(query, empty_tx_control=True, *args, **kwargs) return [result_set for result_set in it] - opt_generator = retry_operation_impl(wrapped_callee, retry_settings, *args, **kwargs) + opt_generator = retry_operation_impl(wrapped_callee, retry_settings) for next_opt in opt_generator: if isinstance(next_opt, YdbRetryOperationSleepOpt): time.sleep(next_opt.timeout) From c3d1d2bf0d2bbbcb0e9029bd3099c52219007e35 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 22 Jul 2024 16:37:12 +0300 Subject: [PATCH 070/429] style fixes --- ydb/query/pool.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 4552e319..d5871d4c 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -116,9 +116,7 @@ def wrapped_callee(): else: return next_opt.result - def execute_with_retries( - self, query: str, retry_settings: RetrySettings = None, *args, **kwargs - ): + def execute_with_retries(self, query: str, retry_settings: RetrySettings = None, *args, **kwargs): retry_settings = RetrySettings() if retry_settings is None else retry_settings with self.checkout() as session: From ec7274f6c6fca7e1a211b340e2ed24bec3cbdc60 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 23 Jul 2024 12:16:49 +0300 Subject: [PATCH 071/429] interactive tx support --- tests/query/test_query_transaction.py | 11 ++++++++--- ydb/query/base.py | 13 +++++-------- ydb/query/transaction.py | 25 +++++++++++++++++++------ 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 1b0d865a..0224a613 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -26,9 +26,14 @@ def test_tx_rollback_raises_before_begin(self, tx): with pytest.raises(RuntimeError): tx.rollback() - # def test_tx_execute_raises_before_begin(self, tx): - # with pytest.raises(RuntimeError): - # tx.execute("select 1;") + def test_tx_first_execute_begins_tx(self, tx): + tx.execute("select 1;") + tx.commit() + + def test_interactive_tx_commit(self, tx): + tx.execute("select 1;", commit_tx=True) + with pytest.raises(RuntimeError): + tx.execute("select 1;") def text_tx_execute_raises_after_commit(self, tx): tx.begin() diff --git a/ydb/query/base.py b/ydb/query/base.py index 98a02a42..e1936291 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -192,8 +192,12 @@ def create_execute_query_request( return req.to_proto() -def wrap_execute_query_response(rpc_state, response_pb): +def wrap_execute_query_response(rpc_state, response_pb, tx, commit_tx=False): issues._process_response(response_pb) + if response_pb.tx_meta and not tx.tx_id: + tx._handle_tx_meta(response_pb.tx_meta) + if commit_tx: + tx._move_to_commited() return convert.ResultSet.from_message(response_pb.result_set) @@ -201,17 +205,10 @@ def wrap_execute_query_response(rpc_state, response_pb): X_YDB_SESSION_CLOSE = "session-close" -# def _check_session_is_closing(rpc_state, session_state): -# metadata = rpc_state.trailing_metadata() -# if X_YDB_SESSION_CLOSE in metadata.get(X_YDB_SERVER_HINTS, []): -# session_state.set_closing() # TODO: clarify & implement - - def bad_session_handler(func): @functools.wraps(func) def decorator(rpc_state, response_pb, session_state, *args, **kwargs): try: - # _check_session_is_closing(rpc_state, session_state) return func(rpc_state, response_pb, session_state, *args, **kwargs) except issues.BadSession: session_state.reset() diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index df71d62c..973526e3 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -245,9 +245,8 @@ def commit(self, settings=None): """ if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): return - self._tx_state._check_invalid_transition(QueryTxStateEnum.COMMITTED) - self._ensure_prev_stream_finished() + self._tx_state._check_invalid_transition(QueryTxStateEnum.COMMITTED) return self._driver( _create_commit_transaction_request(self._session_state, self._tx_state), @@ -262,9 +261,8 @@ def rollback(self, settings=None): if self._tx_state._already_in(QueryTxStateEnum.ROLLBACKED): return - self._tx_state._check_invalid_transition(QueryTxStateEnum.ROLLBACKED) - self._ensure_prev_stream_finished() + self._tx_state._check_invalid_transition(QueryTxStateEnum.ROLLBACKED) return self._driver( _create_rollback_transaction_request(self._session_state, self._tx_state), @@ -309,6 +307,16 @@ def _ensure_prev_stream_finished(self): pass self._prev_stream = None + def _handle_tx_meta(self, tx_meta=None): + if not self.tx_id: + self._tx_state._change_state(QueryTxStateEnum.BEGINED) + self._tx_state.tx_id = tx_meta.id + + def _move_to_commited(self): + if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): + return + self._tx_state._change_state(QueryTxStateEnum.COMMITTED) + def execute( self, query: str, @@ -319,8 +327,8 @@ def execute( parameters: dict = None, concurrent_result_sets: bool = False, ): - self._tx_state._check_tx_not_terminal() self._ensure_prev_stream_finished() + self._tx_state._check_tx_not_terminal() stream_it = self._execute_call( query=query, @@ -333,6 +341,11 @@ def execute( ) self._prev_stream = _utilities.SyncResponseIterator( stream_it, - lambda resp: base.wrap_execute_query_response(rpc_state=None, response_pb=resp), + lambda resp: base.wrap_execute_query_response( + rpc_state=None, + response_pb=resp, + tx=self, + commit_tx=commit_tx, + ), ) return self._prev_stream From 6b07d63d248cb249168f81514e149947b3c925a7 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 23 Jul 2024 12:41:36 +0300 Subject: [PATCH 072/429] fix test errors --- ydb/query/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ydb/query/base.py b/ydb/query/base.py index e1936291..2f270d92 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -192,11 +192,11 @@ def create_execute_query_request( return req.to_proto() -def wrap_execute_query_response(rpc_state, response_pb, tx, commit_tx=False): +def wrap_execute_query_response(rpc_state, response_pb, tx=None, commit_tx=False): issues._process_response(response_pb) - if response_pb.tx_meta and not tx.tx_id: + if tx and response_pb.tx_meta and not tx.tx_id: tx._handle_tx_meta(response_pb.tx_meta) - if commit_tx: + if tx and commit_tx: tx._move_to_commited() return convert.ResultSet.from_message(response_pb.result_set) From 1d1e312f267af7d6011af379be50ef135c6862b1 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 23 Jul 2024 14:00:43 +0300 Subject: [PATCH 073/429] QuerySessionPool docstring --- ydb/query/pool.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ydb/query/pool.py b/ydb/query/pool.py index d5871d4c..2781e0ee 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -96,13 +96,26 @@ def retry_operation_impl(callee: Callable, retry_settings: RetrySettings = None, class QuerySessionPool: + """QuerySessionPool is an object to simplify operations with sessions of Query Service.""" + def __init__(self, driver: base.SupportedDriverType): + """ + :param driver: A driver instance + """ self._driver = driver def checkout(self): + """Return a Session context manager, that opens session on enter and closes session on exit.""" return SimpleQuerySessionCheckout(self) def retry_operation_sync(self, callee: Callable, retry_settings: RetrySettings = None, *args, **kwargs): + """Special interface to execute a bunch of commands with session in a safe, retriable way. + + :param callee: A function, that works with session. + :param retry_settings: RetrySettings object. + + :return: Result sets or exception in case of execution errors. + """ retry_settings = RetrySettings() if retry_settings is None else retry_settings def wrapped_callee(): @@ -117,6 +130,13 @@ def wrapped_callee(): return next_opt.result def execute_with_retries(self, query: str, retry_settings: RetrySettings = None, *args, **kwargs): + """Special interface to execute a one-shot queries in a safe, retriable way. + + :param query: A query, yql or sql text. + :param retry_settings: RetrySettings object. + + :return: Result sets or exception in case of execution errors. + """ retry_settings = RetrySettings() if retry_settings is None else retry_settings with self.checkout() as session: From bbd47dad06971c47e762e8afbf58738021a01790 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 23 Jul 2024 14:52:29 +0300 Subject: [PATCH 074/429] Fix tests naming --- tests/query/test_query_transaction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 0224a613..fd7fb6bb 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -35,13 +35,13 @@ def test_interactive_tx_commit(self, tx): with pytest.raises(RuntimeError): tx.execute("select 1;") - def text_tx_execute_raises_after_commit(self, tx): + def test_tx_execute_raises_after_commit(self, tx): tx.begin() tx.commit() with pytest.raises(RuntimeError): tx.execute("select 1;") - def text_tx_execute_raises_after_rollback(self, tx): + def test_tx_execute_raises_after_rollback(self, tx): tx.begin() tx.rollback() with pytest.raises(RuntimeError): From a1f513a513f7ad01125d221b8e8dede9e701d76f Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 24 Jul 2024 10:17:34 +0300 Subject: [PATCH 075/429] tx context manager tests --- tests/query/test_query_transaction.py | 20 ++++++++++++++++++++ ydb/query/transaction.py | 1 + 2 files changed, 21 insertions(+) diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index fd7fb6bb..ee0c3a07 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -1,5 +1,6 @@ import pytest +from ydb.query.transaction import QueryTxStateEnum class TestQueryTransaction: def test_tx_begin(self, tx): @@ -46,3 +47,22 @@ def test_tx_execute_raises_after_rollback(self, tx): tx.rollback() with pytest.raises(RuntimeError): tx.execute("select 1;") + + def test_context_manager_rollbacks_tx(self, tx): + with tx: + tx.begin() + + assert tx._tx_state._state == QueryTxStateEnum.ROLLBACKED + + def test_context_manager_normal_flow(self, tx): + with tx: + tx.begin() + tx.execute("select 1;") + tx.commit() + + assert tx._tx_state._state == QueryTxStateEnum.COMMITTED + + def test_context_manager_does_not_hide_exceptions(self, tx): + with pytest.raises(RuntimeError): + with tx: + tx.commit() diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 973526e3..2bf76513 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -184,6 +184,7 @@ def __exit__(self, *args, **kwargs): Closes a transaction context manager and rollbacks transaction if it is not rolled back explicitly """ + self._ensure_prev_stream_finished() if self._tx_state.tx_id is not None: # It's strictly recommended to close transactions directly # by using commit_tx=True flag while executing statement or by From 68ce180ca728fa405418d2904391d9ba2ba845ec Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 24 Jul 2024 10:24:36 +0300 Subject: [PATCH 076/429] add typing to tests --- tests/query/test_query_session.py | 28 ++++++++++++++------------- tests/query/test_query_transaction.py | 25 ++++++++++++------------ 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/tests/query/test_query_session.py b/tests/query/test_query_session.py index dc0b7664..402fc8bb 100644 --- a/tests/query/test_query_session.py +++ b/tests/query/test_query_session.py @@ -1,20 +1,22 @@ import pytest +from ydb.query.session import QuerySessionSync -def _check_session_state_empty(session): + +def _check_session_state_empty(session: QuerySessionSync): assert session._state.session_id is None assert session._state.node_id is None assert not session._state.attached -def _check_session_state_full(session): +def _check_session_state_full(session: QuerySessionSync): assert session._state.session_id is not None assert session._state.node_id is not None assert session._state.attached class TestQuerySession: - def test_session_normal_lifecycle(self, session): + def test_session_normal_lifecycle(self, session: QuerySessionSync): _check_session_state_empty(session) session.create() @@ -23,7 +25,7 @@ def test_session_normal_lifecycle(self, session): session.delete() _check_session_state_empty(session) - def test_second_create_do_nothing(self, session): + def test_second_create_do_nothing(self, session: QuerySessionSync): session.create() _check_session_state_full(session) @@ -36,27 +38,27 @@ def test_second_create_do_nothing(self, session): assert session._state.session_id == session_id_before assert session._state.node_id == node_id_before - def test_second_delete_do_nothing(self, session): + def test_second_delete_do_nothing(self, session: QuerySessionSync): session.create() session.delete() session.delete() - def test_delete_before_create_not_possible(self, session): + def test_delete_before_create_not_possible(self, session: QuerySessionSync): with pytest.raises(RuntimeError): session.delete() - def test_create_after_delete_not_possible(self, session): + def test_create_after_delete_not_possible(self, session: QuerySessionSync): session.create() session.delete() with pytest.raises(RuntimeError): session.create() - def test_transaction_before_create_raises(self, session): + def test_transaction_before_create_raises(self, session: QuerySessionSync): with pytest.raises(RuntimeError): session.transaction() - def test_transaction_after_delete_raises(self, session): + def test_transaction_after_delete_raises(self, session: QuerySessionSync): session.create() session.delete() @@ -64,21 +66,21 @@ def test_transaction_after_delete_raises(self, session): with pytest.raises(RuntimeError): session.transaction() - def test_transaction_after_create_not_raises(self, session): + def test_transaction_after_create_not_raises(self, session: QuerySessionSync): session.create() session.transaction() - def test_execute_before_create_raises(self, session): + def test_execute_before_create_raises(self, session: QuerySessionSync): with pytest.raises(RuntimeError): session.execute("select 1;") - def test_execute_after_delete_raises(self, session): + def test_execute_after_delete_raises(self, session: QuerySessionSync): session.create() session.delete() with pytest.raises(RuntimeError): session.execute("select 1;") - def test_basic_execute(self, session): + def test_basic_execute(self, session: QuerySessionSync): session.create() it = session.execute("select 1;") result_sets = [result_set for result_set in it] diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index ee0c3a07..0cfd55e8 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -1,60 +1,61 @@ import pytest +from ydb.query.transaction import BaseTxContext from ydb.query.transaction import QueryTxStateEnum class TestQueryTransaction: - def test_tx_begin(self, tx): + def test_tx_begin(self, tx: BaseTxContext): assert tx.tx_id is None tx.begin() assert tx.tx_id is not None - def test_tx_allow_double_commit(self, tx): + def test_tx_allow_double_commit(self, tx: BaseTxContext): tx.begin() tx.commit() tx.commit() - def test_tx_allow_double_rollback(self, tx): + def test_tx_allow_double_rollback(self, tx: BaseTxContext): tx.begin() tx.rollback() tx.rollback() - def test_tx_commit_raises_before_begin(self, tx): + def test_tx_commit_raises_before_begin(self, tx: BaseTxContext): with pytest.raises(RuntimeError): tx.commit() - def test_tx_rollback_raises_before_begin(self, tx): + def test_tx_rollback_raises_before_begin(self, tx: BaseTxContext): with pytest.raises(RuntimeError): tx.rollback() - def test_tx_first_execute_begins_tx(self, tx): + def test_tx_first_execute_begins_tx(self, tx: BaseTxContext): tx.execute("select 1;") tx.commit() - def test_interactive_tx_commit(self, tx): + def test_interactive_tx_commit(self, tx: BaseTxContext): tx.execute("select 1;", commit_tx=True) with pytest.raises(RuntimeError): tx.execute("select 1;") - def test_tx_execute_raises_after_commit(self, tx): + def test_tx_execute_raises_after_commit(self, tx: BaseTxContext): tx.begin() tx.commit() with pytest.raises(RuntimeError): tx.execute("select 1;") - def test_tx_execute_raises_after_rollback(self, tx): + def test_tx_execute_raises_after_rollback(self, tx: BaseTxContext): tx.begin() tx.rollback() with pytest.raises(RuntimeError): tx.execute("select 1;") - def test_context_manager_rollbacks_tx(self, tx): + def test_context_manager_rollbacks_tx(self, tx: BaseTxContext): with tx: tx.begin() assert tx._tx_state._state == QueryTxStateEnum.ROLLBACKED - def test_context_manager_normal_flow(self, tx): + def test_context_manager_normal_flow(self, tx: BaseTxContext): with tx: tx.begin() tx.execute("select 1;") @@ -62,7 +63,7 @@ def test_context_manager_normal_flow(self, tx): assert tx._tx_state._state == QueryTxStateEnum.COMMITTED - def test_context_manager_does_not_hide_exceptions(self, tx): + def test_context_manager_does_not_hide_exceptions(self, tx: BaseTxContext): with pytest.raises(RuntimeError): with tx: tx.commit() From 690c974c3463edb15392d10634877f1146b4496e Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 24 Jul 2024 10:29:04 +0300 Subject: [PATCH 077/429] style fix --- tests/query/test_query_transaction.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 0cfd55e8..287c151c 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -3,6 +3,7 @@ from ydb.query.transaction import BaseTxContext from ydb.query.transaction import QueryTxStateEnum + class TestQueryTransaction: def test_tx_begin(self, tx: BaseTxContext): assert tx.tx_id is None From c8e74a8fb6999f87ba8929cad09675216bc55322 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 24 Jul 2024 13:16:55 +0300 Subject: [PATCH 078/429] move retry logic to standalone module --- tests/query/test_query_transaction.py | 4 +- ydb/_retries.py | 136 +++++++++++++++++++++ ydb/_topic_reader/topic_reader.py | 2 +- ydb/_topic_writer/topic_writer_asyncio.py | 4 +- ydb/aio/table.py | 6 +- ydb/query/pool.py | 107 +---------------- ydb/table.py | 139 +--------------------- ydb/table_test.py | 5 +- 8 files changed, 158 insertions(+), 245 deletions(-) create mode 100644 ydb/_retries.py diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 287c151c..6b185720 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -65,6 +65,6 @@ def test_context_manager_normal_flow(self, tx: BaseTxContext): assert tx._tx_state._state == QueryTxStateEnum.COMMITTED def test_context_manager_does_not_hide_exceptions(self, tx: BaseTxContext): - with pytest.raises(RuntimeError): + with pytest.raises(Exception): with tx: - tx.commit() + raise Exception() diff --git a/ydb/_retries.py b/ydb/_retries.py new file mode 100644 index 00000000..5d4f6e6a --- /dev/null +++ b/ydb/_retries.py @@ -0,0 +1,136 @@ +import random +import time + +from . import issues +from ._errors import check_retriable_error + + +class BackoffSettings(object): + def __init__(self, ceiling=6, slot_duration=0.001, uncertain_ratio=0.5): + self.ceiling = ceiling + self.slot_duration = slot_duration + self.uncertain_ratio = uncertain_ratio + + def calc_timeout(self, retry_number): + slots_count = 1 << min(retry_number, self.ceiling) + max_duration_ms = slots_count * self.slot_duration * 1000.0 + # duration_ms = random.random() * max_duration_ms * uncertain_ratio) + max_duration_ms * (1 - uncertain_ratio) + duration_ms = max_duration_ms * (random.random() * self.uncertain_ratio + 1.0 - self.uncertain_ratio) + return duration_ms / 1000.0 + + +class RetrySettings(object): + def __init__( + self, + max_retries=10, + max_session_acquire_timeout=None, + on_ydb_error_callback=None, + backoff_ceiling=6, + backoff_slot_duration=1, + get_session_client_timeout=5, + fast_backoff_settings=None, + slow_backoff_settings=None, + idempotent=False, + ): + self.max_retries = max_retries + self.max_session_acquire_timeout = max_session_acquire_timeout + self.on_ydb_error_callback = (lambda e: None) if on_ydb_error_callback is None else on_ydb_error_callback + self.fast_backoff = BackoffSettings(10, 0.005) if fast_backoff_settings is None else fast_backoff_settings + self.slow_backoff = ( + BackoffSettings(backoff_ceiling, backoff_slot_duration) + if slow_backoff_settings is None + else slow_backoff_settings + ) + self.retry_not_found = True + self.idempotent = idempotent + self.retry_internal_error = True + self.unknown_error_handler = lambda e: None + self.get_session_client_timeout = get_session_client_timeout + if max_session_acquire_timeout is not None: + self.get_session_client_timeout = min(self.max_session_acquire_timeout, self.get_session_client_timeout) + + def with_fast_backoff(self, backoff_settings): + self.fast_backoff = backoff_settings + return self + + def with_slow_backoff(self, backoff_settings): + self.slow_backoff = backoff_settings + return self + + +class YdbRetryOperationSleepOpt(object): + def __init__(self, timeout): + self.timeout = timeout + + def __eq__(self, other): + return type(self) == type(other) and self.timeout == other.timeout + + def __repr__(self): + return "YdbRetryOperationSleepOpt(%s)" % self.timeout + + +class YdbRetryOperationFinalResult(object): + def __init__(self, result): + self.result = result + self.exc = None + + def __eq__(self, other): + return type(self) == type(other) and self.result == other.result and self.exc == other.exc + + def __repr__(self): + return "YdbRetryOperationFinalResult(%s, exc=%s)" % (self.result, self.exc) + + def set_exception(self, exc): + self.exc = exc + + +def retry_operation_impl(callee, retry_settings=None, *args, **kwargs): + retry_settings = RetrySettings() if retry_settings is None else retry_settings + status = None + + for attempt in range(retry_settings.max_retries + 1): + try: + result = YdbRetryOperationFinalResult(callee(*args, **kwargs)) + yield result + + if result.exc is not None: + raise result.exc + + except issues.Error as e: + status = e + retry_settings.on_ydb_error_callback(e) + + retriable_info = check_retriable_error(e, retry_settings, attempt) + if not retriable_info.is_retriable: + raise + + skip_yield_error_types = [ + issues.Aborted, + issues.BadSession, + issues.NotFound, + issues.InternalError, + ] + + yield_sleep = True + for t in skip_yield_error_types: + if isinstance(e, t): + yield_sleep = False + + if yield_sleep: + yield YdbRetryOperationSleepOpt(retriable_info.sleep_timeout_seconds) + + except Exception as e: + # you should provide your own handler you want + retry_settings.unknown_error_handler(e) + raise + + raise status + + +def retry_operation_sync(callee, retry_settings=None, *args, **kwargs): + opt_generator = retry_operation_impl(callee, retry_settings, *args, **kwargs) + for next_opt in opt_generator: + if isinstance(next_opt, YdbRetryOperationSleepOpt): + time.sleep(next_opt.timeout) + else: + return next_opt.result diff --git a/ydb/_topic_reader/topic_reader.py b/ydb/_topic_reader/topic_reader.py index 17fb2885..4ac6c441 100644 --- a/ydb/_topic_reader/topic_reader.py +++ b/ydb/_topic_reader/topic_reader.py @@ -10,7 +10,7 @@ Callable, ) -from ..table import RetrySettings +from .._retries import RetrySettings from .._grpc.grpcwrapper.ydb_topic import StreamReadMessage, OffsetsRange diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index 007c8a54..04b174b0 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -26,9 +26,9 @@ from .. import ( _apis, issues, - check_retriable_error, - RetrySettings, ) +from .._errors import check_retriable_error +from .._retries import RetrySettings from .._grpc.grpcwrapper.ydb_topic_public_types import PublicCodec from .._grpc.grpcwrapper.ydb_topic import ( UpdateTokenRequest, diff --git a/ydb/aio/table.py b/ydb/aio/table.py index 3c25f7d2..228581ae 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -15,7 +15,7 @@ BaseTxContext, ) from . import _utilities -from ydb import _apis, _session_impl +from ydb import _apis, _session_impl, _retries logger = logging.getLogger(__name__) @@ -214,9 +214,9 @@ async def retry_operation(callee, retry_settings=None, *args, **kwargs): # pyli Returns awaitable result of coroutine. If retries are not succussful exception is raised. """ - opt_generator = ydb.retry_operation_impl(callee, retry_settings, *args, **kwargs) + opt_generator = _retries.retry_operation_impl(callee, retry_settings, *args, **kwargs) for next_opt in opt_generator: - if isinstance(next_opt, ydb.YdbRetryOperationSleepOpt): + if isinstance(next_opt, _retries.YdbRetryOperationSleepOpt): await asyncio.sleep(next_opt.timeout) else: try: diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 2781e0ee..ce1207de 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -1,98 +1,13 @@ -import time from typing import Callable from . import base from .session import ( QuerySessionSync, ) -from .. import issues -from .._errors import check_retriable_error - - -class RetrySettings(object): - def __init__( - self, - max_retries: int = 10, - max_session_acquire_timeout: int = None, - on_ydb_error_callback: Callable = None, - idempotent: bool = False, - ): - self.max_retries = max_retries - self.max_session_acquire_timeout = max_session_acquire_timeout - self.on_ydb_error_callback = (lambda e: None) if on_ydb_error_callback is None else on_ydb_error_callback - self.retry_not_found = True - self.idempotent = idempotent - self.retry_internal_error = True - self.unknown_error_handler = lambda e: None - - -class YdbRetryOperationSleepOpt: - def __init__(self, timeout): - self.timeout = timeout - - def __eq__(self, other): - return type(self) == type(other) and self.timeout == other.timeout - - def __repr__(self): - return "YdbRetryOperationSleepOpt(%s)" % self.timeout - - -class YdbRetryOperationFinalResult: - def __init__(self, result): - self.result = result - self.exc = None - - def __eq__(self, other): - return type(self) == type(other) and self.result == other.result and self.exc == other.exc - - def __repr__(self): - return "YdbRetryOperationFinalResult(%s, exc=%s)" % (self.result, self.exc) - - def set_exception(self, exc): - self.exc = exc - - -def retry_operation_impl(callee: Callable, retry_settings: RetrySettings = None, *args, **kwargs): - retry_settings = RetrySettings() if retry_settings is None else retry_settings - status = None - - for attempt in range(retry_settings.max_retries + 1): - try: - result = YdbRetryOperationFinalResult(callee(*args, **kwargs)) - yield result - - if result.exc is not None: - raise result.exc - - except issues.Error as e: - status = e - retry_settings.on_ydb_error_callback(e) - - retriable_info = check_retriable_error(e, retry_settings, attempt) - if not retriable_info.is_retriable: - raise - - skip_yield_error_types = [ - issues.Aborted, - issues.BadSession, - issues.NotFound, - issues.InternalError, - ] - - yield_sleep = True - for t in skip_yield_error_types: - if isinstance(e, t): - yield_sleep = False - - if yield_sleep: - yield YdbRetryOperationSleepOpt(retriable_info.sleep_timeout_seconds) - - except Exception as e: - # you should provide your own handler you want - retry_settings.unknown_error_handler(e) - raise - if status: - raise status +from .._retries import ( + RetrySettings, + retry_operation_sync, +) class QuerySessionPool: @@ -122,12 +37,7 @@ def wrapped_callee(): with self.checkout() as session: return callee(session, *args, **kwargs) - opt_generator = retry_operation_impl(wrapped_callee, retry_settings, *args, **kwargs) - for next_opt in opt_generator: - if isinstance(next_opt, YdbRetryOperationSleepOpt): - time.sleep(next_opt.timeout) - else: - return next_opt.result + return retry_operation_sync(wrapped_callee, retry_settings) def execute_with_retries(self, query: str, retry_settings: RetrySettings = None, *args, **kwargs): """Special interface to execute a one-shot queries in a safe, retriable way. @@ -144,12 +54,7 @@ def wrapped_callee(): it = session.execute(query, empty_tx_control=True, *args, **kwargs) return [result_set for result_set in it] - opt_generator = retry_operation_impl(wrapped_callee, retry_settings) - for next_opt in opt_generator: - if isinstance(next_opt, YdbRetryOperationSleepOpt): - time.sleep(next_opt.timeout) - else: - return next_opt.result + return retry_operation_sync(wrapped_callee, retry_settings) class SimpleQuerySessionCheckout: diff --git a/ydb/table.py b/ydb/table.py index c21392bb..b2a4c569 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -3,8 +3,6 @@ import ydb from abc import abstractmethod import logging -import time -import random import enum from . import ( @@ -20,7 +18,11 @@ _tx_ctx_impl, tracing, ) -from ._errors import check_retriable_error + +from ._retries import ( + retry_operation_sync, + RetrySettings, +) try: from . import interceptor @@ -840,137 +842,6 @@ def name(self): return self._name -class BackoffSettings(object): - def __init__(self, ceiling=6, slot_duration=0.001, uncertain_ratio=0.5): - self.ceiling = ceiling - self.slot_duration = slot_duration - self.uncertain_ratio = uncertain_ratio - - def calc_timeout(self, retry_number): - slots_count = 1 << min(retry_number, self.ceiling) - max_duration_ms = slots_count * self.slot_duration * 1000.0 - # duration_ms = random.random() * max_duration_ms * uncertain_ratio) + max_duration_ms * (1 - uncertain_ratio) - duration_ms = max_duration_ms * (random.random() * self.uncertain_ratio + 1.0 - self.uncertain_ratio) - return duration_ms / 1000.0 - - -class RetrySettings(object): - def __init__( - self, - max_retries=10, - max_session_acquire_timeout=None, - on_ydb_error_callback=None, - backoff_ceiling=6, - backoff_slot_duration=1, - get_session_client_timeout=5, - fast_backoff_settings=None, - slow_backoff_settings=None, - idempotent=False, - ): - self.max_retries = max_retries - self.max_session_acquire_timeout = max_session_acquire_timeout - self.on_ydb_error_callback = (lambda e: None) if on_ydb_error_callback is None else on_ydb_error_callback - self.fast_backoff = BackoffSettings(10, 0.005) if fast_backoff_settings is None else fast_backoff_settings - self.slow_backoff = ( - BackoffSettings(backoff_ceiling, backoff_slot_duration) - if slow_backoff_settings is None - else slow_backoff_settings - ) - self.retry_not_found = True - self.idempotent = idempotent - self.retry_internal_error = True - self.unknown_error_handler = lambda e: None - self.get_session_client_timeout = get_session_client_timeout - if max_session_acquire_timeout is not None: - self.get_session_client_timeout = min(self.max_session_acquire_timeout, self.get_session_client_timeout) - - def with_fast_backoff(self, backoff_settings): - self.fast_backoff = backoff_settings - return self - - def with_slow_backoff(self, backoff_settings): - self.slow_backoff = backoff_settings - return self - - -class YdbRetryOperationSleepOpt(object): - def __init__(self, timeout): - self.timeout = timeout - - def __eq__(self, other): - return type(self) == type(other) and self.timeout == other.timeout - - def __repr__(self): - return "YdbRetryOperationSleepOpt(%s)" % self.timeout - - -class YdbRetryOperationFinalResult(object): - def __init__(self, result): - self.result = result - self.exc = None - - def __eq__(self, other): - return type(self) == type(other) and self.result == other.result and self.exc == other.exc - - def __repr__(self): - return "YdbRetryOperationFinalResult(%s, exc=%s)" % (self.result, self.exc) - - def set_exception(self, exc): - self.exc = exc - - -def retry_operation_impl(callee, retry_settings=None, *args, **kwargs): - retry_settings = RetrySettings() if retry_settings is None else retry_settings - status = None - - for attempt in range(retry_settings.max_retries + 1): - try: - result = YdbRetryOperationFinalResult(callee(*args, **kwargs)) - yield result - - if result.exc is not None: - raise result.exc - - except issues.Error as e: - status = e - retry_settings.on_ydb_error_callback(e) - - retriable_info = check_retriable_error(e, retry_settings, attempt) - if not retriable_info.is_retriable: - raise - - skip_yield_error_types = [ - issues.Aborted, - issues.BadSession, - issues.NotFound, - issues.InternalError, - ] - - yield_sleep = True - for t in skip_yield_error_types: - if isinstance(e, t): - yield_sleep = False - - if yield_sleep: - yield YdbRetryOperationSleepOpt(retriable_info.sleep_timeout_seconds) - - except Exception as e: - # you should provide your own handler you want - retry_settings.unknown_error_handler(e) - raise - - raise status - - -def retry_operation_sync(callee, retry_settings=None, *args, **kwargs): - opt_generator = retry_operation_impl(callee, retry_settings, *args, **kwargs) - for next_opt in opt_generator: - if isinstance(next_opt, YdbRetryOperationSleepOpt): - time.sleep(next_opt.timeout) - else: - return next_opt.result - - class TableClientSettings(object): def __init__(self): self._client_query_cache_enabled = False diff --git a/ydb/table_test.py b/ydb/table_test.py index 640662c4..aa45e41e 100644 --- a/ydb/table_test.py +++ b/ydb/table_test.py @@ -1,8 +1,9 @@ from unittest import mock -from . import ( +from . import issues + +from ._retries import ( retry_operation_impl, YdbRetryOperationFinalResult, - issues, YdbRetryOperationSleepOpt, RetrySettings, ) From 249e5696a8ac5be8f5ccf5695688d8011c7cc431 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 24 Jul 2024 14:47:50 +0300 Subject: [PATCH 079/429] response iterator as context manager --- examples/query-service/basic_example.py | 39 +++++++++++++------------ tests/query/test_query_transaction.py | 8 +++++ ydb/query/base.py | 10 +++++++ ydb/query/transaction.py | 3 +- 4 files changed, 39 insertions(+), 21 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index f5c91d4a..d78f5c71 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -38,39 +38,40 @@ def callee(session): print("=" * 50) print("INSERT WITH COMMIT TX") - tx = session.transaction() - tx.begin() + with session.transaction() as tx: + tx.begin() - tx.execute("""INSERT INTO example (key, value) VALUES (1, "onepieceisreal");""") + with tx.execute("""INSERT INTO example (key, value) VALUES (1, "onepieceisreal");""") as results: + pass - for result_set in tx.execute("""SELECT COUNT(*) as rows_count FROM example;"""): - print(f"rows: {str(result_set.rows)}") + with tx.execute("""SELECT COUNT(*) as rows_count FROM example;""") as results: + for result_set in results: + print(f"rows: {str(result_set.rows)}") - tx.commit() + tx.commit() - print("=" * 50) - print("AFTER COMMIT TX") + print("=" * 50) + print("AFTER COMMIT TX") - for result_set in session.execute("""SELECT COUNT(*) as rows_count FROM example;"""): - print(f"rows: {str(result_set.rows)}") + for result_set in session.execute("""SELECT COUNT(*) as rows_count FROM example;"""): + print(f"rows: {str(result_set.rows)}") print("=" * 50) print("INSERT WITH ROLLBACK TX") - tx = session.transaction() + with session.transaction() as tx: + tx.begin() - tx.begin() + tx.execute("""INSERT INTO example (key, value) VALUES (2, "onepieceisreal");""") - tx.execute("""INSERT INTO example (key, value) VALUES (2, "onepieceisreal");""") + for result_set in tx.execute("""SELECT COUNT(*) as rows_count FROM example;"""): + print(f"rows: {str(result_set.rows)}") - for result_set in tx.execute("""SELECT COUNT(*) as rows_count FROM example;"""): - print(f"rows: {str(result_set.rows)}") - - tx.rollback() + tx.rollback() - print("=" * 50) - print("AFTER ROLLBACK TX") + print("=" * 50) + print("AFTER ROLLBACK TX") for result_set in session.execute("""SELECT COUNT(*) as rows_count FROM example;"""): print(f"rows: {str(result_set.rows)}") diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 6b185720..0f09f9b1 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -68,3 +68,11 @@ def test_context_manager_does_not_hide_exceptions(self, tx: BaseTxContext): with pytest.raises(Exception): with tx: raise Exception() + + def test_execute_as_context_manager(self, tx: BaseTxContext): + tx.begin() + + with tx.execute("select 1;") as results: + res = [result_set for result_set in results] + + assert len(res) == 1 diff --git a/ydb/query/base.py b/ydb/query/base.py index 2f270d92..9221da8e 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -16,6 +16,7 @@ ) from .. import convert from .. import issues +from .. import _utilities class QueryClientSettings: @@ -215,3 +216,12 @@ def decorator(rpc_state, response_pb, session_state, *args, **kwargs): raise return decorator + + +class SyncResponseContextIterator(_utilities.SyncResponseIterator): + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + for _ in self.it: + pass diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 2bf76513..a859326f 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -6,7 +6,6 @@ from .. import ( _apis, issues, - _utilities, ) from .._grpc.grpcwrapper import ydb_query as _ydb_query from .._grpc.grpcwrapper import ydb_query_public_types as _ydb_query_public @@ -340,7 +339,7 @@ def execute( parameters=parameters, concurrent_result_sets=concurrent_result_sets, ) - self._prev_stream = _utilities.SyncResponseIterator( + self._prev_stream = base.SyncResponseContextIterator( stream_it, lambda resp: base.wrap_execute_query_response( rpc_state=None, From 8bb8a6ff96572cbffc624b5c358506c278e537d6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 24 Jul 2024 15:01:32 +0300 Subject: [PATCH 080/429] make retries module public --- ydb/__init__.py | 1 + ydb/_topic_reader/topic_reader.py | 2 +- ydb/_topic_writer/topic_writer_asyncio.py | 2 +- ydb/aio/table.py | 6 +++--- ydb/query/pool.py | 2 +- ydb/{_retries.py => retries.py} | 0 ydb/table.py | 2 +- ydb/table_test.py | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) rename ydb/{_retries.py => retries.py} (100%) diff --git a/ydb/__init__.py b/ydb/__init__.py index 1caaaa02..375f2f54 100644 --- a/ydb/__init__.py +++ b/ydb/__init__.py @@ -20,6 +20,7 @@ from .topic import * # noqa from .draft import * # noqa from .query import * # noqa +from .retries import * # noqa try: import ydb.aio as aio # noqa diff --git a/ydb/_topic_reader/topic_reader.py b/ydb/_topic_reader/topic_reader.py index 4ac6c441..b907ee27 100644 --- a/ydb/_topic_reader/topic_reader.py +++ b/ydb/_topic_reader/topic_reader.py @@ -10,7 +10,7 @@ Callable, ) -from .._retries import RetrySettings +from ..retries import RetrySettings from .._grpc.grpcwrapper.ydb_topic import StreamReadMessage, OffsetsRange diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index 04b174b0..585e88ab 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -28,7 +28,7 @@ issues, ) from .._errors import check_retriable_error -from .._retries import RetrySettings +from ..retries import RetrySettings from .._grpc.grpcwrapper.ydb_topic_public_types import PublicCodec from .._grpc.grpcwrapper.ydb_topic import ( UpdateTokenRequest, diff --git a/ydb/aio/table.py b/ydb/aio/table.py index 228581ae..3c25f7d2 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -15,7 +15,7 @@ BaseTxContext, ) from . import _utilities -from ydb import _apis, _session_impl, _retries +from ydb import _apis, _session_impl logger = logging.getLogger(__name__) @@ -214,9 +214,9 @@ async def retry_operation(callee, retry_settings=None, *args, **kwargs): # pyli Returns awaitable result of coroutine. If retries are not succussful exception is raised. """ - opt_generator = _retries.retry_operation_impl(callee, retry_settings, *args, **kwargs) + opt_generator = ydb.retry_operation_impl(callee, retry_settings, *args, **kwargs) for next_opt in opt_generator: - if isinstance(next_opt, _retries.YdbRetryOperationSleepOpt): + if isinstance(next_opt, ydb.YdbRetryOperationSleepOpt): await asyncio.sleep(next_opt.timeout) else: try: diff --git a/ydb/query/pool.py b/ydb/query/pool.py index ce1207de..7124c55e 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -4,7 +4,7 @@ from .session import ( QuerySessionSync, ) -from .._retries import ( +from ..retries import ( RetrySettings, retry_operation_sync, ) diff --git a/ydb/_retries.py b/ydb/retries.py similarity index 100% rename from ydb/_retries.py rename to ydb/retries.py diff --git a/ydb/table.py b/ydb/table.py index b2a4c569..12856d61 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -19,7 +19,7 @@ tracing, ) -from ._retries import ( +from .retries import ( retry_operation_sync, RetrySettings, ) diff --git a/ydb/table_test.py b/ydb/table_test.py index aa45e41e..d5d86e05 100644 --- a/ydb/table_test.py +++ b/ydb/table_test.py @@ -1,7 +1,7 @@ from unittest import mock from . import issues -from ._retries import ( +from .retries import ( retry_operation_impl, YdbRetryOperationFinalResult, YdbRetryOperationSleepOpt, From 56f7b24ae425de984229b51216da9ccf1ca03a21 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 24 Jul 2024 18:39:16 +0300 Subject: [PATCH 081/429] query session pool tests --- tests/query/conftest.py | 7 ++++ tests/query/test_query_session_pool.py | 47 ++++++++++++++++++++++++++ ydb/query/transaction.py | 1 + 3 files changed, 55 insertions(+) create mode 100644 tests/query/test_query_session_pool.py diff --git a/tests/query/conftest.py b/tests/query/conftest.py index a7f0c34c..113c1126 100644 --- a/tests/query/conftest.py +++ b/tests/query/conftest.py @@ -1,5 +1,6 @@ import pytest from ydb.query.session import QuerySessionSync +from ydb.query.pool import QuerySessionPool @pytest.fixture @@ -25,3 +26,9 @@ def tx(session): transaction.rollback() except BaseException: pass + + +@pytest.fixture +def pool(driver_sync): + pool = QuerySessionPool(driver_sync) + yield pool \ No newline at end of file diff --git a/tests/query/test_query_session_pool.py b/tests/query/test_query_session_pool.py new file mode 100644 index 00000000..aee95446 --- /dev/null +++ b/tests/query/test_query_session_pool.py @@ -0,0 +1,47 @@ +import pytest + +from ydb.query.pool import QuerySessionPool +from ydb.query.session import QuerySessionSync, QuerySessionStateEnum + + +class TestQuerySessionPool: + def test_checkout_provides_created_session(self, pool: QuerySessionPool): + with pool.checkout() as session: + assert session._state._state == QuerySessionStateEnum.CREATED + + assert session._state._state == QuerySessionStateEnum.CLOSED + + def test_oneshot_query_normal(self, pool: QuerySessionPool): + res = pool.execute_with_retries("select 1;") + assert len(res) == 1 + + def test_oneshot_ddl_query(self, pool: QuerySessionPool): + pool.execute_with_retries("create table Queen(key UInt64, PRIMARY KEY (key));") + pool.execute_with_retries("drop table Queen;") + + def test_oneshot_query_raises(self, pool: QuerySessionPool): + with pytest.raises(Exception): + pool.execute_with_retries("Is this the real life? Is this just fantasy?") + + def test_retry_op_uses_created_session(self, pool: QuerySessionPool): + def callee(session: QuerySessionSync): + assert session._state._state == QuerySessionStateEnum.CREATED + pool.retry_operation_sync(callee) + + def test_retry_op_normal(self, pool: QuerySessionPool): + def callee(session: QuerySessionSync): + with session.transaction() as tx: + iterator = tx.execute("select 1;", commit_tx=True) + return [result_set for result_set in iterator] + + res = pool.retry_operation_sync(callee) + assert len(res) == 1 + + def test_retry_op_raises(self, pool: QuerySessionPool): + def callee(session: QuerySessionSync): + res = session.execute("Caught in a landslide, no escape from reality") + for _ in res: + pass + + with pytest.raises(Exception): + pool.retry_operation_sync(callee) diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index a859326f..83724245 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -316,6 +316,7 @@ def _move_to_commited(self): if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): return self._tx_state._change_state(QueryTxStateEnum.COMMITTED) + self._tx_state.tx_id = None def execute( self, From aa76736f13daf7ae4ca5b7af9693d8e92e238219 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 24 Jul 2024 18:42:27 +0300 Subject: [PATCH 082/429] style fixes --- tests/query/conftest.py | 2 +- tests/query/test_query_session_pool.py | 1 + ydb/query/base.py | 4 ---- ydb/query/session.py | 4 ++-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/query/conftest.py b/tests/query/conftest.py index 113c1126..277aaeba 100644 --- a/tests/query/conftest.py +++ b/tests/query/conftest.py @@ -31,4 +31,4 @@ def tx(session): @pytest.fixture def pool(driver_sync): pool = QuerySessionPool(driver_sync) - yield pool \ No newline at end of file + yield pool diff --git a/tests/query/test_query_session_pool.py b/tests/query/test_query_session_pool.py index aee95446..069de7f1 100644 --- a/tests/query/test_query_session_pool.py +++ b/tests/query/test_query_session_pool.py @@ -26,6 +26,7 @@ def test_oneshot_query_raises(self, pool: QuerySessionPool): def test_retry_op_uses_created_session(self, pool: QuerySessionPool): def callee(session: QuerySessionSync): assert session._state._state == QuerySessionStateEnum.CREATED + pool.retry_operation_sync(callee) def test_retry_op_normal(self, pool: QuerySessionPool): diff --git a/ydb/query/base.py b/ydb/query/base.py index 9221da8e..e64871d5 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -202,10 +202,6 @@ def wrap_execute_query_response(rpc_state, response_pb, tx=None, commit_tx=False return convert.ResultSet.from_message(response_pb.result_set) -X_YDB_SERVER_HINTS = "x-ydb-server-hints" -X_YDB_SESSION_CLOSE = "session-close" - - def bad_session_handler(func): @functools.wraps(func) def decorator(rpc_state, response_pb, session_state, *args, **kwargs): diff --git a/ydb/query/session.py b/ydb/query/session.py index 8288aa57..83fd1795 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -198,13 +198,13 @@ def _attach(self): self._state._change_state(QuerySessionStateEnum.CREATED) threading.Thread( - target=self._chech_session_status_loop, + target=self._check_session_status_loop, args=(status_stream,), name="check session status thread", daemon=True, ).start() - def _chech_session_status_loop(self, status_stream): + def _check_session_status_loop(self, status_stream): try: for status in status_stream: if status.status != issues.StatusCode.SUCCESS: From 8f3b8afc303f2218c109e187a8776ac2ab755a65 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 25 Jul 2024 11:41:39 +0300 Subject: [PATCH 083/429] docstrings for base interfaces --- ydb/query/base.py | 139 ++++++++++++++++++++++++++++++++++++++----- ydb/query/pool.py | 4 ++ ydb/query/session.py | 41 +++++++++++++ 3 files changed, 169 insertions(+), 15 deletions(-) diff --git a/ydb/query/base.py b/ydb/query/base.py index e64871d5..8ed823d4 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -19,6 +19,20 @@ from .. import _utilities +class QuerySyntax(enum.IntEnum): + UNSPECIFIED = 0 + YQL_V1 = 1 + PG = 2 + + +class QueryExecMode(enum.IntEnum): + UNSPECIFIED = 0 + PARSE = 10 + VALIDATE = 20 + EXPLAIN = 30 + EXECUTE = 50 + + class QueryClientSettings: pass @@ -60,24 +74,60 @@ def set_attached(self, attached: bool) -> "IQuerySessionState": class IQuerySession(abc.ABC): + """Session object for Query Service. It is not recommended to control + session's lifecycle manually - use a QuerySessionPool is always a better choise. + """ + @abc.abstractmethod def __init__(self, driver: SupportedDriverType, settings: QueryClientSettings = None): pass @abc.abstractmethod def create(self) -> "IQuerySession": + """ + Creates a Session of Query Service on server side and attaches it. + + :return: Session object. + """ pass @abc.abstractmethod def delete(self) -> None: + """ + Deletes a Session of Query Service on server side and releases resources. + + :return: None + """ pass @abc.abstractmethod def transaction(self, tx_mode: BaseQueryTxMode) -> "IQueryTxContext": + """ + Creates a transaction context manager with specified transaction mode. + + :param tx_mode: Transaction mode, which is a one from the following choises: + 1) QuerySerializableReadWrite() which is default mode; + 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); + 3) QuerySnapshotReadOnly(); + 4) QueryStaleReadOnly(). + + :return: transaction context manager. + """ pass class IQueryTxContext(abc.ABC): + """ + An object that provides a simple transaction context manager that allows statements execution + in a transaction. You don't have to open transaction explicitly, because context manager encapsulates + transaction control logic, and opens new transaction if: + 1) By explicit .begin(); + 2) On execution of a first statement, which is strictly recommended method, because that avoids + useless round trip + + This context manager is not thread-safe, so you should not manipulate on it concurrently. + """ + @abc.abstractmethod def __init__( self, @@ -90,36 +140,109 @@ def __init__( @abc.abstractmethod def __enter__(self): + """ + Enters a context manager and returns a transaction + + :return: A transaction instance + """ pass @abc.abstractmethod def __exit__(self, *args, **kwargs): + """ + Closes a transaction context manager and rollbacks transaction if + it is not rolled back explicitly + """ pass @property @abc.abstractmethod def session_id(self): + """ + A transaction's session id + + :return: A transaction's session id + """ pass @property @abc.abstractmethod def tx_id(self): + """ + Returns a id of open transaction or None otherwise + + :return: A id of open transaction or None otherwise + """ pass @abc.abstractmethod def begin(settings: QueryClientSettings = None): + """ + Explicitly begins a transaction + + :param settings: A request settings + + :return: None + """ pass @abc.abstractmethod def commit(settings: QueryClientSettings = None): + """ + Calls commit on a transaction if it is open. If transaction execution + failed then this method raises PreconditionFailed. + + :param settings: A request settings + + :return: A committed transaction or exception if commit is failed + """ pass @abc.abstractmethod def rollback(settings: QueryClientSettings = None): + """ + Calls rollback on a transaction if it is open. If transaction execution + failed then this method raises PreconditionFailed. + + :param settings: A request settings + + :return: A rolled back transaction or exception if rollback is failed + """ pass @abc.abstractmethod - def execute(query: str, commit_tx=False): + def execute( + self, + query: str, + commit_tx: bool = False, + tx_mode: BaseQueryTxMode = None, + syntax: QuerySyntax = None, + exec_mode: QueryExecMode = None, + parameters: dict = None, + concurrent_result_sets: bool = False, + ): + """ + Sends a query to Query Service + :param query: (YQL or SQL text) to be executed. + :param commit_tx: A special flag that allows transaction commit. + :param tx_mode: Transaction mode, which is a one from the following choises: + 1) QuerySerializableReadWrite() which is default mode; + 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); + 3) QuerySnapshotReadOnly(); + 4) QueryStaleReadOnly(). + :param syntax: Syntax of the query, which is a one from the following choises: + 1) QuerySyntax.YQL_V1, which is default; + 2) QuerySyntax.PG. + :param exec_mode: Exec mode of the query, which is a one from the following choises: + 1) QueryExecMode.EXECUTE, which is default; + 2) QueryExecMode.EXPLAIN; + 3) QueryExecMode.VALIDATE; + 4) QueryExecMode.PARSE. + :param parameters: dict with parameters and YDB types; + :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; + + :return: Iterator with result sets + """ pass @@ -132,20 +255,6 @@ def session(self) -> IQuerySession: pass -class QuerySyntax(enum.IntEnum): - UNSPECIFIED = 0 - YQL_V1 = 1 - PG = 2 - - -class QueryExecMode(enum.IntEnum): - UNSPECIFIED = 0 - PARSE = 10 - VALIDATE = 20 - EXPLAIN = 30 - EXECUTE = 50 - - def create_execute_query_request( query: str, session_id: str, diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 7124c55e..0a3d6d0a 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -17,10 +17,12 @@ def __init__(self, driver: base.SupportedDriverType): """ :param driver: A driver instance """ + self._driver = driver def checkout(self): """Return a Session context manager, that opens session on enter and closes session on exit.""" + return SimpleQuerySessionCheckout(self) def retry_operation_sync(self, callee: Callable, retry_settings: RetrySettings = None, *args, **kwargs): @@ -31,6 +33,7 @@ def retry_operation_sync(self, callee: Callable, retry_settings: RetrySettings = :return: Result sets or exception in case of execution errors. """ + retry_settings = RetrySettings() if retry_settings is None else retry_settings def wrapped_callee(): @@ -47,6 +50,7 @@ def execute_with_retries(self, query: str, retry_settings: RetrySettings = None, :return: Result sets or exception in case of execution errors. """ + retry_settings = RetrySettings() if retry_settings is None else retry_settings with self.checkout() as session: diff --git a/ydb/query/session.py b/ydb/query/session.py index 83fd1795..5251595f 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -181,6 +181,10 @@ def _execute_call( class QuerySessionSync(BaseQuerySession): + """Session object for Query Service. It is not recommended to control + session's lifecycle manually - use a QuerySessionPool is always a better choise. + """ + _stream = None def _attach(self): @@ -214,6 +218,11 @@ def _check_session_status_loop(self, status_stream): pass def delete(self) -> None: + """ + Deletes a Session of Query Service on server side and releases resources. + + :return: None + """ if self._state._already_in(QuerySessionStateEnum.CLOSED): return @@ -222,6 +231,11 @@ def delete(self) -> None: self._stream.cancel() def create(self) -> "QuerySessionSync": + """ + Creates a Session of Query Service on server side and attaches it. + + :return: QuerySessionSync object. + """ if self._state._already_in(QuerySessionStateEnum.CREATED): return @@ -232,6 +246,17 @@ def create(self) -> "QuerySessionSync": return self def transaction(self, tx_mode: base.BaseQueryTxMode = None) -> base.IQueryTxContext: + """ + Creates a transaction context manager with specified transaction mode. + :param tx_mode: Transaction mode, which is a one from the following choises: + 1) QuerySerializableReadWrite() which is default mode; + 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); + 3) QuerySnapshotReadOnly(); + 4) QueryStaleReadOnly(). + + :return transaction context manager. + + """ self._state._check_session_ready_to_use() return BaseTxContext( @@ -251,6 +276,22 @@ def execute( concurrent_result_sets: bool = False, empty_tx_control: bool = False, ): + """ + Sends a query to Query Service + :param query: (YQL or SQL text) to be executed. + :param tx_mode: Transaction mode, which is a one from the following choises: + 1) QuerySerializableReadWrite() which is default mode; + 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); + 3) QuerySnapshotReadOnly(); + 4) QueryStaleReadOnly(). + :param syntax: Syntax of the query, which is a one from the following choises: + 1) QuerySyntax.YQL_V1, which is default; + 2) QuerySyntax.PG. + :param parameters: dict with parameters and YDB types; + :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; + + :return: Iterator with result sets + """ self._state._check_session_ready_to_use() stream_it = self._execute_call( From 24852f568e2de3219308ca1fe163b60a3644a7c7 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 25 Jul 2024 11:54:41 +0300 Subject: [PATCH 084/429] add logs about experimental api --- ydb/query/__init__.py | 5 +++++ ydb/query/pool.py | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ydb/query/__init__.py b/ydb/query/__init__.py index fbdfa7dd..923202db 100644 --- a/ydb/query/__init__.py +++ b/ydb/query/__init__.py @@ -7,6 +7,8 @@ "QueryClientSync", ] +import logging + from .base import ( IQueryClient, SupportedDriverType, @@ -24,9 +26,12 @@ from .pool import QuerySessionPool +logger = logging.getLogger(__name__) + class QueryClientSync(IQueryClient): def __init__(self, driver: SupportedDriverType, query_client_settings: QueryClientSettings = None): + logger.warning("QueryClientSync is an experimental API, which could be changed.") self._driver = driver self._settings = query_client_settings diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 0a3d6d0a..f76a60aa 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -1,3 +1,4 @@ +import logging from typing import Callable from . import base @@ -9,6 +10,8 @@ retry_operation_sync, ) +logger = logging.getLogger(__name__) + class QuerySessionPool: """QuerySessionPool is an object to simplify operations with sessions of Query Service.""" @@ -18,6 +21,7 @@ def __init__(self, driver: base.SupportedDriverType): :param driver: A driver instance """ + logger.warning("QuerySessionPool is an experimental API, which could be changed.") self._driver = driver def checkout(self): From b4eeb02f3f8f8bdd74f8b0e13d7226a3417c6efe Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 25 Jul 2024 12:51:44 +0300 Subject: [PATCH 085/429] fixes after review --- examples/query-service/basic_example.py | 42 ++++++++++++++----------- ydb/query/session.py | 2 +- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index d78f5c71..de2920c3 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -18,23 +18,23 @@ def main(): print("=" * 50) print("DELETE TABLE IF EXISTS") - pool.execute_with_retries("drop table if exists example;") + pool.execute_with_retries("drop table if exists example") print("=" * 50) print("CREATE TABLE") - pool.execute_with_retries("CREATE TABLE example(key UInt64, value String, PRIMARY KEY (key));") + pool.execute_with_retries("CREATE TABLE example(key UInt64, value String, PRIMARY KEY (key))") - pool.execute_with_retries("INSERT INTO example (key, value) VALUES (1, 'onepieceisreal');") + pool.execute_with_retries("INSERT INTO example (key, value) VALUES (1, 'onepieceisreal')") def callee(session): print("=" * 50) - for _ in session.execute("""delete from example;"""): + with session.execute("delete from example"): pass print("BEFORE ACTION") - it = session.execute("""SELECT COUNT(*) as rows_count FROM example;""") - for result_set in it: - print(f"rows: {str(result_set.rows)}") + with session.execute("SELECT COUNT(*) as rows_count FROM example") as results: + for result_set in results: + print(f"rows: {str(result_set.rows)}") print("=" * 50) print("INSERT WITH COMMIT TX") @@ -42,19 +42,20 @@ def callee(session): with session.transaction() as tx: tx.begin() - with tx.execute("""INSERT INTO example (key, value) VALUES (1, "onepieceisreal");""") as results: + with tx.execute("INSERT INTO example (key, value) VALUES (1, 'onepieceisreal')"): pass - with tx.execute("""SELECT COUNT(*) as rows_count FROM example;""") as results: + with tx.execute("SELECT COUNT(*) as rows_count FROM example") as results: for result_set in results: print(f"rows: {str(result_set.rows)}") tx.commit() - print("=" * 50) - print("AFTER COMMIT TX") + print("=" * 50) + print("AFTER COMMIT TX") - for result_set in session.execute("""SELECT COUNT(*) as rows_count FROM example;"""): + with session.execute("SELECT COUNT(*) as rows_count FROM example") as results: + for result_set in results: print(f"rows: {str(result_set.rows)}") print("=" * 50) @@ -63,18 +64,21 @@ def callee(session): with session.transaction() as tx: tx.begin() - tx.execute("""INSERT INTO example (key, value) VALUES (2, "onepieceisreal");""") + with tx.execute("INSERT INTO example (key, value) VALUES (2, 'onepieceisreal')"): + pass - for result_set in tx.execute("""SELECT COUNT(*) as rows_count FROM example;"""): - print(f"rows: {str(result_set.rows)}") + with tx.execute("SELECT COUNT(*) as rows_count FROM example") as results: + for result_set in results: + print(f"rows: {str(result_set.rows)}") tx.rollback() - print("=" * 50) - print("AFTER ROLLBACK TX") + print("=" * 50) + print("AFTER ROLLBACK TX") - for result_set in session.execute("""SELECT COUNT(*) as rows_count FROM example;"""): - print(f"rows: {str(result_set.rows)}") + with session.execute("SELECT COUNT(*) as rows_count FROM example") as results: + for result_set in results: + print(f"rows: {str(result_set.rows)}") pool.retry_operation_sync(callee) diff --git a/ydb/query/session.py b/ydb/query/session.py index 5251595f..aea69ddf 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -305,7 +305,7 @@ def execute( empty_tx_control=empty_tx_control, ) - return _utilities.SyncResponseIterator( + return base.SyncResponseContextIterator( stream_it, lambda resp: base.wrap_execute_query_response(rpc_state=None, response_pb=resp), ) From 6f980fee4485c2cd0df6c25b4fe6518e43dc8650 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 25 Jul 2024 13:50:23 +0300 Subject: [PATCH 086/429] fix review comments --- tests/query/test_query_session_pool.py | 9 ++++----- tests/query/test_query_transaction.py | 2 ++ ydb/query/base.py | 2 +- ydb/query/transaction.py | 21 ++++++++++++++++++++- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/tests/query/test_query_session_pool.py b/tests/query/test_query_session_pool.py index 069de7f1..eb237870 100644 --- a/tests/query/test_query_session_pool.py +++ b/tests/query/test_query_session_pool.py @@ -1,5 +1,5 @@ import pytest - +import ydb from ydb.query.pool import QuerySessionPool from ydb.query.session import QuerySessionSync, QuerySessionStateEnum @@ -20,7 +20,7 @@ def test_oneshot_ddl_query(self, pool: QuerySessionPool): pool.execute_with_retries("drop table Queen;") def test_oneshot_query_raises(self, pool: QuerySessionPool): - with pytest.raises(Exception): + with pytest.raises(ydb.GenericError): pool.execute_with_retries("Is this the real life? Is this just fantasy?") def test_retry_op_uses_created_session(self, pool: QuerySessionPool): @@ -40,9 +40,8 @@ def callee(session: QuerySessionSync): def test_retry_op_raises(self, pool: QuerySessionPool): def callee(session: QuerySessionSync): - res = session.execute("Caught in a landslide, no escape from reality") - for _ in res: + with session.execute("Caught in a landslide, no escape from reality"): pass - with pytest.raises(Exception): + with pytest.raises(ydb.GenericError): pool.retry_operation_sync(callee) diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 0f09f9b1..eafa412d 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -21,10 +21,12 @@ def test_tx_allow_double_rollback(self, tx: BaseTxContext): tx.rollback() tx.rollback() + @pytest.mark.skip(reason="Not sure should we keep this behavior or not") def test_tx_commit_raises_before_begin(self, tx: BaseTxContext): with pytest.raises(RuntimeError): tx.commit() + @pytest.mark.skip(reason="Not sure should we keep this behavior or not") def test_tx_rollback_raises_before_begin(self, tx: BaseTxContext): with pytest.raises(RuntimeError): tx.rollback() diff --git a/ydb/query/base.py b/ydb/query/base.py index 8ed823d4..e93aa56e 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -328,5 +328,5 @@ def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): - for _ in self.it: + for _ in self: pass diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 83724245..293b1d9c 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -25,7 +25,12 @@ class QueryTxStateEnum(enum.Enum): class QueryTxStateHelper(abc.ABC): _VALID_TRANSITIONS = { - QueryTxStateEnum.NOT_INITIALIZED: [QueryTxStateEnum.BEGINED, QueryTxStateEnum.DEAD], + QueryTxStateEnum.NOT_INITIALIZED: [ + QueryTxStateEnum.BEGINED, + QueryTxStateEnum.DEAD, + QueryTxStateEnum.COMMITTED, + QueryTxStateEnum.ROLLBACKED, + ], QueryTxStateEnum.BEGINED: [QueryTxStateEnum.COMMITTED, QueryTxStateEnum.ROLLBACKED, QueryTxStateEnum.DEAD], QueryTxStateEnum.COMMITTED: [], QueryTxStateEnum.ROLLBACKED: [], @@ -246,6 +251,13 @@ def commit(self, settings=None): if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): return self._ensure_prev_stream_finished() + + if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: + # TODO(vgvoleg): Discuss should we raise before begin or not + self._tx_state._change_state(QueryTxStateEnum.COMMITTED) + self._tx_state.tx_id = None + return + self._tx_state._check_invalid_transition(QueryTxStateEnum.COMMITTED) return self._driver( @@ -262,6 +274,13 @@ def rollback(self, settings=None): return self._ensure_prev_stream_finished() + + if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: + # TODO(vgvoleg): Discuss should we raise before begin or not + self._tx_state._change_state(QueryTxStateEnum.ROLLBACKED) + self._tx_state.tx_id = None + return + self._tx_state._check_invalid_transition(QueryTxStateEnum.ROLLBACKED) return self._driver( From c0b125a2fa406682f0ea6d0e119b46e3025de5e3 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 25 Jul 2024 17:25:56 +0300 Subject: [PATCH 087/429] review fixes --- tests/query/test_query_session_pool.py | 8 +++++--- tests/query/test_query_transaction.py | 21 +++++++++++---------- ydb/query/transaction.py | 2 -- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/tests/query/test_query_session_pool.py b/tests/query/test_query_session_pool.py index eb237870..3c66c613 100644 --- a/tests/query/test_query_session_pool.py +++ b/tests/query/test_query_session_pool.py @@ -39,9 +39,11 @@ def callee(session: QuerySessionSync): assert len(res) == 1 def test_retry_op_raises(self, pool: QuerySessionPool): + class CustomException(Exception): + pass + def callee(session: QuerySessionSync): - with session.execute("Caught in a landslide, no escape from reality"): - pass + raise CustomException() - with pytest.raises(ydb.GenericError): + with pytest.raises(CustomException): pool.retry_operation_sync(callee) diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index eafa412d..41f0f5b3 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -21,15 +21,13 @@ def test_tx_allow_double_rollback(self, tx: BaseTxContext): tx.rollback() tx.rollback() - @pytest.mark.skip(reason="Not sure should we keep this behavior or not") - def test_tx_commit_raises_before_begin(self, tx: BaseTxContext): - with pytest.raises(RuntimeError): - tx.commit() + def test_tx_commit_before_begin(self, tx: BaseTxContext): + tx.commit() + assert tx._tx_state._state == QueryTxStateEnum.COMMITTED - @pytest.mark.skip(reason="Not sure should we keep this behavior or not") - def test_tx_rollback_raises_before_begin(self, tx: BaseTxContext): - with pytest.raises(RuntimeError): - tx.rollback() + def test_tx_rollback_before_begin(self, tx: BaseTxContext): + tx.rollback() + assert tx._tx_state._state == QueryTxStateEnum.ROLLBACKED def test_tx_first_execute_begins_tx(self, tx: BaseTxContext): tx.execute("select 1;") @@ -67,9 +65,12 @@ def test_context_manager_normal_flow(self, tx: BaseTxContext): assert tx._tx_state._state == QueryTxStateEnum.COMMITTED def test_context_manager_does_not_hide_exceptions(self, tx: BaseTxContext): - with pytest.raises(Exception): + class CustomException(Exception): + pass + + with pytest.raises(CustomException): with tx: - raise Exception() + raise CustomException() def test_execute_as_context_manager(self, tx: BaseTxContext): tx.begin() diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 293b1d9c..970ac791 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -253,7 +253,6 @@ def commit(self, settings=None): self._ensure_prev_stream_finished() if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: - # TODO(vgvoleg): Discuss should we raise before begin or not self._tx_state._change_state(QueryTxStateEnum.COMMITTED) self._tx_state.tx_id = None return @@ -276,7 +275,6 @@ def rollback(self, settings=None): self._ensure_prev_stream_finished() if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: - # TODO(vgvoleg): Discuss should we raise before begin or not self._tx_state._change_state(QueryTxStateEnum.ROLLBACKED) self._tx_state.tx_id = None return From d0c9388ad8ce18d3b350c3cefa6cfff9cdd07546 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 26 Jul 2024 15:54:43 +0300 Subject: [PATCH 088/429] fix review --- tests/query/test_query_session.py | 10 ++ tests/query/test_query_transaction.py | 28 ++--- tox.ini | 1 + ydb/_grpc/grpcwrapper/ydb_query.py | 24 ++-- ydb/query/__init__.py | 1 + ydb/query/base.py | 137 ++++++++++++++------- ydb/query/pool.py | 21 ++-- ydb/query/session.py | 50 +++----- ydb/query/transaction.py | 171 +++++++++++++------------- ydb/table.py | 6 +- 10 files changed, 248 insertions(+), 201 deletions(-) diff --git a/tests/query/test_query_session.py b/tests/query/test_query_session.py index 402fc8bb..585c4c2b 100644 --- a/tests/query/test_query_session.py +++ b/tests/query/test_query_session.py @@ -89,3 +89,13 @@ def test_basic_execute(self, session: QuerySessionSync): assert len(result_sets[0].rows) == 1 assert len(result_sets[0].columns) == 1 assert list(result_sets[0].rows[0].values()) == [1] + + def test_two_results(self, session: QuerySessionSync): + session.create() + res = [] + with session.execute("select 1; select 2") as results: + for result_set in results: + if len(result_set.rows) > 0: + res.extend(list(result_set.rows[0].values())) + + assert res == [1, 2] diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 41f0f5b3..1c3fdda2 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -1,62 +1,62 @@ import pytest -from ydb.query.transaction import BaseTxContext +from ydb.query.transaction import BaseQueryTxContext from ydb.query.transaction import QueryTxStateEnum class TestQueryTransaction: - def test_tx_begin(self, tx: BaseTxContext): + def test_tx_begin(self, tx: BaseQueryTxContext): assert tx.tx_id is None tx.begin() assert tx.tx_id is not None - def test_tx_allow_double_commit(self, tx: BaseTxContext): + def test_tx_allow_double_commit(self, tx: BaseQueryTxContext): tx.begin() tx.commit() tx.commit() - def test_tx_allow_double_rollback(self, tx: BaseTxContext): + def test_tx_allow_double_rollback(self, tx: BaseQueryTxContext): tx.begin() tx.rollback() tx.rollback() - def test_tx_commit_before_begin(self, tx: BaseTxContext): + def test_tx_commit_before_begin(self, tx: BaseQueryTxContext): tx.commit() assert tx._tx_state._state == QueryTxStateEnum.COMMITTED - def test_tx_rollback_before_begin(self, tx: BaseTxContext): + def test_tx_rollback_before_begin(self, tx: BaseQueryTxContext): tx.rollback() assert tx._tx_state._state == QueryTxStateEnum.ROLLBACKED - def test_tx_first_execute_begins_tx(self, tx: BaseTxContext): + def test_tx_first_execute_begins_tx(self, tx: BaseQueryTxContext): tx.execute("select 1;") tx.commit() - def test_interactive_tx_commit(self, tx: BaseTxContext): + def test_interactive_tx_commit(self, tx: BaseQueryTxContext): tx.execute("select 1;", commit_tx=True) with pytest.raises(RuntimeError): tx.execute("select 1;") - def test_tx_execute_raises_after_commit(self, tx: BaseTxContext): + def test_tx_execute_raises_after_commit(self, tx: BaseQueryTxContext): tx.begin() tx.commit() with pytest.raises(RuntimeError): tx.execute("select 1;") - def test_tx_execute_raises_after_rollback(self, tx: BaseTxContext): + def test_tx_execute_raises_after_rollback(self, tx: BaseQueryTxContext): tx.begin() tx.rollback() with pytest.raises(RuntimeError): tx.execute("select 1;") - def test_context_manager_rollbacks_tx(self, tx: BaseTxContext): + def test_context_manager_rollbacks_tx(self, tx: BaseQueryTxContext): with tx: tx.begin() assert tx._tx_state._state == QueryTxStateEnum.ROLLBACKED - def test_context_manager_normal_flow(self, tx: BaseTxContext): + def test_context_manager_normal_flow(self, tx: BaseQueryTxContext): with tx: tx.begin() tx.execute("select 1;") @@ -64,7 +64,7 @@ def test_context_manager_normal_flow(self, tx: BaseTxContext): assert tx._tx_state._state == QueryTxStateEnum.COMMITTED - def test_context_manager_does_not_hide_exceptions(self, tx: BaseTxContext): + def test_context_manager_does_not_hide_exceptions(self, tx: BaseQueryTxContext): class CustomException(Exception): pass @@ -72,7 +72,7 @@ class CustomException(Exception): with tx: raise CustomException() - def test_execute_as_context_manager(self, tx: BaseTxContext): + def test_execute_as_context_manager(self, tx: BaseQueryTxContext): tx.begin() with tx.execute("select 1;") as results: diff --git a/tox.ini b/tox.ini index 7aca13db..8b5c06ae 100644 --- a/tox.ini +++ b/tox.ini @@ -75,6 +75,7 @@ builtins = _ max-line-length = 160 ignore=E203,W503 exclude=*_pb2.py,*_grpc.py,.venv,.git,.tox,dist,doc,*egg,ydb/public/api/protos/*,docs/*,ydb/public/api/grpc/*,persqueue/*,client/*,dbapi/*,ydb/default_pem.py,*docs/conf.py +per-file-ignores = ydb/table.py:F401 [pytest] asyncio_mode = auto diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index 343ef8b8..befb02c7 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -21,7 +21,7 @@ @dataclass class CreateSessionResponse(IFromProto): - status: Optional[ServerStatus] + status: ServerStatus session_id: str node_id: int @@ -36,7 +36,7 @@ def from_proto(msg: ydb_query_pb2.CreateSessionResponse) -> "CreateSessionRespon @dataclass class DeleteSessionResponse(IFromProto): - status: Optional[ServerStatus] + status: ServerStatus @staticmethod def from_proto(msg: ydb_query_pb2.DeleteSessionResponse) -> "DeleteSessionResponse": @@ -129,10 +129,10 @@ def from_proto(msg: ydb_query_pb2.RollbackTransactionResponse) -> "RollbackTrans @dataclass class QueryContent(IFromPublic, IToProto): text: str - syntax: Optional[int] = None + syntax: int @staticmethod - def from_public(query: str, syntax: int = None) -> "QueryContent": + def from_public(query: str, syntax: int) -> "QueryContent": return QueryContent(text=query, syntax=syntax) def to_proto(self) -> ydb_query_pb2.QueryContent: @@ -141,9 +141,9 @@ def to_proto(self) -> ydb_query_pb2.QueryContent: @dataclass class TransactionControl(IToProto): - begin_tx: Optional[TransactionSettings] = None - commit_tx: Optional[bool] = None - tx_id: Optional[str] = None + begin_tx: Optional[TransactionSettings] + commit_tx: Optional[bool] + tx_id: Optional[str] def to_proto(self) -> ydb_query_pb2.TransactionControl: if self.tx_id: @@ -161,11 +161,11 @@ def to_proto(self) -> ydb_query_pb2.TransactionControl: class ExecuteQueryRequest(IToProto): session_id: str query_content: QueryContent - tx_control: Optional[TransactionControl] = None - concurrent_result_sets: Optional[bool] = False - exec_mode: Optional[int] = None - parameters: Optional[dict] = None - stats_mode: Optional[int] = None + tx_control: TransactionControl + concurrent_result_sets: bool + exec_mode: int + parameters: dict + stats_mode: int def to_proto(self) -> ydb_query_pb2.ExecuteQueryRequest: tx_control = self.tx_control.to_proto() if self.tx_control is not None else self.tx_control diff --git a/ydb/query/__init__.py b/ydb/query/__init__.py index 923202db..eb967abc 100644 --- a/ydb/query/__init__.py +++ b/ydb/query/__init__.py @@ -5,6 +5,7 @@ "QueryStaleReadOnly", "QuerySessionPool", "QueryClientSync", + "QuerySessionSync", ] import logging diff --git a/ydb/query/base.py b/ydb/query/base.py index e93aa56e..9947e5f2 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -3,6 +3,7 @@ import functools from typing import ( + Iterator, Optional, ) @@ -12,7 +13,6 @@ from .._grpc.grpcwrapper import ydb_query from .._grpc.grpcwrapper.ydb_query_public_types import ( BaseQueryTxMode, - QuerySerializableReadWrite, ) from .. import convert from .. import issues @@ -33,12 +33,29 @@ class QueryExecMode(enum.IntEnum): EXECUTE = 50 +class StatsMode(enum.IntEnum): + UNSPECIFIED = 0 + NONE = 10 + BASIC = 20 + FULL = 30 + PROFILE = 40 + + +class SyncResponseContextIterator(_utilities.SyncResponseIterator): + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + for _ in self: + pass + + class QueryClientSettings: pass class IQuerySessionState(abc.ABC): - def __init__(self, settings: QueryClientSettings = None): + def __init__(self, settings: Optional[QueryClientSettings] = None): pass @abc.abstractmethod @@ -79,7 +96,7 @@ class IQuerySession(abc.ABC): """ @abc.abstractmethod - def __init__(self, driver: SupportedDriverType, settings: QueryClientSettings = None): + def __init__(self, driver: SupportedDriverType, settings: Optional[QueryClientSettings] = None): pass @abc.abstractmethod @@ -101,7 +118,7 @@ def delete(self) -> None: pass @abc.abstractmethod - def transaction(self, tx_mode: BaseQueryTxMode) -> "IQueryTxContext": + def transaction(self, tx_mode: Optional[BaseQueryTxMode] = None) -> "IQueryTxContext": """ Creates a transaction context manager with specified transaction mode. @@ -115,6 +132,27 @@ def transaction(self, tx_mode: BaseQueryTxMode) -> "IQueryTxContext": """ pass + @abc.abstractmethod + def execute( + self, + query: str, + syntax: Optional[QuerySyntax] = None, + exec_mode: Optional[QueryExecMode] = None, + parameters: Optional[dict] = None, + concurrent_result_sets: Optional[bool] = False, + ) -> Iterator: + """ + Sends a query to Query Service + :param query: (YQL or SQL text) to be executed. + :param syntax: Syntax of the query, which is a one from the following choises: + 1) QuerySyntax.YQL_V1, which is default; + 2) QuerySyntax.PG. + :param parameters: dict with parameters and YDB types; + :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; + + :return: Iterator with result sets + """ + class IQueryTxContext(abc.ABC): """ @@ -134,12 +172,30 @@ def __init__( driver: SupportedDriverType, session_state: IQuerySessionState, session: IQuerySession, - tx_mode: BaseQueryTxMode = None, + tx_mode: BaseQueryTxMode, ): + """ + An object that provides a simple transaction context manager that allows statements execution + in a transaction. You don't have to open transaction explicitly, because context manager encapsulates + transaction control logic, and opens new transaction if: + + 1) By explicit .begin() method; + 2) On execution of a first statement, which is strictly recommended method, because that avoids useless round trip + + This context manager is not thread-safe, so you should not manipulate on it concurrently. + + :param driver: A driver instance + :param session_state: A state of session + :param tx_mode: Transaction mode, which is a one from the following choises: + 1) QuerySerializableReadWrite() which is default mode; + 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); + 3) QuerySnapshotReadOnly(); + 4) QueryStaleReadOnly(). + """ pass @abc.abstractmethod - def __enter__(self): + def __enter__(self) -> "IQueryTxContext": """ Enters a context manager and returns a transaction @@ -151,13 +207,13 @@ def __enter__(self): def __exit__(self, *args, **kwargs): """ Closes a transaction context manager and rollbacks transaction if - it is not rolled back explicitly + it is not finished explicitly """ pass @property @abc.abstractmethod - def session_id(self): + def session_id(self) -> str: """ A transaction's session id @@ -167,7 +223,7 @@ def session_id(self): @property @abc.abstractmethod - def tx_id(self): + def tx_id(self) -> Optional[str]: """ Returns a id of open transaction or None otherwise @@ -176,37 +232,37 @@ def tx_id(self): pass @abc.abstractmethod - def begin(settings: QueryClientSettings = None): + def begin(self, settings: Optional[QueryClientSettings] = None) -> None: """ Explicitly begins a transaction :param settings: A request settings - :return: None + :return: None or exception if begin is failed """ pass @abc.abstractmethod - def commit(settings: QueryClientSettings = None): + def commit(self, settings: Optional[QueryClientSettings] = None) -> None: """ Calls commit on a transaction if it is open. If transaction execution failed then this method raises PreconditionFailed. :param settings: A request settings - :return: A committed transaction or exception if commit is failed + :return: None or exception if commit is failed """ pass @abc.abstractmethod - def rollback(settings: QueryClientSettings = None): + def rollback(self, settings: Optional[QueryClientSettings] = None) -> None: """ Calls rollback on a transaction if it is open. If transaction execution failed then this method raises PreconditionFailed. :param settings: A request settings - :return: A rolled back transaction or exception if rollback is failed + :return: None or exception if rollback is failed """ pass @@ -214,22 +270,16 @@ def rollback(settings: QueryClientSettings = None): def execute( self, query: str, - commit_tx: bool = False, - tx_mode: BaseQueryTxMode = None, - syntax: QuerySyntax = None, - exec_mode: QueryExecMode = None, - parameters: dict = None, - concurrent_result_sets: bool = False, - ): + commit_tx: Optional[bool] = False, + syntax: Optional[QuerySyntax] = None, + exec_mode: Optional[QueryExecMode] = None, + parameters: Optional[dict] = None, + concurrent_result_sets: Optional[bool] = False, + ) -> Iterator: """ Sends a query to Query Service :param query: (YQL or SQL text) to be executed. :param commit_tx: A special flag that allows transaction commit. - :param tx_mode: Transaction mode, which is a one from the following choises: - 1) QuerySerializableReadWrite() which is default mode; - 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); - 3) QuerySnapshotReadOnly(); - 4) QueryStaleReadOnly(). :param syntax: Syntax of the query, which is a one from the following choises: 1) QuerySyntax.YQL_V1, which is default; 2) QuerySyntax.PG. @@ -247,7 +297,7 @@ def execute( class IQueryClient(abc.ABC): - def __init__(self, driver: SupportedDriverType, query_client_settings: QueryClientSettings = None): + def __init__(self, driver: SupportedDriverType, query_client_settings: Optional[QueryClientSettings] = None): pass @abc.abstractmethod @@ -258,33 +308,34 @@ def session(self) -> IQuerySession: def create_execute_query_request( query: str, session_id: str, - tx_id: str = None, - commit_tx: bool = False, - tx_mode: BaseQueryTxMode = None, - syntax: QuerySyntax = None, - exec_mode: QueryExecMode = None, - parameters: dict = None, - concurrent_result_sets: bool = False, - empty_tx_control: bool = False, + tx_id: Optional[str], + commit_tx: Optional[bool], + tx_mode: Optional[BaseQueryTxMode], + syntax: Optional[QuerySyntax], + exec_mode: Optional[QueryExecMode], + parameters: Optional[dict], + concurrent_result_sets: Optional[bool], ): syntax = QuerySyntax.YQL_V1 if not syntax else syntax exec_mode = QueryExecMode.EXECUTE if not exec_mode else exec_mode + stats_mode = StatsMode.NONE # TODO: choise is not supported yet tx_control = None - if empty_tx_control: + if not tx_id and not tx_mode: tx_control = None elif tx_id: tx_control = ydb_query.TransactionControl( tx_id=tx_id, commit_tx=commit_tx, + begin_tx=None, ) else: - tx_mode = tx_mode if tx_mode is not None else QuerySerializableReadWrite() tx_control = ydb_query.TransactionControl( begin_tx=ydb_query.TransactionSettings( tx_mode=tx_mode, ), commit_tx=commit_tx, + tx_id=None, ) req = ydb_query.ExecuteQueryRequest( @@ -297,6 +348,7 @@ def create_execute_query_request( exec_mode=exec_mode, parameters=parameters, concurrent_result_sets=concurrent_result_sets, + stats_mode=stats_mode, ) return req.to_proto() @@ -321,12 +373,3 @@ def decorator(rpc_state, response_pb, session_state, *args, **kwargs): raise return decorator - - -class SyncResponseContextIterator(_utilities.SyncResponseIterator): - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_val, exc_tb): - for _ in self: - pass diff --git a/ydb/query/pool.py b/ydb/query/pool.py index f76a60aa..eef084f9 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -1,5 +1,8 @@ import logging -from typing import Callable +from typing import ( + Callable, + Optional, +) from . import base from .session import ( @@ -24,12 +27,12 @@ def __init__(self, driver: base.SupportedDriverType): logger.warning("QuerySessionPool is an experimental API, which could be changed.") self._driver = driver - def checkout(self): + def checkout(self) -> "SimpleQuerySessionCheckout": """Return a Session context manager, that opens session on enter and closes session on exit.""" return SimpleQuerySessionCheckout(self) - def retry_operation_sync(self, callee: Callable, retry_settings: RetrySettings = None, *args, **kwargs): + def retry_operation_sync(self, callee: Callable, retry_settings: Optional[RetrySettings] = None, *args, **kwargs): """Special interface to execute a bunch of commands with session in a safe, retriable way. :param callee: A function, that works with session. @@ -46,7 +49,7 @@ def wrapped_callee(): return retry_operation_sync(wrapped_callee, retry_settings) - def execute_with_retries(self, query: str, retry_settings: RetrySettings = None, *args, **kwargs): + def execute_with_retries(self, query: str, retry_settings: Optional[RetrySettings] = None, *args, **kwargs): """Special interface to execute a one-shot queries in a safe, retriable way. :param query: A query, yql or sql text. @@ -56,13 +59,13 @@ def execute_with_retries(self, query: str, retry_settings: RetrySettings = None, """ retry_settings = RetrySettings() if retry_settings is None else retry_settings - with self.checkout() as session: - def wrapped_callee(): - it = session.execute(query, empty_tx_control=True, *args, **kwargs) + def wrapped_callee(): + with self.checkout() as session: + it = session.execute(query, *args, **kwargs) return [result_set for result_set in it] - return retry_operation_sync(wrapped_callee, retry_settings) + return retry_operation_sync(wrapped_callee, retry_settings) class SimpleQuerySessionCheckout: @@ -70,7 +73,7 @@ def __init__(self, pool: QuerySessionPool): self._pool = pool self._session = QuerySessionSync(pool._driver) - def __enter__(self): + def __enter__(self) -> base.IQuerySession: self._session.create() return self._session diff --git a/ydb/query/session.py b/ydb/query/session.py index aea69ddf..f5e74331 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -11,8 +11,9 @@ from .. import _apis, issues, _utilities from .._grpc.grpcwrapper import common_utils from .._grpc.grpcwrapper import ydb_query as _ydb_query +from .._grpc.grpcwrapper import ydb_query_public_types as _ydb_query_public -from .transaction import BaseTxContext +from .transaction import BaseQueryTxContext logger = logging.getLogger(__name__) @@ -45,16 +46,14 @@ def ready_to_use(cls, state: QuerySessionStateEnum) -> bool: class QuerySessionState(base.IQuerySessionState): - _session_id: Optional[str] - _node_id: Optional[int] + _session_id: Optional[str] = None + _node_id: Optional[int] = None _attached: bool = False - _settings: Optional[base.QueryClientSettings] - _state: QuerySessionStateEnum + _settings: Optional[base.QueryClientSettings] = None + _state: QuerySessionStateEnum = QuerySessionStateEnum.NOT_INITIALIZED def __init__(self, settings: base.QueryClientSettings = None): self._settings = settings - self._state = QuerySessionStateEnum.NOT_INITIALIZED - self.reset() def reset(self) -> None: self._session_id = None @@ -84,19 +83,19 @@ def attached(self) -> bool: def set_attached(self, attached: bool) -> "QuerySessionState": self._attached = attached - def _check_invalid_transition(self, target: QuerySessionStateEnum): + def _check_invalid_transition(self, target: QuerySessionStateEnum) -> None: if not QuerySessionStateHelper.valid_transition(self._state, target): raise RuntimeError(f"Session could not be moved from {self._state.value} to {target.value}") - def _change_state(self, target: QuerySessionStateEnum): + def _change_state(self, target: QuerySessionStateEnum) -> None: self._check_invalid_transition(target) self._state = target - def _check_session_ready_to_use(self): + def _check_session_ready_to_use(self) -> None: if not QuerySessionStateHelper.ready_to_use(self._state): raise RuntimeError(f"Session is not ready to use, current state: {self._state.value}") - def _already_in(self, target): + def _already_in(self, target) -> bool: return self._state == target @@ -117,12 +116,12 @@ def wrapper_delete_session(rpc_state, response_pb, session_state: QuerySessionSt class BaseQuerySession(base.IQuerySession): _driver: base.SupportedDriverType - _settings: Optional[base.QueryClientSettings] + _settings: base.QueryClientSettings _state: QuerySessionState - def __init__(self, driver: base.SupportedDriverType, settings: base.QueryClientSettings = None): + def __init__(self, driver: base.SupportedDriverType, settings: Optional[base.QueryClientSettings] = None): self._driver = driver - self._settings = settings + self._settings = settings if settings is not None else base.QueryClientSettings() self._state = QuerySessionState(settings) def _create_call(self): @@ -154,23 +153,21 @@ def _execute_call( self, query: str, commit_tx: bool = False, - tx_mode: base.BaseQueryTxMode = None, syntax: base.QuerySyntax = None, exec_mode: base.QueryExecMode = None, parameters: dict = None, concurrent_result_sets: bool = False, - empty_tx_control: bool = False, ): request = base.create_execute_query_request( query=query, session_id=self._state.session_id, commit_tx=commit_tx, - tx_mode=tx_mode, + tx_mode=None, + tx_id=None, syntax=syntax, exec_mode=exec_mode, parameters=parameters, concurrent_result_sets=concurrent_result_sets, - empty_tx_control=empty_tx_control, ) return self._driver( @@ -245,7 +242,7 @@ def create(self) -> "QuerySessionSync": return self - def transaction(self, tx_mode: base.BaseQueryTxMode = None) -> base.IQueryTxContext: + def transaction(self, tx_mode: Optional[base.BaseQueryTxMode] = None) -> base.IQueryTxContext: """ Creates a transaction context manager with specified transaction mode. :param tx_mode: Transaction mode, which is a one from the following choises: @@ -259,7 +256,9 @@ def transaction(self, tx_mode: base.BaseQueryTxMode = None) -> base.IQueryTxCont """ self._state._check_session_ready_to_use() - return BaseTxContext( + tx_mode = tx_mode if tx_mode else _ydb_query_public.QuerySerializableReadWrite() + + return BaseQueryTxContext( self._driver, self._state, self, @@ -269,21 +268,14 @@ def transaction(self, tx_mode: base.BaseQueryTxMode = None) -> base.IQueryTxCont def execute( self, query: str, - tx_mode: base.BaseQueryTxMode = None, syntax: base.QuerySyntax = None, exec_mode: base.QueryExecMode = None, parameters: dict = None, concurrent_result_sets: bool = False, - empty_tx_control: bool = False, - ): + ) -> base.SyncResponseContextIterator: """ Sends a query to Query Service :param query: (YQL or SQL text) to be executed. - :param tx_mode: Transaction mode, which is a one from the following choises: - 1) QuerySerializableReadWrite() which is default mode; - 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); - 3) QuerySnapshotReadOnly(); - 4) QueryStaleReadOnly(). :param syntax: Syntax of the query, which is a one from the following choises: 1) QuerySyntax.YQL_V1, which is default; 2) QuerySyntax.PG. @@ -297,12 +289,10 @@ def execute( stream_it = self._execute_call( query=query, commit_tx=True, - tx_mode=tx_mode, syntax=syntax, exec_mode=exec_mode, parameters=parameters, concurrent_result_sets=concurrent_result_sets, - empty_tx_control=empty_tx_control, ) return base.SyncResponseContextIterator( diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 970ac791..0ae770be 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -2,13 +2,15 @@ import logging import enum import functools +from typing import ( + Optional, +) from .. import ( _apis, issues, ) from .._grpc.grpcwrapper import ydb_query as _ydb_query -from .._grpc.grpcwrapper import ydb_query_public_types as _ydb_query_public from . import base @@ -37,19 +39,13 @@ class QueryTxStateHelper(abc.ABC): QueryTxStateEnum.DEAD: [], } - _TERMINAL_STATES = [ - QueryTxStateEnum.COMMITTED, - QueryTxStateEnum.ROLLBACKED, - QueryTxStateEnum.DEAD, - ] - @classmethod def valid_transition(cls, before: QueryTxStateEnum, after: QueryTxStateEnum) -> bool: return after in cls._VALID_TRANSITIONS[before] @classmethod def terminal(cls, state: QueryTxStateEnum) -> bool: - return state in cls._TERMINAL_STATES + return len(cls._VALID_TRANSITIONS[state]) == 0 def reset_tx_id_handler(func): @@ -75,19 +71,19 @@ def __init__(self, tx_mode: base.BaseQueryTxMode): self.tx_mode = tx_mode self._state = QueryTxStateEnum.NOT_INITIALIZED - def _check_invalid_transition(self, target: QueryTxStateEnum): + def _check_invalid_transition(self, target: QueryTxStateEnum) -> None: if not QueryTxStateHelper.valid_transition(self._state, target): raise RuntimeError(f"Transaction could not be moved from {self._state.value} to {target.value}") - def _change_state(self, target: QueryTxStateEnum): + def _change_state(self, target: QueryTxStateEnum) -> None: self._check_invalid_transition(target) self._state = target - def _check_tx_not_terminal(self): + def _check_tx_not_terminal(self) -> None: if QueryTxStateHelper.terminal(self._state): raise RuntimeError(f"Transaction is in terminal state: {self._state.value}") - def _already_in(self, target: QueryTxStateEnum): + def _already_in(self, target: QueryTxStateEnum) -> bool: return self._state == target @@ -132,7 +128,6 @@ def wrap_tx_begin_response(rpc_state, response_pb, session_state, tx_state, tx): def wrap_tx_commit_response(rpc_state, response_pb, session_state, tx_state, tx): message = _ydb_query.CommitTransactionResponse.from_proto(response_pb) issues._process_response(message.status) - tx_state.tx_id = None tx_state._change_state(QueryTxStateEnum.COMMITTED) return tx @@ -142,54 +137,52 @@ def wrap_tx_commit_response(rpc_state, response_pb, session_state, tx_state, tx) def wrap_tx_rollback_response(rpc_state, response_pb, session_state, tx_state, tx): message = _ydb_query.RollbackTransactionResponse.from_proto(response_pb) issues._process_response(message.status) - tx_state.tx_id = None tx_state._change_state(QueryTxStateEnum.ROLLBACKED) return tx -class BaseTxContext(base.IQueryTxContext): - def __init__(self, driver, session_state, session, tx_mode=None): +class BaseQueryTxContext(base.IQueryTxContext): + def __init__(self, driver, session_state, session, tx_mode): """ An object that provides a simple transaction context manager that allows statements execution in a transaction. You don't have to open transaction explicitly, because context manager encapsulates transaction control logic, and opens new transaction if: - 1) By explicit .begin() and .async_begin() methods; + 1) By explicit .begin() method; 2) On execution of a first statement, which is strictly recommended method, because that avoids useless round trip This context manager is not thread-safe, so you should not manipulate on it concurrently. :param driver: A driver instance :param session_state: A state of session - :param tx_mode: A transaction mode, which is a one from the following choices: - 1) SerializableReadWrite() which is default mode; - 2) OnlineReadOnly(); - 3) StaleReadOnly(). + :param tx_mode: Transaction mode, which is a one from the following choises: + 1) QuerySerializableReadWrite() which is default mode; + 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); + 3) QuerySnapshotReadOnly(); + 4) QueryStaleReadOnly(). """ + self._driver = driver - if tx_mode is None: - tx_mode = _ydb_query_public.QuerySerializableReadWrite() self._tx_state = QueryTxState(tx_mode) self._session_state = session_state self.session = session - self._finished = "" self._prev_stream = None - def __enter__(self): + def __enter__(self) -> "BaseQueryTxContext": """ - Enters a context manager and returns a session + Enters a context manager and returns a transaction - :return: A session instance + :return: A transaction instance """ return self def __exit__(self, *args, **kwargs): """ Closes a transaction context manager and rollbacks transaction if - it is not rolled back explicitly + it is not finished explicitly """ self._ensure_prev_stream_finished() - if self._tx_state.tx_id is not None: + if self._tx_state._state == QueryTxStateEnum.BEGINED: # It's strictly recommended to close transactions directly # by using commit_tx=True flag while executing statement or by # .commit() or .rollback() methods, but here we trying to do best @@ -200,10 +193,8 @@ def __exit__(self, *args, **kwargs): except issues.Error: logger.warning("Failed to rollback leaked tx: %s", self._tx_state.tx_id) - self._tx_state.tx_id = None - @property - def session_id(self): + def session_id(self) -> str: """ A transaction's session id @@ -212,7 +203,7 @@ def session_id(self): return self._session_state.session_id @property - def tx_id(self): + def tx_id(self) -> Optional[str]: """ Returns a id of open transaction or None otherwise @@ -220,16 +211,7 @@ def tx_id(self): """ return self._tx_state.tx_id - def begin(self, settings=None): - """ - Explicitly begins a transaction - - :param settings: A request settings - - :return: An open transaction - """ - self._tx_state._check_invalid_transition(QueryTxStateEnum.BEGINED) - + def _begin_call(self, settings: Optional[base.QueryClientSettings]): return self._driver( _create_begin_transaction_request(self._session_state, self._tx_state), _apis.QueryService.Stub, @@ -239,26 +221,7 @@ def begin(self, settings=None): (self._session_state, self._tx_state, self), ) - def commit(self, settings=None): - """ - Calls commit on a transaction if it is open otherwise is no-op. If transaction execution - failed then this method raises PreconditionFailed. - - :param settings: A request settings - - :return: A committed transaction or exception if commit is failed - """ - if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): - return - self._ensure_prev_stream_finished() - - if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: - self._tx_state._change_state(QueryTxStateEnum.COMMITTED) - self._tx_state.tx_id = None - return - - self._tx_state._check_invalid_transition(QueryTxStateEnum.COMMITTED) - + def _commit_call(self, settings: Optional[base.QueryClientSettings]): return self._driver( _create_commit_transaction_request(self._session_state, self._tx_state), _apis.QueryService.Stub, @@ -268,19 +231,7 @@ def commit(self, settings=None): (self._session_state, self._tx_state, self), ) - def rollback(self, settings=None): - if self._tx_state._already_in(QueryTxStateEnum.ROLLBACKED): - return - - self._ensure_prev_stream_finished() - - if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: - self._tx_state._change_state(QueryTxStateEnum.ROLLBACKED) - self._tx_state.tx_id = None - return - - self._tx_state._check_invalid_transition(QueryTxStateEnum.ROLLBACKED) - + def _rollback_call(self, settings: Optional[base.QueryClientSettings]): return self._driver( _create_rollback_transaction_request(self._session_state, self._tx_state), _apis.QueryService.Stub, @@ -294,7 +245,6 @@ def _execute_call( self, query: str, commit_tx: bool = False, - tx_mode: base.BaseQueryTxMode = None, syntax: base.QuerySyntax = None, exec_mode: base.QueryExecMode = None, parameters: dict = None, @@ -305,7 +255,7 @@ def _execute_call( session_id=self._session_state.session_id, commit_tx=commit_tx, tx_id=self._tx_state.tx_id, - tx_mode=tx_mode, + tx_mode=self._tx_state.tx_mode, syntax=syntax, exec_mode=exec_mode, parameters=parameters, @@ -325,7 +275,7 @@ def _ensure_prev_stream_finished(self): self._prev_stream = None def _handle_tx_meta(self, tx_meta=None): - if not self.tx_id: + if not self.tx_id and tx_meta: self._tx_state._change_state(QueryTxStateEnum.BEGINED) self._tx_state.tx_id = tx_meta.id @@ -333,25 +283,70 @@ def _move_to_commited(self): if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): return self._tx_state._change_state(QueryTxStateEnum.COMMITTED) - self._tx_state.tx_id = None + + def begin(self, settings: Optional[base.QueryClientSettings] = None) -> None: + """ + Explicitly begins a transaction + + :param settings: A request settings + + :return: None or exception if begin is failed + """ + self._tx_state._check_invalid_transition(QueryTxStateEnum.BEGINED) + + self._begin_call(settings) + + def commit(self, settings: Optional[base.QueryClientSettings] = None) -> None: + """ + Calls commit on a transaction if it is open otherwise is no-op. If transaction execution + failed then this method raises PreconditionFailed. + + :param settings: A request settings + + :return: A committed transaction or exception if commit is failed + """ + if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): + return + self._ensure_prev_stream_finished() + + if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: + self._tx_state._change_state(QueryTxStateEnum.COMMITTED) + return + + self._tx_state._check_invalid_transition(QueryTxStateEnum.COMMITTED) + + self._commit_call(settings) + + def rollback(self, settings: Optional[base.QueryClientSettings] = None) -> None: + if self._tx_state._already_in(QueryTxStateEnum.ROLLBACKED): + return + + self._ensure_prev_stream_finished() + + if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: + self._tx_state._change_state(QueryTxStateEnum.ROLLBACKED) + return + + self._tx_state._check_invalid_transition(QueryTxStateEnum.ROLLBACKED) + + self._rollback_call(settings) def execute( self, query: str, - commit_tx: bool = False, - tx_mode: base.BaseQueryTxMode = None, - syntax: base.QuerySyntax = None, - exec_mode: base.QueryExecMode = None, - parameters: dict = None, - concurrent_result_sets: bool = False, - ): + commit_tx: Optional[bool] = False, + syntax: Optional[base.QuerySyntax] = None, + exec_mode: Optional[base.QueryExecMode] = None, + parameters: Optional[dict] = None, + concurrent_result_sets: Optional[bool] = False, + ) -> base.SyncResponseContextIterator: + self._ensure_prev_stream_finished() self._tx_state._check_tx_not_terminal() stream_it = self._execute_call( query=query, commit_tx=commit_tx, - tx_mode=tx_mode, syntax=syntax, exec_mode=exec_mode, parameters=parameters, diff --git a/ydb/table.py b/ydb/table.py index 12856d61..ac9f9304 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -20,8 +20,12 @@ ) from .retries import ( - retry_operation_sync, + YdbRetryOperationFinalResult, # noqa + YdbRetryOperationSleepOpt, # noqa + BackoffSettings, # noqa + retry_operation_impl, # noqa RetrySettings, + retry_operation_sync, ) try: From 2d8a2ff5b1b352076aab2e31ee984a90483994fe Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 26 Jul 2024 17:09:37 +0300 Subject: [PATCH 089/429] style fixes --- ydb/query/base.py | 21 ++++++++----- ydb/query/session.py | 30 +++++++++++++------ ydb/query/transaction.py | 65 ++++++++++++++++++++++++++++------------ 3 files changed, 80 insertions(+), 36 deletions(-) diff --git a/ydb/query/base.py b/ydb/query/base.py index 9947e5f2..9fe6c21b 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -14,9 +14,11 @@ from .._grpc.grpcwrapper.ydb_query_public_types import ( BaseQueryTxMode, ) +from ..connection import _RpcState as RpcState from .. import convert from .. import issues from .. import _utilities +from .. import _apis class QuerySyntax(enum.IntEnum): @@ -42,7 +44,7 @@ class StatsMode(enum.IntEnum): class SyncResponseContextIterator(_utilities.SyncResponseIterator): - def __enter__(self): + def __enter__(self) -> "SyncResponseContextIterator": return self def __exit__(self, exc_type, exc_val, exc_tb): @@ -315,7 +317,7 @@ def create_execute_query_request( exec_mode: Optional[QueryExecMode], parameters: Optional[dict], concurrent_result_sets: Optional[bool], -): +) -> ydb_query.ExecuteQueryRequest: syntax = QuerySyntax.YQL_V1 if not syntax else syntax exec_mode = QueryExecMode.EXECUTE if not exec_mode else exec_mode stats_mode = StatsMode.NONE # TODO: choise is not supported yet @@ -338,7 +340,7 @@ def create_execute_query_request( tx_id=None, ) - req = ydb_query.ExecuteQueryRequest( + return ydb_query.ExecuteQueryRequest( session_id=session_id, query_content=ydb_query.QueryContent.from_public( query=query, @@ -351,13 +353,16 @@ def create_execute_query_request( stats_mode=stats_mode, ) - return req.to_proto() - -def wrap_execute_query_response(rpc_state, response_pb, tx=None, commit_tx=False): +def wrap_execute_query_response( + rpc_state: RpcState, + response_pb: _apis.ydb_query.ExecuteQueryResponsePart, + tx: Optional[IQueryTxContext] = None, + commit_tx: Optional[bool] = False, +) -> convert.ResultSet: issues._process_response(response_pb) if tx and response_pb.tx_meta and not tx.tx_id: - tx._handle_tx_meta(response_pb.tx_meta) + tx._move_to_beginned(response_pb.tx_meta.id) if tx and commit_tx: tx._move_to_commited() return convert.ResultSet.from_message(response_pb.result_set) @@ -365,7 +370,7 @@ def wrap_execute_query_response(rpc_state, response_pb, tx=None, commit_tx=False def bad_session_handler(func): @functools.wraps(func) - def decorator(rpc_state, response_pb, session_state, *args, **kwargs): + def decorator(rpc_state, response_pb, session_state: IQuerySessionState, *args, **kwargs): try: return func(rpc_state, response_pb, session_state, *args, **kwargs) except issues.BadSession: diff --git a/ydb/query/session.py b/ydb/query/session.py index f5e74331..a6a02d92 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -3,12 +3,14 @@ import logging import threading from typing import ( + Iterable, Optional, ) from . import base from .. import _apis, issues, _utilities +from ..connection import _RpcState as RpcState from .._grpc.grpcwrapper import common_utils from .._grpc.grpcwrapper import ydb_query as _ydb_query from .._grpc.grpcwrapper import ydb_query_public_types as _ydb_query_public @@ -99,14 +101,24 @@ def _already_in(self, target) -> bool: return self._state == target -def wrapper_create_session(rpc_state, response_pb, session_state: QuerySessionState, session): +def wrapper_create_session( + rpc_state: RpcState, + response_pb: _apis.ydb_query.CreateSessionResponse, + session_state: QuerySessionState, + session: "BaseQuerySession" +) -> "BaseQuerySession": message = _ydb_query.CreateSessionResponse.from_proto(response_pb) issues._process_response(message.status) session_state.set_session_id(message.session_id).set_node_id(message.node_id) return session -def wrapper_delete_session(rpc_state, response_pb, session_state: QuerySessionState, session): +def wrapper_delete_session( + rpc_state: RpcState, + response_pb: _apis.ydb_query.DeleteSessionResponse, + session_state: QuerySessionState, + session: "BaseQuerySession" +) -> "BaseQuerySession": message = _ydb_query.DeleteSessionResponse.from_proto(response_pb) issues._process_response(message.status) session_state.reset() @@ -124,7 +136,7 @@ def __init__(self, driver: base.SupportedDriverType, settings: Optional[base.Que self._settings = settings if settings is not None else base.QueryClientSettings() self._state = QuerySessionState(settings) - def _create_call(self): + def _create_call(self) -> "BaseQuerySession": return self._driver( _apis.ydb_query.CreateSessionRequest(), _apis.QueryService.Stub, @@ -133,7 +145,7 @@ def _create_call(self): wrap_args=(self._state, self), ) - def _delete_call(self): + def _delete_call(self) -> "BaseQuerySession": return self._driver( _apis.ydb_query.DeleteSessionRequest(session_id=self._state.session_id), _apis.QueryService.Stub, @@ -142,7 +154,7 @@ def _delete_call(self): wrap_args=(self._state, self), ) - def _attach_call(self): + def _attach_call(self) -> Iterable[_apis.ydb_query.SessionState]: return self._driver( _apis.ydb_query.AttachSessionRequest(session_id=self._state.session_id), _apis.QueryService.Stub, @@ -157,7 +169,7 @@ def _execute_call( exec_mode: base.QueryExecMode = None, parameters: dict = None, concurrent_result_sets: bool = False, - ): + ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: request = base.create_execute_query_request( query=query, session_id=self._state.session_id, @@ -171,7 +183,7 @@ def _execute_call( ) return self._driver( - request, + request.to_proto(), _apis.QueryService.Stub, _apis.QueryService.ExecuteQuery, ) @@ -184,7 +196,7 @@ class QuerySessionSync(BaseQuerySession): _stream = None - def _attach(self): + def _attach(self) -> None: self._stream = self._attach_call() status_stream = _utilities.SyncResponseIterator( self._stream, @@ -205,7 +217,7 @@ def _attach(self): daemon=True, ).start() - def _check_session_status_loop(self, status_stream): + def _check_session_status_loop(self, status_stream: _utilities.SyncResponseIterator) -> None: try: for status in status_stream: if status.status != issues.StatusCode.SUCCESS: diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 0ae770be..154a893e 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -3,6 +3,7 @@ import enum import functools from typing import ( + Iterable, Optional, ) @@ -11,6 +12,7 @@ issues, ) from .._grpc.grpcwrapper import ydb_query as _ydb_query +from ..connection import _RpcState as RpcState from . import base @@ -50,7 +52,7 @@ def terminal(cls, state: QueryTxStateEnum) -> bool: def reset_tx_id_handler(func): @functools.wraps(func) - def decorator(rpc_state, response_pb, session_state, tx_state, *args, **kwargs): + def decorator(rpc_state, response_pb, session_state: base.IQuerySessionState, tx_state: QueryTxState, *args, **kwargs): try: return func(rpc_state, response_pb, session_state, tx_state, *args, **kwargs) except issues.Error: @@ -87,12 +89,14 @@ def _already_in(self, target: QueryTxStateEnum) -> bool: return self._state == target -def _construct_tx_settings(tx_state): +def _construct_tx_settings(tx_state: QueryTxState) -> _ydb_query.TransactionSettings: tx_settings = _ydb_query.TransactionSettings.from_public(tx_state.tx_mode) return tx_settings -def _create_begin_transaction_request(session_state, tx_state): +def _create_begin_transaction_request( + session_state: base.IQuerySessionState, tx_state: QueryTxState +) -> _apis.ydb_query.BeginTransactionRequest: request = _ydb_query.BeginTransactionRequest( session_id=session_state.session_id, tx_settings=_construct_tx_settings(tx_state), @@ -100,14 +104,18 @@ def _create_begin_transaction_request(session_state, tx_state): return request -def _create_commit_transaction_request(session_state, tx_state): +def _create_commit_transaction_request( + session_state: base.IQuerySessionState, tx_state: QueryTxState +) -> _apis.ydb_query.CommitTransactionRequest: request = _apis.ydb_query.CommitTransactionRequest() request.tx_id = tx_state.tx_id request.session_id = session_state.session_id return request -def _create_rollback_transaction_request(session_state, tx_state): +def _create_rollback_transaction_request( + session_state: base.IQuerySessionState, tx_state: QueryTxState +) -> _apis.ydb_query.RollbackTransactionRequest: request = _apis.ydb_query.RollbackTransactionRequest() request.tx_id = tx_state.tx_id request.session_id = session_state.session_id @@ -115,7 +123,13 @@ def _create_rollback_transaction_request(session_state, tx_state): @base.bad_session_handler -def wrap_tx_begin_response(rpc_state, response_pb, session_state, tx_state, tx): +def wrap_tx_begin_response( + rpc_state: RpcState, + response_pb: _apis.ydb_query.BeginTransactionResponse, + session_state: base.IQuerySessionState, + tx_state: QueryTxState, + tx: "BaseQueryTxContext", +) -> "BaseQueryTxContext": message = _ydb_query.BeginTransactionResponse.from_proto(response_pb) issues._process_response(message.status) tx_state._change_state(QueryTxStateEnum.BEGINED) @@ -125,7 +139,13 @@ def wrap_tx_begin_response(rpc_state, response_pb, session_state, tx_state, tx): @base.bad_session_handler @reset_tx_id_handler -def wrap_tx_commit_response(rpc_state, response_pb, session_state, tx_state, tx): +def wrap_tx_commit_response( + rpc_state: RpcState, + response_pb: _apis.ydb_query.CommitTransactionResponse, + session_state: base.IQuerySessionState, + tx_state: QueryTxState, + tx: "BaseQueryTxContext", +) -> "BaseQueryTxContext": message = _ydb_query.CommitTransactionResponse.from_proto(response_pb) issues._process_response(message.status) tx_state._change_state(QueryTxStateEnum.COMMITTED) @@ -134,7 +154,13 @@ def wrap_tx_commit_response(rpc_state, response_pb, session_state, tx_state, tx) @base.bad_session_handler @reset_tx_id_handler -def wrap_tx_rollback_response(rpc_state, response_pb, session_state, tx_state, tx): +def wrap_tx_rollback_response( + rpc_state: RpcState, + response_pb: _apis.ydb_query.RollbackTransactionResponse, + session_state: base.IQuerySessionState, + tx_state: QueryTxState, + tx: "BaseQueryTxContext", +) -> "BaseQueryTxContext": message = _ydb_query.RollbackTransactionResponse.from_proto(response_pb) issues._process_response(message.status) tx_state._change_state(QueryTxStateEnum.ROLLBACKED) @@ -211,7 +237,7 @@ def tx_id(self) -> Optional[str]: """ return self._tx_state.tx_id - def _begin_call(self, settings: Optional[base.QueryClientSettings]): + def _begin_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQueryTxContext": return self._driver( _create_begin_transaction_request(self._session_state, self._tx_state), _apis.QueryService.Stub, @@ -221,7 +247,7 @@ def _begin_call(self, settings: Optional[base.QueryClientSettings]): (self._session_state, self._tx_state, self), ) - def _commit_call(self, settings: Optional[base.QueryClientSettings]): + def _commit_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQueryTxContext": return self._driver( _create_commit_transaction_request(self._session_state, self._tx_state), _apis.QueryService.Stub, @@ -231,7 +257,7 @@ def _commit_call(self, settings: Optional[base.QueryClientSettings]): (self._session_state, self._tx_state, self), ) - def _rollback_call(self, settings: Optional[base.QueryClientSettings]): + def _rollback_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQueryTxContext": return self._driver( _create_rollback_transaction_request(self._session_state, self._tx_state), _apis.QueryService.Stub, @@ -249,7 +275,7 @@ def _execute_call( exec_mode: base.QueryExecMode = None, parameters: dict = None, concurrent_result_sets: bool = False, - ): + ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: request = base.create_execute_query_request( query=query, session_id=self._session_state.session_id, @@ -263,23 +289,24 @@ def _execute_call( ) return self._driver( - request, + request.to_proto(), _apis.QueryService.Stub, _apis.QueryService.ExecuteQuery, ) - def _ensure_prev_stream_finished(self): + def _ensure_prev_stream_finished(self) -> None: if self._prev_stream is not None: for _ in self._prev_stream: pass self._prev_stream = None - def _handle_tx_meta(self, tx_meta=None): - if not self.tx_id and tx_meta: - self._tx_state._change_state(QueryTxStateEnum.BEGINED) - self._tx_state.tx_id = tx_meta.id + def _move_to_beginned(self, tx_id: str) -> None: + if self._tx_state._already_in(QueryTxStateEnum.BEGINED): + return + self._tx_state._change_state(QueryTxStateEnum.BEGINED) + self._tx_state.tx_id = tx_id - def _move_to_commited(self): + def _move_to_commited(self) -> None: if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): return self._tx_state._change_state(QueryTxStateEnum.COMMITTED) From 630c1883742d088deb53a9acd349c518633aa549 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 26 Jul 2024 17:12:03 +0300 Subject: [PATCH 090/429] fixes --- ydb/query/session.py | 4 ++-- ydb/query/transaction.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ydb/query/session.py b/ydb/query/session.py index a6a02d92..5b9c00ed 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -105,7 +105,7 @@ def wrapper_create_session( rpc_state: RpcState, response_pb: _apis.ydb_query.CreateSessionResponse, session_state: QuerySessionState, - session: "BaseQuerySession" + session: "BaseQuerySession", ) -> "BaseQuerySession": message = _ydb_query.CreateSessionResponse.from_proto(response_pb) issues._process_response(message.status) @@ -117,7 +117,7 @@ def wrapper_delete_session( rpc_state: RpcState, response_pb: _apis.ydb_query.DeleteSessionResponse, session_state: QuerySessionState, - session: "BaseQuerySession" + session: "BaseQuerySession", ) -> "BaseQuerySession": message = _ydb_query.DeleteSessionResponse.from_proto(response_pb) issues._process_response(message.status) diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 154a893e..cfbbf89b 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -52,7 +52,9 @@ def terminal(cls, state: QueryTxStateEnum) -> bool: def reset_tx_id_handler(func): @functools.wraps(func) - def decorator(rpc_state, response_pb, session_state: base.IQuerySessionState, tx_state: QueryTxState, *args, **kwargs): + def decorator( + rpc_state, response_pb, session_state: base.IQuerySessionState, tx_state: QueryTxState, *args, **kwargs + ): try: return func(rpc_state, response_pb, session_state, tx_state, *args, **kwargs) except issues.Error: From 2cbee936c327cc15f12378e8f6f8fca9233a350e Mon Sep 17 00:00:00 2001 From: Vasily Gerasimov Date: Sat, 27 Jul 2024 14:10:45 +0000 Subject: [PATCH 091/429] OAuth 2.0 token exchange. Allow multiple resource parameters --- CHANGELOG.md | 4 +- .../test_token_exchange.py | 11 +++-- ydb/oauth2_token_exchange/token_exchange.py | 42 +++++++++++++++++-- 3 files changed, 49 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ae7391e..70bb5bc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* OAuth 2.0 token exchange. Allow multiple resource parameters in according to https://www.rfc-editor.org/rfc/rfc8693 + ## 3.14.0 ## * Added load OAuth 2.0 token exchange credentials provider from config file @@ -83,7 +85,7 @@ yanked bad api release ## 3.3.5 ## * Fixed use positional argument instead of named in WriterAsyncIO.__del__ -* Fixed release buffer while read topic by one messages +* Fixed release buffer while read topic by one messages * Fixed race condition between commit_with_ack and reconnect in topic writer ## 3.3.4 ## diff --git a/tests/oauth2_token_exchange/test_token_exchange.py b/tests/oauth2_token_exchange/test_token_exchange.py index 010a5d42..51270ba1 100644 --- a/tests/oauth2_token_exchange/test_token_exchange.py +++ b/tests/oauth2_token_exchange/test_token_exchange.py @@ -181,11 +181,12 @@ def check(self, handler, parsed_request) -> None: assert len(parsed_request.get("scope", [])) == 1 assert parsed_request["scope"][0] == " ".join(self.scope) - if self.resource is None or self.resource == "": + if self.resource is None or len(self.resource) == 0: assert len(parsed_request.get("resource", [])) == 0 else: - assert len(parsed_request.get("resource", [])) == 1 - assert parsed_request["resource"][0] == self.resource + assert len(parsed_request["resource"]) == len(self.resource) + for i in range(len(self.resource)): + assert parsed_request["resource"][i] == self.resource[i] if self.subject_token_source is None: assert len(parsed_request.get("subject_token", [])) == 0 @@ -478,7 +479,7 @@ def test_oauth2_token_exchange_credentials_file(): ), grant_type="grant", requested_token_type="access_token", - resource="tEst", + resource=["tEst"], ), response=Oauth2TokenExchangeResponse( 200, @@ -498,6 +499,7 @@ def test_oauth2_token_exchange_credentials_file(): "s1", "s2", ], + "res": ["r1", "r2"], "unknown-field": [123], "actor-credentials": { "type": "fixed", @@ -512,6 +514,7 @@ def test_oauth2_token_exchange_credentials_file(): ), audience=["test-aud"], scope=["s1", "s2"], + resource=["r1", "r2"], ), response=Oauth2TokenExchangeResponse( 200, diff --git a/ydb/oauth2_token_exchange/token_exchange.py b/ydb/oauth2_token_exchange/token_exchange.py index 8f16619d..819f719b 100644 --- a/ydb/oauth2_token_exchange/token_exchange.py +++ b/ydb/oauth2_token_exchange/token_exchange.py @@ -39,7 +39,7 @@ def __init__( actor_token_source: typing.Optional[TokenSource] = None, audience: typing.Union[typing.List[str], str, None] = None, scope: typing.Union[typing.List[str], str, None] = None, - resource: typing.Optional[str] = None, + resource: typing.Union[typing.List[str], str, None] = None, grant_type: str = "urn:ietf:params:oauth:grant-type:token-exchange", requested_token_type: str = "urn:ietf:params:oauth:token-type:access_token", ): @@ -224,6 +224,42 @@ def _duration_seconds_from_config(cls, cfg_json, key_name, default_value): @classmethod def from_file(cls, cfg_file, iam_endpoint=None): + """ + Create OAuth 2.0 token exchange protocol credentials from config file. + + https://www.rfc-editor.org/rfc/rfc8693 + Config file must be a valid json file + + Fields of json file + grant-type: [string] Grant type option (default: "urn:ietf:params:oauth:grant-type:token-exchange") + res: [string | list of strings] Resource option (optional) + aud: [string | list of strings] Audience option for token exchange request (optional) + scope: [string | list of strings] Scope option (optional) + requested-token-type: [string] Requested token type option (default: "urn:ietf:params:oauth:token-type:access_token") + subject-credentials: [creds_json] Subject credentials options (optional) + actor-credentials: [creds_json] Actor credentials options (optional) + token-endpoint: [string] Token endpoint + + Fields of creds_json (JWT): + type: [string] Token source type. Set JWT + alg: [string] Algorithm for JWT signature. + Supported algorithms can be listed + with GetSupportedOauth2TokenExchangeJwtAlgorithms() + private-key: [string] (Private) key in PEM format (RSA, EC) or Base64 format (HMAC) for JWT signature + kid: [string] Key id JWT standard claim (optional) + iss: [string] Issuer JWT standard claim (optional) + sub: [string] Subject JWT standard claim (optional) + aud: [string | list of strings] Audience JWT standard claim (optional) + jti: [string] JWT ID JWT standard claim (optional) + ttl: [string] Token TTL (default: 1h) + + Fields of creds_json (FIXED): + type: [string] Token source type. Set FIXED + token: [string] Token value + token-type: [string] Token type value. It will become + subject_token_type/actor_token_type parameter + in token exchange request (https://www.rfc-editor.org/rfc/rfc8693) + """ with open(os.path.expanduser(cfg_file), "r") as r: cfg = r.read() @@ -245,7 +281,7 @@ def from_content(cls, cfg, iam_endpoint=None): actor_token_source = cls._token_source_from_config(cfg_json, "actor-credentials") audience = cls._list_of_strings_or_single_from_config(cfg_json, "aud") scope = cls._list_of_strings_or_single_from_config(cfg_json, "scope") - resource = cls._string_with_default_from_config(cfg_json, "res", None) + resource = cls._list_of_strings_or_single_from_config(cfg_json, "res") grant_type = cls._string_with_default_from_config( cfg_json, "grant-type", "urn:ietf:params:oauth:grant-type:token-exchange" ) @@ -273,7 +309,7 @@ def __init__( actor_token_source: typing.Optional[TokenSource] = None, audience: typing.Union[typing.List[str], str, None] = None, scope: typing.Union[typing.List[str], str, None] = None, - resource: typing.Optional[str] = None, + resource: typing.Union[typing.List[str], str, None] = None, grant_type: str = "urn:ietf:params:oauth:grant-type:token-exchange", requested_token_type: str = "urn:ietf:params:oauth:token-type:access_token", tracer=None, From 23366241908bbdc7e18df4249a1f54c171bffc29 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Sun, 28 Jul 2024 20:08:58 +0300 Subject: [PATCH 092/429] review fixes --- ydb/query/base.py | 4 ++-- ydb/query/transaction.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ydb/query/base.py b/ydb/query/base.py index 9fe6c21b..dcb56ca6 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -227,9 +227,9 @@ def session_id(self) -> str: @abc.abstractmethod def tx_id(self) -> Optional[str]: """ - Returns a id of open transaction or None otherwise + Returns an id of open transaction or None otherwise - :return: A id of open transaction or None otherwise + :return: An id of open transaction or None otherwise """ pass diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index cfbbf89b..6846b5a5 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -83,7 +83,7 @@ def _change_state(self, target: QueryTxStateEnum) -> None: self._check_invalid_transition(target) self._state = target - def _check_tx_not_terminal(self) -> None: + def _check_tx_ready_to_use(self) -> None: if QueryTxStateHelper.terminal(self._state): raise RuntimeError(f"Transaction is in terminal state: {self._state.value}") @@ -233,9 +233,9 @@ def session_id(self) -> str: @property def tx_id(self) -> Optional[str]: """ - Returns a id of open transaction or None otherwise + Returns an id of open transaction or None otherwise - :return: A id of open transaction or None otherwise + :return: An id of open transaction or None otherwise """ return self._tx_state.tx_id @@ -371,7 +371,7 @@ def execute( ) -> base.SyncResponseContextIterator: self._ensure_prev_stream_finished() - self._tx_state._check_tx_not_terminal() + self._tx_state._check_tx_ready_to_use() stream_it = self._execute_call( query=query, From 1c08ebff902469fc7e8cf29008425279a375899b Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 30 Jul 2024 12:52:12 +0300 Subject: [PATCH 093/429] Add dunder version to ydb package --- ydb/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ydb/__init__.py b/ydb/__init__.py index 0a09834b..6f66e5f7 100644 --- a/ydb/__init__.py +++ b/ydb/__init__.py @@ -2,6 +2,10 @@ __path__ = extend_path(__path__, __name__) +from .ydb_version import VERSION + +__version__ = VERSION + from .credentials import * # noqa from .driver import * # noqa from .global_settings import * # noqa From 49e747127961a0f83b0539635987b84e8277ab1b Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 30 Jul 2024 15:27:14 +0300 Subject: [PATCH 094/429] review fixes --- examples/query-service/basic_example.py | 14 +++++++------- tests/query/test_query_session.py | 5 +++-- ydb/query/pool.py | 8 +++++++- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index de2920c3..b355e10c 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -18,7 +18,7 @@ def main(): print("=" * 50) print("DELETE TABLE IF EXISTS") - pool.execute_with_retries("drop table if exists example") + pool.execute_with_retries("DROP TABLE IF EXISTS example") print("=" * 50) print("CREATE TABLE") @@ -28,11 +28,11 @@ def main(): def callee(session): print("=" * 50) - with session.execute("delete from example"): + with session.execute("DELETE FROM example"): pass print("BEFORE ACTION") - with session.execute("SELECT COUNT(*) as rows_count FROM example") as results: + with session.execute("SELECT COUNT(*) AS rows_count FROM example") as results: for result_set in results: print(f"rows: {str(result_set.rows)}") @@ -45,7 +45,7 @@ def callee(session): with tx.execute("INSERT INTO example (key, value) VALUES (1, 'onepieceisreal')"): pass - with tx.execute("SELECT COUNT(*) as rows_count FROM example") as results: + with tx.execute("SELECT COUNT(*) AS rows_count FROM example") as results: for result_set in results: print(f"rows: {str(result_set.rows)}") @@ -54,7 +54,7 @@ def callee(session): print("=" * 50) print("AFTER COMMIT TX") - with session.execute("SELECT COUNT(*) as rows_count FROM example") as results: + with session.execute("SELECT COUNT(*) AS rows_count FROM example") as results: for result_set in results: print(f"rows: {str(result_set.rows)}") @@ -67,7 +67,7 @@ def callee(session): with tx.execute("INSERT INTO example (key, value) VALUES (2, 'onepieceisreal')"): pass - with tx.execute("SELECT COUNT(*) as rows_count FROM example") as results: + with tx.execute("SELECT COUNT(*) AS rows_count FROM example") as results: for result_set in results: print(f"rows: {str(result_set.rows)}") @@ -76,7 +76,7 @@ def callee(session): print("=" * 50) print("AFTER ROLLBACK TX") - with session.execute("SELECT COUNT(*) as rows_count FROM example") as results: + with session.execute("SELECT COUNT(*) AS rows_count FROM example") as results: for result_set in results: print(f"rows: {str(result_set.rows)}") diff --git a/tests/query/test_query_session.py b/tests/query/test_query_session.py index 585c4c2b..89b899bd 100644 --- a/tests/query/test_query_session.py +++ b/tests/query/test_query_session.py @@ -93,9 +93,10 @@ def test_basic_execute(self, session: QuerySessionSync): def test_two_results(self, session: QuerySessionSync): session.create() res = [] + with session.execute("select 1; select 2") as results: for result_set in results: if len(result_set.rows) > 0: - res.extend(list(result_set.rows[0].values())) + res.append(list(result_set.rows[0].values())) - assert res == [1, 2] + assert res == [[1], [2]] diff --git a/ydb/query/pool.py b/ydb/query/pool.py index eef084f9..bddd666a 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -2,6 +2,7 @@ from typing import ( Callable, Optional, + List, ) from . import base @@ -12,6 +13,7 @@ RetrySettings, retry_operation_sync, ) +from .. import convert logger = logging.getLogger(__name__) @@ -49,8 +51,12 @@ def wrapped_callee(): return retry_operation_sync(wrapped_callee, retry_settings) - def execute_with_retries(self, query: str, retry_settings: Optional[RetrySettings] = None, *args, **kwargs): + def execute_with_retries( + self, query: str, retry_settings: Optional[RetrySettings] = None, *args, **kwargs + ) -> List[convert.ResultSet]: """Special interface to execute a one-shot queries in a safe, retriable way. + Note: this method loads all data from stream before return, do not use this + method with huge read queries. :param query: A query, yql or sql text. :param retry_settings: RetrySettings object. From 96372fb4642ee41da8324b88e121f2ed958d4fa2 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 31 Jul 2024 10:16:24 +0300 Subject: [PATCH 095/429] Add docstrings about experimental API --- ydb/query/base.py | 24 ++++++++++++++++-------- ydb/query/pool.py | 10 +++++++--- ydb/query/session.py | 12 ++++++++---- ydb/query/transaction.py | 25 ++++++++++++++++++++++--- 4 files changed, 53 insertions(+), 18 deletions(-) diff --git a/ydb/query/base.py b/ydb/query/base.py index dcb56ca6..e08d9f52 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -103,7 +103,8 @@ def __init__(self, driver: SupportedDriverType, settings: Optional[QueryClientSe @abc.abstractmethod def create(self) -> "IQuerySession": - """ + """WARNING: This API is experimental and could be changed. + Creates a Session of Query Service on server side and attaches it. :return: Session object. @@ -112,7 +113,8 @@ def create(self) -> "IQuerySession": @abc.abstractmethod def delete(self) -> None: - """ + """WARNING: This API is experimental and could be changed. + Deletes a Session of Query Service on server side and releases resources. :return: None @@ -121,7 +123,8 @@ def delete(self) -> None: @abc.abstractmethod def transaction(self, tx_mode: Optional[BaseQueryTxMode] = None) -> "IQueryTxContext": - """ + """WARNING: This API is experimental and could be changed. + Creates a transaction context manager with specified transaction mode. :param tx_mode: Transaction mode, which is a one from the following choises: @@ -143,7 +146,8 @@ def execute( parameters: Optional[dict] = None, concurrent_result_sets: Optional[bool] = False, ) -> Iterator: - """ + """WARNING: This API is experimental and could be changed. + Sends a query to Query Service :param query: (YQL or SQL text) to be executed. :param syntax: Syntax of the query, which is a one from the following choises: @@ -235,7 +239,8 @@ def tx_id(self) -> Optional[str]: @abc.abstractmethod def begin(self, settings: Optional[QueryClientSettings] = None) -> None: - """ + """WARNING: This API is experimental and could be changed. + Explicitly begins a transaction :param settings: A request settings @@ -246,7 +251,8 @@ def begin(self, settings: Optional[QueryClientSettings] = None) -> None: @abc.abstractmethod def commit(self, settings: Optional[QueryClientSettings] = None) -> None: - """ + """WARNING: This API is experimental and could be changed. + Calls commit on a transaction if it is open. If transaction execution failed then this method raises PreconditionFailed. @@ -258,7 +264,8 @@ def commit(self, settings: Optional[QueryClientSettings] = None) -> None: @abc.abstractmethod def rollback(self, settings: Optional[QueryClientSettings] = None) -> None: - """ + """WARNING: This API is experimental and could be changed. + Calls rollback on a transaction if it is open. If transaction execution failed then this method raises PreconditionFailed. @@ -278,7 +285,8 @@ def execute( parameters: Optional[dict] = None, concurrent_result_sets: Optional[bool] = False, ) -> Iterator: - """ + """WARNING: This API is experimental and could be changed. + Sends a query to Query Service :param query: (YQL or SQL text) to be executed. :param commit_tx: A special flag that allows transaction commit. diff --git a/ydb/query/pool.py b/ydb/query/pool.py index bddd666a..e7514cdf 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -30,12 +30,15 @@ def __init__(self, driver: base.SupportedDriverType): self._driver = driver def checkout(self) -> "SimpleQuerySessionCheckout": - """Return a Session context manager, that opens session on enter and closes session on exit.""" + """WARNING: This API is experimental and could be changed. + Return a Session context manager, that opens session on enter and closes session on exit. + """ return SimpleQuerySessionCheckout(self) def retry_operation_sync(self, callee: Callable, retry_settings: Optional[RetrySettings] = None, *args, **kwargs): - """Special interface to execute a bunch of commands with session in a safe, retriable way. + """WARNING: This API is experimental and could be changed. + Special interface to execute a bunch of commands with session in a safe, retriable way. :param callee: A function, that works with session. :param retry_settings: RetrySettings object. @@ -54,7 +57,8 @@ def wrapped_callee(): def execute_with_retries( self, query: str, retry_settings: Optional[RetrySettings] = None, *args, **kwargs ) -> List[convert.ResultSet]: - """Special interface to execute a one-shot queries in a safe, retriable way. + """WARNING: This API is experimental and could be changed. + Special interface to execute a one-shot queries in a safe, retriable way. Note: this method loads all data from stream before return, do not use this method with huge read queries. diff --git a/ydb/query/session.py b/ydb/query/session.py index 5b9c00ed..d6034d34 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -227,7 +227,8 @@ def _check_session_status_loop(self, status_stream: _utilities.SyncResponseItera pass def delete(self) -> None: - """ + """WARNING: This API is experimental and could be changed. + Deletes a Session of Query Service on server side and releases resources. :return: None @@ -240,7 +241,8 @@ def delete(self) -> None: self._stream.cancel() def create(self) -> "QuerySessionSync": - """ + """WARNING: This API is experimental and could be changed. + Creates a Session of Query Service on server side and attaches it. :return: QuerySessionSync object. @@ -255,7 +257,8 @@ def create(self) -> "QuerySessionSync": return self def transaction(self, tx_mode: Optional[base.BaseQueryTxMode] = None) -> base.IQueryTxContext: - """ + """WARNING: This API is experimental and could be changed. + Creates a transaction context manager with specified transaction mode. :param tx_mode: Transaction mode, which is a one from the following choises: 1) QuerySerializableReadWrite() which is default mode; @@ -285,7 +288,8 @@ def execute( parameters: dict = None, concurrent_result_sets: bool = False, ) -> base.SyncResponseContextIterator: - """ + """WARNING: This API is experimental and could be changed. + Sends a query to Query Service :param query: (YQL or SQL text) to be executed. :param syntax: Syntax of the query, which is a one from the following choises: diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 6846b5a5..0a493202 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -314,7 +314,8 @@ def _move_to_commited(self) -> None: self._tx_state._change_state(QueryTxStateEnum.COMMITTED) def begin(self, settings: Optional[base.QueryClientSettings] = None) -> None: - """ + """WARNING: This API is experimental and could be changed. + Explicitly begins a transaction :param settings: A request settings @@ -326,7 +327,8 @@ def begin(self, settings: Optional[base.QueryClientSettings] = None) -> None: self._begin_call(settings) def commit(self, settings: Optional[base.QueryClientSettings] = None) -> None: - """ + """WARNING: This API is experimental and could be changed. + Calls commit on a transaction if it is open otherwise is no-op. If transaction execution failed then this method raises PreconditionFailed. @@ -369,7 +371,24 @@ def execute( parameters: Optional[dict] = None, concurrent_result_sets: Optional[bool] = False, ) -> base.SyncResponseContextIterator: - + """WARNING: This API is experimental and could be changed. + + Sends a query to Query Service + :param query: (YQL or SQL text) to be executed. + :param commit_tx: A special flag that allows transaction commit. + :param syntax: Syntax of the query, which is a one from the following choises: + 1) QuerySyntax.YQL_V1, which is default; + 2) QuerySyntax.PG. + :param exec_mode: Exec mode of the query, which is a one from the following choises: + 1) QueryExecMode.EXECUTE, which is default; + 2) QueryExecMode.EXPLAIN; + 3) QueryExecMode.VALIDATE; + 4) QueryExecMode.PARSE. + :param parameters: dict with parameters and YDB types; + :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; + + :return: Iterator with result sets + """ self._ensure_prev_stream_finished() self._tx_state._check_tx_ready_to_use() From bee65a9683c8fd50479d5de8c391e1f40128abf4 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 31 Jul 2024 12:06:42 +0300 Subject: [PATCH 096/429] Fix docker image in tls compose file --- docker-compose-tls.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-tls.yml b/docker-compose-tls.yml index c9d6fac9..19693705 100644 --- a/docker-compose-tls.yml +++ b/docker-compose-tls.yml @@ -1,7 +1,7 @@ version: "3.9" services: ydb: - image: cr.yandex/yc/yandex-docker-local-ydb:latest + image: ydbplatform/local-ydb:trunk restart: always ports: - 2136:2136 From a801a6727c31e61e4e6ae0bcb8560ea6ac715a6a Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 2 Aug 2024 16:48:12 +0300 Subject: [PATCH 097/429] typed parameters --- examples/query-service/basic_example.py | 34 ++++++++++++++++++++----- ydb/_grpc/grpcwrapper/ydb_query.py | 4 ++- ydb/convert.py | 33 ++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 8 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index b355e10c..ad164bef 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -16,15 +16,15 @@ def main(): pool = ydb.QuerySessionPool(driver) - print("=" * 50) - print("DELETE TABLE IF EXISTS") - pool.execute_with_retries("DROP TABLE IF EXISTS example") + # print("=" * 50) + # print("DELETE TABLE IF EXISTS") + # pool.execute_with_retries("drop table if exists example") - print("=" * 50) - print("CREATE TABLE") - pool.execute_with_retries("CREATE TABLE example(key UInt64, value String, PRIMARY KEY (key))") + # print("=" * 50) + # print("CREATE TABLE") + # pool.execute_with_retries("CREATE TABLE example(key UInt64, value String, PRIMARY KEY (key))") - pool.execute_with_retries("INSERT INTO example (key, value) VALUES (1, 'onepieceisreal')") + # pool.execute_with_retries("INSERT INTO example (key, value) VALUES (1, 'onepieceisreal')") def callee(session): print("=" * 50) @@ -82,6 +82,26 @@ def callee(session): pool.retry_operation_sync(callee) + query_print = """ + select $a + """ + + def callee(session: ydb.QuerySessionSync): + print("=" * 50) + print("Check typed parameters") + + values = [1, 1.0, True, "text"] + + for value in values: + print(f"value: {value}") + with session.transaction().execute( + query=query_print, parameters={'$a': value}, commit_tx=True + ) as results: + for result_set in results: + print(f"rows: {str(result_set.rows)}") + + pool.retry_operation_sync(callee) + if __name__ == "__main__": main() diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index befb02c7..913b8480 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -18,6 +18,8 @@ ServerStatus, ) +from ... import convert + @dataclass class CreateSessionResponse(IFromProto): @@ -176,5 +178,5 @@ def to_proto(self) -> ydb_query_pb2.ExecuteQueryRequest: exec_mode=self.exec_mode, stats_mode=self.stats_mode, concurrent_result_sets=self.concurrent_result_sets, - parameters=self.parameters, + parameters=convert.query_parameters_to_pb(self.parameters), ) diff --git a/ydb/convert.py b/ydb/convert.py index 6c4164bc..d898e1ef 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -281,6 +281,39 @@ def parameters_to_pb(parameters_types, parameters_values): return param_values_pb +def query_parameters_to_pb(parameters): + if parameters is None or not parameters: + return {} + + parameters_types = {} + parameters_values = {} + for name, value in parameters.items(): + if isinstance(value, tuple): + parameters_values[name] = value[0] + parameters_types[name] = value[1] + else: + parameters_values[name] = value + parameters_types[name] = _primitive_type_from_python_native(value) + + return parameters_to_pb(parameters_types, parameters_values) + + +_from_python_type_map = { + int: types.PrimitiveType.Int64, + float: types.PrimitiveType.Float, + dict: types.PrimitiveType.Json, + bool: types.PrimitiveType.Bool, + str: types.PrimitiveType.Utf8, +} + + +def _primitive_type_from_python_native(value): + t = type(value) + if t not in _from_python_type_map: + return types.PrimitiveType.Int64 + return _from_python_type_map[t] + + def _unwrap_optionality(column): c_type = column.type current_type = c_type.WhichOneof("type") From 643bc020f269a5e7cba6407f191eed8b762fffe0 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 2 Aug 2024 16:48:12 +0300 Subject: [PATCH 098/429] parameters tests --- examples/query-service/basic_example.py | 4 +- tests/query/test_query_parameters.py | 56 +++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 tests/query/test_query_parameters.py diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index ad164bef..02b3a626 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -94,9 +94,7 @@ def callee(session: ydb.QuerySessionSync): for value in values: print(f"value: {value}") - with session.transaction().execute( - query=query_print, parameters={'$a': value}, commit_tx=True - ) as results: + with session.transaction().execute(query=query_print, parameters={'$a': value}, commit_tx=True) as results: for result_set in results: print(f"rows: {str(result_set.rows)}") diff --git a/tests/query/test_query_parameters.py b/tests/query/test_query_parameters.py new file mode 100644 index 00000000..0de0976d --- /dev/null +++ b/tests/query/test_query_parameters.py @@ -0,0 +1,56 @@ +import pytest +import ydb + + +query = """SELECT $a AS value""" + + +def test_select_implicit_int(pool: ydb.QuerySessionPool): + expected_value = 111 + res = pool.execute_with_retries(query, parameters={'$a': expected_value}) + actual_value = res[0].rows[0]['value'] + assert expected_value == actual_value + + +def test_select_implicit_float(pool: ydb.QuerySessionPool): + expected_value = 11.1 + res = pool.execute_with_retries(query, parameters={'$a': expected_value}) + actual_value = res[0].rows[0]['value'] + assert expected_value == pytest.approx(actual_value) + + +def test_select_implicit_bool(pool: ydb.QuerySessionPool): + expected_value = False + res = pool.execute_with_retries(query, parameters={'$a': expected_value}) + actual_value = res[0].rows[0]['value'] + assert expected_value == actual_value + + +def test_select_implicit_str(pool: ydb.QuerySessionPool): + expected_value = "text" + res = pool.execute_with_retries(query, parameters={'$a': expected_value}) + actual_value = res[0].rows[0]['value'] + assert expected_value == actual_value + + +def test_select_explicit_primitive(pool: ydb.QuerySessionPool): + expected_value = 111 + res = pool.execute_with_retries(query, parameters={'$a': (expected_value, ydb.PrimitiveType.Int64)}) + actual_value = res[0].rows[0]['value'] + assert expected_value == actual_value + + +def test_select_explicit_list(pool: ydb.QuerySessionPool): + expected_value = [1, 2, 3] + type_ = ydb.ListType(ydb.PrimitiveType.Int64) + res = pool.execute_with_retries(query, parameters={'$a': (expected_value, type_)}) + actual_value = res[0].rows[0]['value'] + assert expected_value == actual_value + + +def test_select_explicit_dict(pool: ydb.QuerySessionPool): + expected_value = {'key': 'value'} + type_ = ydb.DictType(ydb.PrimitiveType.Utf8, ydb.PrimitiveType.Utf8) + res = pool.execute_with_retries(query, parameters={'$a': (expected_value, type_)}) + actual_value = res[0].rows[0]['value'] + assert expected_value == actual_value From ea6fbb9a6fdd5fe22ee8d224b3c9884b53702494 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 2 Aug 2024 16:48:12 +0300 Subject: [PATCH 099/429] Ability to use implicit lists and dicts --- examples/query-service/basic_example.py | 16 +++---- tests/query/test_query_parameters.py | 58 ++++++++++++++++++------- ydb/convert.py | 24 ++++++++-- 3 files changed, 71 insertions(+), 27 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index 02b3a626..1c4eb28e 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -16,15 +16,15 @@ def main(): pool = ydb.QuerySessionPool(driver) - # print("=" * 50) - # print("DELETE TABLE IF EXISTS") - # pool.execute_with_retries("drop table if exists example") + print("=" * 50) + print("DELETE TABLE IF EXISTS") + pool.execute_with_retries("drop table if exists example") - # print("=" * 50) - # print("CREATE TABLE") - # pool.execute_with_retries("CREATE TABLE example(key UInt64, value String, PRIMARY KEY (key))") + print("=" * 50) + print("CREATE TABLE") + pool.execute_with_retries("CREATE TABLE example(key UInt64, value String, PRIMARY KEY (key))") - # pool.execute_with_retries("INSERT INTO example (key, value) VALUES (1, 'onepieceisreal')") + pool.execute_with_retries("INSERT INTO example (key, value) VALUES (1, 'onepieceisreal')") def callee(session): print("=" * 50) @@ -94,7 +94,7 @@ def callee(session: ydb.QuerySessionSync): for value in values: print(f"value: {value}") - with session.transaction().execute(query=query_print, parameters={'$a': value}, commit_tx=True) as results: + with session.transaction().execute(query=query_print, parameters={"$a": value}, commit_tx=True) as results: for result_set in results: print(f"rows: {str(result_set.rows)}") diff --git a/tests/query/test_query_parameters.py b/tests/query/test_query_parameters.py index 0de0976d..88a6a8f3 100644 --- a/tests/query/test_query_parameters.py +++ b/tests/query/test_query_parameters.py @@ -7,50 +7,78 @@ def test_select_implicit_int(pool: ydb.QuerySessionPool): expected_value = 111 - res = pool.execute_with_retries(query, parameters={'$a': expected_value}) - actual_value = res[0].rows[0]['value'] + res = pool.execute_with_retries(query, parameters={"$a": expected_value}) + actual_value = res[0].rows[0]["value"] assert expected_value == actual_value def test_select_implicit_float(pool: ydb.QuerySessionPool): expected_value = 11.1 - res = pool.execute_with_retries(query, parameters={'$a': expected_value}) - actual_value = res[0].rows[0]['value'] + res = pool.execute_with_retries(query, parameters={"$a": expected_value}) + actual_value = res[0].rows[0]["value"] assert expected_value == pytest.approx(actual_value) def test_select_implicit_bool(pool: ydb.QuerySessionPool): expected_value = False - res = pool.execute_with_retries(query, parameters={'$a': expected_value}) - actual_value = res[0].rows[0]['value'] + res = pool.execute_with_retries(query, parameters={"$a": expected_value}) + actual_value = res[0].rows[0]["value"] assert expected_value == actual_value def test_select_implicit_str(pool: ydb.QuerySessionPool): expected_value = "text" - res = pool.execute_with_retries(query, parameters={'$a': expected_value}) - actual_value = res[0].rows[0]['value'] + res = pool.execute_with_retries(query, parameters={"$a": expected_value}) + actual_value = res[0].rows[0]["value"] + assert expected_value == actual_value + + +def test_select_implicit_list(pool: ydb.QuerySessionPool): + expected_value = [1, 2, 3] + res = pool.execute_with_retries(query, parameters={"$a": expected_value}) + actual_value = res[0].rows[0]["value"] + assert expected_value == actual_value + + +def test_select_implicit_dict(pool: ydb.QuerySessionPool): + expected_value = {"a": 1, "b": 2} + res = pool.execute_with_retries(query, parameters={"$a": expected_value}) + actual_value = res[0].rows[0]["value"] + assert expected_value == actual_value + + +def test_select_implicit_list_nested(pool: ydb.QuerySessionPool): + expected_value = [{"a": 1}, {"b": 2}] + res = pool.execute_with_retries(query, parameters={"$a": expected_value}) + actual_value = res[0].rows[0]["value"] + assert expected_value == actual_value + + +def test_select_implicit_dict_nested(pool: ydb.QuerySessionPool): + expected_value = {"a": [1, 2, 3], "b": [4, 5]} + res = pool.execute_with_retries(query, parameters={"$a": expected_value}) + actual_value = res[0].rows[0]["value"] assert expected_value == actual_value def test_select_explicit_primitive(pool: ydb.QuerySessionPool): expected_value = 111 - res = pool.execute_with_retries(query, parameters={'$a': (expected_value, ydb.PrimitiveType.Int64)}) - actual_value = res[0].rows[0]['value'] + res = pool.execute_with_retries(query, parameters={"$a": (expected_value, ydb.PrimitiveType.Int64)}) + actual_value = res[0].rows[0]["value"] assert expected_value == actual_value def test_select_explicit_list(pool: ydb.QuerySessionPool): expected_value = [1, 2, 3] type_ = ydb.ListType(ydb.PrimitiveType.Int64) - res = pool.execute_with_retries(query, parameters={'$a': (expected_value, type_)}) - actual_value = res[0].rows[0]['value'] + res = pool.execute_with_retries(query, parameters={"$a": (expected_value, type_)}) + actual_value = res[0].rows[0]["value"] assert expected_value == actual_value def test_select_explicit_dict(pool: ydb.QuerySessionPool): - expected_value = {'key': 'value'} + expected_value = {"key": "value"} type_ = ydb.DictType(ydb.PrimitiveType.Utf8, ydb.PrimitiveType.Utf8) - res = pool.execute_with_retries(query, parameters={'$a': (expected_value, type_)}) - actual_value = res[0].rows[0]['value'] + res = pool.execute_with_retries(query, parameters={"$a": (expected_value, type_)}) + actual_value = res[0].rows[0]["value"] assert expected_value == actual_value diff --git a/ydb/convert.py b/ydb/convert.py index d898e1ef..0eaed512 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -301,7 +301,6 @@ def query_parameters_to_pb(parameters): _from_python_type_map = { int: types.PrimitiveType.Int64, float: types.PrimitiveType.Float, - dict: types.PrimitiveType.Json, bool: types.PrimitiveType.Bool, str: types.PrimitiveType.Utf8, } @@ -309,9 +308,26 @@ def query_parameters_to_pb(parameters): def _primitive_type_from_python_native(value): t = type(value) - if t not in _from_python_type_map: - return types.PrimitiveType.Int64 - return _from_python_type_map[t] + default_type = types.PrimitiveType.Int64 + + if t in _from_python_type_map: + return _from_python_type_map[t] + + if t == list: + if len(value) == 0: + return types.ListType(default_type) + entry_type = _primitive_type_from_python_native(value[0]) + return types.ListType(entry_type) + + if t == dict: + if len(value) == 0: + return types.DictType(default_type, default_type) + entry = list(value.items())[0] + key_type = _primitive_type_from_python_native(entry[0]) + value_type = _primitive_type_from_python_native(entry[1]) + return types.DictType(key_type, value_type) + + return default_type def _unwrap_optionality(column): From c82caf00bda2d4c370a09ac8ea06e80d93179d0a Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 2 Aug 2024 16:48:12 +0300 Subject: [PATCH 100/429] TypedValue public interface --- tests/query/test_query_parameters.py | 62 ++++++++++++++++++++++++++++ ydb/convert.py | 30 ++++++++++---- ydb/types.py | 6 +++ 3 files changed, 89 insertions(+), 9 deletions(-) diff --git a/tests/query/test_query_parameters.py b/tests/query/test_query_parameters.py index 88a6a8f3..baf3de04 100644 --- a/tests/query/test_query_parameters.py +++ b/tests/query/test_query_parameters.py @@ -61,6 +61,27 @@ def test_select_implicit_dict_nested(pool: ydb.QuerySessionPool): assert expected_value == actual_value +def test_select_implicit_custom_type_raises(pool: ydb.QuerySessionPool): + class CustomClass: + pass + + expected_value = CustomClass() + with pytest.raises(ValueError): + pool.execute_with_retries(query, parameters={"$a": expected_value}) + + +def test_select_implicit_empty_list_raises(pool: ydb.QuerySessionPool): + expected_value = [] + with pytest.raises(ValueError): + pool.execute_with_retries(query, parameters={"$a": expected_value}) + + +def test_select_implicit_empty_dict_raises(pool: ydb.QuerySessionPool): + expected_value = {} + with pytest.raises(ValueError): + pool.execute_with_retries(query, parameters={"$a": expected_value}) + + def test_select_explicit_primitive(pool: ydb.QuerySessionPool): expected_value = 111 res = pool.execute_with_retries(query, parameters={"$a": (expected_value, ydb.PrimitiveType.Int64)}) @@ -82,3 +103,44 @@ def test_select_explicit_dict(pool: ydb.QuerySessionPool): res = pool.execute_with_retries(query, parameters={"$a": (expected_value, type_)}) actual_value = res[0].rows[0]["value"] assert expected_value == actual_value + + +def test_select_explicit_empty_list_not_raises(pool: ydb.QuerySessionPool): + expected_value = [] + type_ = ydb.ListType(ydb.PrimitiveType.Int64) + res = pool.execute_with_retries(query, parameters={"$a": (expected_value, type_)}) + actual_value = res[0].rows[0]["value"] + assert expected_value == actual_value + + +def test_select_explicit_empty_dict_not_raises(pool: ydb.QuerySessionPool): + expected_value = {} + type_ = ydb.DictType(ydb.PrimitiveType.Utf8, ydb.PrimitiveType.Utf8) + res = pool.execute_with_retries(query, parameters={"$a": (expected_value, type_)}) + actual_value = res[0].rows[0]["value"] + assert expected_value == actual_value + + +def test_select_typedvalue_full_primitive(pool: ydb.QuerySessionPool): + expected_value = 111 + typed_value = ydb.TypedValue(expected_value, ydb.PrimitiveType.Int64) + res = pool.execute_with_retries(query, parameters={"$a": typed_value}) + actual_value = res[0].rows[0]["value"] + assert expected_value == actual_value + + +def test_select_typedvalue_implicit_primitive(pool: ydb.QuerySessionPool): + expected_value = 111 + typed_value = ydb.TypedValue(expected_value) + res = pool.execute_with_retries(query, parameters={"$a": typed_value}) + actual_value = res[0].rows[0]["value"] + assert expected_value == actual_value + +def test_select_typevalue_custom_type_raises(pool: ydb.QuerySessionPool): + class CustomClass: + pass + + expected_value = CustomClass() + typed_value = ydb.TypedValue(expected_value) + with pytest.raises(ValueError): + pool.execute_with_retries(query, parameters={"$a": typed_value}) diff --git a/ydb/convert.py b/ydb/convert.py index 0eaed512..986918c9 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -288,12 +288,16 @@ def query_parameters_to_pb(parameters): parameters_types = {} parameters_values = {} for name, value in parameters.items(): - if isinstance(value, tuple): - parameters_values[name] = value[0] - parameters_types[name] = value[1] + if isinstance(value, types.TypedValue): + if value.value_type is None: + value.value_type = _primitive_type_from_python_native(value.value) + elif isinstance(value, tuple): + value = types.TypedValue(*value) else: - parameters_values[name] = value - parameters_types[name] = _primitive_type_from_python_native(value) + value = types.TypedValue(value, _primitive_type_from_python_native(value)) + + parameters_values[name] = value.value + parameters_types[name] = value.value_type return parameters_to_pb(parameters_types, parameters_values) @@ -308,26 +312,34 @@ def query_parameters_to_pb(parameters): def _primitive_type_from_python_native(value): t = type(value) - default_type = types.PrimitiveType.Int64 if t in _from_python_type_map: return _from_python_type_map[t] if t == list: if len(value) == 0: - return types.ListType(default_type) + raise ValueError( + "Could not map empty list to any type, please specify " + "it manually by tuple(value, type) or ydb.TypedValue" + ) entry_type = _primitive_type_from_python_native(value[0]) return types.ListType(entry_type) if t == dict: if len(value) == 0: - return types.DictType(default_type, default_type) + raise ValueError( + "Could not map empty dict to any type, please specify " + "it manually by tuple(value, type) or ydb.TypedValue" + ) entry = list(value.items())[0] key_type = _primitive_type_from_python_native(entry[0]) value_type = _primitive_type_from_python_native(entry[1]) return types.DictType(key_type, value_type) - return default_type + raise ValueError( + "Could not map value to any type, please specify " + "it manually by tuple(value, type) or ydb.TypedValue" + ) def _unwrap_optionality(column): diff --git a/ydb/types.py b/ydb/types.py index 2a2a7e07..ef197ac0 100644 --- a/ydb/types.py +++ b/ydb/types.py @@ -2,6 +2,7 @@ from __future__ import annotations import abc +from dataclasses import dataclass import enum import json from . import _utilities, _apis @@ -441,3 +442,8 @@ def proto(self): def __str__(self): return "BulkUpsertColumns<%s>" % ",".join(self.__columns_repr) + +@dataclass +class TypedValue: + value: typing.Any + value_type: typing.Optional[typing.Union[PrimitiveType, AbstractTypeBuilder]] = None From d091436733a0e45c5167e2f7556277cb08ecd9cd Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 2 Aug 2024 16:48:12 +0300 Subject: [PATCH 101/429] style fixes --- tests/query/test_query_parameters.py | 1 + ydb/convert.py | 3 +-- ydb/types.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/query/test_query_parameters.py b/tests/query/test_query_parameters.py index baf3de04..ff033311 100644 --- a/tests/query/test_query_parameters.py +++ b/tests/query/test_query_parameters.py @@ -136,6 +136,7 @@ def test_select_typedvalue_implicit_primitive(pool: ydb.QuerySessionPool): actual_value = res[0].rows[0]["value"] assert expected_value == actual_value + def test_select_typevalue_custom_type_raises(pool: ydb.QuerySessionPool): class CustomClass: pass diff --git a/ydb/convert.py b/ydb/convert.py index 986918c9..2763e675 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -337,8 +337,7 @@ def _primitive_type_from_python_native(value): return types.DictType(key_type, value_type) raise ValueError( - "Could not map value to any type, please specify " - "it manually by tuple(value, type) or ydb.TypedValue" + "Could not map value to any type, please specify it manually by tuple(value, type) or ydb.TypedValue" ) diff --git a/ydb/types.py b/ydb/types.py index ef197ac0..f8a56e4d 100644 --- a/ydb/types.py +++ b/ydb/types.py @@ -443,6 +443,7 @@ def proto(self): def __str__(self): return "BulkUpsertColumns<%s>" % ",".join(self.__columns_repr) + @dataclass class TypedValue: value: typing.Any From 019594d8f100efab81a23d067a32d58c63baea48 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 2 Aug 2024 16:48:12 +0300 Subject: [PATCH 102/429] extend query service example with parameters --- examples/query-service/basic_example.py | 53 +++++++++++++++++++++---- 1 file changed, 45 insertions(+), 8 deletions(-) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index 1c4eb28e..cfbb3042 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -18,7 +18,7 @@ def main(): print("=" * 50) print("DELETE TABLE IF EXISTS") - pool.execute_with_retries("drop table if exists example") + pool.execute_with_retries("DROP TABLE IF EXISTS example") print("=" * 50) print("CREATE TABLE") @@ -82,22 +82,59 @@ def callee(session): pool.retry_operation_sync(callee) - query_print = """ - select $a - """ - def callee(session: ydb.QuerySessionSync): + query_print = """select $a""" + print("=" * 50) - print("Check typed parameters") + print("Check implicit typed parameters") - values = [1, 1.0, True, "text"] + values = [ + 1, + 1.0, + True, + "text", + {"4": 8, "15": 16, "23": 42}, + [{"name": "Michael"}, {"surname": "Scott"}], + ] for value in values: print(f"value: {value}") - with session.transaction().execute(query=query_print, parameters={"$a": value}, commit_tx=True) as results: + with session.transaction().execute( + query=query_print, + parameters={"$a": value}, + commit_tx=True, + ) as results: for result_set in results: print(f"rows: {str(result_set.rows)}") + print("=" * 50) + print("Check typed parameters as tuple pair") + + typed_value = ([1, 2, 3], ydb.ListType(ydb.PrimitiveType.Int64)) + print(f"value: {typed_value}") + + with session.transaction().execute( + query=query_print, + parameters={"$a": typed_value}, + commit_tx=True, + ) as results: + for result_set in results: + print(f"rows: {str(result_set.rows)}") + + print("=" * 50) + print("Check typed parameters as ydb.TypedValue") + + typed_value = ydb.TypedValue(111, ydb.PrimitiveType.Int64) + print(f"value: {typed_value}") + + with session.transaction().execute( + query=query_print, + parameters={"$a": typed_value}, + commit_tx=True, + ) as results: + for result_set in results: + print(f"rows: {str(result_set.rows)}") + pool.retry_operation_sync(callee) From 90390c8072866a054e7b313a35495a6a525b496b Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 2 Aug 2024 16:48:12 +0300 Subject: [PATCH 103/429] review fix --- CHANGELOG.md | 3 +++ docker-compose-tls.yml | 1 + docker-compose.yml | 1 + ydb/convert.py | 12 ++++++------ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70bb5bc3..6306aa90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ + +* Query service client support +* Add dunder version to ydb package * OAuth 2.0 token exchange. Allow multiple resource parameters in according to https://www.rfc-editor.org/rfc/rfc8693 ## 3.14.0 ## diff --git a/docker-compose-tls.yml b/docker-compose-tls.yml index 19693705..f0a4b328 100644 --- a/docker-compose-tls.yml +++ b/docker-compose-tls.yml @@ -11,3 +11,4 @@ services: - ./ydb_certs:/ydb_certs environment: - YDB_USE_IN_MEMORY_PDISKS=true + - YDB_ENABLE_COLUMN_TABLES=true diff --git a/docker-compose.yml b/docker-compose.yml index cb37a377..1a466fab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,3 +8,4 @@ services: hostname: localhost environment: - YDB_USE_IN_MEMORY_PDISKS=true + - YDB_ENABLE_COLUMN_TABLES=true diff --git a/ydb/convert.py b/ydb/convert.py index 2763e675..63a5dbe4 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -290,11 +290,11 @@ def query_parameters_to_pb(parameters): for name, value in parameters.items(): if isinstance(value, types.TypedValue): if value.value_type is None: - value.value_type = _primitive_type_from_python_native(value.value) + value.value_type = _type_from_python_native(value.value) elif isinstance(value, tuple): value = types.TypedValue(*value) else: - value = types.TypedValue(value, _primitive_type_from_python_native(value)) + value = types.TypedValue(value, _type_from_python_native(value)) parameters_values[name] = value.value parameters_types[name] = value.value_type @@ -310,7 +310,7 @@ def query_parameters_to_pb(parameters): } -def _primitive_type_from_python_native(value): +def _type_from_python_native(value): t = type(value) if t in _from_python_type_map: @@ -322,7 +322,7 @@ def _primitive_type_from_python_native(value): "Could not map empty list to any type, please specify " "it manually by tuple(value, type) or ydb.TypedValue" ) - entry_type = _primitive_type_from_python_native(value[0]) + entry_type = _type_from_python_native(value[0]) return types.ListType(entry_type) if t == dict: @@ -332,8 +332,8 @@ def _primitive_type_from_python_native(value): "it manually by tuple(value, type) or ydb.TypedValue" ) entry = list(value.items())[0] - key_type = _primitive_type_from_python_native(entry[0]) - value_type = _primitive_type_from_python_native(entry[1]) + key_type = _type_from_python_native(entry[0]) + value_type = _type_from_python_native(entry[1]) return types.DictType(key_type, value_type) raise ValueError( From 786e044c64aa66325a2f29c24b5beee54f5433d0 Mon Sep 17 00:00:00 2001 From: robot Date: Fri, 2 Aug 2024 15:40:22 +0000 Subject: [PATCH 104/429] Release: 3.15.0 --- CHANGELOG.md | 2 +- setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6306aa90..e5cd85a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ - +## 3.15.0 ## * Query service client support * Add dunder version to ydb package * OAuth 2.0 token exchange. Allow multiple resource parameters in according to https://www.rfc-editor.org/rfc/rfc8693 diff --git a/setup.py b/setup.py index 4227fea5..7a5200f4 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.14.0", # AUTOVERSION + version="3.15.0", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index faf1da08..567cda12 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.14.0" +VERSION = "3.15.0" From bc285c13eb074a4f6f8b2a3c899a72b14cbb9f97 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 13 Aug 2024 10:59:55 +0300 Subject: [PATCH 105/429] New basic example with query service --- examples/basic_example_v2/README.md | 5 + examples/basic_example_v2/__main__.py | 28 ++ examples/basic_example_v2/basic_example.py | 342 ++++++++++++++++++ .../basic_example_v2/basic_example_data.py | 182 ++++++++++ ydb/convert.py | 2 +- ydb/query/base.py | 4 +- ydb/query/pool.py | 9 + ydb/query/session.py | 2 +- ydb/query/transaction.py | 8 +- 9 files changed, 575 insertions(+), 7 deletions(-) create mode 100644 examples/basic_example_v2/README.md create mode 100644 examples/basic_example_v2/__main__.py create mode 100644 examples/basic_example_v2/basic_example.py create mode 100644 examples/basic_example_v2/basic_example_data.py diff --git a/examples/basic_example_v2/README.md b/examples/basic_example_v2/README.md new file mode 100644 index 00000000..92ebe21a --- /dev/null +++ b/examples/basic_example_v2/README.md @@ -0,0 +1,5 @@ +# YDB Python SDK Example: basic_example_v2 + +Example code demonstrating the basic YDB Python SDK operations. + +See the top-level [README.md](../README.md) file for instructions on running this example. diff --git a/examples/basic_example_v2/__main__.py b/examples/basic_example_v2/__main__.py new file mode 100644 index 00000000..2397a2c1 --- /dev/null +++ b/examples/basic_example_v2/__main__.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +import argparse +import basic_example +import logging + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description="""\033[92mYDB basic example.\x1b[0m\n""", + ) + parser.add_argument("-d", "--database", help="Name of the database to use", default="/local") + parser.add_argument("-e", "--endpoint", help="Endpoint url to use", default="grpc://localhost:2136") + parser.add_argument("-p", "--path", default="") + parser.add_argument("-v", "--verbose", default=False, action="store_true") + + args = parser.parse_args() + + if args.verbose: + logger = logging.getLogger("ydb.pool.Discovery") + logger.setLevel(logging.INFO) + logger.addHandler(logging.StreamHandler()) + + basic_example.run( + args.endpoint, + args.database, + args.path, + ) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py new file mode 100644 index 00000000..f691e85a --- /dev/null +++ b/examples/basic_example_v2/basic_example.py @@ -0,0 +1,342 @@ +# -*- coding: utf-8 -*- +import posixpath +import ydb +import basic_example_data + +# Table path prefix allows to put the working tables into the specific directory +# inside the YDB database. Putting `PRAGMA TablePathPrefix("some/path")` +# at the beginning of the query allows to reference the tables through +# their names "under" the specified directory. +# +# TablePathPrefix has to be defined as an absolute path, which has to be started +# with the current database location. +# +# https://ydb.tech/ru/docs/yql/reference/syntax/pragma#table-path-prefix + +DropTablesQuery = """PRAGMA TablePathPrefix("{}"); +DROP TABLE IF EXISTS series; +DROP TABLE IF EXISTS seasons; +DROP TABLE IF EXISTS episodes; +""" + +FillDataQuery = """PRAGMA TablePathPrefix("{}"); + +DECLARE $seriesData AS List>; + +DECLARE $seasonsData AS List>; + +DECLARE $episodesData AS List>; + +REPLACE INTO series +SELECT + series_id, + title, + series_info, + CAST(release_date AS Uint64) AS release_date +FROM AS_TABLE($seriesData); + +REPLACE INTO seasons +SELECT + series_id, + season_id, + title, + CAST(first_aired AS Uint64) AS first_aired, + CAST(last_aired AS Uint64) AS last_aired +FROM AS_TABLE($seasonsData); + +REPLACE INTO episodes +SELECT + series_id, + season_id, + episode_id, + title, + CAST(air_date AS Uint64) AS air_date +FROM AS_TABLE($episodesData); +""" + + +def fill_tables_with_data(pool, path): + print("\nFilling tables with data...") + + global FillDataQuery + + def callee(session): + + prepared_query = FillDataQuery.format(path) + with session.transaction(ydb.QuerySerializableReadWrite()).execute( + prepared_query, + { + "$seriesData": (basic_example_data.get_series_data(), basic_example_data.get_series_data_type()), + "$seasonsData": (basic_example_data.get_seasons_data(), basic_example_data.get_seasons_data_type()), + "$episodesData": (basic_example_data.get_episodes_data(), basic_example_data.get_episodes_data_type()), + }, + commit_tx=True, + ) as result_sets: + pass + + return pool.retry_operation_sync(callee) + + +def select_simple(pool, path): + print("\nCheck series table...") + + def callee(session): + # new transaction in serializable read write mode + # if query successfully completed you will get result sets. + # otherwise exception will be raised + with session.transaction(ydb.QuerySerializableReadWrite()).execute( + """ + PRAGMA TablePathPrefix("{}"); + $format = DateTime::Format("%Y-%m-%d"); + SELECT + series_id, + title, + $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(release_date AS Int16))) AS Uint32))) AS release_date + FROM series + WHERE series_id = 1; + """.format( + path + ), + commit_tx=True, + ) as result_sets: + first_set = next(result_sets) + for row in first_set.rows: + print( + "series, id: ", + row.series_id, + ", title: ", + row.title, + ", release date: ", + row.release_date, + ) + + return first_set + + return pool.retry_operation_sync(callee) + + +def upsert_simple(pool, path): + print(f"\nPerforming UPSERT into episodes...") + + def callee(session): + with session.transaction().execute( + """ + PRAGMA TablePathPrefix("{}"); + + DECLARE $seriesId AS Uint64; + DECLARE $seasonId AS Uint64; + DECLARE $episodeId AS Uint64; + DECLARE $title AS Utf8; + + UPSERT INTO episodes (series_id, season_id, episode_id, title) VALUES (2, 6, 1, "TBD"); + """.format( + path + ), + commit_tx=True, + ) as result_sets: + pass + + return pool.retry_operation_sync(callee) + + +def select_with_parameters(pool, path, series_id, season_id, episode_id): + def callee(session): + query = """ + PRAGMA TablePathPrefix("{}"); + + DECLARE $seriesId AS Uint64; + DECLARE $seasonId AS Uint64; + DECLARE $episodeId AS Uint64; + + $format = DateTime::Format("%Y-%m-%d"); + SELECT + title, + $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(air_date AS Int16))) AS Uint32))) AS air_date + FROM episodes + WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; + """.format( + path + ) + + with session.transaction(ydb.QuerySerializableReadWrite()).execute( + query, + { + "$seriesId": series_id, # could be defined implicit in case of int, str, bool + "$seasonId": (season_id, ydb.PrimitiveType.Uint64), # could be defined via tuple + "$episodeId": ydb.TypedValue(episode_id, ydb.PrimitiveType.Uint64), # could be defined via special class + }, + commit_tx=True, + ) as result_sets: + print("\n> select_prepared_transaction:") + first_set = next(result_sets) + for row in first_set.rows: + print("episode title:", row.title, ", air date:", row.air_date) + + return first_set + + return pool.retry_operation_sync(callee) + + +# Show usage of explicit Begin/Commit transaction control calls. +# In most cases it's better to use transaction control settings in session.transaction +# calls instead to avoid additional hops to YDB cluster and allow more efficient +# execution of queries. +def explicit_tcl(pool, path, series_id, season_id, episode_id): + def callee(session): + query = """ + PRAGMA TablePathPrefix("{}"); + + DECLARE $seriesId AS Uint64; + DECLARE $seasonId AS Uint64; + DECLARE $episodeId AS Uint64; + + UPDATE episodes + SET air_date = CAST(CurrentUtcDate() AS Uint64) + WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; + """.format( + path + ) + + # Get newly created transaction id + tx = session.transaction(ydb.QuerySerializableReadWrite()).begin() + + # Execute data query. + # Transaction control settings continues active transaction (tx) + with tx.execute( + query, + {"$seriesId": series_id, "$seasonId": season_id, "$episodeId": episode_id}, + ) as result_sets: + pass + + print("\n> explicit TCL call") + + # Commit active transaction(tx) + tx.commit() + + return pool.retry_operation_sync(callee) + + +def drop_tables(pool, path): + print("\nCleaning up existing tables...") + pool.execute_with_retries(DropTablesQuery.format(path)) + + +def create_tables(pool, path): + print("\nCreating table series...") + pool.execute_with_retries( + """ + PRAGMA TablePathPrefix("{}"); + CREATE table `series` ( + `series_id` Uint64, + `title` Utf8, + `series_info` Utf8, + `release_date` Uint64, + PRIMARY KEY (`series_id`) + ) + """.format( + path + ) + ) + + print("\nCreating table seasons...") + pool.execute_with_retries( + """ + PRAGMA TablePathPrefix("{}"); + CREATE table `seasons` ( + `series_id` Uint64, + `season_id` Uint64, + `title` Utf8, + `first_aired` Uint64, + `last_aired` Uint64, + PRIMARY KEY (`series_id`, `season_id`) + ) + """.format( + path + ) + ) + + print("\nCreating table episodes...") + pool.execute_with_retries( + """ + PRAGMA TablePathPrefix("{}"); + CREATE table `episodes` ( + `series_id` Uint64, + `season_id` Uint64, + `episode_id` Uint64, + `title` Utf8, + `air_date` Uint64, + PRIMARY KEY (`series_id`, `season_id`, `episode_id`) + ) + """.format( + path + ) + ) + + +def is_directory_exists(driver, path): + try: + return driver.scheme_client.describe_path(path).is_directory() + except ydb.SchemeError: + return False + + +def ensure_path_exists(driver, database, path): + paths_to_create = list() + path = path.rstrip("/") + while path not in ("", database): + full_path = posixpath.join(database, path) + if is_directory_exists(driver, full_path): + break + paths_to_create.append(full_path) + path = posixpath.dirname(path).rstrip("/") + + while len(paths_to_create) > 0: + full_path = paths_to_create.pop(-1) + driver.scheme_client.make_directory(full_path) + + +def run(endpoint, database, path): + with ydb.Driver( + endpoint=endpoint, + database=database, + # credentials=ydb.credentials_from_env_variables() + ) as driver: + driver.wait(timeout=5, fail_fast=True) + + with ydb.QuerySessionPool(driver) as pool: + + ensure_path_exists(driver, database, path) + + # absolute path - prefix to the table's names, + # including the database location + full_path = posixpath.join(database, path) + + drop_tables(pool, full_path) + + create_tables(pool, full_path) + + fill_tables_with_data(pool, full_path) + + select_simple(pool, full_path) + + upsert_simple(pool, full_path) + + select_with_parameters(pool, full_path, 2, 3, 7) + select_with_parameters(pool, full_path, 2, 3, 8) + + explicit_tcl(pool, full_path, 2, 6, 1) + select_with_parameters(pool, full_path, 2, 6, 1) diff --git a/examples/basic_example_v2/basic_example_data.py b/examples/basic_example_v2/basic_example_data.py new file mode 100644 index 00000000..2363fe2e --- /dev/null +++ b/examples/basic_example_v2/basic_example_data.py @@ -0,0 +1,182 @@ +# -*- coding: utf-8 -*- +import iso8601 +import ydb + + +def to_days(date): + timedelta = iso8601.parse_date(date) - iso8601.parse_date("1970-1-1") + return timedelta.days + + +class Series(object): + __slots__ = ("series_id", "title", "release_date", "series_info") + + def __init__(self, series_id, title, release_date, series_info): + self.series_id = series_id + self.title = title + self.release_date = to_days(release_date) + self.series_info = series_info + + +class Season(object): + __slots__ = ("series_id", "season_id", "title", "first_aired", "last_aired") + + def __init__(self, series_id, season_id, title, first_aired, last_aired): + self.series_id = series_id + self.season_id = season_id + self.title = title + self.first_aired = to_days(first_aired) + self.last_aired = to_days(last_aired) + + +class Episode(object): + __slots__ = ("series_id", "season_id", "episode_id", "title", "air_date") + + def __init__(self, series_id, season_id, episode_id, title, air_date): + self.series_id = series_id + self.season_id = season_id + self.episode_id = episode_id + self.title = title + self.air_date = to_days(air_date) + + +def get_series_data(): + return [ + Series( + 1, + "IT Crowd", + "2006-02-03", + "The IT Crowd is a British sitcom produced by Channel 4, written by Graham Linehan, produced by " + "Ash Atalla and starring Chris O'Dowd, Richard Ayoade, Katherine Parkinson, and Matt Berry.", + ), + Series( + 2, + "Silicon Valley", + "2014-04-06", + "Silicon Valley is an American comedy television series created by Mike Judge, John Altschuler and " + "Dave Krinsky. The series focuses on five young men who founded a startup company in Silicon Valley.", + ), + ] + + +def get_series_data_type(): + struct_type = ydb.StructType() + struct_type.add_member("series_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("title", ydb.PrimitiveType.Utf8) + struct_type.add_member("series_info", ydb.PrimitiveType.Utf8) + struct_type.add_member("release_date", ydb.PrimitiveType.Date) + return ydb.ListType(struct_type) + + +def get_seasons_data(): + return [ + Season(1, 1, "Season 1", "2006-02-03", "2006-03-03"), + Season(1, 2, "Season 2", "2007-08-24", "2007-09-28"), + Season(1, 3, "Season 3", "2008-11-21", "2008-12-26"), + Season(1, 4, "Season 4", "2010-06-25", "2010-07-30"), + Season(2, 1, "Season 1", "2014-04-06", "2014-06-01"), + Season(2, 2, "Season 2", "2015-04-12", "2015-06-14"), + Season(2, 3, "Season 3", "2016-04-24", "2016-06-26"), + Season(2, 4, "Season 4", "2017-04-23", "2017-06-25"), + Season(2, 5, "Season 5", "2018-03-25", "2018-05-13"), + ] + + +def get_seasons_data_type(): + struct_type = ydb.StructType() + struct_type.add_member("series_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("season_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("title", ydb.PrimitiveType.Utf8) + struct_type.add_member("first_aired", ydb.PrimitiveType.Date) + struct_type.add_member("last_aired", ydb.PrimitiveType.Date) + return ydb.ListType(struct_type) + + +def get_episodes_data(): + return [ + Episode(1, 1, 1, "Yesterday's Jam", "2006-02-03"), + Episode(1, 1, 2, "Calamity Jen", "2006-02-03"), + Episode(1, 1, 3, "Fifty-Fifty", "2006-02-10"), + Episode(1, 1, 4, "The Red Door", "2006-02-17"), + Episode(1, 1, 5, "The Haunting of Bill Crouse", "2006-02-24"), + Episode(1, 1, 6, "Aunt Irma Visits", "2006-03-03"), + Episode(1, 2, 1, "The Work Outing", "2006-08-24"), + Episode(1, 2, 2, "Return of the Golden Child", "2007-08-31"), + Episode(1, 2, 3, "Moss and the German", "2007-09-07"), + Episode(1, 2, 4, "The Dinner Party", "2007-09-14"), + Episode(1, 2, 5, "Smoke and Mirrors", "2007-09-21"), + Episode(1, 2, 6, "Men Without Women", "2007-09-28"), + Episode(1, 3, 1, "From Hell", "2008-11-21"), + Episode(1, 3, 2, "Are We Not Men?", "2008-11-28"), + Episode(1, 3, 3, "Tramps Like Us", "2008-12-05"), + Episode(1, 3, 4, "The Speech", "2008-12-12"), + Episode(1, 3, 5, "Friendface", "2008-12-19"), + Episode(1, 3, 6, "Calendar Geeks", "2008-12-26"), + Episode(1, 4, 1, "Jen The Fredo", "2010-06-25"), + Episode(1, 4, 2, "The Final Countdown", "2010-07-02"), + Episode(1, 4, 3, "Something Happened", "2010-07-09"), + Episode(1, 4, 4, "Italian For Beginners", "2010-07-16"), + Episode(1, 4, 5, "Bad Boys", "2010-07-23"), + Episode(1, 4, 6, "Reynholm vs Reynholm", "2010-07-30"), + ] + + +def get_episodes_data_type(): + struct_type = ydb.StructType() + struct_type.add_member("series_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("season_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("episode_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("title", ydb.PrimitiveType.Utf8) + struct_type.add_member("air_date", ydb.PrimitiveType.Date) + return ydb.ListType(struct_type) + + +def get_episodes_data_for_bulk_upsert(): + return [ + Episode(2, 1, 1, "Minimum Viable Product", "2014-04-06"), + Episode(2, 1, 2, "The Cap Table", "2014-04-13"), + Episode(2, 1, 3, "Articles of Incorporation", "2014-04-20"), + Episode(2, 1, 4, "Fiduciary Duties", "2014-04-27"), + Episode(2, 1, 5, "Signaling Risk", "2014-05-04"), + Episode(2, 1, 6, "Third Party Insourcing", "2014-05-11"), + Episode(2, 1, 7, "Proof of Concept", "2014-05-18"), + Episode(2, 1, 8, "Optimal Tip-to-Tip Efficiency", "2014-06-01"), + Episode(2, 2, 1, "Sand Hill Shuffle", "2015-04-12"), + Episode(2, 2, 2, "Runaway Devaluation", "2015-04-19"), + Episode(2, 2, 3, "Bad Money", "2015-04-26"), + Episode(2, 2, 4, "The Lady", "2015-05-03"), + Episode(2, 2, 5, "Server Space", "2015-05-10"), + Episode(2, 2, 6, "Homicide", "2015-05-17"), + Episode(2, 2, 7, "Adult Content", "2015-05-24"), + Episode(2, 2, 8, "White Hat/Black Hat", "2015-05-31"), + Episode(2, 2, 9, "Binding Arbitration", "2015-06-07"), + Episode(2, 2, 10, "Two Days of the Condor", "2015-06-14"), + Episode(2, 3, 1, "Founder Friendly", "2016-04-24"), + Episode(2, 3, 2, "Two in the Box", "2016-05-01"), + Episode(2, 3, 3, "Meinertzhagen's Haversack", "2016-05-08"), + Episode(2, 3, 4, "Maleant Data Systems Solutions", "2016-05-15"), + Episode(2, 3, 5, "The Empty Chair", "2016-05-22"), + Episode(2, 3, 6, "Bachmanity Insanity", "2016-05-29"), + Episode(2, 3, 7, "To Build a Better Beta", "2016-06-05"), + Episode(2, 3, 8, "Bachman's Earnings Over-Ride", "2016-06-12"), + Episode(2, 3, 9, "Daily Active Users", "2016-06-19"), + Episode(2, 3, 10, "The Uptick", "2016-06-26"), + Episode(2, 4, 1, "Success Failure", "2017-04-23"), + Episode(2, 4, 2, "Terms of Service", "2017-04-30"), + Episode(2, 4, 3, "Intellectual Property", "2017-05-07"), + Episode(2, 4, 4, "Teambuilding Exercise", "2017-05-14"), + Episode(2, 4, 5, "The Blood Boy", "2017-05-21"), + Episode(2, 4, 6, "Customer Service", "2017-05-28"), + Episode(2, 4, 7, "The Patent Troll", "2017-06-04"), + Episode(2, 4, 8, "The Keenan Vortex", "2017-06-11"), + Episode(2, 4, 9, "Hooli-Con", "2017-06-18"), + Episode(2, 4, 10, "Server Error", "2017-06-25"), + Episode(2, 5, 1, "Grow Fast or Die Slow", "2018-03-25"), + Episode(2, 5, 2, "Reorientation", "2018-04-01"), + Episode(2, 5, 3, "Chief Operating Officer", "2018-04-08"), + Episode(2, 5, 4, "Tech Evangelist", "2018-04-15"), + Episode(2, 5, 5, "Facial Recognition", "2018-04-22"), + Episode(2, 5, 6, "Artificial Emotional Intelligence", "2018-04-29"), + Episode(2, 5, 7, "Initial Coin Offering", "2018-05-06"), + Episode(2, 5, 8, "Fifty-One Percent", "2018-05-13"), + ] diff --git a/ydb/convert.py b/ydb/convert.py index 63a5dbe4..9e1478b5 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -303,7 +303,7 @@ def query_parameters_to_pb(parameters): _from_python_type_map = { - int: types.PrimitiveType.Int64, + int: types.PrimitiveType.Uint64, float: types.PrimitiveType.Float, bool: types.PrimitiveType.Bool, str: types.PrimitiveType.Utf8, diff --git a/ydb/query/base.py b/ydb/query/base.py index e08d9f52..9c6462ce 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -238,14 +238,14 @@ def tx_id(self) -> Optional[str]: pass @abc.abstractmethod - def begin(self, settings: Optional[QueryClientSettings] = None) -> None: + def begin(self, settings: Optional[QueryClientSettings] = None) -> "IQueryTxContext": """WARNING: This API is experimental and could be changed. Explicitly begins a transaction :param settings: A request settings - :return: None or exception if begin is failed + :return: Transaction object or exception if begin is failed """ pass diff --git a/ydb/query/pool.py b/ydb/query/pool.py index e7514cdf..51efcb25 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -77,6 +77,15 @@ def wrapped_callee(): return retry_operation_sync(wrapped_callee, retry_settings) + def stop(self, timeout=None): + pass # TODO: implement + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.stop() + class SimpleQuerySessionCheckout: def __init__(self, pool: QuerySessionPool): diff --git a/ydb/query/session.py b/ydb/query/session.py index d6034d34..87351b75 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -283,9 +283,9 @@ def transaction(self, tx_mode: Optional[base.BaseQueryTxMode] = None) -> base.IQ def execute( self, query: str, + parameters: dict = None, syntax: base.QuerySyntax = None, exec_mode: base.QueryExecMode = None, - parameters: dict = None, concurrent_result_sets: bool = False, ) -> base.SyncResponseContextIterator: """WARNING: This API is experimental and could be changed. diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 0a493202..ba0d4a4d 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -313,19 +313,21 @@ def _move_to_commited(self) -> None: return self._tx_state._change_state(QueryTxStateEnum.COMMITTED) - def begin(self, settings: Optional[base.QueryClientSettings] = None) -> None: + def begin(self, settings: Optional[base.QueryClientSettings] = None) -> "BaseQueryTxContext": """WARNING: This API is experimental and could be changed. Explicitly begins a transaction :param settings: A request settings - :return: None or exception if begin is failed + :return: Transaction object or exception if begin is failed """ self._tx_state._check_invalid_transition(QueryTxStateEnum.BEGINED) self._begin_call(settings) + return self + def commit(self, settings: Optional[base.QueryClientSettings] = None) -> None: """WARNING: This API is experimental and could be changed. @@ -365,10 +367,10 @@ def rollback(self, settings: Optional[base.QueryClientSettings] = None) -> None: def execute( self, query: str, + parameters: Optional[dict] = None, commit_tx: Optional[bool] = False, syntax: Optional[base.QuerySyntax] = None, exec_mode: Optional[base.QueryExecMode] = None, - parameters: Optional[dict] = None, concurrent_result_sets: Optional[bool] = False, ) -> base.SyncResponseContextIterator: """WARNING: This API is experimental and could be changed. From 3e2440f966a19569219f257cd6816f9094a5e076 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 13 Aug 2024 11:03:50 +0300 Subject: [PATCH 106/429] basic example with query service --- examples/basic_example_v2/README.md | 5 + examples/basic_example_v2/__main__.py | 28 ++ examples/basic_example_v2/basic_example.py | 342 ++++++++++++++++++ .../basic_example_v2/basic_example_data.py | 182 ++++++++++ ydb/convert.py | 2 +- ydb/query/base.py | 4 +- ydb/query/pool.py | 9 + ydb/query/session.py | 2 +- ydb/query/transaction.py | 8 +- 9 files changed, 575 insertions(+), 7 deletions(-) create mode 100644 examples/basic_example_v2/README.md create mode 100644 examples/basic_example_v2/__main__.py create mode 100644 examples/basic_example_v2/basic_example.py create mode 100644 examples/basic_example_v2/basic_example_data.py diff --git a/examples/basic_example_v2/README.md b/examples/basic_example_v2/README.md new file mode 100644 index 00000000..92ebe21a --- /dev/null +++ b/examples/basic_example_v2/README.md @@ -0,0 +1,5 @@ +# YDB Python SDK Example: basic_example_v2 + +Example code demonstrating the basic YDB Python SDK operations. + +See the top-level [README.md](../README.md) file for instructions on running this example. diff --git a/examples/basic_example_v2/__main__.py b/examples/basic_example_v2/__main__.py new file mode 100644 index 00000000..2397a2c1 --- /dev/null +++ b/examples/basic_example_v2/__main__.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +import argparse +import basic_example +import logging + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description="""\033[92mYDB basic example.\x1b[0m\n""", + ) + parser.add_argument("-d", "--database", help="Name of the database to use", default="/local") + parser.add_argument("-e", "--endpoint", help="Endpoint url to use", default="grpc://localhost:2136") + parser.add_argument("-p", "--path", default="") + parser.add_argument("-v", "--verbose", default=False, action="store_true") + + args = parser.parse_args() + + if args.verbose: + logger = logging.getLogger("ydb.pool.Discovery") + logger.setLevel(logging.INFO) + logger.addHandler(logging.StreamHandler()) + + basic_example.run( + args.endpoint, + args.database, + args.path, + ) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py new file mode 100644 index 00000000..f691e85a --- /dev/null +++ b/examples/basic_example_v2/basic_example.py @@ -0,0 +1,342 @@ +# -*- coding: utf-8 -*- +import posixpath +import ydb +import basic_example_data + +# Table path prefix allows to put the working tables into the specific directory +# inside the YDB database. Putting `PRAGMA TablePathPrefix("some/path")` +# at the beginning of the query allows to reference the tables through +# their names "under" the specified directory. +# +# TablePathPrefix has to be defined as an absolute path, which has to be started +# with the current database location. +# +# https://ydb.tech/ru/docs/yql/reference/syntax/pragma#table-path-prefix + +DropTablesQuery = """PRAGMA TablePathPrefix("{}"); +DROP TABLE IF EXISTS series; +DROP TABLE IF EXISTS seasons; +DROP TABLE IF EXISTS episodes; +""" + +FillDataQuery = """PRAGMA TablePathPrefix("{}"); + +DECLARE $seriesData AS List>; + +DECLARE $seasonsData AS List>; + +DECLARE $episodesData AS List>; + +REPLACE INTO series +SELECT + series_id, + title, + series_info, + CAST(release_date AS Uint64) AS release_date +FROM AS_TABLE($seriesData); + +REPLACE INTO seasons +SELECT + series_id, + season_id, + title, + CAST(first_aired AS Uint64) AS first_aired, + CAST(last_aired AS Uint64) AS last_aired +FROM AS_TABLE($seasonsData); + +REPLACE INTO episodes +SELECT + series_id, + season_id, + episode_id, + title, + CAST(air_date AS Uint64) AS air_date +FROM AS_TABLE($episodesData); +""" + + +def fill_tables_with_data(pool, path): + print("\nFilling tables with data...") + + global FillDataQuery + + def callee(session): + + prepared_query = FillDataQuery.format(path) + with session.transaction(ydb.QuerySerializableReadWrite()).execute( + prepared_query, + { + "$seriesData": (basic_example_data.get_series_data(), basic_example_data.get_series_data_type()), + "$seasonsData": (basic_example_data.get_seasons_data(), basic_example_data.get_seasons_data_type()), + "$episodesData": (basic_example_data.get_episodes_data(), basic_example_data.get_episodes_data_type()), + }, + commit_tx=True, + ) as result_sets: + pass + + return pool.retry_operation_sync(callee) + + +def select_simple(pool, path): + print("\nCheck series table...") + + def callee(session): + # new transaction in serializable read write mode + # if query successfully completed you will get result sets. + # otherwise exception will be raised + with session.transaction(ydb.QuerySerializableReadWrite()).execute( + """ + PRAGMA TablePathPrefix("{}"); + $format = DateTime::Format("%Y-%m-%d"); + SELECT + series_id, + title, + $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(release_date AS Int16))) AS Uint32))) AS release_date + FROM series + WHERE series_id = 1; + """.format( + path + ), + commit_tx=True, + ) as result_sets: + first_set = next(result_sets) + for row in first_set.rows: + print( + "series, id: ", + row.series_id, + ", title: ", + row.title, + ", release date: ", + row.release_date, + ) + + return first_set + + return pool.retry_operation_sync(callee) + + +def upsert_simple(pool, path): + print(f"\nPerforming UPSERT into episodes...") + + def callee(session): + with session.transaction().execute( + """ + PRAGMA TablePathPrefix("{}"); + + DECLARE $seriesId AS Uint64; + DECLARE $seasonId AS Uint64; + DECLARE $episodeId AS Uint64; + DECLARE $title AS Utf8; + + UPSERT INTO episodes (series_id, season_id, episode_id, title) VALUES (2, 6, 1, "TBD"); + """.format( + path + ), + commit_tx=True, + ) as result_sets: + pass + + return pool.retry_operation_sync(callee) + + +def select_with_parameters(pool, path, series_id, season_id, episode_id): + def callee(session): + query = """ + PRAGMA TablePathPrefix("{}"); + + DECLARE $seriesId AS Uint64; + DECLARE $seasonId AS Uint64; + DECLARE $episodeId AS Uint64; + + $format = DateTime::Format("%Y-%m-%d"); + SELECT + title, + $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(air_date AS Int16))) AS Uint32))) AS air_date + FROM episodes + WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; + """.format( + path + ) + + with session.transaction(ydb.QuerySerializableReadWrite()).execute( + query, + { + "$seriesId": series_id, # could be defined implicit in case of int, str, bool + "$seasonId": (season_id, ydb.PrimitiveType.Uint64), # could be defined via tuple + "$episodeId": ydb.TypedValue(episode_id, ydb.PrimitiveType.Uint64), # could be defined via special class + }, + commit_tx=True, + ) as result_sets: + print("\n> select_prepared_transaction:") + first_set = next(result_sets) + for row in first_set.rows: + print("episode title:", row.title, ", air date:", row.air_date) + + return first_set + + return pool.retry_operation_sync(callee) + + +# Show usage of explicit Begin/Commit transaction control calls. +# In most cases it's better to use transaction control settings in session.transaction +# calls instead to avoid additional hops to YDB cluster and allow more efficient +# execution of queries. +def explicit_tcl(pool, path, series_id, season_id, episode_id): + def callee(session): + query = """ + PRAGMA TablePathPrefix("{}"); + + DECLARE $seriesId AS Uint64; + DECLARE $seasonId AS Uint64; + DECLARE $episodeId AS Uint64; + + UPDATE episodes + SET air_date = CAST(CurrentUtcDate() AS Uint64) + WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; + """.format( + path + ) + + # Get newly created transaction id + tx = session.transaction(ydb.QuerySerializableReadWrite()).begin() + + # Execute data query. + # Transaction control settings continues active transaction (tx) + with tx.execute( + query, + {"$seriesId": series_id, "$seasonId": season_id, "$episodeId": episode_id}, + ) as result_sets: + pass + + print("\n> explicit TCL call") + + # Commit active transaction(tx) + tx.commit() + + return pool.retry_operation_sync(callee) + + +def drop_tables(pool, path): + print("\nCleaning up existing tables...") + pool.execute_with_retries(DropTablesQuery.format(path)) + + +def create_tables(pool, path): + print("\nCreating table series...") + pool.execute_with_retries( + """ + PRAGMA TablePathPrefix("{}"); + CREATE table `series` ( + `series_id` Uint64, + `title` Utf8, + `series_info` Utf8, + `release_date` Uint64, + PRIMARY KEY (`series_id`) + ) + """.format( + path + ) + ) + + print("\nCreating table seasons...") + pool.execute_with_retries( + """ + PRAGMA TablePathPrefix("{}"); + CREATE table `seasons` ( + `series_id` Uint64, + `season_id` Uint64, + `title` Utf8, + `first_aired` Uint64, + `last_aired` Uint64, + PRIMARY KEY (`series_id`, `season_id`) + ) + """.format( + path + ) + ) + + print("\nCreating table episodes...") + pool.execute_with_retries( + """ + PRAGMA TablePathPrefix("{}"); + CREATE table `episodes` ( + `series_id` Uint64, + `season_id` Uint64, + `episode_id` Uint64, + `title` Utf8, + `air_date` Uint64, + PRIMARY KEY (`series_id`, `season_id`, `episode_id`) + ) + """.format( + path + ) + ) + + +def is_directory_exists(driver, path): + try: + return driver.scheme_client.describe_path(path).is_directory() + except ydb.SchemeError: + return False + + +def ensure_path_exists(driver, database, path): + paths_to_create = list() + path = path.rstrip("/") + while path not in ("", database): + full_path = posixpath.join(database, path) + if is_directory_exists(driver, full_path): + break + paths_to_create.append(full_path) + path = posixpath.dirname(path).rstrip("/") + + while len(paths_to_create) > 0: + full_path = paths_to_create.pop(-1) + driver.scheme_client.make_directory(full_path) + + +def run(endpoint, database, path): + with ydb.Driver( + endpoint=endpoint, + database=database, + # credentials=ydb.credentials_from_env_variables() + ) as driver: + driver.wait(timeout=5, fail_fast=True) + + with ydb.QuerySessionPool(driver) as pool: + + ensure_path_exists(driver, database, path) + + # absolute path - prefix to the table's names, + # including the database location + full_path = posixpath.join(database, path) + + drop_tables(pool, full_path) + + create_tables(pool, full_path) + + fill_tables_with_data(pool, full_path) + + select_simple(pool, full_path) + + upsert_simple(pool, full_path) + + select_with_parameters(pool, full_path, 2, 3, 7) + select_with_parameters(pool, full_path, 2, 3, 8) + + explicit_tcl(pool, full_path, 2, 6, 1) + select_with_parameters(pool, full_path, 2, 6, 1) diff --git a/examples/basic_example_v2/basic_example_data.py b/examples/basic_example_v2/basic_example_data.py new file mode 100644 index 00000000..2363fe2e --- /dev/null +++ b/examples/basic_example_v2/basic_example_data.py @@ -0,0 +1,182 @@ +# -*- coding: utf-8 -*- +import iso8601 +import ydb + + +def to_days(date): + timedelta = iso8601.parse_date(date) - iso8601.parse_date("1970-1-1") + return timedelta.days + + +class Series(object): + __slots__ = ("series_id", "title", "release_date", "series_info") + + def __init__(self, series_id, title, release_date, series_info): + self.series_id = series_id + self.title = title + self.release_date = to_days(release_date) + self.series_info = series_info + + +class Season(object): + __slots__ = ("series_id", "season_id", "title", "first_aired", "last_aired") + + def __init__(self, series_id, season_id, title, first_aired, last_aired): + self.series_id = series_id + self.season_id = season_id + self.title = title + self.first_aired = to_days(first_aired) + self.last_aired = to_days(last_aired) + + +class Episode(object): + __slots__ = ("series_id", "season_id", "episode_id", "title", "air_date") + + def __init__(self, series_id, season_id, episode_id, title, air_date): + self.series_id = series_id + self.season_id = season_id + self.episode_id = episode_id + self.title = title + self.air_date = to_days(air_date) + + +def get_series_data(): + return [ + Series( + 1, + "IT Crowd", + "2006-02-03", + "The IT Crowd is a British sitcom produced by Channel 4, written by Graham Linehan, produced by " + "Ash Atalla and starring Chris O'Dowd, Richard Ayoade, Katherine Parkinson, and Matt Berry.", + ), + Series( + 2, + "Silicon Valley", + "2014-04-06", + "Silicon Valley is an American comedy television series created by Mike Judge, John Altschuler and " + "Dave Krinsky. The series focuses on five young men who founded a startup company in Silicon Valley.", + ), + ] + + +def get_series_data_type(): + struct_type = ydb.StructType() + struct_type.add_member("series_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("title", ydb.PrimitiveType.Utf8) + struct_type.add_member("series_info", ydb.PrimitiveType.Utf8) + struct_type.add_member("release_date", ydb.PrimitiveType.Date) + return ydb.ListType(struct_type) + + +def get_seasons_data(): + return [ + Season(1, 1, "Season 1", "2006-02-03", "2006-03-03"), + Season(1, 2, "Season 2", "2007-08-24", "2007-09-28"), + Season(1, 3, "Season 3", "2008-11-21", "2008-12-26"), + Season(1, 4, "Season 4", "2010-06-25", "2010-07-30"), + Season(2, 1, "Season 1", "2014-04-06", "2014-06-01"), + Season(2, 2, "Season 2", "2015-04-12", "2015-06-14"), + Season(2, 3, "Season 3", "2016-04-24", "2016-06-26"), + Season(2, 4, "Season 4", "2017-04-23", "2017-06-25"), + Season(2, 5, "Season 5", "2018-03-25", "2018-05-13"), + ] + + +def get_seasons_data_type(): + struct_type = ydb.StructType() + struct_type.add_member("series_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("season_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("title", ydb.PrimitiveType.Utf8) + struct_type.add_member("first_aired", ydb.PrimitiveType.Date) + struct_type.add_member("last_aired", ydb.PrimitiveType.Date) + return ydb.ListType(struct_type) + + +def get_episodes_data(): + return [ + Episode(1, 1, 1, "Yesterday's Jam", "2006-02-03"), + Episode(1, 1, 2, "Calamity Jen", "2006-02-03"), + Episode(1, 1, 3, "Fifty-Fifty", "2006-02-10"), + Episode(1, 1, 4, "The Red Door", "2006-02-17"), + Episode(1, 1, 5, "The Haunting of Bill Crouse", "2006-02-24"), + Episode(1, 1, 6, "Aunt Irma Visits", "2006-03-03"), + Episode(1, 2, 1, "The Work Outing", "2006-08-24"), + Episode(1, 2, 2, "Return of the Golden Child", "2007-08-31"), + Episode(1, 2, 3, "Moss and the German", "2007-09-07"), + Episode(1, 2, 4, "The Dinner Party", "2007-09-14"), + Episode(1, 2, 5, "Smoke and Mirrors", "2007-09-21"), + Episode(1, 2, 6, "Men Without Women", "2007-09-28"), + Episode(1, 3, 1, "From Hell", "2008-11-21"), + Episode(1, 3, 2, "Are We Not Men?", "2008-11-28"), + Episode(1, 3, 3, "Tramps Like Us", "2008-12-05"), + Episode(1, 3, 4, "The Speech", "2008-12-12"), + Episode(1, 3, 5, "Friendface", "2008-12-19"), + Episode(1, 3, 6, "Calendar Geeks", "2008-12-26"), + Episode(1, 4, 1, "Jen The Fredo", "2010-06-25"), + Episode(1, 4, 2, "The Final Countdown", "2010-07-02"), + Episode(1, 4, 3, "Something Happened", "2010-07-09"), + Episode(1, 4, 4, "Italian For Beginners", "2010-07-16"), + Episode(1, 4, 5, "Bad Boys", "2010-07-23"), + Episode(1, 4, 6, "Reynholm vs Reynholm", "2010-07-30"), + ] + + +def get_episodes_data_type(): + struct_type = ydb.StructType() + struct_type.add_member("series_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("season_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("episode_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("title", ydb.PrimitiveType.Utf8) + struct_type.add_member("air_date", ydb.PrimitiveType.Date) + return ydb.ListType(struct_type) + + +def get_episodes_data_for_bulk_upsert(): + return [ + Episode(2, 1, 1, "Minimum Viable Product", "2014-04-06"), + Episode(2, 1, 2, "The Cap Table", "2014-04-13"), + Episode(2, 1, 3, "Articles of Incorporation", "2014-04-20"), + Episode(2, 1, 4, "Fiduciary Duties", "2014-04-27"), + Episode(2, 1, 5, "Signaling Risk", "2014-05-04"), + Episode(2, 1, 6, "Third Party Insourcing", "2014-05-11"), + Episode(2, 1, 7, "Proof of Concept", "2014-05-18"), + Episode(2, 1, 8, "Optimal Tip-to-Tip Efficiency", "2014-06-01"), + Episode(2, 2, 1, "Sand Hill Shuffle", "2015-04-12"), + Episode(2, 2, 2, "Runaway Devaluation", "2015-04-19"), + Episode(2, 2, 3, "Bad Money", "2015-04-26"), + Episode(2, 2, 4, "The Lady", "2015-05-03"), + Episode(2, 2, 5, "Server Space", "2015-05-10"), + Episode(2, 2, 6, "Homicide", "2015-05-17"), + Episode(2, 2, 7, "Adult Content", "2015-05-24"), + Episode(2, 2, 8, "White Hat/Black Hat", "2015-05-31"), + Episode(2, 2, 9, "Binding Arbitration", "2015-06-07"), + Episode(2, 2, 10, "Two Days of the Condor", "2015-06-14"), + Episode(2, 3, 1, "Founder Friendly", "2016-04-24"), + Episode(2, 3, 2, "Two in the Box", "2016-05-01"), + Episode(2, 3, 3, "Meinertzhagen's Haversack", "2016-05-08"), + Episode(2, 3, 4, "Maleant Data Systems Solutions", "2016-05-15"), + Episode(2, 3, 5, "The Empty Chair", "2016-05-22"), + Episode(2, 3, 6, "Bachmanity Insanity", "2016-05-29"), + Episode(2, 3, 7, "To Build a Better Beta", "2016-06-05"), + Episode(2, 3, 8, "Bachman's Earnings Over-Ride", "2016-06-12"), + Episode(2, 3, 9, "Daily Active Users", "2016-06-19"), + Episode(2, 3, 10, "The Uptick", "2016-06-26"), + Episode(2, 4, 1, "Success Failure", "2017-04-23"), + Episode(2, 4, 2, "Terms of Service", "2017-04-30"), + Episode(2, 4, 3, "Intellectual Property", "2017-05-07"), + Episode(2, 4, 4, "Teambuilding Exercise", "2017-05-14"), + Episode(2, 4, 5, "The Blood Boy", "2017-05-21"), + Episode(2, 4, 6, "Customer Service", "2017-05-28"), + Episode(2, 4, 7, "The Patent Troll", "2017-06-04"), + Episode(2, 4, 8, "The Keenan Vortex", "2017-06-11"), + Episode(2, 4, 9, "Hooli-Con", "2017-06-18"), + Episode(2, 4, 10, "Server Error", "2017-06-25"), + Episode(2, 5, 1, "Grow Fast or Die Slow", "2018-03-25"), + Episode(2, 5, 2, "Reorientation", "2018-04-01"), + Episode(2, 5, 3, "Chief Operating Officer", "2018-04-08"), + Episode(2, 5, 4, "Tech Evangelist", "2018-04-15"), + Episode(2, 5, 5, "Facial Recognition", "2018-04-22"), + Episode(2, 5, 6, "Artificial Emotional Intelligence", "2018-04-29"), + Episode(2, 5, 7, "Initial Coin Offering", "2018-05-06"), + Episode(2, 5, 8, "Fifty-One Percent", "2018-05-13"), + ] diff --git a/ydb/convert.py b/ydb/convert.py index 63a5dbe4..9e1478b5 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -303,7 +303,7 @@ def query_parameters_to_pb(parameters): _from_python_type_map = { - int: types.PrimitiveType.Int64, + int: types.PrimitiveType.Uint64, float: types.PrimitiveType.Float, bool: types.PrimitiveType.Bool, str: types.PrimitiveType.Utf8, diff --git a/ydb/query/base.py b/ydb/query/base.py index e08d9f52..9c6462ce 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -238,14 +238,14 @@ def tx_id(self) -> Optional[str]: pass @abc.abstractmethod - def begin(self, settings: Optional[QueryClientSettings] = None) -> None: + def begin(self, settings: Optional[QueryClientSettings] = None) -> "IQueryTxContext": """WARNING: This API is experimental and could be changed. Explicitly begins a transaction :param settings: A request settings - :return: None or exception if begin is failed + :return: Transaction object or exception if begin is failed """ pass diff --git a/ydb/query/pool.py b/ydb/query/pool.py index e7514cdf..51efcb25 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -77,6 +77,15 @@ def wrapped_callee(): return retry_operation_sync(wrapped_callee, retry_settings) + def stop(self, timeout=None): + pass # TODO: implement + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.stop() + class SimpleQuerySessionCheckout: def __init__(self, pool: QuerySessionPool): diff --git a/ydb/query/session.py b/ydb/query/session.py index d6034d34..87351b75 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -283,9 +283,9 @@ def transaction(self, tx_mode: Optional[base.BaseQueryTxMode] = None) -> base.IQ def execute( self, query: str, + parameters: dict = None, syntax: base.QuerySyntax = None, exec_mode: base.QueryExecMode = None, - parameters: dict = None, concurrent_result_sets: bool = False, ) -> base.SyncResponseContextIterator: """WARNING: This API is experimental and could be changed. diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 0a493202..ba0d4a4d 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -313,19 +313,21 @@ def _move_to_commited(self) -> None: return self._tx_state._change_state(QueryTxStateEnum.COMMITTED) - def begin(self, settings: Optional[base.QueryClientSettings] = None) -> None: + def begin(self, settings: Optional[base.QueryClientSettings] = None) -> "BaseQueryTxContext": """WARNING: This API is experimental and could be changed. Explicitly begins a transaction :param settings: A request settings - :return: None or exception if begin is failed + :return: Transaction object or exception if begin is failed """ self._tx_state._check_invalid_transition(QueryTxStateEnum.BEGINED) self._begin_call(settings) + return self + def commit(self, settings: Optional[base.QueryClientSettings] = None) -> None: """WARNING: This API is experimental and could be changed. @@ -365,10 +367,10 @@ def rollback(self, settings: Optional[base.QueryClientSettings] = None) -> None: def execute( self, query: str, + parameters: Optional[dict] = None, commit_tx: Optional[bool] = False, syntax: Optional[base.QuerySyntax] = None, exec_mode: Optional[base.QueryExecMode] = None, - parameters: Optional[dict] = None, concurrent_result_sets: Optional[bool] = False, ) -> base.SyncResponseContextIterator: """WARNING: This API is experimental and could be changed. From 85ca8cf26abb6c6e790279316bd72bea8fd775ab Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 13 Aug 2024 11:04:58 +0300 Subject: [PATCH 107/429] Revert "New basic example with query service" This reverts commit bc285c13eb074a4f6f8b2a3c899a72b14cbb9f97. --- examples/basic_example_v2/README.md | 5 - examples/basic_example_v2/__main__.py | 28 -- examples/basic_example_v2/basic_example.py | 342 ------------------ .../basic_example_v2/basic_example_data.py | 182 ---------- ydb/convert.py | 2 +- ydb/query/base.py | 4 +- ydb/query/pool.py | 9 - ydb/query/session.py | 2 +- ydb/query/transaction.py | 8 +- 9 files changed, 7 insertions(+), 575 deletions(-) delete mode 100644 examples/basic_example_v2/README.md delete mode 100644 examples/basic_example_v2/__main__.py delete mode 100644 examples/basic_example_v2/basic_example.py delete mode 100644 examples/basic_example_v2/basic_example_data.py diff --git a/examples/basic_example_v2/README.md b/examples/basic_example_v2/README.md deleted file mode 100644 index 92ebe21a..00000000 --- a/examples/basic_example_v2/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# YDB Python SDK Example: basic_example_v2 - -Example code demonstrating the basic YDB Python SDK operations. - -See the top-level [README.md](../README.md) file for instructions on running this example. diff --git a/examples/basic_example_v2/__main__.py b/examples/basic_example_v2/__main__.py deleted file mode 100644 index 2397a2c1..00000000 --- a/examples/basic_example_v2/__main__.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -import argparse -import basic_example -import logging - - -if __name__ == "__main__": - parser = argparse.ArgumentParser( - formatter_class=argparse.RawDescriptionHelpFormatter, - description="""\033[92mYDB basic example.\x1b[0m\n""", - ) - parser.add_argument("-d", "--database", help="Name of the database to use", default="/local") - parser.add_argument("-e", "--endpoint", help="Endpoint url to use", default="grpc://localhost:2136") - parser.add_argument("-p", "--path", default="") - parser.add_argument("-v", "--verbose", default=False, action="store_true") - - args = parser.parse_args() - - if args.verbose: - logger = logging.getLogger("ydb.pool.Discovery") - logger.setLevel(logging.INFO) - logger.addHandler(logging.StreamHandler()) - - basic_example.run( - args.endpoint, - args.database, - args.path, - ) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py deleted file mode 100644 index f691e85a..00000000 --- a/examples/basic_example_v2/basic_example.py +++ /dev/null @@ -1,342 +0,0 @@ -# -*- coding: utf-8 -*- -import posixpath -import ydb -import basic_example_data - -# Table path prefix allows to put the working tables into the specific directory -# inside the YDB database. Putting `PRAGMA TablePathPrefix("some/path")` -# at the beginning of the query allows to reference the tables through -# their names "under" the specified directory. -# -# TablePathPrefix has to be defined as an absolute path, which has to be started -# with the current database location. -# -# https://ydb.tech/ru/docs/yql/reference/syntax/pragma#table-path-prefix - -DropTablesQuery = """PRAGMA TablePathPrefix("{}"); -DROP TABLE IF EXISTS series; -DROP TABLE IF EXISTS seasons; -DROP TABLE IF EXISTS episodes; -""" - -FillDataQuery = """PRAGMA TablePathPrefix("{}"); - -DECLARE $seriesData AS List>; - -DECLARE $seasonsData AS List>; - -DECLARE $episodesData AS List>; - -REPLACE INTO series -SELECT - series_id, - title, - series_info, - CAST(release_date AS Uint64) AS release_date -FROM AS_TABLE($seriesData); - -REPLACE INTO seasons -SELECT - series_id, - season_id, - title, - CAST(first_aired AS Uint64) AS first_aired, - CAST(last_aired AS Uint64) AS last_aired -FROM AS_TABLE($seasonsData); - -REPLACE INTO episodes -SELECT - series_id, - season_id, - episode_id, - title, - CAST(air_date AS Uint64) AS air_date -FROM AS_TABLE($episodesData); -""" - - -def fill_tables_with_data(pool, path): - print("\nFilling tables with data...") - - global FillDataQuery - - def callee(session): - - prepared_query = FillDataQuery.format(path) - with session.transaction(ydb.QuerySerializableReadWrite()).execute( - prepared_query, - { - "$seriesData": (basic_example_data.get_series_data(), basic_example_data.get_series_data_type()), - "$seasonsData": (basic_example_data.get_seasons_data(), basic_example_data.get_seasons_data_type()), - "$episodesData": (basic_example_data.get_episodes_data(), basic_example_data.get_episodes_data_type()), - }, - commit_tx=True, - ) as result_sets: - pass - - return pool.retry_operation_sync(callee) - - -def select_simple(pool, path): - print("\nCheck series table...") - - def callee(session): - # new transaction in serializable read write mode - # if query successfully completed you will get result sets. - # otherwise exception will be raised - with session.transaction(ydb.QuerySerializableReadWrite()).execute( - """ - PRAGMA TablePathPrefix("{}"); - $format = DateTime::Format("%Y-%m-%d"); - SELECT - series_id, - title, - $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(release_date AS Int16))) AS Uint32))) AS release_date - FROM series - WHERE series_id = 1; - """.format( - path - ), - commit_tx=True, - ) as result_sets: - first_set = next(result_sets) - for row in first_set.rows: - print( - "series, id: ", - row.series_id, - ", title: ", - row.title, - ", release date: ", - row.release_date, - ) - - return first_set - - return pool.retry_operation_sync(callee) - - -def upsert_simple(pool, path): - print(f"\nPerforming UPSERT into episodes...") - - def callee(session): - with session.transaction().execute( - """ - PRAGMA TablePathPrefix("{}"); - - DECLARE $seriesId AS Uint64; - DECLARE $seasonId AS Uint64; - DECLARE $episodeId AS Uint64; - DECLARE $title AS Utf8; - - UPSERT INTO episodes (series_id, season_id, episode_id, title) VALUES (2, 6, 1, "TBD"); - """.format( - path - ), - commit_tx=True, - ) as result_sets: - pass - - return pool.retry_operation_sync(callee) - - -def select_with_parameters(pool, path, series_id, season_id, episode_id): - def callee(session): - query = """ - PRAGMA TablePathPrefix("{}"); - - DECLARE $seriesId AS Uint64; - DECLARE $seasonId AS Uint64; - DECLARE $episodeId AS Uint64; - - $format = DateTime::Format("%Y-%m-%d"); - SELECT - title, - $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(air_date AS Int16))) AS Uint32))) AS air_date - FROM episodes - WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; - """.format( - path - ) - - with session.transaction(ydb.QuerySerializableReadWrite()).execute( - query, - { - "$seriesId": series_id, # could be defined implicit in case of int, str, bool - "$seasonId": (season_id, ydb.PrimitiveType.Uint64), # could be defined via tuple - "$episodeId": ydb.TypedValue(episode_id, ydb.PrimitiveType.Uint64), # could be defined via special class - }, - commit_tx=True, - ) as result_sets: - print("\n> select_prepared_transaction:") - first_set = next(result_sets) - for row in first_set.rows: - print("episode title:", row.title, ", air date:", row.air_date) - - return first_set - - return pool.retry_operation_sync(callee) - - -# Show usage of explicit Begin/Commit transaction control calls. -# In most cases it's better to use transaction control settings in session.transaction -# calls instead to avoid additional hops to YDB cluster and allow more efficient -# execution of queries. -def explicit_tcl(pool, path, series_id, season_id, episode_id): - def callee(session): - query = """ - PRAGMA TablePathPrefix("{}"); - - DECLARE $seriesId AS Uint64; - DECLARE $seasonId AS Uint64; - DECLARE $episodeId AS Uint64; - - UPDATE episodes - SET air_date = CAST(CurrentUtcDate() AS Uint64) - WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; - """.format( - path - ) - - # Get newly created transaction id - tx = session.transaction(ydb.QuerySerializableReadWrite()).begin() - - # Execute data query. - # Transaction control settings continues active transaction (tx) - with tx.execute( - query, - {"$seriesId": series_id, "$seasonId": season_id, "$episodeId": episode_id}, - ) as result_sets: - pass - - print("\n> explicit TCL call") - - # Commit active transaction(tx) - tx.commit() - - return pool.retry_operation_sync(callee) - - -def drop_tables(pool, path): - print("\nCleaning up existing tables...") - pool.execute_with_retries(DropTablesQuery.format(path)) - - -def create_tables(pool, path): - print("\nCreating table series...") - pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); - CREATE table `series` ( - `series_id` Uint64, - `title` Utf8, - `series_info` Utf8, - `release_date` Uint64, - PRIMARY KEY (`series_id`) - ) - """.format( - path - ) - ) - - print("\nCreating table seasons...") - pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); - CREATE table `seasons` ( - `series_id` Uint64, - `season_id` Uint64, - `title` Utf8, - `first_aired` Uint64, - `last_aired` Uint64, - PRIMARY KEY (`series_id`, `season_id`) - ) - """.format( - path - ) - ) - - print("\nCreating table episodes...") - pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); - CREATE table `episodes` ( - `series_id` Uint64, - `season_id` Uint64, - `episode_id` Uint64, - `title` Utf8, - `air_date` Uint64, - PRIMARY KEY (`series_id`, `season_id`, `episode_id`) - ) - """.format( - path - ) - ) - - -def is_directory_exists(driver, path): - try: - return driver.scheme_client.describe_path(path).is_directory() - except ydb.SchemeError: - return False - - -def ensure_path_exists(driver, database, path): - paths_to_create = list() - path = path.rstrip("/") - while path not in ("", database): - full_path = posixpath.join(database, path) - if is_directory_exists(driver, full_path): - break - paths_to_create.append(full_path) - path = posixpath.dirname(path).rstrip("/") - - while len(paths_to_create) > 0: - full_path = paths_to_create.pop(-1) - driver.scheme_client.make_directory(full_path) - - -def run(endpoint, database, path): - with ydb.Driver( - endpoint=endpoint, - database=database, - # credentials=ydb.credentials_from_env_variables() - ) as driver: - driver.wait(timeout=5, fail_fast=True) - - with ydb.QuerySessionPool(driver) as pool: - - ensure_path_exists(driver, database, path) - - # absolute path - prefix to the table's names, - # including the database location - full_path = posixpath.join(database, path) - - drop_tables(pool, full_path) - - create_tables(pool, full_path) - - fill_tables_with_data(pool, full_path) - - select_simple(pool, full_path) - - upsert_simple(pool, full_path) - - select_with_parameters(pool, full_path, 2, 3, 7) - select_with_parameters(pool, full_path, 2, 3, 8) - - explicit_tcl(pool, full_path, 2, 6, 1) - select_with_parameters(pool, full_path, 2, 6, 1) diff --git a/examples/basic_example_v2/basic_example_data.py b/examples/basic_example_v2/basic_example_data.py deleted file mode 100644 index 2363fe2e..00000000 --- a/examples/basic_example_v2/basic_example_data.py +++ /dev/null @@ -1,182 +0,0 @@ -# -*- coding: utf-8 -*- -import iso8601 -import ydb - - -def to_days(date): - timedelta = iso8601.parse_date(date) - iso8601.parse_date("1970-1-1") - return timedelta.days - - -class Series(object): - __slots__ = ("series_id", "title", "release_date", "series_info") - - def __init__(self, series_id, title, release_date, series_info): - self.series_id = series_id - self.title = title - self.release_date = to_days(release_date) - self.series_info = series_info - - -class Season(object): - __slots__ = ("series_id", "season_id", "title", "first_aired", "last_aired") - - def __init__(self, series_id, season_id, title, first_aired, last_aired): - self.series_id = series_id - self.season_id = season_id - self.title = title - self.first_aired = to_days(first_aired) - self.last_aired = to_days(last_aired) - - -class Episode(object): - __slots__ = ("series_id", "season_id", "episode_id", "title", "air_date") - - def __init__(self, series_id, season_id, episode_id, title, air_date): - self.series_id = series_id - self.season_id = season_id - self.episode_id = episode_id - self.title = title - self.air_date = to_days(air_date) - - -def get_series_data(): - return [ - Series( - 1, - "IT Crowd", - "2006-02-03", - "The IT Crowd is a British sitcom produced by Channel 4, written by Graham Linehan, produced by " - "Ash Atalla and starring Chris O'Dowd, Richard Ayoade, Katherine Parkinson, and Matt Berry.", - ), - Series( - 2, - "Silicon Valley", - "2014-04-06", - "Silicon Valley is an American comedy television series created by Mike Judge, John Altschuler and " - "Dave Krinsky. The series focuses on five young men who founded a startup company in Silicon Valley.", - ), - ] - - -def get_series_data_type(): - struct_type = ydb.StructType() - struct_type.add_member("series_id", ydb.PrimitiveType.Uint64) - struct_type.add_member("title", ydb.PrimitiveType.Utf8) - struct_type.add_member("series_info", ydb.PrimitiveType.Utf8) - struct_type.add_member("release_date", ydb.PrimitiveType.Date) - return ydb.ListType(struct_type) - - -def get_seasons_data(): - return [ - Season(1, 1, "Season 1", "2006-02-03", "2006-03-03"), - Season(1, 2, "Season 2", "2007-08-24", "2007-09-28"), - Season(1, 3, "Season 3", "2008-11-21", "2008-12-26"), - Season(1, 4, "Season 4", "2010-06-25", "2010-07-30"), - Season(2, 1, "Season 1", "2014-04-06", "2014-06-01"), - Season(2, 2, "Season 2", "2015-04-12", "2015-06-14"), - Season(2, 3, "Season 3", "2016-04-24", "2016-06-26"), - Season(2, 4, "Season 4", "2017-04-23", "2017-06-25"), - Season(2, 5, "Season 5", "2018-03-25", "2018-05-13"), - ] - - -def get_seasons_data_type(): - struct_type = ydb.StructType() - struct_type.add_member("series_id", ydb.PrimitiveType.Uint64) - struct_type.add_member("season_id", ydb.PrimitiveType.Uint64) - struct_type.add_member("title", ydb.PrimitiveType.Utf8) - struct_type.add_member("first_aired", ydb.PrimitiveType.Date) - struct_type.add_member("last_aired", ydb.PrimitiveType.Date) - return ydb.ListType(struct_type) - - -def get_episodes_data(): - return [ - Episode(1, 1, 1, "Yesterday's Jam", "2006-02-03"), - Episode(1, 1, 2, "Calamity Jen", "2006-02-03"), - Episode(1, 1, 3, "Fifty-Fifty", "2006-02-10"), - Episode(1, 1, 4, "The Red Door", "2006-02-17"), - Episode(1, 1, 5, "The Haunting of Bill Crouse", "2006-02-24"), - Episode(1, 1, 6, "Aunt Irma Visits", "2006-03-03"), - Episode(1, 2, 1, "The Work Outing", "2006-08-24"), - Episode(1, 2, 2, "Return of the Golden Child", "2007-08-31"), - Episode(1, 2, 3, "Moss and the German", "2007-09-07"), - Episode(1, 2, 4, "The Dinner Party", "2007-09-14"), - Episode(1, 2, 5, "Smoke and Mirrors", "2007-09-21"), - Episode(1, 2, 6, "Men Without Women", "2007-09-28"), - Episode(1, 3, 1, "From Hell", "2008-11-21"), - Episode(1, 3, 2, "Are We Not Men?", "2008-11-28"), - Episode(1, 3, 3, "Tramps Like Us", "2008-12-05"), - Episode(1, 3, 4, "The Speech", "2008-12-12"), - Episode(1, 3, 5, "Friendface", "2008-12-19"), - Episode(1, 3, 6, "Calendar Geeks", "2008-12-26"), - Episode(1, 4, 1, "Jen The Fredo", "2010-06-25"), - Episode(1, 4, 2, "The Final Countdown", "2010-07-02"), - Episode(1, 4, 3, "Something Happened", "2010-07-09"), - Episode(1, 4, 4, "Italian For Beginners", "2010-07-16"), - Episode(1, 4, 5, "Bad Boys", "2010-07-23"), - Episode(1, 4, 6, "Reynholm vs Reynholm", "2010-07-30"), - ] - - -def get_episodes_data_type(): - struct_type = ydb.StructType() - struct_type.add_member("series_id", ydb.PrimitiveType.Uint64) - struct_type.add_member("season_id", ydb.PrimitiveType.Uint64) - struct_type.add_member("episode_id", ydb.PrimitiveType.Uint64) - struct_type.add_member("title", ydb.PrimitiveType.Utf8) - struct_type.add_member("air_date", ydb.PrimitiveType.Date) - return ydb.ListType(struct_type) - - -def get_episodes_data_for_bulk_upsert(): - return [ - Episode(2, 1, 1, "Minimum Viable Product", "2014-04-06"), - Episode(2, 1, 2, "The Cap Table", "2014-04-13"), - Episode(2, 1, 3, "Articles of Incorporation", "2014-04-20"), - Episode(2, 1, 4, "Fiduciary Duties", "2014-04-27"), - Episode(2, 1, 5, "Signaling Risk", "2014-05-04"), - Episode(2, 1, 6, "Third Party Insourcing", "2014-05-11"), - Episode(2, 1, 7, "Proof of Concept", "2014-05-18"), - Episode(2, 1, 8, "Optimal Tip-to-Tip Efficiency", "2014-06-01"), - Episode(2, 2, 1, "Sand Hill Shuffle", "2015-04-12"), - Episode(2, 2, 2, "Runaway Devaluation", "2015-04-19"), - Episode(2, 2, 3, "Bad Money", "2015-04-26"), - Episode(2, 2, 4, "The Lady", "2015-05-03"), - Episode(2, 2, 5, "Server Space", "2015-05-10"), - Episode(2, 2, 6, "Homicide", "2015-05-17"), - Episode(2, 2, 7, "Adult Content", "2015-05-24"), - Episode(2, 2, 8, "White Hat/Black Hat", "2015-05-31"), - Episode(2, 2, 9, "Binding Arbitration", "2015-06-07"), - Episode(2, 2, 10, "Two Days of the Condor", "2015-06-14"), - Episode(2, 3, 1, "Founder Friendly", "2016-04-24"), - Episode(2, 3, 2, "Two in the Box", "2016-05-01"), - Episode(2, 3, 3, "Meinertzhagen's Haversack", "2016-05-08"), - Episode(2, 3, 4, "Maleant Data Systems Solutions", "2016-05-15"), - Episode(2, 3, 5, "The Empty Chair", "2016-05-22"), - Episode(2, 3, 6, "Bachmanity Insanity", "2016-05-29"), - Episode(2, 3, 7, "To Build a Better Beta", "2016-06-05"), - Episode(2, 3, 8, "Bachman's Earnings Over-Ride", "2016-06-12"), - Episode(2, 3, 9, "Daily Active Users", "2016-06-19"), - Episode(2, 3, 10, "The Uptick", "2016-06-26"), - Episode(2, 4, 1, "Success Failure", "2017-04-23"), - Episode(2, 4, 2, "Terms of Service", "2017-04-30"), - Episode(2, 4, 3, "Intellectual Property", "2017-05-07"), - Episode(2, 4, 4, "Teambuilding Exercise", "2017-05-14"), - Episode(2, 4, 5, "The Blood Boy", "2017-05-21"), - Episode(2, 4, 6, "Customer Service", "2017-05-28"), - Episode(2, 4, 7, "The Patent Troll", "2017-06-04"), - Episode(2, 4, 8, "The Keenan Vortex", "2017-06-11"), - Episode(2, 4, 9, "Hooli-Con", "2017-06-18"), - Episode(2, 4, 10, "Server Error", "2017-06-25"), - Episode(2, 5, 1, "Grow Fast or Die Slow", "2018-03-25"), - Episode(2, 5, 2, "Reorientation", "2018-04-01"), - Episode(2, 5, 3, "Chief Operating Officer", "2018-04-08"), - Episode(2, 5, 4, "Tech Evangelist", "2018-04-15"), - Episode(2, 5, 5, "Facial Recognition", "2018-04-22"), - Episode(2, 5, 6, "Artificial Emotional Intelligence", "2018-04-29"), - Episode(2, 5, 7, "Initial Coin Offering", "2018-05-06"), - Episode(2, 5, 8, "Fifty-One Percent", "2018-05-13"), - ] diff --git a/ydb/convert.py b/ydb/convert.py index 9e1478b5..63a5dbe4 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -303,7 +303,7 @@ def query_parameters_to_pb(parameters): _from_python_type_map = { - int: types.PrimitiveType.Uint64, + int: types.PrimitiveType.Int64, float: types.PrimitiveType.Float, bool: types.PrimitiveType.Bool, str: types.PrimitiveType.Utf8, diff --git a/ydb/query/base.py b/ydb/query/base.py index 9c6462ce..e08d9f52 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -238,14 +238,14 @@ def tx_id(self) -> Optional[str]: pass @abc.abstractmethod - def begin(self, settings: Optional[QueryClientSettings] = None) -> "IQueryTxContext": + def begin(self, settings: Optional[QueryClientSettings] = None) -> None: """WARNING: This API is experimental and could be changed. Explicitly begins a transaction :param settings: A request settings - :return: Transaction object or exception if begin is failed + :return: None or exception if begin is failed """ pass diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 51efcb25..e7514cdf 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -77,15 +77,6 @@ def wrapped_callee(): return retry_operation_sync(wrapped_callee, retry_settings) - def stop(self, timeout=None): - pass # TODO: implement - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_val, exc_tb): - self.stop() - class SimpleQuerySessionCheckout: def __init__(self, pool: QuerySessionPool): diff --git a/ydb/query/session.py b/ydb/query/session.py index 87351b75..d6034d34 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -283,9 +283,9 @@ def transaction(self, tx_mode: Optional[base.BaseQueryTxMode] = None) -> base.IQ def execute( self, query: str, - parameters: dict = None, syntax: base.QuerySyntax = None, exec_mode: base.QueryExecMode = None, + parameters: dict = None, concurrent_result_sets: bool = False, ) -> base.SyncResponseContextIterator: """WARNING: This API is experimental and could be changed. diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index ba0d4a4d..0a493202 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -313,21 +313,19 @@ def _move_to_commited(self) -> None: return self._tx_state._change_state(QueryTxStateEnum.COMMITTED) - def begin(self, settings: Optional[base.QueryClientSettings] = None) -> "BaseQueryTxContext": + def begin(self, settings: Optional[base.QueryClientSettings] = None) -> None: """WARNING: This API is experimental and could be changed. Explicitly begins a transaction :param settings: A request settings - :return: Transaction object or exception if begin is failed + :return: None or exception if begin is failed """ self._tx_state._check_invalid_transition(QueryTxStateEnum.BEGINED) self._begin_call(settings) - return self - def commit(self, settings: Optional[base.QueryClientSettings] = None) -> None: """WARNING: This API is experimental and could be changed. @@ -367,10 +365,10 @@ def rollback(self, settings: Optional[base.QueryClientSettings] = None) -> None: def execute( self, query: str, - parameters: Optional[dict] = None, commit_tx: Optional[bool] = False, syntax: Optional[base.QuerySyntax] = None, exec_mode: Optional[base.QueryExecMode] = None, + parameters: Optional[dict] = None, concurrent_result_sets: Optional[bool] = False, ) -> base.SyncResponseContextIterator: """WARNING: This API is experimental and could be changed. From a299e2291e3805aeeee99c8bfb196c8f28fb6508 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 13 Aug 2024 11:08:11 +0300 Subject: [PATCH 108/429] style fixes --- examples/basic_example_v2/basic_example.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index f691e85a..b008d73c 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -177,7 +177,10 @@ def callee(session): { "$seriesId": series_id, # could be defined implicit in case of int, str, bool "$seasonId": (season_id, ydb.PrimitiveType.Uint64), # could be defined via tuple - "$episodeId": ydb.TypedValue(episode_id, ydb.PrimitiveType.Uint64), # could be defined via special class + "$episodeId": ydb.TypedValue( + episode_id, + ydb.PrimitiveType.Uint64 + ), # could be defined via special class }, commit_tx=True, ) as result_sets: @@ -282,7 +285,7 @@ def create_tables(pool, path): PRIMARY KEY (`series_id`, `season_id`, `episode_id`) ) """.format( - path + path ) ) From e207c998bc06f1012ad7be6e2d9db586b076bb34 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 13 Aug 2024 11:18:43 +0300 Subject: [PATCH 109/429] style fixes --- examples/basic_example_v2/basic_example.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index b008d73c..2f638f4f 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -178,8 +178,7 @@ def callee(session): "$seriesId": series_id, # could be defined implicit in case of int, str, bool "$seasonId": (season_id, ydb.PrimitiveType.Uint64), # could be defined via tuple "$episodeId": ydb.TypedValue( - episode_id, - ydb.PrimitiveType.Uint64 + episode_id, ydb.PrimitiveType.Uint64 ), # could be defined via special class }, commit_tx=True, From 565451259987a0509062968ce3a4be2bbecf6520 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 13 Aug 2024 11:26:19 +0300 Subject: [PATCH 110/429] style fixes --- examples/basic_example_v2/basic_example.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index 2f638f4f..2a6fe504 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -85,7 +85,7 @@ def callee(session): "$episodesData": (basic_example_data.get_episodes_data(), basic_example_data.get_episodes_data_type()), }, commit_tx=True, - ) as result_sets: + ) as _: pass return pool.retry_operation_sync(callee) @@ -130,7 +130,7 @@ def callee(session): def upsert_simple(pool, path): - print(f"\nPerforming UPSERT into episodes...") + print("\nPerforming UPSERT into episodes...") def callee(session): with session.transaction().execute( @@ -147,7 +147,7 @@ def callee(session): path ), commit_tx=True, - ) as result_sets: + ) as _: pass return pool.retry_operation_sync(callee) @@ -221,7 +221,7 @@ def callee(session): with tx.execute( query, {"$seriesId": series_id, "$seasonId": season_id, "$episodeId": episode_id}, - ) as result_sets: + ) as _: pass print("\n> explicit TCL call") From 5491395fe4d0b7b0ca1d5293b445860231bcceab Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 13 Aug 2024 12:49:13 +0300 Subject: [PATCH 111/429] revert Uint64->Int64 --- examples/basic_example_v2/basic_example.py | 24 ++++++---------------- ydb/convert.py | 2 +- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index 2a6fe504..1cded980 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -136,12 +136,6 @@ def callee(session): with session.transaction().execute( """ PRAGMA TablePathPrefix("{}"); - - DECLARE $seriesId AS Uint64; - DECLARE $seasonId AS Uint64; - DECLARE $episodeId AS Uint64; - DECLARE $title AS Utf8; - UPSERT INTO episodes (series_id, season_id, episode_id, title) VALUES (2, 6, 1, "TBD"); """.format( path @@ -157,11 +151,6 @@ def select_with_parameters(pool, path, series_id, season_id, episode_id): def callee(session): query = """ PRAGMA TablePathPrefix("{}"); - - DECLARE $seriesId AS Uint64; - DECLARE $seasonId AS Uint64; - DECLARE $episodeId AS Uint64; - $format = DateTime::Format("%Y-%m-%d"); SELECT title, @@ -175,7 +164,7 @@ def callee(session): with session.transaction(ydb.QuerySerializableReadWrite()).execute( query, { - "$seriesId": series_id, # could be defined implicit in case of int, str, bool + "$seriesId": (series_id, ydb.PrimitiveType.Uint64), "$seasonId": (season_id, ydb.PrimitiveType.Uint64), # could be defined via tuple "$episodeId": ydb.TypedValue( episode_id, ydb.PrimitiveType.Uint64 @@ -201,11 +190,6 @@ def explicit_tcl(pool, path, series_id, season_id, episode_id): def callee(session): query = """ PRAGMA TablePathPrefix("{}"); - - DECLARE $seriesId AS Uint64; - DECLARE $seasonId AS Uint64; - DECLARE $episodeId AS Uint64; - UPDATE episodes SET air_date = CAST(CurrentUtcDate() AS Uint64) WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; @@ -220,7 +204,11 @@ def callee(session): # Transaction control settings continues active transaction (tx) with tx.execute( query, - {"$seriesId": series_id, "$seasonId": season_id, "$episodeId": episode_id}, + { + "$seriesId": (series_id, ydb.PrimitiveType.Uint64), + "$seasonId": (season_id, ydb.PrimitiveType.Uint64), + "$episodeId": (episode_id, ydb.PrimitiveType.Uint64), + }, ) as _: pass diff --git a/ydb/convert.py b/ydb/convert.py index 9e1478b5..63a5dbe4 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -303,7 +303,7 @@ def query_parameters_to_pb(parameters): _from_python_type_map = { - int: types.PrimitiveType.Uint64, + int: types.PrimitiveType.Int64, float: types.PrimitiveType.Float, bool: types.PrimitiveType.Bool, str: types.PrimitiveType.Utf8, From eaa8df2df3603fab15970c31974d716cf1b7aad2 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 13 Aug 2024 16:02:24 +0300 Subject: [PATCH 112/429] move bulk upsert data to simple upsert --- examples/basic_example_v2/basic_example.py | 2 +- .../basic_example_v2/basic_example_data.py | 25 ++++++++----------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index 1cded980..443a32b5 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -303,7 +303,7 @@ def run(endpoint, database, path): with ydb.Driver( endpoint=endpoint, database=database, - # credentials=ydb.credentials_from_env_variables() + credentials=ydb.credentials_from_env_variables() ) as driver: driver.wait(timeout=5, fail_fast=True) diff --git a/examples/basic_example_v2/basic_example_data.py b/examples/basic_example_v2/basic_example_data.py index 2363fe2e..1aebde89 100644 --- a/examples/basic_example_v2/basic_example_data.py +++ b/examples/basic_example_v2/basic_example_data.py @@ -118,21 +118,6 @@ def get_episodes_data(): Episode(1, 4, 4, "Italian For Beginners", "2010-07-16"), Episode(1, 4, 5, "Bad Boys", "2010-07-23"), Episode(1, 4, 6, "Reynholm vs Reynholm", "2010-07-30"), - ] - - -def get_episodes_data_type(): - struct_type = ydb.StructType() - struct_type.add_member("series_id", ydb.PrimitiveType.Uint64) - struct_type.add_member("season_id", ydb.PrimitiveType.Uint64) - struct_type.add_member("episode_id", ydb.PrimitiveType.Uint64) - struct_type.add_member("title", ydb.PrimitiveType.Utf8) - struct_type.add_member("air_date", ydb.PrimitiveType.Date) - return ydb.ListType(struct_type) - - -def get_episodes_data_for_bulk_upsert(): - return [ Episode(2, 1, 1, "Minimum Viable Product", "2014-04-06"), Episode(2, 1, 2, "The Cap Table", "2014-04-13"), Episode(2, 1, 3, "Articles of Incorporation", "2014-04-20"), @@ -180,3 +165,13 @@ def get_episodes_data_for_bulk_upsert(): Episode(2, 5, 7, "Initial Coin Offering", "2018-05-06"), Episode(2, 5, 8, "Fifty-One Percent", "2018-05-13"), ] + + +def get_episodes_data_type(): + struct_type = ydb.StructType() + struct_type.add_member("series_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("season_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("episode_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("title", ydb.PrimitiveType.Utf8) + struct_type.add_member("air_date", ydb.PrimitiveType.Date) + return ydb.ListType(struct_type) From 45807f5e8ff0a64545ceed749ddcebd139352a4a Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 10:25:30 +0300 Subject: [PATCH 113/429] review fixes --- examples/basic_example_v2/basic_example.py | 122 ++++++++---------- .../basic_example_v2/basic_example_data.py | 12 +- 2 files changed, 62 insertions(+), 72 deletions(-) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index 443a32b5..fab88702 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -22,22 +22,22 @@ FillDataQuery = """PRAGMA TablePathPrefix("{}"); DECLARE $seriesData AS List>; DECLARE $seasonsData AS List>; DECLARE $episodesData AS List>; @@ -46,7 +46,7 @@ series_id, title, series_info, - CAST(release_date AS Uint64) AS release_date + release_date FROM AS_TABLE($seriesData); REPLACE INTO seasons @@ -54,8 +54,8 @@ series_id, season_id, title, - CAST(first_aired AS Uint64) AS first_aired, - CAST(last_aired AS Uint64) AS last_aired + first_aired, + last_aired FROM AS_TABLE($seasonsData); REPLACE INTO episodes @@ -64,7 +64,7 @@ season_id, episode_id, title, - CAST(air_date AS Uint64) AS air_date + air_date FROM AS_TABLE($episodesData); """ @@ -76,9 +76,9 @@ def fill_tables_with_data(pool, path): def callee(session): - prepared_query = FillDataQuery.format(path) + query = FillDataQuery.format(path) with session.transaction(ydb.QuerySerializableReadWrite()).execute( - prepared_query, + query, { "$seriesData": (basic_example_data.get_series_data(), basic_example_data.get_series_data_type()), "$seasonsData": (basic_example_data.get_seasons_data(), basic_example_data.get_seasons_data_type()), @@ -93,40 +93,31 @@ def callee(session): def select_simple(pool, path): print("\nCheck series table...") + result_sets = pool.execute_with_retries( + """ + PRAGMA TablePathPrefix("{}"); + SELECT + series_id, + title, + release_date + FROM series + WHERE series_id = 1; + """.format( + path + ), + ) + first_set = result_sets[0] + for row in first_set.rows: + print( + "series, id: ", + row.series_id, + ", title: ", + row.title, + ", release date: ", + row.release_date, + ) - def callee(session): - # new transaction in serializable read write mode - # if query successfully completed you will get result sets. - # otherwise exception will be raised - with session.transaction(ydb.QuerySerializableReadWrite()).execute( - """ - PRAGMA TablePathPrefix("{}"); - $format = DateTime::Format("%Y-%m-%d"); - SELECT - series_id, - title, - $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(release_date AS Int16))) AS Uint32))) AS release_date - FROM series - WHERE series_id = 1; - """.format( - path - ), - commit_tx=True, - ) as result_sets: - first_set = next(result_sets) - for row in first_set.rows: - print( - "series, id: ", - row.series_id, - ", title: ", - row.title, - ", release date: ", - row.release_date, - ) - - return first_set - - return pool.retry_operation_sync(callee) + return first_set def upsert_simple(pool, path): @@ -151,10 +142,9 @@ def select_with_parameters(pool, path, series_id, season_id, episode_id): def callee(session): query = """ PRAGMA TablePathPrefix("{}"); - $format = DateTime::Format("%Y-%m-%d"); SELECT title, - $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(air_date AS Int16))) AS Uint32))) AS air_date + air_date FROM episodes WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; """.format( @@ -164,10 +154,10 @@ def callee(session): with session.transaction(ydb.QuerySerializableReadWrite()).execute( query, { - "$seriesId": (series_id, ydb.PrimitiveType.Uint64), - "$seasonId": (season_id, ydb.PrimitiveType.Uint64), # could be defined via tuple + "$seriesId": series_id, # could be defined implicit + "$seasonId": (season_id, ydb.PrimitiveType.Int64), # could be defined via tuple "$episodeId": ydb.TypedValue( - episode_id, ydb.PrimitiveType.Uint64 + episode_id, ydb.PrimitiveType.Int64 ), # could be defined via special class }, commit_tx=True, @@ -186,12 +176,12 @@ def callee(session): # In most cases it's better to use transaction control settings in session.transaction # calls instead to avoid additional hops to YDB cluster and allow more efficient # execution of queries. -def explicit_tcl(pool, path, series_id, season_id, episode_id): +def explicit_transaction_control(pool, path, series_id, season_id, episode_id): def callee(session): query = """ PRAGMA TablePathPrefix("{}"); UPDATE episodes - SET air_date = CAST(CurrentUtcDate() AS Uint64) + SET air_date = CurrentUtcDate() WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; """.format( path @@ -205,9 +195,9 @@ def callee(session): with tx.execute( query, { - "$seriesId": (series_id, ydb.PrimitiveType.Uint64), - "$seasonId": (season_id, ydb.PrimitiveType.Uint64), - "$episodeId": (episode_id, ydb.PrimitiveType.Uint64), + "$seriesId": (series_id, ydb.PrimitiveType.Int64), + "$seasonId": (season_id, ydb.PrimitiveType.Int64), + "$episodeId": (episode_id, ydb.PrimitiveType.Int64), }, ) as _: pass @@ -231,10 +221,10 @@ def create_tables(pool, path): """ PRAGMA TablePathPrefix("{}"); CREATE table `series` ( - `series_id` Uint64, + `series_id` Int64, `title` Utf8, `series_info` Utf8, - `release_date` Uint64, + `release_date` Date, PRIMARY KEY (`series_id`) ) """.format( @@ -247,11 +237,11 @@ def create_tables(pool, path): """ PRAGMA TablePathPrefix("{}"); CREATE table `seasons` ( - `series_id` Uint64, - `season_id` Uint64, + `series_id` Int64, + `season_id` Int64, `title` Utf8, - `first_aired` Uint64, - `last_aired` Uint64, + `first_aired` Date, + `last_aired` Date, PRIMARY KEY (`series_id`, `season_id`) ) """.format( @@ -264,11 +254,11 @@ def create_tables(pool, path): """ PRAGMA TablePathPrefix("{}"); CREATE table `episodes` ( - `series_id` Uint64, - `season_id` Uint64, - `episode_id` Uint64, + `series_id` Int64, + `season_id` Int64, + `episode_id` Int64, `title` Utf8, - `air_date` Uint64, + `air_date` Date, PRIMARY KEY (`series_id`, `season_id`, `episode_id`) ) """.format( @@ -328,5 +318,5 @@ def run(endpoint, database, path): select_with_parameters(pool, full_path, 2, 3, 7) select_with_parameters(pool, full_path, 2, 3, 8) - explicit_tcl(pool, full_path, 2, 6, 1) + explicit_transaction_control(pool, full_path, 2, 6, 1) select_with_parameters(pool, full_path, 2, 6, 1) diff --git a/examples/basic_example_v2/basic_example_data.py b/examples/basic_example_v2/basic_example_data.py index 1aebde89..3c9616f4 100644 --- a/examples/basic_example_v2/basic_example_data.py +++ b/examples/basic_example_v2/basic_example_data.py @@ -61,7 +61,7 @@ def get_series_data(): def get_series_data_type(): struct_type = ydb.StructType() - struct_type.add_member("series_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("series_id", ydb.PrimitiveType.Int64) struct_type.add_member("title", ydb.PrimitiveType.Utf8) struct_type.add_member("series_info", ydb.PrimitiveType.Utf8) struct_type.add_member("release_date", ydb.PrimitiveType.Date) @@ -84,8 +84,8 @@ def get_seasons_data(): def get_seasons_data_type(): struct_type = ydb.StructType() - struct_type.add_member("series_id", ydb.PrimitiveType.Uint64) - struct_type.add_member("season_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("series_id", ydb.PrimitiveType.Int64) + struct_type.add_member("season_id", ydb.PrimitiveType.Int64) struct_type.add_member("title", ydb.PrimitiveType.Utf8) struct_type.add_member("first_aired", ydb.PrimitiveType.Date) struct_type.add_member("last_aired", ydb.PrimitiveType.Date) @@ -169,9 +169,9 @@ def get_episodes_data(): def get_episodes_data_type(): struct_type = ydb.StructType() - struct_type.add_member("series_id", ydb.PrimitiveType.Uint64) - struct_type.add_member("season_id", ydb.PrimitiveType.Uint64) - struct_type.add_member("episode_id", ydb.PrimitiveType.Uint64) + struct_type.add_member("series_id", ydb.PrimitiveType.Int64) + struct_type.add_member("season_id", ydb.PrimitiveType.Int64) + struct_type.add_member("episode_id", ydb.PrimitiveType.Int64) struct_type.add_member("title", ydb.PrimitiveType.Utf8) struct_type.add_member("air_date", ydb.PrimitiveType.Date) return ydb.ListType(struct_type) From e4a2fd895168ff30631b67568ae87a656d65b23f Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 10:28:59 +0300 Subject: [PATCH 114/429] style fixes --- examples/basic_example_v2/basic_example.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index fab88702..0f810698 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -96,10 +96,11 @@ def select_simple(pool, path): result_sets = pool.execute_with_retries( """ PRAGMA TablePathPrefix("{}"); + $format = DateTime::Format("%Y-%m-%d"); SELECT series_id, title, - release_date + $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(release_date AS Int16))) AS Uint32))) AS release_date FROM series WHERE series_id = 1; """.format( @@ -142,9 +143,10 @@ def select_with_parameters(pool, path, series_id, season_id, episode_id): def callee(session): query = """ PRAGMA TablePathPrefix("{}"); + $format = DateTime::Format("%Y-%m-%d"); SELECT title, - air_date + $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(air_date AS Int16))) AS Uint32))) AS air_date FROM episodes WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; """.format( @@ -156,9 +158,7 @@ def callee(session): { "$seriesId": series_id, # could be defined implicit "$seasonId": (season_id, ydb.PrimitiveType.Int64), # could be defined via tuple - "$episodeId": ydb.TypedValue( - episode_id, ydb.PrimitiveType.Int64 - ), # could be defined via special class + "$episodeId": ydb.TypedValue(episode_id, ydb.PrimitiveType.Int64), # could be defined via special class }, commit_tx=True, ) as result_sets: @@ -293,7 +293,7 @@ def run(endpoint, database, path): with ydb.Driver( endpoint=endpoint, database=database, - credentials=ydb.credentials_from_env_variables() + credentials=ydb.credentials_from_env_variables(), ) as driver: driver.wait(timeout=5, fail_fast=True) From c74e46861026907f531753ae983134588558013b Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 13:30:32 +0300 Subject: [PATCH 115/429] make to native converters by default --- examples/basic_example_v2/basic_example.py | 6 ++-- ydb/query/base.py | 32 ++++++++++++++++++++-- ydb/query/session.py | 6 +++- ydb/query/transaction.py | 5 ++++ 4 files changed, 42 insertions(+), 7 deletions(-) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index 0f810698..42802b61 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -96,11 +96,10 @@ def select_simple(pool, path): result_sets = pool.execute_with_retries( """ PRAGMA TablePathPrefix("{}"); - $format = DateTime::Format("%Y-%m-%d"); SELECT series_id, title, - $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(release_date AS Int16))) AS Uint32))) AS release_date + release_date FROM series WHERE series_id = 1; """.format( @@ -143,10 +142,9 @@ def select_with_parameters(pool, path, series_id, season_id, episode_id): def callee(session): query = """ PRAGMA TablePathPrefix("{}"); - $format = DateTime::Format("%Y-%m-%d"); SELECT title, - $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(air_date AS Int16))) AS Uint32))) AS air_date + air_date FROM episodes WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; """.format( diff --git a/ydb/query/base.py b/ydb/query/base.py index 9c6462ce..49c8f42d 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -53,7 +53,32 @@ def __exit__(self, exc_type, exc_val, exc_tb): class QueryClientSettings: - pass + def __init__(self): + self._native_datetime_in_result_sets = True + self._native_date_in_result_sets = True + self._native_json_in_result_sets = True + self._native_interval_in_result_sets = True + self._native_timestamp_in_result_sets = True + + def with_native_timestamp_in_result_sets(self, enabled: bool) -> "QueryClientSettings": + self._native_timestamp_in_result_sets = enabled + return self + + def with_native_interval_in_result_sets(self, enabled: bool) -> "QueryClientSettings": + self._native_interval_in_result_sets = enabled + return self + + def with_native_json_in_result_sets(self, enabled: bool) -> "QueryClientSettings": + self._native_json_in_result_sets = enabled + return self + + def with_native_date_in_result_sets(self, enabled: bool) -> "QueryClientSettings": + self._native_date_in_result_sets = enabled + return self + + def with_native_datetime_in_result_sets(self, enabled: bool) -> "QueryClientSettings": + self._native_datetime_in_result_sets = enabled + return self class IQuerySessionState(abc.ABC): @@ -284,6 +309,7 @@ def execute( exec_mode: Optional[QueryExecMode] = None, parameters: Optional[dict] = None, concurrent_result_sets: Optional[bool] = False, + settings: Optional[QueryClientSettings] = None, ) -> Iterator: """WARNING: This API is experimental and could be changed. @@ -300,6 +326,7 @@ def execute( 4) QueryExecMode.PARSE. :param parameters: dict with parameters and YDB types; :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; + :param settings: An additional request settings QueryClientSettings; :return: Iterator with result sets """ @@ -367,13 +394,14 @@ def wrap_execute_query_response( response_pb: _apis.ydb_query.ExecuteQueryResponsePart, tx: Optional[IQueryTxContext] = None, commit_tx: Optional[bool] = False, + settings: Optional[QueryClientSettings] = None, ) -> convert.ResultSet: issues._process_response(response_pb) if tx and response_pb.tx_meta and not tx.tx_id: tx._move_to_beginned(response_pb.tx_meta.id) if tx and commit_tx: tx._move_to_commited() - return convert.ResultSet.from_message(response_pb.result_set) + return convert.ResultSet.from_message(response_pb.result_set, settings) def bad_session_handler(func): diff --git a/ydb/query/session.py b/ydb/query/session.py index 87351b75..1cc08ec6 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -313,5 +313,9 @@ def execute( return base.SyncResponseContextIterator( stream_it, - lambda resp: base.wrap_execute_query_response(rpc_state=None, response_pb=resp), + lambda resp: base.wrap_execute_query_response( + rpc_state=None, + response_pb=resp, + settings=self._settings + ), ) diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index ba0d4a4d..cecc612c 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -372,6 +372,7 @@ def execute( syntax: Optional[base.QuerySyntax] = None, exec_mode: Optional[base.QueryExecMode] = None, concurrent_result_sets: Optional[bool] = False, + settings: Optional[base.QueryClientSettings] = None, ) -> base.SyncResponseContextIterator: """WARNING: This API is experimental and could be changed. @@ -388,6 +389,7 @@ def execute( 4) QueryExecMode.PARSE. :param parameters: dict with parameters and YDB types; :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; + :param settings: An additional request settings QueryClientSettings; :return: Iterator with result sets """ @@ -402,6 +404,8 @@ def execute( parameters=parameters, concurrent_result_sets=concurrent_result_sets, ) + + settings = settings if settings is not None else self.session._settings self._prev_stream = base.SyncResponseContextIterator( stream_it, lambda resp: base.wrap_execute_query_response( @@ -409,6 +413,7 @@ def execute( response_pb=resp, tx=self, commit_tx=commit_tx, + settings=settings ), ) return self._prev_stream From 34d91cd7f3b277f855590335aa9da96aadb5af15 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 13:37:38 +0300 Subject: [PATCH 116/429] style fixes --- ydb/query/session.py | 2 +- ydb/query/transaction.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ydb/query/session.py b/ydb/query/session.py index 1cc08ec6..1fa3025d 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -316,6 +316,6 @@ def execute( lambda resp: base.wrap_execute_query_response( rpc_state=None, response_pb=resp, - settings=self._settings + settings=self._settings, ), ) diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index cecc612c..f42571c2 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -413,7 +413,7 @@ def execute( response_pb=resp, tx=self, commit_tx=commit_tx, - settings=settings + settings=settings, ), ) return self._prev_stream From 3ddf96f44046a04f45a8a126957a33d503c7897d Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 15:19:13 +0300 Subject: [PATCH 117/429] simplify examples --- examples/basic_example_v2/basic_example.py | 85 +++++++++------------- ydb/query/base.py | 2 +- ydb/query/pool.py | 9 ++- 3 files changed, 42 insertions(+), 54 deletions(-) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index 42802b61..53b2b428 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -69,29 +69,22 @@ """ -def fill_tables_with_data(pool, path): +def fill_tables_with_data(pool: ydb.QuerySessionPool, path: str): print("\nFilling tables with data...") - global FillDataQuery + query = FillDataQuery.format(path) - def callee(session): - - query = FillDataQuery.format(path) - with session.transaction(ydb.QuerySerializableReadWrite()).execute( - query, - { - "$seriesData": (basic_example_data.get_series_data(), basic_example_data.get_series_data_type()), - "$seasonsData": (basic_example_data.get_seasons_data(), basic_example_data.get_seasons_data_type()), - "$episodesData": (basic_example_data.get_episodes_data(), basic_example_data.get_episodes_data_type()), - }, - commit_tx=True, - ) as _: - pass - - return pool.retry_operation_sync(callee) + pool.execute_with_retries( + query, + { + "$seriesData": (basic_example_data.get_series_data(), basic_example_data.get_series_data_type()), + "$seasonsData": (basic_example_data.get_seasons_data(), basic_example_data.get_seasons_data_type()), + "$episodesData": (basic_example_data.get_episodes_data(), basic_example_data.get_episodes_data_type()), + }, + ) -def select_simple(pool, path): +def select_simple(pool: ydb.QuerySessionSync, path): print("\nCheck series table...") result_sets = pool.execute_with_retries( """ @@ -120,27 +113,22 @@ def select_simple(pool, path): return first_set -def upsert_simple(pool, path): +def upsert_simple(pool: ydb.QuerySessionPool, path): print("\nPerforming UPSERT into episodes...") - def callee(session): - with session.transaction().execute( - """ - PRAGMA TablePathPrefix("{}"); - UPSERT INTO episodes (series_id, season_id, episode_id, title) VALUES (2, 6, 1, "TBD"); - """.format( - path - ), - commit_tx=True, - ) as _: - pass - - return pool.retry_operation_sync(callee) + pool.execute_with_retries( + """ + PRAGMA TablePathPrefix("{}"); + UPSERT INTO episodes (series_id, season_id, episode_id, title) VALUES (2, 6, 1, "TBD"); + """.format( + path + ) + ) def select_with_parameters(pool, path, series_id, season_id, episode_id): - def callee(session): - query = """ + result_sets = pool.execute_with_retries( + """ PRAGMA TablePathPrefix("{}"); SELECT title, @@ -149,25 +137,20 @@ def callee(session): WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; """.format( path - ) - - with session.transaction(ydb.QuerySerializableReadWrite()).execute( - query, - { - "$seriesId": series_id, # could be defined implicit - "$seasonId": (season_id, ydb.PrimitiveType.Int64), # could be defined via tuple - "$episodeId": ydb.TypedValue(episode_id, ydb.PrimitiveType.Int64), # could be defined via special class - }, - commit_tx=True, - ) as result_sets: - print("\n> select_prepared_transaction:") - first_set = next(result_sets) - for row in first_set.rows: - print("episode title:", row.title, ", air date:", row.air_date) + ), + { + "$seriesId": series_id, # could be defined implicit + "$seasonId": (season_id, ydb.PrimitiveType.Int64), # could be defined via tuple + "$episodeId": ydb.TypedValue(episode_id, ydb.PrimitiveType.Int64), # could be defined via special class + } + ) - return first_set + print("\n> select_with_parameters:") + first_set = result_sets[0] + for row in first_set.rows: + print("episode title:", row.title, ", air date:", row.air_date) - return pool.retry_operation_sync(callee) + return first_set # Show usage of explicit Begin/Commit transaction control calls. diff --git a/ydb/query/base.py b/ydb/query/base.py index 49c8f42d..eef51ee6 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -166,9 +166,9 @@ def transaction(self, tx_mode: Optional[BaseQueryTxMode] = None) -> "IQueryTxCon def execute( self, query: str, + parameters: Optional[dict] = None, syntax: Optional[QuerySyntax] = None, exec_mode: Optional[QueryExecMode] = None, - parameters: Optional[dict] = None, concurrent_result_sets: Optional[bool] = False, ) -> Iterator: """WARNING: This API is experimental and could be changed. diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 51efcb25..bc214ecb 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -55,7 +55,12 @@ def wrapped_callee(): return retry_operation_sync(wrapped_callee, retry_settings) def execute_with_retries( - self, query: str, retry_settings: Optional[RetrySettings] = None, *args, **kwargs + self, + query: str, + parameters: Optional[dict] = None, + retry_settings: Optional[RetrySettings] = None, + *args, + **kwargs, ) -> List[convert.ResultSet]: """WARNING: This API is experimental and could be changed. Special interface to execute a one-shot queries in a safe, retriable way. @@ -72,7 +77,7 @@ def execute_with_retries( def wrapped_callee(): with self.checkout() as session: - it = session.execute(query, *args, **kwargs) + it = session.execute(query, parameters, *args, **kwargs) return [result_set for result_set in it] return retry_operation_sync(wrapped_callee, retry_settings) From da4cad85de189555bc62bfdb0085399cc931a0f3 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 15:24:06 +0300 Subject: [PATCH 118/429] style fixes --- examples/basic_example_v2/basic_example.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index 53b2b428..3deed483 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -84,7 +84,7 @@ def fill_tables_with_data(pool: ydb.QuerySessionPool, path: str): ) -def select_simple(pool: ydb.QuerySessionSync, path): +def select_simple(pool: ydb.QuerySessionPool, path: str): print("\nCheck series table...") result_sets = pool.execute_with_retries( """ @@ -113,7 +113,7 @@ def select_simple(pool: ydb.QuerySessionSync, path): return first_set -def upsert_simple(pool: ydb.QuerySessionPool, path): +def upsert_simple(pool: ydb.QuerySessionPool, path: str): print("\nPerforming UPSERT into episodes...") pool.execute_with_retries( @@ -126,7 +126,7 @@ def upsert_simple(pool: ydb.QuerySessionPool, path): ) -def select_with_parameters(pool, path, series_id, season_id, episode_id): +def select_with_parameters(pool: ydb.QuerySessionPool, path: str, series_id, season_id, episode_id): result_sets = pool.execute_with_retries( """ PRAGMA TablePathPrefix("{}"); @@ -142,7 +142,7 @@ def select_with_parameters(pool, path, series_id, season_id, episode_id): "$seriesId": series_id, # could be defined implicit "$seasonId": (season_id, ydb.PrimitiveType.Int64), # could be defined via tuple "$episodeId": ydb.TypedValue(episode_id, ydb.PrimitiveType.Int64), # could be defined via special class - } + }, ) print("\n> select_with_parameters:") @@ -157,8 +157,8 @@ def select_with_parameters(pool, path, series_id, season_id, episode_id): # In most cases it's better to use transaction control settings in session.transaction # calls instead to avoid additional hops to YDB cluster and allow more efficient # execution of queries. -def explicit_transaction_control(pool, path, series_id, season_id, episode_id): - def callee(session): +def explicit_transaction_control(pool: ydb.QuerySessionPool, path: str, series_id, season_id, episode_id): + def callee(session: ydb.QuerySessionSync): query = """ PRAGMA TablePathPrefix("{}"); UPDATE episodes @@ -191,12 +191,12 @@ def callee(session): return pool.retry_operation_sync(callee) -def drop_tables(pool, path): +def drop_tables(pool: ydb.QuerySessionPool, path: str): print("\nCleaning up existing tables...") pool.execute_with_retries(DropTablesQuery.format(path)) -def create_tables(pool, path): +def create_tables(pool: ydb.QuerySessionPool, path: str): print("\nCreating table series...") pool.execute_with_retries( """ @@ -248,7 +248,7 @@ def create_tables(pool, path): ) -def is_directory_exists(driver, path): +def is_directory_exists(driver: ydb.Driver, path: str): try: return driver.scheme_client.describe_path(path).is_directory() except ydb.SchemeError: From 61c40fdd0ffa04767c34e8856faabd959a263c02 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 16:11:14 +0300 Subject: [PATCH 119/429] add notes about outdated docs --- examples/basic_example_v1/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/basic_example_v1/README.md b/examples/basic_example_v1/README.md index 3985a3e4..ac3c3978 100644 --- a/examples/basic_example_v1/README.md +++ b/examples/basic_example_v1/README.md @@ -1,5 +1,7 @@ # YDB Python SDK Example: basic_example_v1 +**This example is outdated, please see [example with new API](../basic_example_v2/)** + Example code demonstrating the basic YDB Python SDK operations. See the top-level [README.md](../README.md) file for instructions on running this example. From 7d4af033f6d27c9cc7a60a96fba7dd5318d3be6d Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 16:22:35 +0300 Subject: [PATCH 120/429] aio query session --- tests/aio/query/__init__.py | 0 tests/aio/query/conftest.py | 13 +++ tests/aio/query/test_query_session.py | 110 +++++++++++++++++++++ ydb/aio/query/__init__.py | 0 ydb/aio/query/session.py | 132 ++++++++++++++++++++++++++ 5 files changed, 255 insertions(+) create mode 100644 tests/aio/query/__init__.py create mode 100644 tests/aio/query/conftest.py create mode 100644 tests/aio/query/test_query_session.py create mode 100644 ydb/aio/query/__init__.py create mode 100644 ydb/aio/query/session.py diff --git a/tests/aio/query/__init__.py b/tests/aio/query/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/aio/query/conftest.py b/tests/aio/query/conftest.py new file mode 100644 index 00000000..f08d323c --- /dev/null +++ b/tests/aio/query/conftest.py @@ -0,0 +1,13 @@ +import pytest +from ydb.aio.query.session import QuerySessionAsync + +@pytest.fixture +async def session(driver): + session = QuerySessionAsync(driver) + + yield session + + try: + await session.delete() + except BaseException: + pass \ No newline at end of file diff --git a/tests/aio/query/test_query_session.py b/tests/aio/query/test_query_session.py new file mode 100644 index 00000000..3e120566 --- /dev/null +++ b/tests/aio/query/test_query_session.py @@ -0,0 +1,110 @@ +import pytest +from ydb.aio.query.session import QuerySessionAsync + + +def _check_session_state_empty(session: QuerySessionAsync): + assert session._state.session_id is None + assert session._state.node_id is None + assert not session._state.attached + + +def _check_session_state_full(session: QuerySessionAsync): + assert session._state.session_id is not None + assert session._state.node_id is not None + assert session._state.attached + + +class TestAsyncQuerySession: + @pytest.mark.asyncio + async def test_session_normal_lifecycle(self, session: QuerySessionAsync): + _check_session_state_empty(session) + + await session.create() + _check_session_state_full(session) + + await session.delete() + _check_session_state_empty(session) + + @pytest.mark.asyncio + async def test_second_create_do_nothing(self, session: QuerySessionAsync): + await session.create() + _check_session_state_full(session) + + session_id_before = session._state.session_id + node_id_before = session._state.node_id + + await session.create() + _check_session_state_full(session) + + assert session._state.session_id == session_id_before + assert session._state.node_id == node_id_before + + @pytest.mark.asyncio + async def test_second_delete_do_nothing(self, session: QuerySessionAsync): + await session.create() + + await session.delete() + await session.delete() + + @pytest.mark.asyncio + async def test_delete_before_create_not_possible(self, session: QuerySessionAsync): + with pytest.raises(RuntimeError): + await session.delete() + + @pytest.mark.asyncio + async def test_create_after_delete_not_possible(self, session: QuerySessionAsync): + await session.create() + await session.delete() + with pytest.raises(RuntimeError): + await session.create() + + # def test_transaction_before_create_raises(self, session: QuerySessionAsync): + # with pytest.raises(RuntimeError): + # session.transaction() + + # def test_transaction_after_delete_raises(self, session: QuerySessionAsync): + # session.create() + + # session.delete() + + # with pytest.raises(RuntimeError): + # session.transaction() + + # def test_transaction_after_create_not_raises(self, session: QuerySessionAsync): + # session.create() + # session.transaction() + + @pytest.mark.asyncio + async def test_execute_before_create_raises(self, session: QuerySessionAsync): + with pytest.raises(RuntimeError): + await session.execute("select 1;") + + @pytest.mark.asyncio + async def test_execute_after_delete_raises(self, session: QuerySessionAsync): + await session.create() + await session.delete() + with pytest.raises(RuntimeError): + await session.execute("select 1;") + + @pytest.mark.asyncio + async def test_basic_execute(self, session: QuerySessionAsync): + await session.create() + it = await session.execute("select 1;") + result_sets = [result_set async for result_set in it] + + assert len(result_sets) == 1 + assert len(result_sets[0].rows) == 1 + assert len(result_sets[0].columns) == 1 + assert list(result_sets[0].rows[0].values()) == [1] + + @pytest.mark.asyncio + async def test_two_results(self, session: QuerySessionAsync): + await session.create() + res = [] + + async with await session.execute("select 1; select 2") as results: + async for result_set in results: + if len(result_set.rows) > 0: + res.append(list(result_set.rows[0].values())) + + assert res == [[1], [2]] diff --git a/ydb/aio/query/__init__.py b/ydb/aio/query/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py new file mode 100644 index 00000000..545004a6 --- /dev/null +++ b/ydb/aio/query/session.py @@ -0,0 +1,132 @@ +import asyncio + +from typing import ( + Optional, +) + +from .. import _utilities +from ... import issues +from ..._grpc.grpcwrapper import common_utils +from ...query import base +from ...query.session import ( + BaseQuerySession, + QuerySessionStateEnum, +) + + +class AsyncResponseContextIterator(_utilities.AsyncResponseIterator): + async def __aenter__(self) -> "AsyncResponseContextIterator": + return self + + async def __aexit__(self, exc_type, exc_val, exc_tb): + async for _ in self: + pass + + +class QuerySessionAsync(BaseQuerySession): + """Session object for Query Service. It is not recommended to control + session's lifecycle manually - use a QuerySessionPool is always a better choise. + """ + + _loop: asyncio.AbstractEventLoop + _status_stream: _utilities.AsyncResponseIterator = None + + def __init__(self, driver: base.SupportedDriverType, settings: Optional[base.QueryClientSettings] = None): + super(QuerySessionAsync, self).__init__(driver, settings) + self._loop = asyncio.get_running_loop() + + async def _attach(self) -> None: + self._stream = await self._attach_call() + self._status_stream = _utilities.AsyncResponseIterator( + self._stream, + lambda response: common_utils.ServerStatus.from_proto(response), + ) + + first_response = await self._status_stream.next() + if first_response.status != issues.StatusCode.SUCCESS: + pass + + self._state.set_attached(True) + self._state._change_state(QuerySessionStateEnum.CREATED) + + self._loop.create_task(self._check_session_status_loop(), name="check session status task") + + + async def _check_session_status_loop(self) -> None: + try: + async for status in self._status_stream: + if status.status != issues.StatusCode.SUCCESS: + self._state.reset() + self._state._change_state(QuerySessionStateEnum.CLOSED) + except Exception: + pass + + async def delete(self) -> None: + """WARNING: This API is experimental and could be changed. + + Deletes a Session of Query Service on server side and releases resources. + + :return: None + """ + if self._state._already_in(QuerySessionStateEnum.CLOSED): + return + + self._state._check_invalid_transition(QuerySessionStateEnum.CLOSED) + await self._delete_call() + self._stream.cancel() + + async def create(self) -> "QuerySessionAsync": + """WARNING: This API is experimental and could be changed. + + Creates a Session of Query Service on server side and attaches it. + + :return: QuerySessionSync object. + """ + if self._state._already_in(QuerySessionStateEnum.CREATED): + return + + self._state._check_invalid_transition(QuerySessionStateEnum.CREATED) + await self._create_call() + await self._attach() + + return self + + async def transaction(self, tx_mode) -> base.IQueryTxContext: + return super().transaction(tx_mode) + + async def execute( + self, + query: str, + parameters: dict = None, + commit_tx: bool = False, + syntax: base.QuerySyntax = None, + exec_mode: base.QueryExecMode = None, + concurrent_result_sets: bool = False, + ) -> AsyncResponseContextIterator: + """WARNING: This API is experimental and could be changed. + + Sends a query to Query Service + :param query: (YQL or SQL text) to be executed. + :param syntax: Syntax of the query, which is a one from the following choises: + 1) QuerySyntax.YQL_V1, which is default; + 2) QuerySyntax.PG. + :param parameters: dict with parameters and YDB types; + :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; + + :return: Iterator with result sets + """ + self._state._check_session_ready_to_use() + + stream_it = await self._execute_call( + query=query, + commit_tx=True, + syntax=syntax, + exec_mode=exec_mode, + parameters=parameters, + concurrent_result_sets=concurrent_result_sets, + ) + + return AsyncResponseContextIterator( + stream_it, + lambda resp: base.wrap_execute_query_response(rpc_state=None, response_pb=resp), + ) From 09cdcecd91bc912426216a0006e2bbaf910e0886 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 16:23:38 +0300 Subject: [PATCH 121/429] async transactions --- tests/aio/query/conftest.py | 15 ++- tests/aio/query/test_query_session.py | 24 ++--- tests/aio/query/test_query_transaction.py | 94 ++++++++++++++++++ tests/query/test_query_transaction.py | 28 +++--- ydb/aio/_utilities.py | 3 + ydb/aio/query/base.py | 9 ++ ydb/aio/query/session.py | 27 ++--- ydb/aio/query/transaction.py | 114 ++++++++++++++++++++++ ydb/query/session.py | 4 +- ydb/query/transaction.py | 52 +++++----- 10 files changed, 303 insertions(+), 67 deletions(-) create mode 100644 tests/aio/query/test_query_transaction.py create mode 100644 ydb/aio/query/base.py create mode 100644 ydb/aio/query/transaction.py diff --git a/tests/aio/query/conftest.py b/tests/aio/query/conftest.py index f08d323c..be00a386 100644 --- a/tests/aio/query/conftest.py +++ b/tests/aio/query/conftest.py @@ -10,4 +10,17 @@ async def session(driver): try: await session.delete() except BaseException: - pass \ No newline at end of file + pass + + +@pytest.fixture +async def tx(session): + await session.create() + transaction = session.transaction() + + yield transaction + + try: + await transaction.rollback() + except BaseException: + pass diff --git a/tests/aio/query/test_query_session.py b/tests/aio/query/test_query_session.py index 3e120566..117e39af 100644 --- a/tests/aio/query/test_query_session.py +++ b/tests/aio/query/test_query_session.py @@ -58,21 +58,23 @@ async def test_create_after_delete_not_possible(self, session: QuerySessionAsync with pytest.raises(RuntimeError): await session.create() - # def test_transaction_before_create_raises(self, session: QuerySessionAsync): - # with pytest.raises(RuntimeError): - # session.transaction() + def test_transaction_before_create_raises(self, session: QuerySessionAsync): + with pytest.raises(RuntimeError): + session.transaction() - # def test_transaction_after_delete_raises(self, session: QuerySessionAsync): - # session.create() + @pytest.mark.asyncio + async def test_transaction_after_delete_raises(self, session: QuerySessionAsync): + await session.create() - # session.delete() + await session.delete() - # with pytest.raises(RuntimeError): - # session.transaction() + with pytest.raises(RuntimeError): + session.transaction() - # def test_transaction_after_create_not_raises(self, session: QuerySessionAsync): - # session.create() - # session.transaction() + @pytest.mark.asyncio + async def test_transaction_after_create_not_raises(self, session: QuerySessionAsync): + await session.create() + session.transaction() @pytest.mark.asyncio async def test_execute_before_create_raises(self, session: QuerySessionAsync): diff --git a/tests/aio/query/test_query_transaction.py b/tests/aio/query/test_query_transaction.py new file mode 100644 index 00000000..7c97d5fb --- /dev/null +++ b/tests/aio/query/test_query_transaction.py @@ -0,0 +1,94 @@ +import pytest + +from ydb.aio.query.transaction import QueryTxContextAsync +from ydb.query.transaction import QueryTxStateEnum + + +class TestAsyncQueryTransaction: + @pytest.mark.asyncio + async def test_tx_begin(self, tx: QueryTxContextAsync): + assert tx.tx_id is None + + await tx.begin() + assert tx.tx_id is not None + + @pytest.mark.asyncio + async def test_tx_allow_double_commit(self, tx: QueryTxContextAsync): + await tx.begin() + await tx.commit() + await tx.commit() + + @pytest.mark.asyncio + async def test_tx_allow_double_rollback(self, tx: QueryTxContextAsync): + await tx.begin() + await tx.rollback() + await tx.rollback() + + @pytest.mark.asyncio + async def test_tx_commit_before_begin(self, tx: QueryTxContextAsync): + await tx.commit() + assert tx._tx_state._state == QueryTxStateEnum.COMMITTED + + @pytest.mark.asyncio + async def test_tx_rollback_before_begin(self, tx: QueryTxContextAsync): + await tx.rollback() + assert tx._tx_state._state == QueryTxStateEnum.ROLLBACKED + + @pytest.mark.asyncio + async def test_tx_first_execute_begins_tx(self, tx: QueryTxContextAsync): + await tx.execute("select 1;") + await tx.commit() + + @pytest.mark.asyncio + async def test_interactive_tx_commit(self, tx: QueryTxContextAsync): + await tx.execute("select 1;", commit_tx=True) + with pytest.raises(RuntimeError): + await tx.execute("select 1;") + + @pytest.mark.asyncio + async def test_tx_execute_raises_after_commit(self, tx: QueryTxContextAsync): + await tx.begin() + await tx.commit() + with pytest.raises(RuntimeError): + await tx.execute("select 1;") + + @pytest.mark.asyncio + async def test_tx_execute_raises_after_rollback(self, tx: QueryTxContextAsync): + await tx.begin() + await tx.rollback() + with pytest.raises(RuntimeError): + await tx.execute("select 1;") + + @pytest.mark.asyncio + async def test_context_manager_rollbacks_tx(self, tx: QueryTxContextAsync): + async with tx: + await tx.begin() + + assert tx._tx_state._state == QueryTxStateEnum.ROLLBACKED + + @pytest.mark.asyncio + async def test_context_manager_normal_flow(self, tx: QueryTxContextAsync): + async with tx: + await tx.begin() + await tx.execute("select 1;") + await tx.commit() + + assert tx._tx_state._state == QueryTxStateEnum.COMMITTED + + @pytest.mark.asyncio + async def test_context_manager_does_not_hide_exceptions(self, tx: QueryTxContextAsync): + class CustomException(Exception): + pass + + with pytest.raises(CustomException): + async with tx: + raise CustomException() + + @pytest.mark.asyncio + async def test_execute_as_context_manager(self, tx: QueryTxContextAsync): + await tx.begin() + + async with await tx.execute("select 1;") as results: + res = [result_set for result_set in results] + + assert len(res) == 1 diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 1c3fdda2..07a43fa6 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -1,62 +1,62 @@ import pytest -from ydb.query.transaction import BaseQueryTxContext +from ydb.query.transaction import QueryTxContextSync from ydb.query.transaction import QueryTxStateEnum class TestQueryTransaction: - def test_tx_begin(self, tx: BaseQueryTxContext): + def test_tx_begin(self, tx: QueryTxContextSync): assert tx.tx_id is None tx.begin() assert tx.tx_id is not None - def test_tx_allow_double_commit(self, tx: BaseQueryTxContext): + def test_tx_allow_double_commit(self, tx: QueryTxContextSync): tx.begin() tx.commit() tx.commit() - def test_tx_allow_double_rollback(self, tx: BaseQueryTxContext): + def test_tx_allow_double_rollback(self, tx: QueryTxContextSync): tx.begin() tx.rollback() tx.rollback() - def test_tx_commit_before_begin(self, tx: BaseQueryTxContext): + def test_tx_commit_before_begin(self, tx: QueryTxContextSync): tx.commit() assert tx._tx_state._state == QueryTxStateEnum.COMMITTED - def test_tx_rollback_before_begin(self, tx: BaseQueryTxContext): + def test_tx_rollback_before_begin(self, tx: QueryTxContextSync): tx.rollback() assert tx._tx_state._state == QueryTxStateEnum.ROLLBACKED - def test_tx_first_execute_begins_tx(self, tx: BaseQueryTxContext): + def test_tx_first_execute_begins_tx(self, tx: QueryTxContextSync): tx.execute("select 1;") tx.commit() - def test_interactive_tx_commit(self, tx: BaseQueryTxContext): + def test_interactive_tx_commit(self, tx: QueryTxContextSync): tx.execute("select 1;", commit_tx=True) with pytest.raises(RuntimeError): tx.execute("select 1;") - def test_tx_execute_raises_after_commit(self, tx: BaseQueryTxContext): + def test_tx_execute_raises_after_commit(self, tx: QueryTxContextSync): tx.begin() tx.commit() with pytest.raises(RuntimeError): tx.execute("select 1;") - def test_tx_execute_raises_after_rollback(self, tx: BaseQueryTxContext): + def test_tx_execute_raises_after_rollback(self, tx: QueryTxContextSync): tx.begin() tx.rollback() with pytest.raises(RuntimeError): tx.execute("select 1;") - def test_context_manager_rollbacks_tx(self, tx: BaseQueryTxContext): + def test_context_manager_rollbacks_tx(self, tx: QueryTxContextSync): with tx: tx.begin() assert tx._tx_state._state == QueryTxStateEnum.ROLLBACKED - def test_context_manager_normal_flow(self, tx: BaseQueryTxContext): + def test_context_manager_normal_flow(self, tx: QueryTxContextSync): with tx: tx.begin() tx.execute("select 1;") @@ -64,7 +64,7 @@ def test_context_manager_normal_flow(self, tx: BaseQueryTxContext): assert tx._tx_state._state == QueryTxStateEnum.COMMITTED - def test_context_manager_does_not_hide_exceptions(self, tx: BaseQueryTxContext): + def test_context_manager_does_not_hide_exceptions(self, tx: QueryTxContextSync): class CustomException(Exception): pass @@ -72,7 +72,7 @@ class CustomException(Exception): with tx: raise CustomException() - def test_execute_as_context_manager(self, tx: BaseQueryTxContext): + def test_execute_as_context_manager(self, tx: QueryTxContextSync): tx.begin() with tx.execute("select 1;") as results: diff --git a/ydb/aio/_utilities.py b/ydb/aio/_utilities.py index 10cbead6..454378b0 100644 --- a/ydb/aio/_utilities.py +++ b/ydb/aio/_utilities.py @@ -7,6 +7,9 @@ def cancel(self): self.it.cancel() return self + def __iter__(self): + return self + def __aiter__(self): return self diff --git a/ydb/aio/query/base.py b/ydb/aio/query/base.py new file mode 100644 index 00000000..000df8a5 --- /dev/null +++ b/ydb/aio/query/base.py @@ -0,0 +1,9 @@ +from .. import _utilities + +class AsyncResponseContextIterator(_utilities.AsyncResponseIterator): + async def __aenter__(self) -> "AsyncResponseContextIterator": + return self + + async def __aexit__(self, exc_type, exc_val, exc_tb): + async for _ in self: + pass \ No newline at end of file diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index 545004a6..3122e94f 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -4,25 +4,19 @@ Optional, ) +from .base import AsyncResponseContextIterator +from .transaction import QueryTxContextAsync from .. import _utilities from ... import issues from ..._grpc.grpcwrapper import common_utils +from ..._grpc.grpcwrapper import ydb_query_public_types as _ydb_query_public + from ...query import base from ...query.session import ( BaseQuerySession, QuerySessionStateEnum, ) - -class AsyncResponseContextIterator(_utilities.AsyncResponseIterator): - async def __aenter__(self) -> "AsyncResponseContextIterator": - return self - - async def __aexit__(self, exc_type, exc_val, exc_tb): - async for _ in self: - pass - - class QuerySessionAsync(BaseQuerySession): """Session object for Query Service. It is not recommended to control session's lifecycle manually - use a QuerySessionPool is always a better choise. @@ -91,14 +85,21 @@ async def create(self) -> "QuerySessionAsync": return self - async def transaction(self, tx_mode) -> base.IQueryTxContext: - return super().transaction(tx_mode) + def transaction(self, tx_mode = None) -> base.IQueryTxContext: + self._state._check_session_ready_to_use() + tx_mode = tx_mode if tx_mode else _ydb_query_public.QuerySerializableReadWrite() + + return QueryTxContextAsync( + self._driver, + self._state, + self, + tx_mode, + ) async def execute( self, query: str, parameters: dict = None, - commit_tx: bool = False, syntax: base.QuerySyntax = None, exec_mode: base.QueryExecMode = None, concurrent_result_sets: bool = False, diff --git a/ydb/aio/query/transaction.py b/ydb/aio/query/transaction.py new file mode 100644 index 00000000..3558ed4c --- /dev/null +++ b/ydb/aio/query/transaction.py @@ -0,0 +1,114 @@ +import logging +from typing import ( + Optional, +) + +from .base import AsyncResponseContextIterator +from ... import issues +from ...query import base +from ...query.transaction import ( + BaseQueryTxContext, + QueryTxStateEnum, +) + +logger = logging.getLogger(__name__) + + +class QueryTxContextAsync(BaseQueryTxContext): + async def __aenter__(self) -> "QueryTxContextAsync": + """ + Enters a context manager and returns a transaction + + :return: A transaction instance + """ + return self + + async def __aexit__(self, *args, **kwargs): + """ + Closes a transaction context manager and rollbacks transaction if + it is not finished explicitly + """ + self._ensure_prev_stream_finished() + if self._tx_state._state == QueryTxStateEnum.BEGINED: + # It's strictly recommended to close transactions directly + # by using commit_tx=True flag while executing statement or by + # .commit() or .rollback() methods, but here we trying to do best + # effort to avoid useless open transactions + logger.warning("Potentially leaked tx: %s", self._tx_state.tx_id) + try: + await self.rollback() + except issues.Error: + logger.warning("Failed to rollback leaked tx: %s", self._tx_state.tx_id) + + async def begin(self, settings: Optional[base.QueryClientSettings] = None) -> None: + """WARNING: This API is experimental and could be changed. + + Explicitly begins a transaction + + :param settings: A request settings + + :return: None or exception if begin is failed + """ + await self._begin_call(settings) + + async def commit(self, settings: Optional[base.QueryClientSettings] = None) -> None: + """WARNING: This API is experimental and could be changed. + + Calls commit on a transaction if it is open otherwise is no-op. If transaction execution + failed then this method raises PreconditionFailed. + + :param settings: A request settings + + :return: A committed transaction or exception if commit is failed + """ + await self._commit_call(settings) + + async def rollback(self, settings: Optional[base.QueryClientSettings] = None) -> None: + await self._rollback_call(settings) + + async def execute( + self, + query: str, + commit_tx: Optional[bool] = False, + syntax: Optional[base.QuerySyntax] = None, + exec_mode: Optional[base.QueryExecMode] = None, + parameters: Optional[dict] = None, + concurrent_result_sets: Optional[bool] = False, + ) -> AsyncResponseContextIterator: + """WARNING: This API is experimental and could be changed. + + Sends a query to Query Service + :param query: (YQL or SQL text) to be executed. + :param commit_tx: A special flag that allows transaction commit. + :param syntax: Syntax of the query, which is a one from the following choises: + 1) QuerySyntax.YQL_V1, which is default; + 2) QuerySyntax.PG. + :param exec_mode: Exec mode of the query, which is a one from the following choises: + 1) QueryExecMode.EXECUTE, which is default; + 2) QueryExecMode.EXPLAIN; + 3) QueryExecMode.VALIDATE; + 4) QueryExecMode.PARSE. + :param parameters: dict with parameters and YDB types; + :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; + + :return: Iterator with result sets + """ + stream_it = await self._execute_call( + query=query, + commit_tx=commit_tx, + syntax=syntax, + exec_mode=exec_mode, + parameters=parameters, + concurrent_result_sets=concurrent_result_sets, + ) + + self._prev_stream = AsyncResponseContextIterator( + stream_it, + lambda resp: base.wrap_execute_query_response( + rpc_state=None, + response_pb=resp, + tx=self, + commit_tx=commit_tx, + ), + ) + return self._prev_stream diff --git a/ydb/query/session.py b/ydb/query/session.py index 1fa3025d..4f627a7b 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -15,7 +15,7 @@ from .._grpc.grpcwrapper import ydb_query as _ydb_query from .._grpc.grpcwrapper import ydb_query_public_types as _ydb_query_public -from .transaction import BaseQueryTxContext +from .transaction import QueryTxContextSync logger = logging.getLogger(__name__) @@ -273,7 +273,7 @@ def transaction(self, tx_mode: Optional[base.BaseQueryTxMode] = None) -> base.IQ tx_mode = tx_mode if tx_mode else _ydb_query_public.QuerySerializableReadWrite() - return BaseQueryTxContext( + return QueryTxContextSync( self._driver, self._state, self, diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index f42571c2..d99e8107 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -240,6 +240,8 @@ def tx_id(self) -> Optional[str]: return self._tx_state.tx_id def _begin_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQueryTxContext": + self._tx_state._check_invalid_transition(QueryTxStateEnum.BEGINED) + return self._driver( _create_begin_transaction_request(self._session_state, self._tx_state), _apis.QueryService.Stub, @@ -250,6 +252,16 @@ def _begin_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQuer ) def _commit_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQueryTxContext": + if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): + return + self._ensure_prev_stream_finished() + + if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: + self._tx_state._change_state(QueryTxStateEnum.COMMITTED) + return + + self._tx_state._check_invalid_transition(QueryTxStateEnum.COMMITTED) + return self._driver( _create_commit_transaction_request(self._session_state, self._tx_state), _apis.QueryService.Stub, @@ -260,6 +272,17 @@ def _commit_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQue ) def _rollback_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQueryTxContext": + if self._tx_state._already_in(QueryTxStateEnum.ROLLBACKED): + return + + self._ensure_prev_stream_finished() + + if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: + self._tx_state._change_state(QueryTxStateEnum.ROLLBACKED) + return + + self._tx_state._check_invalid_transition(QueryTxStateEnum.ROLLBACKED) + return self._driver( _create_rollback_transaction_request(self._session_state, self._tx_state), _apis.QueryService.Stub, @@ -278,6 +301,9 @@ def _execute_call( parameters: dict = None, concurrent_result_sets: bool = False, ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: + self._ensure_prev_stream_finished() + self._tx_state._check_tx_ready_to_use() + request = base.create_execute_query_request( query=query, session_id=self._session_state.session_id, @@ -322,8 +348,6 @@ def begin(self, settings: Optional[base.QueryClientSettings] = None) -> "BaseQue :return: Transaction object or exception if begin is failed """ - self._tx_state._check_invalid_transition(QueryTxStateEnum.BEGINED) - self._begin_call(settings) return self @@ -338,30 +362,9 @@ def commit(self, settings: Optional[base.QueryClientSettings] = None) -> None: :return: A committed transaction or exception if commit is failed """ - if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): - return - self._ensure_prev_stream_finished() - - if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: - self._tx_state._change_state(QueryTxStateEnum.COMMITTED) - return - - self._tx_state._check_invalid_transition(QueryTxStateEnum.COMMITTED) - self._commit_call(settings) def rollback(self, settings: Optional[base.QueryClientSettings] = None) -> None: - if self._tx_state._already_in(QueryTxStateEnum.ROLLBACKED): - return - - self._ensure_prev_stream_finished() - - if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: - self._tx_state._change_state(QueryTxStateEnum.ROLLBACKED) - return - - self._tx_state._check_invalid_transition(QueryTxStateEnum.ROLLBACKED) - self._rollback_call(settings) def execute( @@ -393,9 +396,6 @@ def execute( :return: Iterator with result sets """ - self._ensure_prev_stream_finished() - self._tx_state._check_tx_ready_to_use() - stream_it = self._execute_call( query=query, commit_tx=commit_tx, From 00b138eb4144dea9150039231be1172b5c00bd46 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 16:23:38 +0300 Subject: [PATCH 122/429] style fixes --- tests/aio/query/conftest.py | 1 + ydb/aio/query/base.py | 3 ++- ydb/aio/query/session.py | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/aio/query/conftest.py b/tests/aio/query/conftest.py index be00a386..bf4dfa7c 100644 --- a/tests/aio/query/conftest.py +++ b/tests/aio/query/conftest.py @@ -1,6 +1,7 @@ import pytest from ydb.aio.query.session import QuerySessionAsync + @pytest.fixture async def session(driver): session = QuerySessionAsync(driver) diff --git a/ydb/aio/query/base.py b/ydb/aio/query/base.py index 000df8a5..596677ff 100644 --- a/ydb/aio/query/base.py +++ b/ydb/aio/query/base.py @@ -1,9 +1,10 @@ from .. import _utilities + class AsyncResponseContextIterator(_utilities.AsyncResponseIterator): async def __aenter__(self) -> "AsyncResponseContextIterator": return self async def __aexit__(self, exc_type, exc_val, exc_tb): async for _ in self: - pass \ No newline at end of file + pass diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index 3122e94f..b41d6acd 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -17,6 +17,7 @@ QuerySessionStateEnum, ) + class QuerySessionAsync(BaseQuerySession): """Session object for Query Service. It is not recommended to control session's lifecycle manually - use a QuerySessionPool is always a better choise. @@ -45,7 +46,6 @@ async def _attach(self) -> None: self._loop.create_task(self._check_session_status_loop(), name="check session status task") - async def _check_session_status_loop(self) -> None: try: async for status in self._status_stream: @@ -85,7 +85,7 @@ async def create(self) -> "QuerySessionAsync": return self - def transaction(self, tx_mode = None) -> base.IQueryTxContext: + def transaction(self, tx_mode=None) -> base.IQueryTxContext: self._state._check_session_ready_to_use() tx_mode = tx_mode if tx_mode else _ydb_query_public.QuerySerializableReadWrite() From 73c9ad0b8bf166460eee65d63de1b792d3de6cb8 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 16:23:38 +0300 Subject: [PATCH 123/429] fix async transactions --- tests/aio/query/test_query_transaction.py | 2 +- ydb/aio/query/session.py | 10 +++- ydb/aio/query/transaction.py | 57 +++++++++++++++++++++++ ydb/query/transaction.py | 38 ++++++++------- 4 files changed, 86 insertions(+), 21 deletions(-) diff --git a/tests/aio/query/test_query_transaction.py b/tests/aio/query/test_query_transaction.py index 7c97d5fb..e332b086 100644 --- a/tests/aio/query/test_query_transaction.py +++ b/tests/aio/query/test_query_transaction.py @@ -89,6 +89,6 @@ async def test_execute_as_context_manager(self, tx: QueryTxContextAsync): await tx.begin() async with await tx.execute("select 1;") as results: - res = [result_set for result_set in results] + res = [result_set async for result_set in results] assert len(res) == 1 diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index b41d6acd..72e38900 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -26,9 +26,14 @@ class QuerySessionAsync(BaseQuerySession): _loop: asyncio.AbstractEventLoop _status_stream: _utilities.AsyncResponseIterator = None - def __init__(self, driver: base.SupportedDriverType, settings: Optional[base.QueryClientSettings] = None): + def __init__( + self, + driver: base.SupportedDriverType, + settings: Optional[base.QueryClientSettings] = None, + loop: asyncio.AbstractEventLoop = None + ): super(QuerySessionAsync, self).__init__(driver, settings) - self._loop = asyncio.get_running_loop() + self._loop = loop if loop is not None else asyncio.get_running_loop() async def _attach(self) -> None: self._stream = await self._attach_call() @@ -94,6 +99,7 @@ def transaction(self, tx_mode=None) -> base.IQueryTxContext: self._state, self, tx_mode, + self._loop, ) async def execute( diff --git a/ydb/aio/query/transaction.py b/ydb/aio/query/transaction.py index 3558ed4c..84d9d2c1 100644 --- a/ydb/aio/query/transaction.py +++ b/ydb/aio/query/transaction.py @@ -1,3 +1,4 @@ +import asyncio import logging from typing import ( Optional, @@ -15,6 +16,36 @@ class QueryTxContextAsync(BaseQueryTxContext): + _loop: asyncio.AbstractEventLoop + + def __init__(self, driver, session_state, session, tx_mode, loop): + """ + An object that provides a simple transaction context manager that allows statements execution + in a transaction. You don't have to open transaction explicitly, because context manager encapsulates + transaction control logic, and opens new transaction if: + + 1) By explicit .begin() method; + 2) On execution of a first statement, which is strictly recommended method, because that avoids useless round trip + + This context manager is not thread-safe, so you should not manipulate on it concurrently. + + :param driver: A driver instance + :param session_state: A state of session + :param tx_mode: Transaction mode, which is a one from the following choises: + 1) QuerySerializableReadWrite() which is default mode; + 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); + 3) QuerySnapshotReadOnly(); + 4) QueryStaleReadOnly(). + """ + + super(QueryTxContextAsync, self).__init__( + driver, + session_state, + session, + tx_mode, + ) + self._loop = loop + async def __aenter__(self) -> "QueryTxContextAsync": """ Enters a context manager and returns a transaction @@ -40,6 +71,12 @@ async def __aexit__(self, *args, **kwargs): except issues.Error: logger.warning("Failed to rollback leaked tx: %s", self._tx_state.tx_id) + async def _ensure_prev_stream_finished(self) -> None: + if self._prev_stream is not None: + async for _ in self._prev_stream: + pass + self._prev_stream = None + async def begin(self, settings: Optional[base.QueryClientSettings] = None) -> None: """WARNING: This API is experimental and could be changed. @@ -61,9 +98,27 @@ async def commit(self, settings: Optional[base.QueryClientSettings] = None) -> N :return: A committed transaction or exception if commit is failed """ + if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): + return + + if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: + self._tx_state._change_state(QueryTxStateEnum.COMMITTED) + return + + await self._ensure_prev_stream_finished() + await self._commit_call(settings) async def rollback(self, settings: Optional[base.QueryClientSettings] = None) -> None: + if self._tx_state._already_in(QueryTxStateEnum.ROLLBACKED): + return + + if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: + self._tx_state._change_state(QueryTxStateEnum.ROLLBACKED) + return + + await self._ensure_prev_stream_finished() + await self._rollback_call(settings) async def execute( @@ -93,6 +148,8 @@ async def execute( :return: Iterator with result sets """ + await self._ensure_prev_stream_finished() + stream_it = await self._execute_call( query=query, commit_tx=commit_tx, diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index d99e8107..170e6baf 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -252,14 +252,6 @@ def _begin_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQuer ) def _commit_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQueryTxContext": - if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): - return - self._ensure_prev_stream_finished() - - if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: - self._tx_state._change_state(QueryTxStateEnum.COMMITTED) - return - self._tx_state._check_invalid_transition(QueryTxStateEnum.COMMITTED) return self._driver( @@ -272,15 +264,6 @@ def _commit_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQue ) def _rollback_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQueryTxContext": - if self._tx_state._already_in(QueryTxStateEnum.ROLLBACKED): - return - - self._ensure_prev_stream_finished() - - if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: - self._tx_state._change_state(QueryTxStateEnum.ROLLBACKED) - return - self._tx_state._check_invalid_transition(QueryTxStateEnum.ROLLBACKED) return self._driver( @@ -301,7 +284,6 @@ def _execute_call( parameters: dict = None, concurrent_result_sets: bool = False, ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: - self._ensure_prev_stream_finished() self._tx_state._check_tx_ready_to_use() request = base.create_execute_query_request( @@ -362,9 +344,27 @@ def commit(self, settings: Optional[base.QueryClientSettings] = None) -> None: :return: A committed transaction or exception if commit is failed """ + if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): + return + + if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: + self._tx_state._change_state(QueryTxStateEnum.COMMITTED) + return + + self._ensure_prev_stream_finished() + self._commit_call(settings) def rollback(self, settings: Optional[base.QueryClientSettings] = None) -> None: + if self._tx_state._already_in(QueryTxStateEnum.ROLLBACKED): + return + + if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: + self._tx_state._change_state(QueryTxStateEnum.ROLLBACKED) + return + + self._ensure_prev_stream_finished() + self._rollback_call(settings) def execute( @@ -396,6 +396,8 @@ def execute( :return: Iterator with result sets """ + self._ensure_prev_stream_finished() + stream_it = self._execute_call( query=query, commit_tx=commit_tx, From 4208d64bc5e4ee4f993adcac84b8b74ed2486630 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 16:23:38 +0300 Subject: [PATCH 124/429] style fixes --- ydb/aio/query/session.py | 3 +-- ydb/aio/query/transaction.py | 31 ------------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index 72e38900..c122faa7 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -30,7 +30,7 @@ def __init__( self, driver: base.SupportedDriverType, settings: Optional[base.QueryClientSettings] = None, - loop: asyncio.AbstractEventLoop = None + loop: asyncio.AbstractEventLoop = None, ): super(QuerySessionAsync, self).__init__(driver, settings) self._loop = loop if loop is not None else asyncio.get_running_loop() @@ -99,7 +99,6 @@ def transaction(self, tx_mode=None) -> base.IQueryTxContext: self._state, self, tx_mode, - self._loop, ) async def execute( diff --git a/ydb/aio/query/transaction.py b/ydb/aio/query/transaction.py index 84d9d2c1..2b581469 100644 --- a/ydb/aio/query/transaction.py +++ b/ydb/aio/query/transaction.py @@ -1,4 +1,3 @@ -import asyncio import logging from typing import ( Optional, @@ -16,36 +15,6 @@ class QueryTxContextAsync(BaseQueryTxContext): - _loop: asyncio.AbstractEventLoop - - def __init__(self, driver, session_state, session, tx_mode, loop): - """ - An object that provides a simple transaction context manager that allows statements execution - in a transaction. You don't have to open transaction explicitly, because context manager encapsulates - transaction control logic, and opens new transaction if: - - 1) By explicit .begin() method; - 2) On execution of a first statement, which is strictly recommended method, because that avoids useless round trip - - This context manager is not thread-safe, so you should not manipulate on it concurrently. - - :param driver: A driver instance - :param session_state: A state of session - :param tx_mode: Transaction mode, which is a one from the following choises: - 1) QuerySerializableReadWrite() which is default mode; - 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); - 3) QuerySnapshotReadOnly(); - 4) QueryStaleReadOnly(). - """ - - super(QueryTxContextAsync, self).__init__( - driver, - session_state, - session, - tx_mode, - ) - self._loop = loop - async def __aenter__(self) -> "QueryTxContextAsync": """ Enters a context manager and returns a transaction From d0675cf444058d18e9b412c26bb346e3acf9aee9 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 16:23:38 +0300 Subject: [PATCH 125/429] query session pool async --- tests/aio/query/conftest.py | 7 ++ tests/aio/query/test_query_session_pool.py | 56 +++++++++++++ ydb/aio/query/pool.py | 91 ++++++++++++++++++++++ ydb/retries.py | 25 ++++++ 4 files changed, 179 insertions(+) create mode 100644 tests/aio/query/test_query_session_pool.py create mode 100644 ydb/aio/query/pool.py diff --git a/tests/aio/query/conftest.py b/tests/aio/query/conftest.py index bf4dfa7c..0fbdbd38 100644 --- a/tests/aio/query/conftest.py +++ b/tests/aio/query/conftest.py @@ -1,5 +1,6 @@ import pytest from ydb.aio.query.session import QuerySessionAsync +from ydb.aio.query.pool import QuerySessionPoolAsync @pytest.fixture @@ -25,3 +26,9 @@ async def tx(session): await transaction.rollback() except BaseException: pass + + +@pytest.fixture +def pool(driver): + pool = QuerySessionPoolAsync(driver) + yield pool diff --git a/tests/aio/query/test_query_session_pool.py b/tests/aio/query/test_query_session_pool.py new file mode 100644 index 00000000..e544f7b6 --- /dev/null +++ b/tests/aio/query/test_query_session_pool.py @@ -0,0 +1,56 @@ +import pytest +import ydb +from ydb.aio.query.pool import QuerySessionPoolAsync +from ydb.aio.query.session import QuerySessionAsync, QuerySessionStateEnum + + +class TestQuerySessionPoolAsync: + @pytest.mark.asyncio + async def test_checkout_provides_created_session(self, pool: QuerySessionPoolAsync): + async with pool.checkout() as session: + assert session._state._state == QuerySessionStateEnum.CREATED + + assert session._state._state == QuerySessionStateEnum.CLOSED + + @pytest.mark.asyncio + async def test_oneshot_query_normal(self, pool: QuerySessionPoolAsync): + res = await pool.execute_with_retries("select 1;") + assert len(res) == 1 + + @pytest.mark.asyncio + async def test_oneshot_ddl_query(self, pool: QuerySessionPoolAsync): + await pool.execute_with_retries("create table Queen(key UInt64, PRIMARY KEY (key));") + await pool.execute_with_retries("drop table Queen;") + + @pytest.mark.asyncio + async def test_oneshot_query_raises(self, pool: QuerySessionPoolAsync): + with pytest.raises(ydb.GenericError): + await pool.execute_with_retries("Is this the real life? Is this just fantasy?") + + @pytest.mark.asyncio + async def test_retry_op_uses_created_session(self, pool: QuerySessionPoolAsync): + async def callee(session: QuerySessionAsync): + assert session._state._state == QuerySessionStateEnum.CREATED + + await pool.retry_operation_async(callee) + + @pytest.mark.asyncio + async def test_retry_op_normal(self, pool: QuerySessionPoolAsync): + async def callee(session: QuerySessionAsync): + async with session.transaction() as tx: + iterator = await tx.execute("select 1;", commit_tx=True) + return [result_set async for result_set in iterator] + + res = await pool.retry_operation_async(callee) + assert len(res) == 1 + + @pytest.mark.asyncio + async def test_retry_op_raises(self, pool: QuerySessionPoolAsync): + class CustomException(Exception): + pass + + async def callee(session: QuerySessionAsync): + raise CustomException() + + with pytest.raises(CustomException): + await pool.retry_operation_async(callee) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py new file mode 100644 index 00000000..0975f593 --- /dev/null +++ b/ydb/aio/query/pool.py @@ -0,0 +1,91 @@ +import logging +from typing import ( + Callable, + Optional, + List, +) + +from ...query import base +from .session import ( + QuerySessionAsync, +) +from ...retries import ( + RetrySettings, + retry_operation_async, +) +from ... import convert + +logger = logging.getLogger(__name__) + + +class QuerySessionPoolAsync: + """QuerySessionPoolAsync is an object to simplify operations with sessions of Query Service.""" + + def __init__(self, driver: base.SupportedDriverType): + """ + :param driver: A driver instance + """ + + logger.warning("QuerySessionPoolAsync is an experimental API, which could be changed.") + self._driver = driver + + def checkout(self) -> "SimpleQuerySessionCheckoutAsync": + """WARNING: This API is experimental and could be changed. + Return a Session context manager, that opens session on enter and closes session on exit. + """ + + return SimpleQuerySessionCheckoutAsync(self) + + async def retry_operation_async(self, callee: Callable, retry_settings: Optional[RetrySettings] = None, *args, **kwargs): + """WARNING: This API is experimental and could be changed. + Special interface to execute a bunch of commands with session in a safe, retriable way. + + :param callee: A function, that works with session. + :param retry_settings: RetrySettings object. + + :return: Result sets or exception in case of execution errors. + """ + + retry_settings = RetrySettings() if retry_settings is None else retry_settings + + async def wrapped_callee(): + async with self.checkout() as session: + return await callee(session, *args, **kwargs) + + return await retry_operation_async(wrapped_callee, retry_settings) + + async def execute_with_retries( + self, query: str, retry_settings: Optional[RetrySettings] = None, *args, **kwargs + ) -> List[convert.ResultSet]: + """WARNING: This API is experimental and could be changed. + Special interface to execute a one-shot queries in a safe, retriable way. + Note: this method loads all data from stream before return, do not use this + method with huge read queries. + + :param query: A query, yql or sql text. + :param retry_settings: RetrySettings object. + + :return: Result sets or exception in case of execution errors. + """ + + retry_settings = RetrySettings() if retry_settings is None else retry_settings + + async def wrapped_callee(): + async with self.checkout() as session: + it = await session.execute(query, *args, **kwargs) + return [result_set async for result_set in it] + + return await retry_operation_async(wrapped_callee, retry_settings) + + +class SimpleQuerySessionCheckoutAsync: + def __init__(self, pool: QuerySessionPoolAsync): + self._pool = pool + self._session = QuerySessionAsync(pool._driver) + + async def __aenter__(self) -> base.IQuerySession: + await self._session.create() + return self._session + + async def __aexit__(self, exc_type, exc_val, exc_tb): + await self._session.delete() diff --git a/ydb/retries.py b/ydb/retries.py index 5d4f6e6a..a2030d10 100644 --- a/ydb/retries.py +++ b/ydb/retries.py @@ -1,3 +1,4 @@ +import asyncio import random import time @@ -134,3 +135,27 @@ def retry_operation_sync(callee, retry_settings=None, *args, **kwargs): time.sleep(next_opt.timeout) else: return next_opt.result + + +async def retry_operation_async(callee, retry_settings=None, *args, **kwargs): # pylint: disable=W1113 + """ + The retry operation helper can be used to retry a coroutine that raises YDB specific + exceptions. + + :param callee: A coroutine to retry. + :param retry_settings: An instance of ydb.RetrySettings that describes how the coroutine + should be retried. If None, default instance of retry settings will be used. + :param args: A tuple with positional arguments to be passed into the coroutine. + :param kwargs: A dictionary with keyword arguments to be passed into the coroutine. + + Returns awaitable result of coroutine. If retries are not succussful exception is raised. + """ + opt_generator = retry_operation_impl(callee, retry_settings, *args, **kwargs) + for next_opt in opt_generator: + if isinstance(next_opt, YdbRetryOperationSleepOpt): + await asyncio.sleep(next_opt.timeout) + else: + try: + return await next_opt.result + except BaseException as e: # pylint: disable=W0703 + next_opt.set_exception(e) \ No newline at end of file From bf79ab0fb818041a93051c091a7c3405a6d7c672 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 16:23:38 +0300 Subject: [PATCH 126/429] style fixes --- ydb/aio/query/pool.py | 4 +++- ydb/retries.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 0975f593..e75ce4d2 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -36,7 +36,9 @@ def checkout(self) -> "SimpleQuerySessionCheckoutAsync": return SimpleQuerySessionCheckoutAsync(self) - async def retry_operation_async(self, callee: Callable, retry_settings: Optional[RetrySettings] = None, *args, **kwargs): + async def retry_operation_async( + self, callee: Callable, retry_settings: Optional[RetrySettings] = None, *args, **kwargs + ): """WARNING: This API is experimental and could be changed. Special interface to execute a bunch of commands with session in a safe, retriable way. diff --git a/ydb/retries.py b/ydb/retries.py index a2030d10..c9c23b1a 100644 --- a/ydb/retries.py +++ b/ydb/retries.py @@ -158,4 +158,4 @@ async def retry_operation_async(callee, retry_settings=None, *args, **kwargs): try: return await next_opt.result except BaseException as e: # pylint: disable=W0703 - next_opt.set_exception(e) \ No newline at end of file + next_opt.set_exception(e) From 3b66b2a3e04022e072a22be10d89e4c52ca2eed8 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 16:23:38 +0300 Subject: [PATCH 127/429] query service asyncio example --- .../query-service/basic_example_asyncio.py | 143 ++++++++++++++++++ ydb/_grpc/grpcwrapper/common_utils.py | 4 +- ydb/aio/__init__.py | 1 + ydb/aio/query/__init__.py | 7 + 4 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 examples/query-service/basic_example_asyncio.py diff --git a/examples/query-service/basic_example_asyncio.py b/examples/query-service/basic_example_asyncio.py new file mode 100644 index 00000000..cd7a4919 --- /dev/null +++ b/examples/query-service/basic_example_asyncio.py @@ -0,0 +1,143 @@ +import asyncio +import ydb + + +async def main(): + driver_config = ydb.DriverConfig( + endpoint="grpc://localhost:2136", + database="/local", + # credentials=ydb.credentials_from_env_variables(), + # root_certificates=ydb.load_ydb_root_certificate(), + ) + try: + driver = ydb.aio.Driver(driver_config) + await driver.wait(timeout=5) + except TimeoutError: + raise RuntimeError("Connect failed to YDB") + + pool = ydb.aio.QuerySessionPoolAsync(driver) + + print("=" * 50) + print("DELETE TABLE IF EXISTS") + await pool.execute_with_retries("DROP TABLE IF EXISTS example") + + print("=" * 50) + print("CREATE TABLE") + await pool.execute_with_retries("CREATE TABLE example(key UInt64, value String, PRIMARY KEY (key))") + + await pool.execute_with_retries("INSERT INTO example (key, value) VALUES (1, 'onepieceisreal')") + + async def callee(session): + print("=" * 50) + async with await session.execute("DELETE FROM example"): + pass + + print("BEFORE ACTION") + async with await session.execute("SELECT COUNT(*) AS rows_count FROM example") as results: + async for result_set in results: + print(f"rows: {str(result_set.rows)}") + + print("=" * 50) + print("INSERT WITH COMMIT TX") + + async with session.transaction() as tx: + await tx.begin() + + async with await tx.execute("INSERT INTO example (key, value) VALUES (1, 'onepieceisreal')"): + pass + + async with await tx.execute("SELECT COUNT(*) AS rows_count FROM example") as results: + async for result_set in results: + print(f"rows: {str(result_set.rows)}") + + await tx.commit() + + print("=" * 50) + print("AFTER COMMIT TX") + + async with await session.execute("SELECT COUNT(*) AS rows_count FROM example") as results: + async for result_set in results: + print(f"rows: {str(result_set.rows)}") + + print("=" * 50) + print("INSERT WITH ROLLBACK TX") + + async with session.transaction() as tx: + await tx.begin() + + async with await tx.execute("INSERT INTO example (key, value) VALUES (2, 'onepieceisreal')"): + pass + + async with await tx.execute("SELECT COUNT(*) AS rows_count FROM example") as results: + async for result_set in results: + print(f"rows: {str(result_set.rows)}") + + await tx.rollback() + + print("=" * 50) + print("AFTER ROLLBACK TX") + + async with await session.execute("SELECT COUNT(*) AS rows_count FROM example") as results: + async for result_set in results: + print(f"rows: {str(result_set.rows)}") + + await pool.retry_operation_async(callee) + + async def callee(session: ydb.aio.QuerySessionAsync): + query_print = """select $a""" + + print("=" * 50) + print("Check implicit typed parameters") + + values = [ + 1, + 1.0, + True, + "text", + {"4": 8, "15": 16, "23": 42}, + [{"name": "Michael"}, {"surname": "Scott"}], + ] + + for value in values: + print(f"value: {value}") + async with await session.transaction().execute( + query=query_print, + parameters={"$a": value}, + commit_tx=True, + ) as results: + async for result_set in results: + print(f"rows: {str(result_set.rows)}") + + print("=" * 50) + print("Check typed parameters as tuple pair") + + typed_value = ([1, 2, 3], ydb.ListType(ydb.PrimitiveType.Int64)) + print(f"value: {typed_value}") + + async with await session.transaction().execute( + query=query_print, + parameters={"$a": typed_value}, + commit_tx=True, + ) as results: + async for result_set in results: + print(f"rows: {str(result_set.rows)}") + + print("=" * 50) + print("Check typed parameters as ydb.TypedValue") + + typed_value = ydb.TypedValue(111, ydb.PrimitiveType.Int64) + print(f"value: {typed_value}") + + async with await session.transaction().execute( + query=query_print, + parameters={"$a": typed_value}, + commit_tx=True, + ) as results: + async for result_set in results: + print(f"rows: {str(result_set.rows)}") + + await pool.retry_operation_async(callee) + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/ydb/_grpc/grpcwrapper/common_utils.py b/ydb/_grpc/grpcwrapper/common_utils.py index a7febd5b..42d2b437 100644 --- a/ydb/_grpc/grpcwrapper/common_utils.py +++ b/ydb/_grpc/grpcwrapper/common_utils.py @@ -24,6 +24,8 @@ from google.protobuf.duration_pb2 import Duration as ProtoDuration from google.protobuf.timestamp_pb2 import Timestamp as ProtoTimeStamp +from ...driver import Driver +from ...aio.driver import Driver as DriverIO import ydb.aio # Workaround for good IDE and universal for runtime @@ -142,7 +144,7 @@ def close(self): ... -SupportedDriverType = Union[ydb.Driver, ydb.aio.Driver] +SupportedDriverType = Union[Driver, DriverIO] class GrpcWrapperAsyncIO(IGrpcWrapperAsyncIO): diff --git a/ydb/aio/__init__.py b/ydb/aio/__init__.py index acc44db5..0e7d4e74 100644 --- a/ydb/aio/__init__.py +++ b/ydb/aio/__init__.py @@ -1,2 +1,3 @@ from .driver import Driver # noqa from .table import SessionPool, retry_operation # noqa +from .query import QuerySessionPoolAsync, QuerySessionAsync # noqa diff --git a/ydb/aio/query/__init__.py b/ydb/aio/query/__init__.py index e69de29b..829d7b54 100644 --- a/ydb/aio/query/__init__.py +++ b/ydb/aio/query/__init__.py @@ -0,0 +1,7 @@ +__all__ = [ + "QuerySessionPoolAsync", + "QuerySessionAsync", +] + +from .pool import QuerySessionPoolAsync +from .session import QuerySessionAsync From 52a6bfdcbab24a491512532bd40519316dcd0083 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 16:23:38 +0300 Subject: [PATCH 128/429] temp --- ydb/_grpc/grpcwrapper/common_utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ydb/_grpc/grpcwrapper/common_utils.py b/ydb/_grpc/grpcwrapper/common_utils.py index 42d2b437..7fb5b684 100644 --- a/ydb/_grpc/grpcwrapper/common_utils.py +++ b/ydb/_grpc/grpcwrapper/common_utils.py @@ -26,7 +26,6 @@ from ...driver import Driver from ...aio.driver import Driver as DriverIO -import ydb.aio # Workaround for good IDE and universal for runtime if typing.TYPE_CHECKING: @@ -183,7 +182,7 @@ def _clean_executor(self, wait: bool): if self._wait_executor: self._wait_executor.shutdown(wait) - async def _start_asyncio_driver(self, driver: ydb.aio.Driver, stub, method): + async def _start_asyncio_driver(self, driver: DriverIO, stub, method): requests_iterator = QueueToIteratorAsyncIO(self.from_client_grpc) stream_call = await driver( requests_iterator, @@ -193,7 +192,7 @@ async def _start_asyncio_driver(self, driver: ydb.aio.Driver, stub, method): self._stream_call = stream_call self.from_server_grpc = stream_call.__aiter__() - async def _start_sync_driver(self, driver: ydb.Driver, stub, method): + async def _start_sync_driver(self, driver: Driver, stub, method): requests_iterator = AsyncQueueToSyncIteratorAsyncIO(self.from_client_grpc) self._wait_executor = concurrent.futures.ThreadPoolExecutor(max_workers=1) From fe65ddd2ce1f88c5b044fbf5a532a54bc98c68de Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 17:30:46 +0300 Subject: [PATCH 129/429] refactor useless interfaces --- ydb/aio/query/pool.py | 5 +- ydb/aio/query/session.py | 4 +- ydb/aio/query/transaction.py | 17 ++- ydb/query/__init__.py | 7 +- ydb/query/base.py | 235 +---------------------------------- ydb/query/pool.py | 6 +- ydb/query/session.py | 8 +- ydb/query/transaction.py | 17 ++- 8 files changed, 49 insertions(+), 250 deletions(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index e75ce4d2..1500b902 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -14,6 +14,7 @@ retry_operation_async, ) from ... import convert +from ..._grpc.grpcwrapper import common_utils logger = logging.getLogger(__name__) @@ -21,7 +22,7 @@ class QuerySessionPoolAsync: """QuerySessionPoolAsync is an object to simplify operations with sessions of Query Service.""" - def __init__(self, driver: base.SupportedDriverType): + def __init__(self, driver: common_utils.SupportedDriverType): """ :param driver: A driver instance """ @@ -85,7 +86,7 @@ def __init__(self, pool: QuerySessionPoolAsync): self._pool = pool self._session = QuerySessionAsync(pool._driver) - async def __aenter__(self) -> base.IQuerySession: + async def __aenter__(self) -> QuerySessionAsync: await self._session.create() return self._session diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index c122faa7..96da4f12 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -28,7 +28,7 @@ class QuerySessionAsync(BaseQuerySession): def __init__( self, - driver: base.SupportedDriverType, + driver: common_utils.SupportedDriverType, settings: Optional[base.QueryClientSettings] = None, loop: asyncio.AbstractEventLoop = None, ): @@ -90,7 +90,7 @@ async def create(self) -> "QuerySessionAsync": return self - def transaction(self, tx_mode=None) -> base.IQueryTxContext: + def transaction(self, tx_mode=None) -> QueryTxContextAsync: self._state._check_session_ready_to_use() tx_mode = tx_mode if tx_mode else _ydb_query_public.QuerySerializableReadWrite() diff --git a/ydb/aio/query/transaction.py b/ydb/aio/query/transaction.py index 2b581469..411c6501 100644 --- a/ydb/aio/query/transaction.py +++ b/ydb/aio/query/transaction.py @@ -46,7 +46,7 @@ async def _ensure_prev_stream_finished(self) -> None: pass self._prev_stream = None - async def begin(self, settings: Optional[base.QueryClientSettings] = None) -> None: + async def begin(self, settings: Optional[base.QueryClientSettings] = None) -> "QueryTxContextAsync": """WARNING: This API is experimental and could be changed. Explicitly begins a transaction @@ -79,6 +79,15 @@ async def commit(self, settings: Optional[base.QueryClientSettings] = None) -> N await self._commit_call(settings) async def rollback(self, settings: Optional[base.QueryClientSettings] = None) -> None: + """WARNING: This API is experimental and could be changed. + + Calls rollback on a transaction if it is open otherwise is no-op. If transaction execution + failed then this method raises PreconditionFailed. + + :param settings: A request settings + + :return: A committed transaction or exception if commit is failed + """ if self._tx_state._already_in(QueryTxStateEnum.ROLLBACKED): return @@ -93,16 +102,18 @@ async def rollback(self, settings: Optional[base.QueryClientSettings] = None) -> async def execute( self, query: str, + parameters: Optional[dict] = None, commit_tx: Optional[bool] = False, syntax: Optional[base.QuerySyntax] = None, exec_mode: Optional[base.QueryExecMode] = None, - parameters: Optional[dict] = None, concurrent_result_sets: Optional[bool] = False, + settings: Optional[base.QueryClientSettings] = None, ) -> AsyncResponseContextIterator: """WARNING: This API is experimental and could be changed. Sends a query to Query Service :param query: (YQL or SQL text) to be executed. + :param parameters: dict with parameters and YDB types; :param commit_tx: A special flag that allows transaction commit. :param syntax: Syntax of the query, which is a one from the following choises: 1) QuerySyntax.YQL_V1, which is default; @@ -112,7 +123,6 @@ async def execute( 2) QueryExecMode.EXPLAIN; 3) QueryExecMode.VALIDATE; 4) QueryExecMode.PARSE. - :param parameters: dict with parameters and YDB types; :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; :return: Iterator with result sets @@ -128,6 +138,7 @@ async def execute( concurrent_result_sets=concurrent_result_sets, ) + settings = settings if settings is not None else self.session._settings self._prev_stream = AsyncResponseContextIterator( stream_it, lambda resp: base.wrap_execute_query_response( diff --git a/ydb/query/__init__.py b/ydb/query/__init__.py index eb967abc..40e512cd 100644 --- a/ydb/query/__init__.py +++ b/ydb/query/__init__.py @@ -11,13 +11,12 @@ import logging from .base import ( - IQueryClient, - SupportedDriverType, QueryClientSettings, ) from .session import QuerySessionSync +from .._grpc.grpcwrapper import common_utils from .._grpc.grpcwrapper.ydb_query_public_types import ( QueryOnlineReadOnly, QuerySerializableReadWrite, @@ -30,8 +29,8 @@ logger = logging.getLogger(__name__) -class QueryClientSync(IQueryClient): - def __init__(self, driver: SupportedDriverType, query_client_settings: QueryClientSettings = None): +class QueryClientSync: + def __init__(self, driver: common_utils.SupportedDriverType, query_client_settings: QueryClientSettings = None): logger.warning("QueryClientSync is an experimental API, which could be changed.") self._driver = driver self._settings = query_client_settings diff --git a/ydb/query/base.py b/ydb/query/base.py index eef51ee6..62061a48 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -2,14 +2,11 @@ import enum import functools +import typing from typing import ( - Iterator, Optional, ) -from .._grpc.grpcwrapper.common_utils import ( - SupportedDriverType, -) from .._grpc.grpcwrapper import ydb_query from .._grpc.grpcwrapper.ydb_query_public_types import ( BaseQueryTxMode, @@ -20,6 +17,9 @@ from .. import _utilities from .. import _apis +if typing.TYPE_CHECKING: + from .transaction import BaseQueryTxContext + class QuerySyntax(enum.IntEnum): UNSPECIFIED = 0 @@ -117,231 +117,6 @@ def set_attached(self, attached: bool) -> "IQuerySessionState": pass -class IQuerySession(abc.ABC): - """Session object for Query Service. It is not recommended to control - session's lifecycle manually - use a QuerySessionPool is always a better choise. - """ - - @abc.abstractmethod - def __init__(self, driver: SupportedDriverType, settings: Optional[QueryClientSettings] = None): - pass - - @abc.abstractmethod - def create(self) -> "IQuerySession": - """WARNING: This API is experimental and could be changed. - - Creates a Session of Query Service on server side and attaches it. - - :return: Session object. - """ - pass - - @abc.abstractmethod - def delete(self) -> None: - """WARNING: This API is experimental and could be changed. - - Deletes a Session of Query Service on server side and releases resources. - - :return: None - """ - pass - - @abc.abstractmethod - def transaction(self, tx_mode: Optional[BaseQueryTxMode] = None) -> "IQueryTxContext": - """WARNING: This API is experimental and could be changed. - - Creates a transaction context manager with specified transaction mode. - - :param tx_mode: Transaction mode, which is a one from the following choises: - 1) QuerySerializableReadWrite() which is default mode; - 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); - 3) QuerySnapshotReadOnly(); - 4) QueryStaleReadOnly(). - - :return: transaction context manager. - """ - pass - - @abc.abstractmethod - def execute( - self, - query: str, - parameters: Optional[dict] = None, - syntax: Optional[QuerySyntax] = None, - exec_mode: Optional[QueryExecMode] = None, - concurrent_result_sets: Optional[bool] = False, - ) -> Iterator: - """WARNING: This API is experimental and could be changed. - - Sends a query to Query Service - :param query: (YQL or SQL text) to be executed. - :param syntax: Syntax of the query, which is a one from the following choises: - 1) QuerySyntax.YQL_V1, which is default; - 2) QuerySyntax.PG. - :param parameters: dict with parameters and YDB types; - :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; - - :return: Iterator with result sets - """ - - -class IQueryTxContext(abc.ABC): - """ - An object that provides a simple transaction context manager that allows statements execution - in a transaction. You don't have to open transaction explicitly, because context manager encapsulates - transaction control logic, and opens new transaction if: - 1) By explicit .begin(); - 2) On execution of a first statement, which is strictly recommended method, because that avoids - useless round trip - - This context manager is not thread-safe, so you should not manipulate on it concurrently. - """ - - @abc.abstractmethod - def __init__( - self, - driver: SupportedDriverType, - session_state: IQuerySessionState, - session: IQuerySession, - tx_mode: BaseQueryTxMode, - ): - """ - An object that provides a simple transaction context manager that allows statements execution - in a transaction. You don't have to open transaction explicitly, because context manager encapsulates - transaction control logic, and opens new transaction if: - - 1) By explicit .begin() method; - 2) On execution of a first statement, which is strictly recommended method, because that avoids useless round trip - - This context manager is not thread-safe, so you should not manipulate on it concurrently. - - :param driver: A driver instance - :param session_state: A state of session - :param tx_mode: Transaction mode, which is a one from the following choises: - 1) QuerySerializableReadWrite() which is default mode; - 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); - 3) QuerySnapshotReadOnly(); - 4) QueryStaleReadOnly(). - """ - pass - - @abc.abstractmethod - def __enter__(self) -> "IQueryTxContext": - """ - Enters a context manager and returns a transaction - - :return: A transaction instance - """ - pass - - @abc.abstractmethod - def __exit__(self, *args, **kwargs): - """ - Closes a transaction context manager and rollbacks transaction if - it is not finished explicitly - """ - pass - - @property - @abc.abstractmethod - def session_id(self) -> str: - """ - A transaction's session id - - :return: A transaction's session id - """ - pass - - @property - @abc.abstractmethod - def tx_id(self) -> Optional[str]: - """ - Returns an id of open transaction or None otherwise - - :return: An id of open transaction or None otherwise - """ - pass - - @abc.abstractmethod - def begin(self, settings: Optional[QueryClientSettings] = None) -> "IQueryTxContext": - """WARNING: This API is experimental and could be changed. - - Explicitly begins a transaction - - :param settings: A request settings - - :return: Transaction object or exception if begin is failed - """ - pass - - @abc.abstractmethod - def commit(self, settings: Optional[QueryClientSettings] = None) -> None: - """WARNING: This API is experimental and could be changed. - - Calls commit on a transaction if it is open. If transaction execution - failed then this method raises PreconditionFailed. - - :param settings: A request settings - - :return: None or exception if commit is failed - """ - pass - - @abc.abstractmethod - def rollback(self, settings: Optional[QueryClientSettings] = None) -> None: - """WARNING: This API is experimental and could be changed. - - Calls rollback on a transaction if it is open. If transaction execution - failed then this method raises PreconditionFailed. - - :param settings: A request settings - - :return: None or exception if rollback is failed - """ - pass - - @abc.abstractmethod - def execute( - self, - query: str, - commit_tx: Optional[bool] = False, - syntax: Optional[QuerySyntax] = None, - exec_mode: Optional[QueryExecMode] = None, - parameters: Optional[dict] = None, - concurrent_result_sets: Optional[bool] = False, - settings: Optional[QueryClientSettings] = None, - ) -> Iterator: - """WARNING: This API is experimental and could be changed. - - Sends a query to Query Service - :param query: (YQL or SQL text) to be executed. - :param commit_tx: A special flag that allows transaction commit. - :param syntax: Syntax of the query, which is a one from the following choises: - 1) QuerySyntax.YQL_V1, which is default; - 2) QuerySyntax.PG. - :param exec_mode: Exec mode of the query, which is a one from the following choises: - 1) QueryExecMode.EXECUTE, which is default; - 2) QueryExecMode.EXPLAIN; - 3) QueryExecMode.VALIDATE; - 4) QueryExecMode.PARSE. - :param parameters: dict with parameters and YDB types; - :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; - :param settings: An additional request settings QueryClientSettings; - - :return: Iterator with result sets - """ - pass - - -class IQueryClient(abc.ABC): - def __init__(self, driver: SupportedDriverType, query_client_settings: Optional[QueryClientSettings] = None): - pass - - @abc.abstractmethod - def session(self) -> IQuerySession: - pass - - def create_execute_query_request( query: str, session_id: str, @@ -392,7 +167,7 @@ def create_execute_query_request( def wrap_execute_query_response( rpc_state: RpcState, response_pb: _apis.ydb_query.ExecuteQueryResponsePart, - tx: Optional[IQueryTxContext] = None, + tx: Optional["BaseQueryTxContext"] = None, commit_tx: Optional[bool] = False, settings: Optional[QueryClientSettings] = None, ) -> convert.ResultSet: diff --git a/ydb/query/pool.py b/ydb/query/pool.py index bc214ecb..a6db4f3e 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -14,6 +14,8 @@ retry_operation_sync, ) from .. import convert +from .._grpc.grpcwrapper import common_utils + logger = logging.getLogger(__name__) @@ -21,7 +23,7 @@ class QuerySessionPool: """QuerySessionPool is an object to simplify operations with sessions of Query Service.""" - def __init__(self, driver: base.SupportedDriverType): + def __init__(self, driver: common_utils.SupportedDriverType): """ :param driver: A driver instance """ @@ -97,7 +99,7 @@ def __init__(self, pool: QuerySessionPool): self._pool = pool self._session = QuerySessionSync(pool._driver) - def __enter__(self) -> base.IQuerySession: + def __enter__(self) -> QuerySessionSync: self._session.create() return self._session diff --git a/ydb/query/session.py b/ydb/query/session.py index 4f627a7b..d3c82bc7 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -126,12 +126,12 @@ def wrapper_delete_session( return session -class BaseQuerySession(base.IQuerySession): - _driver: base.SupportedDriverType +class BaseQuerySession: + _driver: common_utils.SupportedDriverType _settings: base.QueryClientSettings _state: QuerySessionState - def __init__(self, driver: base.SupportedDriverType, settings: Optional[base.QueryClientSettings] = None): + def __init__(self, driver: common_utils.SupportedDriverType, settings: Optional[base.QueryClientSettings] = None): self._driver = driver self._settings = settings if settings is not None else base.QueryClientSettings() self._state = QuerySessionState(settings) @@ -256,7 +256,7 @@ def create(self) -> "QuerySessionSync": return self - def transaction(self, tx_mode: Optional[base.BaseQueryTxMode] = None) -> base.IQueryTxContext: + def transaction(self, tx_mode: Optional[base.BaseQueryTxMode] = None) -> QueryTxContextSync: """WARNING: This API is experimental and could be changed. Creates a transaction context manager with specified transaction mode. diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 170e6baf..b80fe014 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -169,7 +169,7 @@ def wrap_tx_rollback_response( return tx -class BaseQueryTxContext(base.IQueryTxContext): +class BaseQueryTxContext: def __init__(self, driver, session_state, session, tx_mode): """ An object that provides a simple transaction context manager that allows statements execution @@ -321,7 +321,9 @@ def _move_to_commited(self) -> None: return self._tx_state._change_state(QueryTxStateEnum.COMMITTED) - def begin(self, settings: Optional[base.QueryClientSettings] = None) -> "BaseQueryTxContext": + +class QueryTxContextSync(BaseQueryTxContext): + def begin(self, settings: Optional[base.QueryClientSettings] = None) -> "QueryTxContextSync": """WARNING: This API is experimental and could be changed. Explicitly begins a transaction @@ -356,6 +358,15 @@ def commit(self, settings: Optional[base.QueryClientSettings] = None) -> None: self._commit_call(settings) def rollback(self, settings: Optional[base.QueryClientSettings] = None) -> None: + """WARNING: This API is experimental and could be changed. + + Calls rollback on a transaction if it is open otherwise is no-op. If transaction execution + failed then this method raises PreconditionFailed. + + :param settings: A request settings + + :return: A committed transaction or exception if commit is failed + """ if self._tx_state._already_in(QueryTxStateEnum.ROLLBACKED): return @@ -381,6 +392,7 @@ def execute( Sends a query to Query Service :param query: (YQL or SQL text) to be executed. + :param parameters: dict with parameters and YDB types; :param commit_tx: A special flag that allows transaction commit. :param syntax: Syntax of the query, which is a one from the following choises: 1) QuerySyntax.YQL_V1, which is default; @@ -390,7 +402,6 @@ def execute( 2) QueryExecMode.EXPLAIN; 3) QueryExecMode.VALIDATE; 4) QueryExecMode.PARSE. - :param parameters: dict with parameters and YDB types; :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; :param settings: An additional request settings QueryClientSettings; From af4d5d918903fb9ed4621f3ba04313ef70016cdf Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 14 Aug 2024 17:35:45 +0300 Subject: [PATCH 130/429] style fixes --- ydb/aio/query/pool.py | 1 - ydb/query/pool.py | 1 - 2 files changed, 2 deletions(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 1500b902..53f11a03 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -5,7 +5,6 @@ List, ) -from ...query import base from .session import ( QuerySessionAsync, ) diff --git a/ydb/query/pool.py b/ydb/query/pool.py index a6db4f3e..bf868352 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -5,7 +5,6 @@ List, ) -from . import base from .session import ( QuerySessionSync, ) From 145054f7eaddfe0f527406832d3171bed37b69ab Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 15 Aug 2024 10:55:17 +0300 Subject: [PATCH 131/429] review fixes --- ydb/aio/query/base.py | 1 + ydb/aio/query/session.py | 4 ++- ydb/aio/query/transaction.py | 4 +-- ydb/query/base.py | 1 + ydb/query/session.py | 4 ++- ydb/query/transaction.py | 62 ++++++++++++++++++------------------ 6 files changed, 41 insertions(+), 35 deletions(-) diff --git a/ydb/aio/query/base.py b/ydb/aio/query/base.py index 596677ff..3800ce3d 100644 --- a/ydb/aio/query/base.py +++ b/ydb/aio/query/base.py @@ -6,5 +6,6 @@ async def __aenter__(self) -> "AsyncResponseContextIterator": return self async def __aexit__(self, exc_type, exc_val, exc_tb): + # To close stream on YDB it is necessary to scroll through it to the end async for _ in self: pass diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index 96da4f12..3b918e61 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -58,7 +58,9 @@ async def _check_session_status_loop(self) -> None: self._state.reset() self._state._change_state(QuerySessionStateEnum.CLOSED) except Exception: - pass + if not self._state._already_in(QuerySessionStateEnum.CLOSED): + self._state.reset() + self._state._change_state(QuerySessionStateEnum.CLOSED) async def delete(self) -> None: """WARNING: This API is experimental and could be changed. diff --git a/ydb/aio/query/transaction.py b/ydb/aio/query/transaction.py index 411c6501..f8e332fa 100644 --- a/ydb/aio/query/transaction.py +++ b/ydb/aio/query/transaction.py @@ -28,7 +28,7 @@ async def __aexit__(self, *args, **kwargs): Closes a transaction context manager and rollbacks transaction if it is not finished explicitly """ - self._ensure_prev_stream_finished() + await self._ensure_prev_stream_finished() if self._tx_state._state == QueryTxStateEnum.BEGINED: # It's strictly recommended to close transactions directly # by using commit_tx=True flag while executing statement or by @@ -42,7 +42,7 @@ async def __aexit__(self, *args, **kwargs): async def _ensure_prev_stream_finished(self) -> None: if self._prev_stream is not None: - async for _ in self._prev_stream: + async with self._prev_stream: pass self._prev_stream = None diff --git a/ydb/query/base.py b/ydb/query/base.py index 62061a48..55087d0c 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -48,6 +48,7 @@ def __enter__(self) -> "SyncResponseContextIterator": return self def __exit__(self, exc_type, exc_val, exc_tb): + # To close stream on YDB it is necessary to scroll through it to the end for _ in self: pass diff --git a/ydb/query/session.py b/ydb/query/session.py index d3c82bc7..4b051dc1 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -224,7 +224,9 @@ def _check_session_status_loop(self, status_stream: _utilities.SyncResponseItera self._state.reset() self._state._change_state(QuerySessionStateEnum.CLOSED) except Exception: - pass + if not self._state._already_in(QuerySessionStateEnum.CLOSED): + self._state.reset() + self._state._change_state(QuerySessionStateEnum.CLOSED) def delete(self) -> None: """WARNING: This API is experimental and could be changed. diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index b80fe014..750a94b0 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -196,31 +196,6 @@ def __init__(self, driver, session_state, session, tx_mode): self.session = session self._prev_stream = None - def __enter__(self) -> "BaseQueryTxContext": - """ - Enters a context manager and returns a transaction - - :return: A transaction instance - """ - return self - - def __exit__(self, *args, **kwargs): - """ - Closes a transaction context manager and rollbacks transaction if - it is not finished explicitly - """ - self._ensure_prev_stream_finished() - if self._tx_state._state == QueryTxStateEnum.BEGINED: - # It's strictly recommended to close transactions directly - # by using commit_tx=True flag while executing statement or by - # .commit() or .rollback() methods, but here we trying to do best - # effort to avoid useless open transactions - logger.warning("Potentially leaked tx: %s", self._tx_state.tx_id) - try: - self.rollback() - except issues.Error: - logger.warning("Failed to rollback leaked tx: %s", self._tx_state.tx_id) - @property def session_id(self) -> str: """ @@ -304,12 +279,6 @@ def _execute_call( _apis.QueryService.ExecuteQuery, ) - def _ensure_prev_stream_finished(self) -> None: - if self._prev_stream is not None: - for _ in self._prev_stream: - pass - self._prev_stream = None - def _move_to_beginned(self, tx_id: str) -> None: if self._tx_state._already_in(QueryTxStateEnum.BEGINED): return @@ -323,6 +292,37 @@ def _move_to_commited(self) -> None: class QueryTxContextSync(BaseQueryTxContext): + def __enter__(self) -> "BaseQueryTxContext": + """ + Enters a context manager and returns a transaction + + :return: A transaction instance + """ + return self + + def __exit__(self, *args, **kwargs): + """ + Closes a transaction context manager and rollbacks transaction if + it is not finished explicitly + """ + self._ensure_prev_stream_finished() + if self._tx_state._state == QueryTxStateEnum.BEGINED: + # It's strictly recommended to close transactions directly + # by using commit_tx=True flag while executing statement or by + # .commit() or .rollback() methods, but here we trying to do best + # effort to avoid useless open transactions + logger.warning("Potentially leaked tx: %s", self._tx_state.tx_id) + try: + self.rollback() + except issues.Error: + logger.warning("Failed to rollback leaked tx: %s", self._tx_state.tx_id) + + def _ensure_prev_stream_finished(self) -> None: + if self._prev_stream is not None: + with self._prev_stream: + pass + self._prev_stream = None + def begin(self, settings: Optional[base.QueryClientSettings] = None) -> "QueryTxContextSync": """WARNING: This API is experimental and could be changed. From f3bd61302af312bbe91549c6a2ad030628eab648 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 15 Aug 2024 13:10:22 +0300 Subject: [PATCH 132/429] Extend example with async mode --- examples/basic_example_v2/README.md | 5 + examples/basic_example_v2/__main__.py | 29 +- .../basic_example_v2/basic_example_async.py | 303 ++++++++++++++++++ ydb/aio/query/pool.py | 19 +- ydb/aio/query/session.py | 6 +- ydb/aio/query/transaction.py | 2 + ydb/query/pool.py | 1 + 7 files changed, 355 insertions(+), 10 deletions(-) create mode 100644 examples/basic_example_v2/basic_example_async.py diff --git a/examples/basic_example_v2/README.md b/examples/basic_example_v2/README.md index 92ebe21a..396e0e7f 100644 --- a/examples/basic_example_v2/README.md +++ b/examples/basic_example_v2/README.md @@ -1,5 +1,10 @@ # YDB Python SDK Example: basic_example_v2 Example code demonstrating the basic YDB Python SDK operations. +Example is awailable in two modes: +1. `sync` - synchronous implementation; +1. `async` - asynchronous implementation using asyncio. + +To spesify mode, use argument `-m async` or `--mode async`. See the top-level [README.md](../README.md) file for instructions on running this example. diff --git a/examples/basic_example_v2/__main__.py b/examples/basic_example_v2/__main__.py index 2397a2c1..9c68c00d 100644 --- a/examples/basic_example_v2/__main__.py +++ b/examples/basic_example_v2/__main__.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- import argparse -import basic_example +import asyncio +from basic_example import run as run_sync +from basic_example_async import run as run_async import logging @@ -13,6 +15,7 @@ parser.add_argument("-e", "--endpoint", help="Endpoint url to use", default="grpc://localhost:2136") parser.add_argument("-p", "--path", default="") parser.add_argument("-v", "--verbose", default=False, action="store_true") + parser.add_argument("-m", "--mode", default="sync", help="Mode of example: sync or async") args = parser.parse_args() @@ -20,9 +23,21 @@ logger = logging.getLogger("ydb.pool.Discovery") logger.setLevel(logging.INFO) logger.addHandler(logging.StreamHandler()) - - basic_example.run( - args.endpoint, - args.database, - args.path, - ) + if args.mode == "sync": + print("Running sync example") + run_sync( + args.endpoint, + args.database, + args.path, + ) + elif args.mode == "async": + print("Running async example") + asyncio.run( + run_async( + args.endpoint, + args.database, + args.path, + ) + ) + else: + raise ValueError(f"Unsupported mode: {args.mode}, use one of sync|async") diff --git a/examples/basic_example_v2/basic_example_async.py b/examples/basic_example_v2/basic_example_async.py new file mode 100644 index 00000000..405a15b9 --- /dev/null +++ b/examples/basic_example_v2/basic_example_async.py @@ -0,0 +1,303 @@ +# -*- coding: utf-8 -*- +import posixpath +import ydb +import basic_example_data + +# Table path prefix allows to put the working tables into the specific directory +# inside the YDB database. Putting `PRAGMA TablePathPrefix("some/path")` +# at the beginning of the query allows to reference the tables through +# their names "under" the specified directory. +# +# TablePathPrefix has to be defined as an absolute path, which has to be started +# with the current database location. +# +# https://ydb.tech/ru/docs/yql/reference/syntax/pragma#table-path-prefix + +DropTablesQuery = """PRAGMA TablePathPrefix("{}"); +DROP TABLE IF EXISTS series; +DROP TABLE IF EXISTS seasons; +DROP TABLE IF EXISTS episodes; +""" + +FillDataQuery = """PRAGMA TablePathPrefix("{}"); + +DECLARE $seriesData AS List>; + +DECLARE $seasonsData AS List>; + +DECLARE $episodesData AS List>; + +REPLACE INTO series +SELECT + series_id, + title, + series_info, + release_date +FROM AS_TABLE($seriesData); + +REPLACE INTO seasons +SELECT + series_id, + season_id, + title, + first_aired, + last_aired +FROM AS_TABLE($seasonsData); + +REPLACE INTO episodes +SELECT + series_id, + season_id, + episode_id, + title, + air_date +FROM AS_TABLE($episodesData); +""" + + +async def fill_tables_with_data(pool: ydb.aio.QuerySessionPoolAsync, path: str): + print("\nFilling tables with data...") + + query = FillDataQuery.format(path) + + await pool.execute_with_retries( + query, + { + "$seriesData": (basic_example_data.get_series_data(), basic_example_data.get_series_data_type()), + "$seasonsData": (basic_example_data.get_seasons_data(), basic_example_data.get_seasons_data_type()), + "$episodesData": (basic_example_data.get_episodes_data(), basic_example_data.get_episodes_data_type()), + }, + ) + + +async def select_simple(pool: ydb.aio.QuerySessionPoolAsync, path: str): + print("\nCheck series table...") + result_sets = await pool.execute_with_retries( + """ + PRAGMA TablePathPrefix("{}"); + SELECT + series_id, + title, + release_date + FROM series + WHERE series_id = 1; + """.format( + path + ), + ) + first_set = result_sets[0] + for row in first_set.rows: + print( + "series, id: ", + row.series_id, + ", title: ", + row.title, + ", release date: ", + row.release_date, + ) + + return first_set + + +async def upsert_simple(pool: ydb.aio.QuerySessionPoolAsync, path: str): + print("\nPerforming UPSERT into episodes...") + + await pool.execute_with_retries( + """ + PRAGMA TablePathPrefix("{}"); + UPSERT INTO episodes (series_id, season_id, episode_id, title) VALUES (2, 6, 1, "TBD"); + """.format( + path + ) + ) + + +async def select_with_parameters(pool: ydb.aio.QuerySessionPoolAsync, path: str, series_id, season_id, episode_id): + result_sets = await pool.execute_with_retries( + """ + PRAGMA TablePathPrefix("{}"); + SELECT + title, + air_date + FROM episodes + WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; + """.format( + path + ), + { + "$seriesId": series_id, # could be defined implicit + "$seasonId": (season_id, ydb.PrimitiveType.Int64), # could be defined via tuple + "$episodeId": ydb.TypedValue(episode_id, ydb.PrimitiveType.Int64), # could be defined via special class + }, + ) + + print("\n> select_with_parameters:") + first_set = result_sets[0] + for row in first_set.rows: + print("episode title:", row.title, ", air date:", row.air_date) + + return first_set + + +# Show usage of explicit Begin/Commit transaction control calls. +# In most cases it's better to use transaction control settings in session.transaction +# calls instead to avoid additional hops to YDB cluster and allow more efficient +# execution of queries. +async def explicit_transaction_control(pool: ydb.aio.QuerySessionPoolAsync, path: str, series_id, season_id, episode_id): + async def callee(session: ydb.aio.QuerySessionAsync): + query = """ + PRAGMA TablePathPrefix("{}"); + UPDATE episodes + SET air_date = CurrentUtcDate() + WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; + """.format( + path + ) + + # Get newly created transaction id + tx = await session.transaction(ydb.QuerySerializableReadWrite()).begin() + + # Execute data query. + # Transaction control settings continues active transaction (tx) + async with await tx.execute( + query, + { + "$seriesId": (series_id, ydb.PrimitiveType.Int64), + "$seasonId": (season_id, ydb.PrimitiveType.Int64), + "$episodeId": (episode_id, ydb.PrimitiveType.Int64), + }, + ) as _: + pass + + print("\n> explicit TCL call") + + # Commit active transaction(tx) + await tx.commit() + + return await pool.retry_operation_async(callee) + + +async def drop_tables(pool: ydb.aio.QuerySessionPoolAsync, path: str): + print("\nCleaning up existing tables...") + await pool.execute_with_retries(DropTablesQuery.format(path)) + + +async def create_tables(pool: ydb.aio.QuerySessionPoolAsync, path: str): + print("\nCreating table series...") + await pool.execute_with_retries( + """ + PRAGMA TablePathPrefix("{}"); + CREATE table `series` ( + `series_id` Int64, + `title` Utf8, + `series_info` Utf8, + `release_date` Date, + PRIMARY KEY (`series_id`) + ) + """.format( + path + ) + ) + + print("\nCreating table seasons...") + await pool.execute_with_retries( + """ + PRAGMA TablePathPrefix("{}"); + CREATE table `seasons` ( + `series_id` Int64, + `season_id` Int64, + `title` Utf8, + `first_aired` Date, + `last_aired` Date, + PRIMARY KEY (`series_id`, `season_id`) + ) + """.format( + path + ) + ) + + print("\nCreating table episodes...") + await pool.execute_with_retries( + """ + PRAGMA TablePathPrefix("{}"); + CREATE table `episodes` ( + `series_id` Int64, + `season_id` Int64, + `episode_id` Int64, + `title` Utf8, + `air_date` Date, + PRIMARY KEY (`series_id`, `season_id`, `episode_id`) + ) + """.format( + path + ) + ) + + +async def is_directory_exists(driver: ydb.aio.Driver, path: str): + try: + return await driver.scheme_client.describe_path(path).is_directory() + except ydb.SchemeError: + return False + + +async def ensure_path_exists(driver: ydb.aio.Driver, database, path): + paths_to_create = list() + path = path.rstrip("/") + while path not in ("", database): + full_path = posixpath.join(database, path) + if await is_directory_exists(driver, full_path): + break + paths_to_create.append(full_path) + path = posixpath.dirname(path).rstrip("/") + + while len(paths_to_create) > 0: + full_path = paths_to_create.pop(-1) + await driver.scheme_client.make_directory(full_path) + + +async def run(endpoint, database, path): + async with ydb.aio.Driver( + endpoint=endpoint, + database=database, + credentials=ydb.credentials_from_env_variables(), + ) as driver: + await driver.wait(timeout=5, fail_fast=True) + + async with ydb.aio.QuerySessionPoolAsync(driver) as pool: + + await ensure_path_exists(driver, database, path) + + # absolute path - prefix to the table's names, + # including the database location + full_path = posixpath.join(database, path) + + await drop_tables(pool, full_path) + + await create_tables(pool, full_path) + + await fill_tables_with_data(pool, full_path) + + await select_simple(pool, full_path) + + await upsert_simple(pool, full_path) + + await select_with_parameters(pool, full_path, 2, 3, 7) + await select_with_parameters(pool, full_path, 2, 3, 8) + + await explicit_transaction_control(pool, full_path, 2, 6, 1) + await select_with_parameters(pool, full_path, 2, 6, 1) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 53f11a03..f91f7465 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -57,7 +57,12 @@ async def wrapped_callee(): return await retry_operation_async(wrapped_callee, retry_settings) async def execute_with_retries( - self, query: str, retry_settings: Optional[RetrySettings] = None, *args, **kwargs + self, + query: str, + parameters: Optional[dict] = None, + retry_settings: Optional[RetrySettings] = None, + *args, + **kwargs, ) -> List[convert.ResultSet]: """WARNING: This API is experimental and could be changed. Special interface to execute a one-shot queries in a safe, retriable way. @@ -65,6 +70,7 @@ async def execute_with_retries( method with huge read queries. :param query: A query, yql or sql text. + :param parameters: dict with parameters and YDB types; :param retry_settings: RetrySettings object. :return: Result sets or exception in case of execution errors. @@ -74,11 +80,20 @@ async def execute_with_retries( async def wrapped_callee(): async with self.checkout() as session: - it = await session.execute(query, *args, **kwargs) + it = await session.execute(query, parameters, *args, **kwargs) return [result_set async for result_set in it] return await retry_operation_async(wrapped_callee, retry_settings) + async def stop(self, timeout=None): + pass # TODO: implement + + async def __aenter__(self): + return self + + async def __aexit__(self, exc_type, exc_val, exc_tb): + await self.stop() + class SimpleQuerySessionCheckoutAsync: def __init__(self, pool: QuerySessionPoolAsync): diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index 3b918e61..627a41d8 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -136,5 +136,9 @@ async def execute( return AsyncResponseContextIterator( stream_it, - lambda resp: base.wrap_execute_query_response(rpc_state=None, response_pb=resp), + lambda resp: base.wrap_execute_query_response( + rpc_state=None, + response_pb=resp, + settings=self._settings, + ), ) diff --git a/ydb/aio/query/transaction.py b/ydb/aio/query/transaction.py index f8e332fa..e9993fcc 100644 --- a/ydb/aio/query/transaction.py +++ b/ydb/aio/query/transaction.py @@ -56,6 +56,7 @@ async def begin(self, settings: Optional[base.QueryClientSettings] = None) -> "Q :return: None or exception if begin is failed """ await self._begin_call(settings) + return self async def commit(self, settings: Optional[base.QueryClientSettings] = None) -> None: """WARNING: This API is experimental and could be changed. @@ -146,6 +147,7 @@ async def execute( response_pb=resp, tx=self, commit_tx=commit_tx, + settings=settings, ), ) return self._prev_stream diff --git a/ydb/query/pool.py b/ydb/query/pool.py index bf868352..afe39f06 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -69,6 +69,7 @@ def execute_with_retries( method with huge read queries. :param query: A query, yql or sql text. + :param parameters: dict with parameters and YDB types; :param retry_settings: RetrySettings object. :return: Result sets or exception in case of execution errors. From b15a1dd51a6de6e7aa2f97b50f2d3901cc8aee78 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 15 Aug 2024 13:17:55 +0300 Subject: [PATCH 133/429] style fixes --- examples/basic_example_v2/basic_example_async.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/basic_example_v2/basic_example_async.py b/examples/basic_example_v2/basic_example_async.py index 405a15b9..0966b592 100644 --- a/examples/basic_example_v2/basic_example_async.py +++ b/examples/basic_example_v2/basic_example_async.py @@ -157,7 +157,9 @@ async def select_with_parameters(pool: ydb.aio.QuerySessionPoolAsync, path: str, # In most cases it's better to use transaction control settings in session.transaction # calls instead to avoid additional hops to YDB cluster and allow more efficient # execution of queries. -async def explicit_transaction_control(pool: ydb.aio.QuerySessionPoolAsync, path: str, series_id, season_id, episode_id): +async def explicit_transaction_control( + pool: ydb.aio.QuerySessionPoolAsync, path: str, series_id, season_id, episode_id +): async def callee(session: ydb.aio.QuerySessionAsync): query = """ PRAGMA TablePathPrefix("{}"); From 02c0f1115bda423e93867705336b1da80abba6ba Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 15 Aug 2024 14:28:59 +0300 Subject: [PATCH 134/429] add python 3.9 to tox matrix --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 3b477b3c..fe2cf19a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8] + python-version: [3.8, 3.9] environment: [py, py-tls, py-proto3, py-tls-proto3] folder: [ydb, tests] exclude: From 9247707b99ceb670874d0fbac2aa992f9fe0e7ca Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 15 Aug 2024 14:29:20 +0300 Subject: [PATCH 135/429] Revert "add python 3.9 to tox matrix" This reverts commit 02c0f1115bda423e93867705336b1da80abba6ba. --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index fe2cf19a..3b477b3c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8, 3.9] + python-version: [3.8] environment: [py, py-tls, py-proto3, py-tls-proto3] folder: [ydb, tests] exclude: From 95099cf7f6c1e87356b0ab5a66af0b355810b91c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 19 Aug 2024 13:17:55 +0300 Subject: [PATCH 136/429] specify service to slo via arg --- .github/workflows/slo.yml | 12 +++++++++--- tests/slo/Dockerfile | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/slo.yml b/.github/workflows/slo.yml index 701d6d98..23da75bc 100644 --- a/.github/workflows/slo.yml +++ b/.github/workflows/slo.yml @@ -48,11 +48,17 @@ jobs: timeBetweenPhases: 30 shutdownTime: 30 - language_id0: sync - language0: python-sync + language_id0: sync-table + language0: Python SDK over Table Service workload_path0: tests/slo workload_build_context0: ../.. - workload_build_options0: -f Dockerfile + workload_build_options0: -f Dockerfile --build-arg SDK_SERVICE=table-service + + language_id1: sync-query + language1: Python SDK over Query Service + workload_path1: tests/slo + workload_build_context1: ../.. + workload_build_options1: -f Dockerfile --build-arg SDK_SERVICE=query-service - uses: actions/upload-artifact@v3 if: env.DOCKER_REPO != null diff --git a/tests/slo/Dockerfile b/tests/slo/Dockerfile index bcb01d72..a948d69c 100644 --- a/tests/slo/Dockerfile +++ b/tests/slo/Dockerfile @@ -3,5 +3,6 @@ COPY . /src WORKDIR /src RUN python -m pip install --upgrade pip && python -m pip install -e . && python -m pip install -r tests/slo/requirements.txt WORKDIR tests/slo +ARG SDK_SERVICE ENTRYPOINT ["python", "src"] From d2c8526828f1d56f2a8ec344a227d86f32045b9b Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 19 Aug 2024 13:17:55 +0300 Subject: [PATCH 137/429] fix hardcoded metric name --- .github/workflows/slo.yml | 4 ++-- tests/slo/src/metrics.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/slo.yml b/.github/workflows/slo.yml index 23da75bc..a0be4442 100644 --- a/.github/workflows/slo.yml +++ b/.github/workflows/slo.yml @@ -48,13 +48,13 @@ jobs: timeBetweenPhases: 30 shutdownTime: 30 - language_id0: sync-table + language_id0: sync-python-table language0: Python SDK over Table Service workload_path0: tests/slo workload_build_context0: ../.. workload_build_options0: -f Dockerfile --build-arg SDK_SERVICE=table-service - language_id1: sync-query + language_id1: sync-python-query language1: Python SDK over Query Service workload_path1: tests/slo workload_build_context1: ../.. diff --git a/tests/slo/src/metrics.py b/tests/slo/src/metrics.py index 34e6ca80..14abd8e7 100644 --- a/tests/slo/src/metrics.py +++ b/tests/slo/src/metrics.py @@ -13,6 +13,8 @@ JOB_READ_LABEL, JOB_WRITE_LABEL = "read", "write" JOB_STATUS_OK, JOB_STATUS_ERR = "ok", "err" +SDK_SERVICE_NAME = "sync-python-table" + class Metrics: def __init__(self, push_gateway): @@ -105,7 +107,7 @@ def push(self): job="workload-sync", registry=self._registry, grouping_key={ - "sdk": "python-sync", + "sdk": SDK_SERVICE_NAME, "sdkVersion": version("ydb"), }, ) From ebc1d51adce0abf5618e50b9e99faa741108a4d3 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 19 Aug 2024 13:17:55 +0300 Subject: [PATCH 138/429] switch between different slo services --- tests/slo/src/metrics.py | 2 +- tests/slo/src/runner.py | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/tests/slo/src/metrics.py b/tests/slo/src/metrics.py index 14abd8e7..722c66eb 100644 --- a/tests/slo/src/metrics.py +++ b/tests/slo/src/metrics.py @@ -13,7 +13,7 @@ JOB_READ_LABEL, JOB_WRITE_LABEL = "read", "write" JOB_STATUS_OK, JOB_STATUS_ERR = "ok", "err" -SDK_SERVICE_NAME = "sync-python-table" +SDK_SERVICE_NAME = environ.get("SDK_SERVICE", "table-service") class Metrics: diff --git a/tests/slo/src/runner.py b/tests/slo/src/runner.py index d2957d62..bd1ee636 100644 --- a/tests/slo/src/runner.py +++ b/tests/slo/src/runner.py @@ -8,7 +8,7 @@ from concurrent.futures import ThreadPoolExecutor from jobs import run_read_jobs, run_write_jobs, run_metric_job -from metrics import Metrics +from metrics import Metrics, SDK_SERVICE_NAME logger = logging.getLogger(__name__) @@ -85,12 +85,20 @@ def run_slo(args, driver, tb_name): logger.info("Max ID: %s", max_id) metrics = Metrics(args.prom_pgw) - - futures = ( - *run_read_jobs(args, driver, tb_name, max_id, metrics), - *run_write_jobs(args, driver, tb_name, max_id, metrics), - run_metric_job(args, metrics), - ) + if SDK_SERVICE_NAME == "table-service": + futures = ( + *run_read_jobs(args, driver, tb_name, max_id, metrics), + *run_write_jobs(args, driver, tb_name, max_id, metrics), + run_metric_job(args, metrics), + ) + elif SDK_SERVICE_NAME == "query-service": + futures = ( + *run_read_jobs(args, driver, tb_name, max_id, metrics), + *run_write_jobs(args, driver, tb_name, max_id, metrics), + run_metric_job(args, metrics), + ) + else: + raise ValueError(f"Unsupported service: {SDK_SERVICE_NAME}") for future in futures: future.join() From 88fbd4516859d0c9f08a69d2899c3f093538cff2 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 19 Aug 2024 13:18:25 +0300 Subject: [PATCH 139/429] SLO for query service --- tests/slo/src/jobs.py | 124 +++++++++++++++++++++++++++++++++++++++- tests/slo/src/runner.py | 12 +++- 2 files changed, 130 insertions(+), 6 deletions(-) diff --git a/tests/slo/src/jobs.py b/tests/slo/src/jobs.py index 8a2f5f20..3d19bc67 100644 --- a/tests/slo/src/jobs.py +++ b/tests/slo/src/jobs.py @@ -3,7 +3,7 @@ import logging import dataclasses from random import randint -from typing import Callable, Tuple +from typing import Callable, Tuple, Union from ratelimiter import RateLimiter import threading @@ -36,7 +36,7 @@ @dataclasses.dataclass class RequestParams: - pool: ydb.SessionPool + pool: Union[ydb.SessionPool, ydb.QuerySessionPool] query: str params: dict metrics: Metrics @@ -56,7 +56,7 @@ def transaction(session): result = session.transaction().execute( params.query, - params.params, + parameters=params.params, commit_tx=True, settings=params.request_settings, ) @@ -135,6 +135,61 @@ def run_read_jobs(args, driver, tb_name, max_id, metrics): return futures +def run_reads_query(driver, query, max_id, metrics, limiter, runtime, timeout): + start_time = time.time() + + logger.info("Start read workload") + + request_settings = ydb.BaseRequestSettings().with_timeout(timeout) + retry_setting = ydb.RetrySettings( + idempotent=True, + max_session_acquire_timeout=timeout, + ) + + with ydb.QuerySessionPool(driver) as pool: + logger.info("Session pool for read requests created") + + while time.time() - start_time < runtime: + params = {"$object_id": randint(1, max_id)} + with limiter: + + def check_result(result): + res = next(result) + assert res[0].rows[0] + + params = RequestParams( + pool=pool, + query=query, + params=params, + metrics=metrics, + labels=(JOB_READ_LABEL,), + request_settings=request_settings, + retry_settings=retry_setting, + check_result_cb=check_result, + ) + execute_query(params) + + logger.info("Stop read workload") + + +def run_read_jobs_query(args, driver, tb_name, max_id, metrics): + logger.info("Start read jobs for query service") + + read_q = READ_QUERY_TEMPLATE.format(tb_name) + + read_limiter = RateLimiter(max_calls=args.read_rps, period=1) + futures = [] + for _ in range(args.read_threads): + future = threading.Thread( + name="slo_run_read", + target=run_reads_query, + args=(driver, read_q, max_id, metrics, read_limiter, args.time, args.read_timeout / 1000), + ) + future.start() + futures.append(future) + return futures + + def run_writes(driver, query, row_generator, metrics, limiter, runtime, timeout): start_time = time.time() @@ -157,6 +212,11 @@ def run_writes(driver, query, row_generator, metrics, limiter, runtime, timeout) "$payload_double": row.payload_double, "$payload_timestamp": row.payload_timestamp, } + + def check_result(result): + with result: + pass + with limiter: params = RequestParams( pool=pool, @@ -166,6 +226,7 @@ def run_writes(driver, query, row_generator, metrics, limiter, runtime, timeout) labels=(JOB_WRITE_LABEL,), request_settings=request_settings, retry_settings=retry_setting, + check_result_cb=check_result, ) execute_query(params) @@ -194,6 +255,63 @@ def run_write_jobs(args, driver, tb_name, max_id, metrics): return futures +def run_writes_query(driver, query, row_generator, metrics, limiter, runtime, timeout): + start_time = time.time() + + logger.info("Start write workload") + + request_settings = ydb.BaseRequestSettings().with_timeout(timeout) + retry_setting = ydb.RetrySettings( + idempotent=True, + max_session_acquire_timeout=timeout, + ) + + with ydb.QuerySessionPool(driver) as pool: + logger.info("Session pool for read requests created") + + while time.time() - start_time < runtime: + row = row_generator.get() + params = { + "$object_id": (row.object_id, ydb.PrimitiveType.Int64), + "$payload_str": (row.payload_str, ydb.PrimitiveType.Utf8), + "$payload_double": (row.payload_double, ydb.PrimitiveType.Double), + "$payload_timestamp": (row.payload_timestamp, ydb.PrimitiveType.Timestamp), + } + with limiter: + params = RequestParams( + pool=pool, + query=query, + params=params, + metrics=metrics, + labels=(JOB_WRITE_LABEL,), + request_settings=request_settings, + retry_settings=retry_setting, + ) + execute_query(params) + + logger.info("Stop write workload") + + +def run_write_jobs_query(args, driver, tb_name, max_id, metrics): + logger.info("Start write jobs for query service") + + write_q = WRITE_QUERY_TEMPLATE.format(tb_name) + + write_limiter = RateLimiter(max_calls=args.write_rps, period=1) + row_generator = RowGenerator(max_id) + + futures = [] + for _ in range(args.write_threads): + future = threading.Thread( + name="slo_run_write", + target=run_writes_query, + args=(driver, write_q, row_generator, metrics, write_limiter, args.time, args.write_timeout / 1000), + ) + future.start() + futures.append(future) + return futures + + def push_metric(limiter, runtime, metrics): start_time = time.time() logger.info("Start push metrics") diff --git a/tests/slo/src/runner.py b/tests/slo/src/runner.py index bd1ee636..8daeb9c6 100644 --- a/tests/slo/src/runner.py +++ b/tests/slo/src/runner.py @@ -7,7 +7,13 @@ import concurrent.futures from concurrent.futures import ThreadPoolExecutor -from jobs import run_read_jobs, run_write_jobs, run_metric_job +from jobs import ( + run_read_jobs, + run_write_jobs, + run_read_jobs_query, + run_write_jobs_query, + run_metric_job, +) from metrics import Metrics, SDK_SERVICE_NAME logger = logging.getLogger(__name__) @@ -93,8 +99,8 @@ def run_slo(args, driver, tb_name): ) elif SDK_SERVICE_NAME == "query-service": futures = ( - *run_read_jobs(args, driver, tb_name, max_id, metrics), - *run_write_jobs(args, driver, tb_name, max_id, metrics), + *run_read_jobs_query(args, driver, tb_name, max_id, metrics), + *run_write_jobs_query(args, driver, tb_name, max_id, metrics), run_metric_job(args, metrics), ) else: From d21ae3ca42e204862fdbc7661801937f66affe19 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 19 Aug 2024 13:18:57 +0300 Subject: [PATCH 140/429] try fix charts --- .github/workflows/slo.yml | 4 ++-- tests/slo/src/jobs.py | 33 +++++++++++++++++++++++---------- tests/slo/src/metrics.py | 2 +- tests/slo/src/runner.py | 4 ++-- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/.github/workflows/slo.yml b/.github/workflows/slo.yml index a0be4442..87144db0 100644 --- a/.github/workflows/slo.yml +++ b/.github/workflows/slo.yml @@ -52,13 +52,13 @@ jobs: language0: Python SDK over Table Service workload_path0: tests/slo workload_build_context0: ../.. - workload_build_options0: -f Dockerfile --build-arg SDK_SERVICE=table-service + workload_build_options0: -f Dockerfile --build-arg SDK_SERVICE=sync-python-table language_id1: sync-python-query language1: Python SDK over Query Service workload_path1: tests/slo workload_build_context1: ../.. - workload_build_options1: -f Dockerfile --build-arg SDK_SERVICE=query-service + workload_build_options1: -f Dockerfile --build-arg SDK_SERVICE=sync-python-query - uses: actions/upload-artifact@v3 if: env.DOCKER_REPO != null diff --git a/tests/slo/src/jobs.py b/tests/slo/src/jobs.py index 3d19bc67..5df16c44 100644 --- a/tests/slo/src/jobs.py +++ b/tests/slo/src/jobs.py @@ -31,6 +31,18 @@ ); """ +QUERY_READ_QUERY_TEMPLATE = """ +SELECT * FROM `{}` WHERE object_id = $object_id AND object_hash = Digest::NumericHash($object_id); +""" + +QUERY_WRITE_QUERY_TEMPLATE = """ +UPSERT INTO `{}` ( + object_id, object_hash, payload_str, payload_double, payload_timestamp +) VALUES ( + $object_id, Digest::NumericHash($object_id), $payload_str, $payload_double, $payload_timestamp +); +""" + logger = logging.getLogger(__name__) @@ -150,12 +162,12 @@ def run_reads_query(driver, query, max_id, metrics, limiter, runtime, timeout): logger.info("Session pool for read requests created") while time.time() - start_time < runtime: - params = {"$object_id": randint(1, max_id)} + params = {"$object_id": (randint(1, max_id), ydb.PrimitiveType.Uint64)} with limiter: def check_result(result): res = next(result) - assert res[0].rows[0] + assert res.rows[0] params = RequestParams( pool=pool, @@ -175,7 +187,7 @@ def check_result(result): def run_read_jobs_query(args, driver, tb_name, max_id, metrics): logger.info("Start read jobs for query service") - read_q = READ_QUERY_TEMPLATE.format(tb_name) + read_q = QUERY_READ_QUERY_TEMPLATE.format(tb_name) read_limiter = RateLimiter(max_calls=args.read_rps, period=1) futures = [] @@ -213,10 +225,6 @@ def run_writes(driver, query, row_generator, metrics, limiter, runtime, timeout) "$payload_timestamp": row.payload_timestamp, } - def check_result(result): - with result: - pass - with limiter: params = RequestParams( pool=pool, @@ -226,7 +234,6 @@ def check_result(result): labels=(JOB_WRITE_LABEL,), request_settings=request_settings, retry_settings=retry_setting, - check_result_cb=check_result, ) execute_query(params) @@ -272,11 +279,16 @@ def run_writes_query(driver, query, row_generator, metrics, limiter, runtime, ti while time.time() - start_time < runtime: row = row_generator.get() params = { - "$object_id": (row.object_id, ydb.PrimitiveType.Int64), + "$object_id": (row.object_id, ydb.PrimitiveType.Uint64), "$payload_str": (row.payload_str, ydb.PrimitiveType.Utf8), "$payload_double": (row.payload_double, ydb.PrimitiveType.Double), "$payload_timestamp": (row.payload_timestamp, ydb.PrimitiveType.Timestamp), } + + def check_result(result): + with result: + pass + with limiter: params = RequestParams( pool=pool, @@ -286,6 +298,7 @@ def run_writes_query(driver, query, row_generator, metrics, limiter, runtime, ti labels=(JOB_WRITE_LABEL,), request_settings=request_settings, retry_settings=retry_setting, + check_result_cb=check_result, ) execute_query(params) @@ -295,7 +308,7 @@ def run_writes_query(driver, query, row_generator, metrics, limiter, runtime, ti def run_write_jobs_query(args, driver, tb_name, max_id, metrics): logger.info("Start write jobs for query service") - write_q = WRITE_QUERY_TEMPLATE.format(tb_name) + write_q = QUERY_WRITE_QUERY_TEMPLATE.format(tb_name) write_limiter = RateLimiter(max_calls=args.write_rps, period=1) row_generator = RowGenerator(max_id) diff --git a/tests/slo/src/metrics.py b/tests/slo/src/metrics.py index 722c66eb..9dc201f4 100644 --- a/tests/slo/src/metrics.py +++ b/tests/slo/src/metrics.py @@ -13,7 +13,7 @@ JOB_READ_LABEL, JOB_WRITE_LABEL = "read", "write" JOB_STATUS_OK, JOB_STATUS_ERR = "ok", "err" -SDK_SERVICE_NAME = environ.get("SDK_SERVICE", "table-service") +SDK_SERVICE_NAME = environ.get("SDK_SERVICE", "sync-python-table") class Metrics: diff --git a/tests/slo/src/runner.py b/tests/slo/src/runner.py index 8daeb9c6..cc8908ca 100644 --- a/tests/slo/src/runner.py +++ b/tests/slo/src/runner.py @@ -91,13 +91,13 @@ def run_slo(args, driver, tb_name): logger.info("Max ID: %s", max_id) metrics = Metrics(args.prom_pgw) - if SDK_SERVICE_NAME == "table-service": + if SDK_SERVICE_NAME == "sync-python-table": futures = ( *run_read_jobs(args, driver, tb_name, max_id, metrics), *run_write_jobs(args, driver, tb_name, max_id, metrics), run_metric_job(args, metrics), ) - elif SDK_SERVICE_NAME == "query-service": + elif SDK_SERVICE_NAME == "sync-python-query": futures = ( *run_read_jobs_query(args, driver, tb_name, max_id, metrics), *run_write_jobs_query(args, driver, tb_name, max_id, metrics), From 67ca0f0359921c5d79531220fa0bbfc33c89bf02 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 19 Aug 2024 13:18:57 +0300 Subject: [PATCH 141/429] try to increase timeout on driver wait --- tests/slo/src/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/slo/src/runner.py b/tests/slo/src/runner.py index cc8908ca..091a975a 100644 --- a/tests/slo/src/runner.py +++ b/tests/slo/src/runner.py @@ -128,7 +128,7 @@ def run_from_args(args): table_name = path.join(args.db, args.table_name) with ydb.Driver(driver_config) as driver: - driver.wait(timeout=5) + driver.wait(timeout=60) try: if args.subcommand == "create": run_create(args, driver, table_name) From 83bcbe1e19df888fe112c2bf20b6d0f4140a0655 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 19 Aug 2024 13:18:57 +0300 Subject: [PATCH 142/429] try something new --- tests/slo/src/metrics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/slo/src/metrics.py b/tests/slo/src/metrics.py index 9dc201f4..ea989a0c 100644 --- a/tests/slo/src/metrics.py +++ b/tests/slo/src/metrics.py @@ -109,6 +109,7 @@ def push(self): grouping_key={ "sdk": SDK_SERVICE_NAME, "sdkVersion": version("ydb"), + "jobName": SDK_SERVICE_NAME, }, ) From 473a8960eba3477639f45b77452eef6b32b19aaa Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 19 Aug 2024 13:18:57 +0300 Subject: [PATCH 143/429] increase wait timeout --- tests/slo/src/metrics.py | 1 - tests/slo/src/runner.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/slo/src/metrics.py b/tests/slo/src/metrics.py index ea989a0c..9dc201f4 100644 --- a/tests/slo/src/metrics.py +++ b/tests/slo/src/metrics.py @@ -109,7 +109,6 @@ def push(self): grouping_key={ "sdk": SDK_SERVICE_NAME, "sdkVersion": version("ydb"), - "jobName": SDK_SERVICE_NAME, }, ) diff --git a/tests/slo/src/runner.py b/tests/slo/src/runner.py index 091a975a..b9380436 100644 --- a/tests/slo/src/runner.py +++ b/tests/slo/src/runner.py @@ -128,7 +128,7 @@ def run_from_args(args): table_name = path.join(args.db, args.table_name) with ydb.Driver(driver_config) as driver: - driver.wait(timeout=60) + driver.wait(timeout=300) try: if args.subcommand == "create": run_create(args, driver, table_name) From a7b06ce52d3f88a4b6aeffd94fc71b511585e5ea Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 19 Aug 2024 13:18:57 +0300 Subject: [PATCH 144/429] try again --- tests/slo/src/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/slo/src/metrics.py b/tests/slo/src/metrics.py index 9dc201f4..b9d33a5c 100644 --- a/tests/slo/src/metrics.py +++ b/tests/slo/src/metrics.py @@ -104,7 +104,7 @@ def stop(self, labels, start_time, attempts=1, error=None): def push(self): push_to_gateway( self._push_gtw, - job="workload-sync", + job=f"workload-{SDK_SERVICE_NAME}", registry=self._registry, grouping_key={ "sdk": SDK_SERVICE_NAME, From 9ab156560bc16220cb110fc8a8ecca1dd9b1957a Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 19 Aug 2024 13:18:57 +0300 Subject: [PATCH 145/429] hack to disable reset after run --- tests/slo/src/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/slo/src/runner.py b/tests/slo/src/runner.py index b9380436..59110400 100644 --- a/tests/slo/src/runner.py +++ b/tests/slo/src/runner.py @@ -109,7 +109,7 @@ def run_slo(args, driver, tb_name): for future in futures: future.join() - metrics.reset() + # metrics.reset() def run_cleanup(args, driver, tb_name): From 3c500d79b9f60478d4f134578ede7ea0828a798c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 19 Aug 2024 15:04:36 +0300 Subject: [PATCH 146/429] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5cd85a0..4e21809d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +* Async implementation of Query Service SDK +* New basic example with Query Service SDK + ## 3.15.0 ## * Query service client support * Add dunder version to ydb package From ef70e733325883b15b4cca6974496212777f0015 Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 19 Aug 2024 12:06:11 +0000 Subject: [PATCH 147/429] Release: 3.16.0 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e21809d..ad1c163b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.16.0 ## * Async implementation of Query Service SDK * New basic example with Query Service SDK diff --git a/setup.py b/setup.py index 7a5200f4..50991b05 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.15.0", # AUTOVERSION + version="3.16.0", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 567cda12..76caab7b 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.15.0" +VERSION = "3.16.0" From e9be1389a04875fa5a954dba8d5d2564110fe24a Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 20 Aug 2024 11:06:30 +0300 Subject: [PATCH 148/429] Change format to f strings in example --- examples/basic_example_v2/basic_example.py | 96 ++++++++----------- .../basic_example_v2/basic_example_async.py | 96 ++++++++----------- 2 files changed, 82 insertions(+), 110 deletions(-) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index 3deed483..52d580bd 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -87,17 +87,15 @@ def fill_tables_with_data(pool: ydb.QuerySessionPool, path: str): def select_simple(pool: ydb.QuerySessionPool, path: str): print("\nCheck series table...") result_sets = pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); + f""" + PRAGMA TablePathPrefix("{path}"); SELECT series_id, title, release_date FROM series WHERE series_id = 1; - """.format( - path - ), + """, ) first_set = result_sets[0] for row in first_set.rows: @@ -117,27 +115,23 @@ def upsert_simple(pool: ydb.QuerySessionPool, path: str): print("\nPerforming UPSERT into episodes...") pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); + f""" + PRAGMA TablePathPrefix("{path}"); UPSERT INTO episodes (series_id, season_id, episode_id, title) VALUES (2, 6, 1, "TBD"); - """.format( - path - ) + """ ) def select_with_parameters(pool: ydb.QuerySessionPool, path: str, series_id, season_id, episode_id): result_sets = pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); + f""" + PRAGMA TablePathPrefix("{path}"); SELECT title, air_date FROM episodes WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; - """.format( - path - ), + """, { "$seriesId": series_id, # could be defined implicit "$seasonId": (season_id, ydb.PrimitiveType.Int64), # could be defined via tuple @@ -159,14 +153,12 @@ def select_with_parameters(pool: ydb.QuerySessionPool, path: str, series_id, sea # execution of queries. def explicit_transaction_control(pool: ydb.QuerySessionPool, path: str, series_id, season_id, episode_id): def callee(session: ydb.QuerySessionSync): - query = """ - PRAGMA TablePathPrefix("{}"); + query = f""" + PRAGMA TablePathPrefix("{path}"); UPDATE episodes SET air_date = CurrentUtcDate() WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; - """.format( - path - ) + """ # Get newly created transaction id tx = session.transaction(ydb.QuerySerializableReadWrite()).begin() @@ -199,52 +191,46 @@ def drop_tables(pool: ydb.QuerySessionPool, path: str): def create_tables(pool: ydb.QuerySessionPool, path: str): print("\nCreating table series...") pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); - CREATE table `series` ( - `series_id` Int64, - `title` Utf8, - `series_info` Utf8, - `release_date` Date, - PRIMARY KEY (`series_id`) - ) - """.format( - path + f""" + PRAGMA TablePathPrefix("{path}"); + CREATE table `series` ( + `series_id` Int64, + `title` Utf8, + `series_info` Utf8, + `release_date` Date, + PRIMARY KEY (`series_id`) ) + """ ) print("\nCreating table seasons...") pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); - CREATE table `seasons` ( - `series_id` Int64, - `season_id` Int64, - `title` Utf8, - `first_aired` Date, - `last_aired` Date, - PRIMARY KEY (`series_id`, `season_id`) - ) - """.format( - path + f""" + PRAGMA TablePathPrefix("{path}"); + CREATE table `seasons` ( + `series_id` Int64, + `season_id` Int64, + `title` Utf8, + `first_aired` Date, + `last_aired` Date, + PRIMARY KEY (`series_id`, `season_id`) ) + """ ) print("\nCreating table episodes...") pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); - CREATE table `episodes` ( - `series_id` Int64, - `season_id` Int64, - `episode_id` Int64, - `title` Utf8, - `air_date` Date, - PRIMARY KEY (`series_id`, `season_id`, `episode_id`) - ) - """.format( - path + f""" + PRAGMA TablePathPrefix("{path}"); + CREATE table `episodes` ( + `series_id` Int64, + `season_id` Int64, + `episode_id` Int64, + `title` Utf8, + `air_date` Date, + PRIMARY KEY (`series_id`, `season_id`, `episode_id`) ) + """ ) diff --git a/examples/basic_example_v2/basic_example_async.py b/examples/basic_example_v2/basic_example_async.py index 0966b592..2bb5cab6 100644 --- a/examples/basic_example_v2/basic_example_async.py +++ b/examples/basic_example_v2/basic_example_async.py @@ -87,17 +87,15 @@ async def fill_tables_with_data(pool: ydb.aio.QuerySessionPoolAsync, path: str): async def select_simple(pool: ydb.aio.QuerySessionPoolAsync, path: str): print("\nCheck series table...") result_sets = await pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); + f""" + PRAGMA TablePathPrefix("{path}"); SELECT series_id, title, release_date FROM series WHERE series_id = 1; - """.format( - path - ), + """, ) first_set = result_sets[0] for row in first_set.rows: @@ -117,27 +115,23 @@ async def upsert_simple(pool: ydb.aio.QuerySessionPoolAsync, path: str): print("\nPerforming UPSERT into episodes...") await pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); + f""" + PRAGMA TablePathPrefix("{path}"); UPSERT INTO episodes (series_id, season_id, episode_id, title) VALUES (2, 6, 1, "TBD"); - """.format( - path - ) + """ ) async def select_with_parameters(pool: ydb.aio.QuerySessionPoolAsync, path: str, series_id, season_id, episode_id): result_sets = await pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); + f""" + PRAGMA TablePathPrefix("{path}"); SELECT title, air_date FROM episodes WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; - """.format( - path - ), + """, { "$seriesId": series_id, # could be defined implicit "$seasonId": (season_id, ydb.PrimitiveType.Int64), # could be defined via tuple @@ -161,14 +155,12 @@ async def explicit_transaction_control( pool: ydb.aio.QuerySessionPoolAsync, path: str, series_id, season_id, episode_id ): async def callee(session: ydb.aio.QuerySessionAsync): - query = """ - PRAGMA TablePathPrefix("{}"); + query = f""" + PRAGMA TablePathPrefix("{path}"); UPDATE episodes SET air_date = CurrentUtcDate() WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; - """.format( - path - ) + """ # Get newly created transaction id tx = await session.transaction(ydb.QuerySerializableReadWrite()).begin() @@ -201,52 +193,46 @@ async def drop_tables(pool: ydb.aio.QuerySessionPoolAsync, path: str): async def create_tables(pool: ydb.aio.QuerySessionPoolAsync, path: str): print("\nCreating table series...") await pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); - CREATE table `series` ( - `series_id` Int64, - `title` Utf8, - `series_info` Utf8, - `release_date` Date, - PRIMARY KEY (`series_id`) - ) - """.format( - path + f""" + PRAGMA TablePathPrefix("{path}"); + CREATE table `series` ( + `series_id` Int64, + `title` Utf8, + `series_info` Utf8, + `release_date` Date, + PRIMARY KEY (`series_id`) ) + """ ) print("\nCreating table seasons...") await pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); - CREATE table `seasons` ( - `series_id` Int64, - `season_id` Int64, - `title` Utf8, - `first_aired` Date, - `last_aired` Date, - PRIMARY KEY (`series_id`, `season_id`) - ) - """.format( - path + f""" + PRAGMA TablePathPrefix("{path}"); + CREATE table `seasons` ( + `series_id` Int64, + `season_id` Int64, + `title` Utf8, + `first_aired` Date, + `last_aired` Date, + PRIMARY KEY (`series_id`, `season_id`) ) + """ ) print("\nCreating table episodes...") await pool.execute_with_retries( - """ - PRAGMA TablePathPrefix("{}"); - CREATE table `episodes` ( - `series_id` Int64, - `season_id` Int64, - `episode_id` Int64, - `title` Utf8, - `air_date` Date, - PRIMARY KEY (`series_id`, `season_id`, `episode_id`) - ) - """.format( - path + f""" + PRAGMA TablePathPrefix("{path}"); + CREATE table `episodes` ( + `series_id` Int64, + `season_id` Int64, + `episode_id` Int64, + `title` Utf8, + `air_date` Date, + PRIMARY KEY (`series_id`, `season_id`, `episode_id`) ) + """ ) From a6b58ca6975aa995c393732c37487af0bd67f071 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 20 Aug 2024 11:28:39 +0300 Subject: [PATCH 149/429] Change froat to ydb.PrimitiveTypes.Double --- ydb/convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/convert.py b/ydb/convert.py index 63a5dbe4..17e72f76 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -304,7 +304,7 @@ def query_parameters_to_pb(parameters): _from_python_type_map = { int: types.PrimitiveType.Int64, - float: types.PrimitiveType.Float, + float: types.PrimitiveType.Double, bool: types.PrimitiveType.Bool, str: types.PrimitiveType.Utf8, } From 7fdb54aa1fa5e1d9a8ee4bc692f64b257d5134b6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 20 Aug 2024 12:43:40 +0300 Subject: [PATCH 150/429] Add implicit bytes->ydb.PrimitiveType.String --- tests/query/test_query_parameters.py | 7 +++++++ ydb/convert.py | 1 + 2 files changed, 8 insertions(+) diff --git a/tests/query/test_query_parameters.py b/tests/query/test_query_parameters.py index ff033311..4fccca0f 100644 --- a/tests/query/test_query_parameters.py +++ b/tests/query/test_query_parameters.py @@ -33,6 +33,13 @@ def test_select_implicit_str(pool: ydb.QuerySessionPool): assert expected_value == actual_value +def test_select_implicit_bytes(pool: ydb.QuerySessionPool): + expected_value = b"text" + res = pool.execute_with_retries(query, parameters={"$a": expected_value}) + actual_value = res[0].rows[0]["value"] + assert expected_value == actual_value + + def test_select_implicit_list(pool: ydb.QuerySessionPool): expected_value = [1, 2, 3] res = pool.execute_with_retries(query, parameters={"$a": expected_value}) diff --git a/ydb/convert.py b/ydb/convert.py index 17e72f76..f48e024a 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -307,6 +307,7 @@ def query_parameters_to_pb(parameters): float: types.PrimitiveType.Double, bool: types.PrimitiveType.Bool, str: types.PrimitiveType.Utf8, + bytes: types.PrimitiveType.String, } From 6f1d7a329d5b2cec89e48e58ac69743631569eb8 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 20 Aug 2024 14:14:36 +0300 Subject: [PATCH 151/429] extend job logs --- tests/slo/src/jobs.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/slo/src/jobs.py b/tests/slo/src/jobs.py index 5df16c44..5ed80938 100644 --- a/tests/slo/src/jobs.py +++ b/tests/slo/src/jobs.py @@ -94,7 +94,7 @@ def transaction(session): def run_reads(driver, query, max_id, metrics, limiter, runtime, timeout): start_time = time.time() - logger.info("Start read workload") + logger.info("Start read workload over table service") request_settings = ydb.BaseRequestSettings().with_timeout(timeout) retry_setting = ydb.RetrySettings( @@ -128,7 +128,7 @@ def check_result(result): def run_read_jobs(args, driver, tb_name, max_id, metrics): - logger.info("Start read jobs") + logger.info("Start read jobs over table service") session = ydb.retry_operation_sync(lambda: driver.table_client.session().create()) read_q = session.prepare(READ_QUERY_TEMPLATE.format(tb_name)) @@ -150,7 +150,7 @@ def run_read_jobs(args, driver, tb_name, max_id, metrics): def run_reads_query(driver, query, max_id, metrics, limiter, runtime, timeout): start_time = time.time() - logger.info("Start read workload") + logger.info("Start read workload over query service") request_settings = ydb.BaseRequestSettings().with_timeout(timeout) retry_setting = ydb.RetrySettings( @@ -185,7 +185,7 @@ def check_result(result): def run_read_jobs_query(args, driver, tb_name, max_id, metrics): - logger.info("Start read jobs for query service") + logger.info("Start read jobs over query service") read_q = QUERY_READ_QUERY_TEMPLATE.format(tb_name) @@ -205,7 +205,7 @@ def run_read_jobs_query(args, driver, tb_name, max_id, metrics): def run_writes(driver, query, row_generator, metrics, limiter, runtime, timeout): start_time = time.time() - logger.info("Start write workload") + logger.info("Start write workload over table service") request_settings = ydb.BaseRequestSettings().with_timeout(timeout) retry_setting = ydb.RetrySettings( @@ -241,7 +241,7 @@ def run_writes(driver, query, row_generator, metrics, limiter, runtime, timeout) def run_write_jobs(args, driver, tb_name, max_id, metrics): - logger.info("Start write jobs") + logger.info("Start write jobs over table service") session = ydb.retry_operation_sync(lambda: driver.table_client.session().create()) write_q = session.prepare(WRITE_QUERY_TEMPLATE.format(tb_name)) @@ -265,7 +265,7 @@ def run_write_jobs(args, driver, tb_name, max_id, metrics): def run_writes_query(driver, query, row_generator, metrics, limiter, runtime, timeout): start_time = time.time() - logger.info("Start write workload") + logger.info("Start write workload over query service") request_settings = ydb.BaseRequestSettings().with_timeout(timeout) retry_setting = ydb.RetrySettings( From 5412369ca360c30834d9815eba0c5d2ca6a42ec4 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 20 Aug 2024 14:24:12 +0300 Subject: [PATCH 152/429] additional logs to SLO run --- tests/slo/src/metrics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/slo/src/metrics.py b/tests/slo/src/metrics.py index b9d33a5c..467314d1 100644 --- a/tests/slo/src/metrics.py +++ b/tests/slo/src/metrics.py @@ -14,6 +14,7 @@ JOB_STATUS_OK, JOB_STATUS_ERR = "ok", "err" SDK_SERVICE_NAME = environ.get("SDK_SERVICE", "sync-python-table") +print(f"SDK_SERVICE_NAME = {SDK_SERVICE_NAME}") class Metrics: From 331b724cff5fde168f319e191d7fe827a6403abd Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 20 Aug 2024 14:51:16 +0300 Subject: [PATCH 153/429] try to fix docker envs --- tests/slo/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/slo/Dockerfile b/tests/slo/Dockerfile index a948d69c..e705e624 100644 --- a/tests/slo/Dockerfile +++ b/tests/slo/Dockerfile @@ -4,5 +4,6 @@ WORKDIR /src RUN python -m pip install --upgrade pip && python -m pip install -e . && python -m pip install -r tests/slo/requirements.txt WORKDIR tests/slo ARG SDK_SERVICE +ENV SDK_SERVICE=$SDK_SERVICE ENTRYPOINT ["python", "src"] From b6f4f88a0aa0607893440e82632f8b41bb381ef6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 20 Aug 2024 15:11:19 +0300 Subject: [PATCH 154/429] skip on failure --- .github/workflows/slo.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/slo.yml b/.github/workflows/slo.yml index 87144db0..4ca0adac 100644 --- a/.github/workflows/slo.yml +++ b/.github/workflows/slo.yml @@ -31,6 +31,7 @@ jobs: if: env.DOCKER_REPO != null env: DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }} + continue-on-error: true with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} KUBECONFIG_B64: ${{ secrets.SLO_KUBE_CONFIG }} From e68168ab14f7c23204b90a334c0d637d862554c8 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 20 Aug 2024 15:26:23 +0300 Subject: [PATCH 155/429] try to fix --- tests/slo/src/jobs.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/slo/src/jobs.py b/tests/slo/src/jobs.py index 5ed80938..545b345c 100644 --- a/tests/slo/src/jobs.py +++ b/tests/slo/src/jobs.py @@ -31,17 +31,17 @@ ); """ -QUERY_READ_QUERY_TEMPLATE = """ -SELECT * FROM `{}` WHERE object_id = $object_id AND object_hash = Digest::NumericHash($object_id); -""" - -QUERY_WRITE_QUERY_TEMPLATE = """ -UPSERT INTO `{}` ( - object_id, object_hash, payload_str, payload_double, payload_timestamp -) VALUES ( - $object_id, Digest::NumericHash($object_id), $payload_str, $payload_double, $payload_timestamp -); -""" +# QUERY_READ_QUERY_TEMPLATE = """ +# SELECT * FROM `{}` WHERE object_id = $object_id AND object_hash = Digest::NumericHash($object_id); +# """ + +# QUERY_WRITE_QUERY_TEMPLATE = """ +# UPSERT INTO `{}` ( +# object_id, object_hash, payload_str, payload_double, payload_timestamp +# ) VALUES ( +# $object_id, Digest::NumericHash($object_id), $payload_str, $payload_double, $payload_timestamp +# ); +# """ logger = logging.getLogger(__name__) @@ -187,7 +187,7 @@ def check_result(result): def run_read_jobs_query(args, driver, tb_name, max_id, metrics): logger.info("Start read jobs over query service") - read_q = QUERY_READ_QUERY_TEMPLATE.format(tb_name) + read_q = READ_QUERY_TEMPLATE.format(tb_name) read_limiter = RateLimiter(max_calls=args.read_rps, period=1) futures = [] @@ -308,7 +308,7 @@ def check_result(result): def run_write_jobs_query(args, driver, tb_name, max_id, metrics): logger.info("Start write jobs for query service") - write_q = QUERY_WRITE_QUERY_TEMPLATE.format(tb_name) + write_q = WRITE_QUERY_TEMPLATE.format(tb_name) write_limiter = RateLimiter(max_calls=args.write_rps, period=1) row_generator = RowGenerator(max_id) From a27d6798892196b06dfe5387c48913af02290f28 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 20 Aug 2024 16:03:38 +0300 Subject: [PATCH 156/429] change settings obj on requests --- ydb/aio/query/transaction.py | 19 +++++++++--------- ydb/query/transaction.py | 39 +++++++++++++++++++----------------- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/ydb/aio/query/transaction.py b/ydb/aio/query/transaction.py index e9993fcc..429ba125 100644 --- a/ydb/aio/query/transaction.py +++ b/ydb/aio/query/transaction.py @@ -5,6 +5,7 @@ from .base import AsyncResponseContextIterator from ... import issues +from ...settings import BaseRequestSettings from ...query import base from ...query.transaction import ( BaseQueryTxContext, @@ -46,25 +47,25 @@ async def _ensure_prev_stream_finished(self) -> None: pass self._prev_stream = None - async def begin(self, settings: Optional[base.QueryClientSettings] = None) -> "QueryTxContextAsync": + async def begin(self, settings: Optional[BaseRequestSettings] = None) -> "QueryTxContextAsync": """WARNING: This API is experimental and could be changed. Explicitly begins a transaction - :param settings: A request settings + :param settings: An additional request settings BaseRequestSettings; :return: None or exception if begin is failed """ await self._begin_call(settings) return self - async def commit(self, settings: Optional[base.QueryClientSettings] = None) -> None: + async def commit(self, settings: Optional[BaseRequestSettings] = None) -> None: """WARNING: This API is experimental and could be changed. Calls commit on a transaction if it is open otherwise is no-op. If transaction execution failed then this method raises PreconditionFailed. - :param settings: A request settings + :param settings: An additional request settings BaseRequestSettings; :return: A committed transaction or exception if commit is failed """ @@ -79,13 +80,13 @@ async def commit(self, settings: Optional[base.QueryClientSettings] = None) -> N await self._commit_call(settings) - async def rollback(self, settings: Optional[base.QueryClientSettings] = None) -> None: + async def rollback(self, settings: Optional[BaseRequestSettings] = None) -> None: """WARNING: This API is experimental and could be changed. Calls rollback on a transaction if it is open otherwise is no-op. If transaction execution failed then this method raises PreconditionFailed. - :param settings: A request settings + :param settings: An additional request settings BaseRequestSettings; :return: A committed transaction or exception if commit is failed """ @@ -108,7 +109,7 @@ async def execute( syntax: Optional[base.QuerySyntax] = None, exec_mode: Optional[base.QueryExecMode] = None, concurrent_result_sets: Optional[bool] = False, - settings: Optional[base.QueryClientSettings] = None, + settings: Optional[BaseRequestSettings] = None, ) -> AsyncResponseContextIterator: """WARNING: This API is experimental and could be changed. @@ -137,9 +138,9 @@ async def execute( exec_mode=exec_mode, parameters=parameters, concurrent_result_sets=concurrent_result_sets, + settings=settings, ) - settings = settings if settings is not None else self.session._settings self._prev_stream = AsyncResponseContextIterator( stream_it, lambda resp: base.wrap_execute_query_response( @@ -147,7 +148,7 @@ async def execute( response_pb=resp, tx=self, commit_tx=commit_tx, - settings=settings, + settings=self.session._settings, ), ) return self._prev_stream diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 750a94b0..be7396b1 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -15,6 +15,7 @@ from ..connection import _RpcState as RpcState from . import base +from ..settings import BaseRequestSettings logger = logging.getLogger(__name__) @@ -214,7 +215,7 @@ def tx_id(self) -> Optional[str]: """ return self._tx_state.tx_id - def _begin_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQueryTxContext": + def _begin_call(self, settings: Optional[BaseRequestSettings]) -> "BaseQueryTxContext": self._tx_state._check_invalid_transition(QueryTxStateEnum.BEGINED) return self._driver( @@ -226,7 +227,7 @@ def _begin_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQuer (self._session_state, self._tx_state, self), ) - def _commit_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQueryTxContext": + def _commit_call(self, settings: Optional[BaseRequestSettings]) -> "BaseQueryTxContext": self._tx_state._check_invalid_transition(QueryTxStateEnum.COMMITTED) return self._driver( @@ -238,7 +239,7 @@ def _commit_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQue (self._session_state, self._tx_state, self), ) - def _rollback_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQueryTxContext": + def _rollback_call(self, settings: Optional[BaseRequestSettings]) -> "BaseQueryTxContext": self._tx_state._check_invalid_transition(QueryTxStateEnum.ROLLBACKED) return self._driver( @@ -253,11 +254,12 @@ def _rollback_call(self, settings: Optional[base.QueryClientSettings]) -> "BaseQ def _execute_call( self, query: str, - commit_tx: bool = False, - syntax: base.QuerySyntax = None, - exec_mode: base.QueryExecMode = None, - parameters: dict = None, - concurrent_result_sets: bool = False, + commit_tx: Optional[bool], + syntax: Optional[base.QuerySyntax], + exec_mode: Optional[base.QueryExecMode], + parameters: Optional[dict], + concurrent_result_sets: Optional[bool], + settings: Optional[BaseRequestSettings], ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: self._tx_state._check_tx_ready_to_use() @@ -277,6 +279,7 @@ def _execute_call( request.to_proto(), _apis.QueryService.Stub, _apis.QueryService.ExecuteQuery, + settings=settings, ) def _move_to_beginned(self, tx_id: str) -> None: @@ -323,12 +326,12 @@ def _ensure_prev_stream_finished(self) -> None: pass self._prev_stream = None - def begin(self, settings: Optional[base.QueryClientSettings] = None) -> "QueryTxContextSync": + def begin(self, settings: Optional[BaseRequestSettings] = None) -> "QueryTxContextSync": """WARNING: This API is experimental and could be changed. Explicitly begins a transaction - :param settings: A request settings + :param settings: An additional request settings BaseRequestSettings; :return: Transaction object or exception if begin is failed """ @@ -336,13 +339,13 @@ def begin(self, settings: Optional[base.QueryClientSettings] = None) -> "QueryTx return self - def commit(self, settings: Optional[base.QueryClientSettings] = None) -> None: + def commit(self, settings: Optional[BaseRequestSettings] = None) -> None: """WARNING: This API is experimental and could be changed. Calls commit on a transaction if it is open otherwise is no-op. If transaction execution failed then this method raises PreconditionFailed. - :param settings: A request settings + :param settings: An additional request settings BaseRequestSettings; :return: A committed transaction or exception if commit is failed """ @@ -357,13 +360,13 @@ def commit(self, settings: Optional[base.QueryClientSettings] = None) -> None: self._commit_call(settings) - def rollback(self, settings: Optional[base.QueryClientSettings] = None) -> None: + def rollback(self, settings: Optional[BaseRequestSettings] = None) -> None: """WARNING: This API is experimental and could be changed. Calls rollback on a transaction if it is open otherwise is no-op. If transaction execution failed then this method raises PreconditionFailed. - :param settings: A request settings + :param settings: An additional request settings BaseRequestSettings; :return: A committed transaction or exception if commit is failed """ @@ -386,7 +389,7 @@ def execute( syntax: Optional[base.QuerySyntax] = None, exec_mode: Optional[base.QueryExecMode] = None, concurrent_result_sets: Optional[bool] = False, - settings: Optional[base.QueryClientSettings] = None, + settings: Optional[BaseRequestSettings] = None, ) -> base.SyncResponseContextIterator: """WARNING: This API is experimental and could be changed. @@ -403,7 +406,7 @@ def execute( 3) QueryExecMode.VALIDATE; 4) QueryExecMode.PARSE. :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; - :param settings: An additional request settings QueryClientSettings; + :param settings: An additional request settings BaseRequestSettings; :return: Iterator with result sets """ @@ -416,9 +419,9 @@ def execute( exec_mode=exec_mode, parameters=parameters, concurrent_result_sets=concurrent_result_sets, + settings=settings, ) - settings = settings if settings is not None else self.session._settings self._prev_stream = base.SyncResponseContextIterator( stream_it, lambda resp: base.wrap_execute_query_response( @@ -426,7 +429,7 @@ def execute( response_pb=resp, tx=self, commit_tx=commit_tx, - settings=settings, + settings=self.session._settings, ), ) return self._prev_stream From 197c428f38d847a87cc16c06311b088e44e53322 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 20 Aug 2024 19:22:47 +0300 Subject: [PATCH 157/429] review fixes --- tests/slo/src/jobs.py | 12 +----------- tests/slo/src/metrics.py | 1 - tests/slo/src/runner.py | 2 +- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/tests/slo/src/jobs.py b/tests/slo/src/jobs.py index 545b345c..3fb1833a 100644 --- a/tests/slo/src/jobs.py +++ b/tests/slo/src/jobs.py @@ -31,17 +31,6 @@ ); """ -# QUERY_READ_QUERY_TEMPLATE = """ -# SELECT * FROM `{}` WHERE object_id = $object_id AND object_hash = Digest::NumericHash($object_id); -# """ - -# QUERY_WRITE_QUERY_TEMPLATE = """ -# UPSERT INTO `{}` ( -# object_id, object_hash, payload_str, payload_double, payload_timestamp -# ) VALUES ( -# $object_id, Digest::NumericHash($object_id), $payload_str, $payload_double, $payload_timestamp -# ); -# """ logger = logging.getLogger(__name__) @@ -286,6 +275,7 @@ def run_writes_query(driver, query, row_generator, metrics, limiter, runtime, ti } def check_result(result): + # we have to close stream by reading it till the end with result: pass diff --git a/tests/slo/src/metrics.py b/tests/slo/src/metrics.py index 467314d1..b9d33a5c 100644 --- a/tests/slo/src/metrics.py +++ b/tests/slo/src/metrics.py @@ -14,7 +14,6 @@ JOB_STATUS_OK, JOB_STATUS_ERR = "ok", "err" SDK_SERVICE_NAME = environ.get("SDK_SERVICE", "sync-python-table") -print(f"SDK_SERVICE_NAME = {SDK_SERVICE_NAME}") class Metrics: diff --git a/tests/slo/src/runner.py b/tests/slo/src/runner.py index 59110400..b9380436 100644 --- a/tests/slo/src/runner.py +++ b/tests/slo/src/runner.py @@ -109,7 +109,7 @@ def run_slo(args, driver, tb_name): for future in futures: future.join() - # metrics.reset() + metrics.reset() def run_cleanup(args, driver, tb_name): From 051bfbbaf771529e33ba46c21e1b3486ab43008f Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 21 Aug 2024 12:22:10 +0300 Subject: [PATCH 158/429] Add huge select example to basic example v2 --- examples/basic_example_v2/basic_example.py | 20 +++++++++++++++++++ .../basic_example_v2/basic_example_async.py | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index 52d580bd..d6da8087 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -183,6 +183,25 @@ def callee(session: ydb.QuerySessionSync): return pool.retry_operation_sync(callee) +def huge_select(pool: ydb.QuerySessionPool, path: str): + def callee(session: ydb.QuerySessionSync): + query = f""" + PRAGMA TablePathPrefix("{path}"); + SELECT * from episodes; + """ + + with session.transaction().execute( + query, + commit_tx=True, + ) as result_sets: + print("\n> Huge SELECT call") + for result_set in result_sets: + for row in result_set.rows: + print("episode title:", row.title, ", air date:", row.air_date) + + return pool.retry_operation_sync(callee) + + def drop_tables(pool: ydb.QuerySessionPool, path: str): print("\nCleaning up existing tables...") pool.execute_with_retries(DropTablesQuery.format(path)) @@ -287,3 +306,4 @@ def run(endpoint, database, path): explicit_transaction_control(pool, full_path, 2, 6, 1) select_with_parameters(pool, full_path, 2, 6, 1) + huge_select(pool, full_path) diff --git a/examples/basic_example_v2/basic_example_async.py b/examples/basic_example_v2/basic_example_async.py index 2bb5cab6..be977471 100644 --- a/examples/basic_example_v2/basic_example_async.py +++ b/examples/basic_example_v2/basic_example_async.py @@ -185,6 +185,25 @@ async def callee(session: ydb.aio.QuerySessionAsync): return await pool.retry_operation_async(callee) +async def huge_select(pool: ydb.aio.QuerySessionPoolAsync, path: str): + async def callee(session: ydb.aio.QuerySessionAsync): + query = f""" + PRAGMA TablePathPrefix("{path}"); + SELECT * from episodes; + """ + + async with await session.transaction().execute( + query, + commit_tx=True, + ) as result_sets: + print("\n> Huge SELECT call") + async for result_set in result_sets: + for row in result_set.rows: + print("episode title:", row.title, ", air date:", row.air_date) + + return await pool.retry_operation_async(callee) + + async def drop_tables(pool: ydb.aio.QuerySessionPoolAsync, path: str): print("\nCleaning up existing tables...") await pool.execute_with_retries(DropTablesQuery.format(path)) @@ -289,3 +308,4 @@ async def run(endpoint, database, path): await explicit_transaction_control(pool, full_path, 2, 6, 1) await select_with_parameters(pool, full_path, 2, 6, 1) + await huge_select(pool, full_path) From f07ad801d2b844e05546a25332f3c89d0c8e7eb7 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 21 Aug 2024 12:44:30 +0300 Subject: [PATCH 159/429] Remove PragmaTablePrefix and add Declare to example --- examples/basic_example_v2/__main__.py | 5 +- examples/basic_example_v2/basic_example.py | 124 ++++++----------- .../basic_example_v2/basic_example_async.py | 125 ++++++------------ 3 files changed, 81 insertions(+), 173 deletions(-) diff --git a/examples/basic_example_v2/__main__.py b/examples/basic_example_v2/__main__.py index 9c68c00d..95ecf99e 100644 --- a/examples/basic_example_v2/__main__.py +++ b/examples/basic_example_v2/__main__.py @@ -11,9 +11,8 @@ formatter_class=argparse.RawDescriptionHelpFormatter, description="""\033[92mYDB basic example.\x1b[0m\n""", ) - parser.add_argument("-d", "--database", help="Name of the database to use", default="/local") parser.add_argument("-e", "--endpoint", help="Endpoint url to use", default="grpc://localhost:2136") - parser.add_argument("-p", "--path", default="") + parser.add_argument("-d", "--database", help="Name of the database to use", default="/local") parser.add_argument("-v", "--verbose", default=False, action="store_true") parser.add_argument("-m", "--mode", default="sync", help="Mode of example: sync or async") @@ -28,7 +27,6 @@ run_sync( args.endpoint, args.database, - args.path, ) elif args.mode == "async": print("Running async example") @@ -36,7 +34,6 @@ run_async( args.endpoint, args.database, - args.path, ) ) else: diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index d6da8087..ed05554b 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -1,26 +1,15 @@ # -*- coding: utf-8 -*- -import posixpath import ydb import basic_example_data -# Table path prefix allows to put the working tables into the specific directory -# inside the YDB database. Putting `PRAGMA TablePathPrefix("some/path")` -# at the beginning of the query allows to reference the tables through -# their names "under" the specified directory. -# -# TablePathPrefix has to be defined as an absolute path, which has to be started -# with the current database location. -# -# https://ydb.tech/ru/docs/yql/reference/syntax/pragma#table-path-prefix - -DropTablesQuery = """PRAGMA TablePathPrefix("{}"); + +DropTablesQuery = """ DROP TABLE IF EXISTS series; DROP TABLE IF EXISTS seasons; DROP TABLE IF EXISTS episodes; """ -FillDataQuery = """PRAGMA TablePathPrefix("{}"); - +FillDataQuery = """ DECLARE $seriesData AS List 0: - full_path = paths_to_create.pop(-1) - driver.scheme_client.make_directory(full_path) - - -def run(endpoint, database, path): +def run(endpoint, database): with ydb.Driver( endpoint=endpoint, database=database, @@ -284,26 +247,19 @@ def run(endpoint, database, path): driver.wait(timeout=5, fail_fast=True) with ydb.QuerySessionPool(driver) as pool: + drop_tables(pool) - ensure_path_exists(driver, database, path) - - # absolute path - prefix to the table's names, - # including the database location - full_path = posixpath.join(database, path) - - drop_tables(pool, full_path) - - create_tables(pool, full_path) + create_tables(pool) - fill_tables_with_data(pool, full_path) + fill_tables_with_data(pool) - select_simple(pool, full_path) + select_simple(pool) - upsert_simple(pool, full_path) + upsert_simple(pool) - select_with_parameters(pool, full_path, 2, 3, 7) - select_with_parameters(pool, full_path, 2, 3, 8) + select_with_parameters(pool, 2, 3, 7) + select_with_parameters(pool, 2, 3, 8) - explicit_transaction_control(pool, full_path, 2, 6, 1) - select_with_parameters(pool, full_path, 2, 6, 1) - huge_select(pool, full_path) + explicit_transaction_control(pool, 2, 6, 1) + select_with_parameters(pool, 2, 6, 1) + huge_select(pool) diff --git a/examples/basic_example_v2/basic_example_async.py b/examples/basic_example_v2/basic_example_async.py index be977471..e35fbabc 100644 --- a/examples/basic_example_v2/basic_example_async.py +++ b/examples/basic_example_v2/basic_example_async.py @@ -1,26 +1,15 @@ # -*- coding: utf-8 -*- -import posixpath import ydb import basic_example_data -# Table path prefix allows to put the working tables into the specific directory -# inside the YDB database. Putting `PRAGMA TablePathPrefix("some/path")` -# at the beginning of the query allows to reference the tables through -# their names "under" the specified directory. -# -# TablePathPrefix has to be defined as an absolute path, which has to be started -# with the current database location. -# -# https://ydb.tech/ru/docs/yql/reference/syntax/pragma#table-path-prefix - -DropTablesQuery = """PRAGMA TablePathPrefix("{}"); + +DropTablesQuery = """ DROP TABLE IF EXISTS series; DROP TABLE IF EXISTS seasons; DROP TABLE IF EXISTS episodes; """ -FillDataQuery = """PRAGMA TablePathPrefix("{}"); - +FillDataQuery = """ DECLARE $seriesData AS List 0: - full_path = paths_to_create.pop(-1) - await driver.scheme_client.make_directory(full_path) - - -async def run(endpoint, database, path): +async def run(endpoint, database): async with ydb.aio.Driver( endpoint=endpoint, database=database, @@ -286,26 +248,19 @@ async def run(endpoint, database, path): await driver.wait(timeout=5, fail_fast=True) async with ydb.aio.QuerySessionPoolAsync(driver) as pool: + await drop_tables(pool) - await ensure_path_exists(driver, database, path) - - # absolute path - prefix to the table's names, - # including the database location - full_path = posixpath.join(database, path) - - await drop_tables(pool, full_path) - - await create_tables(pool, full_path) + await create_tables(pool) - await fill_tables_with_data(pool, full_path) + await fill_tables_with_data(pool) - await select_simple(pool, full_path) + await select_simple(pool) - await upsert_simple(pool, full_path) + await upsert_simple(pool) - await select_with_parameters(pool, full_path, 2, 3, 7) - await select_with_parameters(pool, full_path, 2, 3, 8) + await select_with_parameters(pool, 2, 3, 7) + await select_with_parameters(pool, 2, 3, 8) - await explicit_transaction_control(pool, full_path, 2, 6, 1) - await select_with_parameters(pool, full_path, 2, 6, 1) - await huge_select(pool, full_path) + await explicit_transaction_control(pool, 2, 6, 1) + await select_with_parameters(pool, 2, 6, 1) + await huge_select(pool) From cc67aeece8088c0fbceee1c9a926a649933e9ede Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 21 Aug 2024 12:59:49 +0300 Subject: [PATCH 160/429] review fixes --- examples/basic_example_v2/basic_example_async.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/basic_example_v2/basic_example_async.py b/examples/basic_example_v2/basic_example_async.py index e35fbabc..944ffe7c 100644 --- a/examples/basic_example_v2/basic_example_async.py +++ b/examples/basic_example_v2/basic_example_async.py @@ -138,9 +138,7 @@ async def select_with_parameters(pool: ydb.aio.QuerySessionPoolAsync, series_id, # In most cases it's better to use transaction control settings in session.transaction # calls instead to avoid additional hops to YDB cluster and allow more efficient # execution of queries. -async def explicit_transaction_control( - pool: ydb.aio.QuerySessionPoolAsync, series_id, season_id, episode_id -): +async def explicit_transaction_control(pool: ydb.aio.QuerySessionPoolAsync, series_id, season_id, episode_id): async def callee(session: ydb.aio.QuerySessionAsync): query = """ DECLARE $seriesId AS Int64; From b39f19dccfe4e8e3f99cd53bd6304135b842562c Mon Sep 17 00:00:00 2001 From: Andrei Naumov Date: Fri, 30 Aug 2024 12:00:00 +0300 Subject: [PATCH 161/429] Add recomended cached query usage example --- examples/basic_example_v1/basic_example.py | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/examples/basic_example_v1/basic_example.py b/examples/basic_example_v1/basic_example.py index e439a8c6..d09c644a 100644 --- a/examples/basic_example_v1/basic_example.py +++ b/examples/basic_example_v1/basic_example.py @@ -134,6 +134,54 @@ def callee(session): def select_prepared(pool, path, series_id, season_id, episode_id): + def callee(session): + query = """ + PRAGMA TablePathPrefix("{}"); + + DECLARE $seriesId AS Uint64; + DECLARE $seasonId AS Uint64; + DECLARE $episodeId AS Uint64; + + $format = DateTime::Format("%Y-%m-%d"); + SELECT + title, + $format(DateTime::FromSeconds(CAST(DateTime::ToSeconds(DateTime::IntervalFromDays(CAST(air_date AS Int16))) AS Uint32))) AS air_date + FROM episodes + WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; + """.format( + path + ) + + data_query = ydb.types.DataQuery( + query, + parameters_types={ + '$seriesId': ydb.types.PrimitiveType.Uint64, + '$seasonId': ydb.types.PrimitiveType.Uint64, + '$episodeId': ydb.types.PrimitiveType.Uint64, + } + ) + + result_sets = session.transaction(ydb.SerializableReadWrite()).execute( + data_query, + { + "$seriesId": series_id, + "$seasonId": season_id, + "$episodeId": episode_id, + }, + commit_tx=True, + settings=ydb.table.ExecDataQuerySettings().with_keep_in_cache(True), + ) + print("\n> select_prepared_transaction:") + for row in result_sets[0].rows: + print("episode title:", row.title, ", air date:", row.air_date) + + return result_sets[0] + + return pool.retry_operation_sync(callee) + + +# Prepared query with session-based cache (obsolete) +def select_prepared_session_based(pool, path, series_id, season_id, episode_id): def callee(session): query = """ PRAGMA TablePathPrefix("{}"); From 9f5650a52239351a3e5f1c30d51c5a968241341c Mon Sep 17 00:00:00 2001 From: Andrei Naumov Date: Fri, 30 Aug 2024 15:11:05 +0300 Subject: [PATCH 162/429] Fix style --- examples/basic_example_v1/basic_example.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/basic_example_v1/basic_example.py b/examples/basic_example_v1/basic_example.py index d09c644a..db4b86f7 100644 --- a/examples/basic_example_v1/basic_example.py +++ b/examples/basic_example_v1/basic_example.py @@ -155,10 +155,10 @@ def callee(session): data_query = ydb.types.DataQuery( query, parameters_types={ - '$seriesId': ydb.types.PrimitiveType.Uint64, - '$seasonId': ydb.types.PrimitiveType.Uint64, - '$episodeId': ydb.types.PrimitiveType.Uint64, - } + "$seriesId": ydb.types.PrimitiveType.Uint64, + "$seasonId": ydb.types.PrimitiveType.Uint64, + "$episodeId": ydb.types.PrimitiveType.Uint64, + }, ) result_sets = session.transaction(ydb.SerializableReadWrite()).execute( From 8ae452dbf1f4d3b2619eea9220abf15b62d23c8b Mon Sep 17 00:00:00 2001 From: Andrei Naumov Date: Tue, 3 Sep 2024 11:21:13 +0300 Subject: [PATCH 163/429] Improve example --- examples/basic_example_v1/basic_example.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/basic_example_v1/basic_example.py b/examples/basic_example_v1/basic_example.py index db4b86f7..54b9bb16 100644 --- a/examples/basic_example_v1/basic_example.py +++ b/examples/basic_example_v1/basic_example.py @@ -133,7 +133,7 @@ def callee(session): return pool.retry_operation_sync(callee) -def select_prepared(pool, path, series_id, season_id, episode_id): +def select_parametrized(pool, path, series_id, season_id, episode_id): def callee(session): query = """ PRAGMA TablePathPrefix("{}"); @@ -171,7 +171,7 @@ def callee(session): commit_tx=True, settings=ydb.table.ExecDataQuerySettings().with_keep_in_cache(True), ) - print("\n> select_prepared_transaction:") + print("\n> select_parametrized_transaction:") for row in result_sets[0].rows: print("episode title:", row.title, ", air date:", row.air_date) @@ -180,8 +180,8 @@ def callee(session): return pool.retry_operation_sync(callee) -# Prepared query with session-based cache (obsolete) -def select_prepared_session_based(pool, path, series_id, season_id, episode_id): +# Prepared query with session-based cache +def select_prepared(pool, path, series_id, season_id, episode_id): def callee(session): query = """ PRAGMA TablePathPrefix("{}"); @@ -386,5 +386,8 @@ def run(endpoint, database, path): select_prepared(pool, full_path, 2, 3, 7) select_prepared(pool, full_path, 2, 3, 8) + select_parametrized(pool, full_path, 2, 3, 9) + select_parametrized(pool, full_path, 2, 3, 10) + explicit_tcl(pool, full_path, 2, 6, 1) - select_prepared(pool, full_path, 2, 6, 1) + select_parametrized(pool, full_path, 2, 6, 1) From 5849cee969570a8a47a5383703be7eb4b397f7bf Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 3 Sep 2024 19:17:02 +0300 Subject: [PATCH 164/429] Add root_certificates to driver init in examples --- examples/basic_example_v1/basic_example.py | 7 ++++++- examples/basic_example_v2/basic_example.py | 1 + examples/basic_example_v2/basic_example_async.py | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/basic_example_v1/basic_example.py b/examples/basic_example_v1/basic_example.py index e439a8c6..b5e19baf 100644 --- a/examples/basic_example_v1/basic_example.py +++ b/examples/basic_example_v1/basic_example.py @@ -312,7 +312,12 @@ def ensure_path_exists(driver, database, path): def run(endpoint, database, path): - with ydb.Driver(endpoint=endpoint, database=database, credentials=ydb.credentials_from_env_variables()) as driver: + with ydb.Driver( + endpoint=endpoint, + database=database, + credentials=ydb.credentials_from_env_variables(), + root_certificates=ydb.load_ydb_root_certificate(), + ) as driver: driver.wait(timeout=5, fail_fast=True) with ydb.SessionPool(driver) as pool: diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index ed05554b..40aef03d 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -243,6 +243,7 @@ def run(endpoint, database): endpoint=endpoint, database=database, credentials=ydb.credentials_from_env_variables(), + root_certificates=ydb.load_ydb_root_certificate(), ) as driver: driver.wait(timeout=5, fail_fast=True) diff --git a/examples/basic_example_v2/basic_example_async.py b/examples/basic_example_v2/basic_example_async.py index 944ffe7c..f57ec491 100644 --- a/examples/basic_example_v2/basic_example_async.py +++ b/examples/basic_example_v2/basic_example_async.py @@ -242,6 +242,7 @@ async def run(endpoint, database): endpoint=endpoint, database=database, credentials=ydb.credentials_from_env_variables(), + root_certificates=ydb.load_ydb_root_certificate(), ) as driver: await driver.wait(timeout=5, fail_fast=True) From aac9cfc43f8314139e57e4cc8fcc36c025964e79 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 165/429] AsyncIO query session pool --- ydb/aio/query/pool.py | 86 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 77 insertions(+), 9 deletions(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index f91f7465..8e6afd3b 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -1,3 +1,4 @@ +import asyncio import logging from typing import ( Callable, @@ -8,6 +9,7 @@ from .session import ( QuerySessionAsync, ) +from ... import issues from ...retries import ( RetrySettings, retry_operation_async, @@ -21,20 +23,73 @@ class QuerySessionPoolAsync: """QuerySessionPoolAsync is an object to simplify operations with sessions of Query Service.""" - def __init__(self, driver: common_utils.SupportedDriverType): + def __init__(self, driver: common_utils.SupportedDriverType, size: int = 10): """ :param driver: A driver instance + :param size: Size of session pool """ logger.warning("QuerySessionPoolAsync is an experimental API, which could be changed.") self._driver = driver - - def checkout(self) -> "SimpleQuerySessionCheckoutAsync": + self._size = size + self._should_stop = asyncio.Event() + self._queue = asyncio.PriorityQueue() + self._current_size = 0 + self._waiters = 0 + + async def _create_new_session(self): + session = QuerySessionAsync(self._driver) + await session.create() + logger.debug(f"New session was created for pool. Session id: {session._state.session_id}") + return session + + async def acquire(self, timeout: float) -> QuerySessionAsync: + if self._should_stop.is_set(): + logger.error("An attempt to take session from closed session pool.") + raise RuntimeError("An attempt to take session from closed session pool.") + + try: + _, session = self._queue.get_nowait() + logger.debug(f"Acquired active session from queue: {session._state.session_id}") + return session + except asyncio.QueueEmpty: + pass + + if self._current_size < self._size: + logger.debug(f"Session pool is not large enough: {self._current_size} < {self._size}, will create new one.") + session = await self._create_new_session() + self._current_size += 1 + return session + + try: + self._waiters += 1 + session = await self._get_session_with_timeout(timeout) + return session + except asyncio.TimeoutError: + raise issues.SessionPoolEmpty("Timeout on acquire session") + finally: + self._waiters -= 1 + + async def _get_session_with_timeout(self, timeout: float): + task_wait = asyncio.ensure_future(asyncio.wait_for(self._queue.get(), timeout=timeout)) + task_stop = asyncio.ensure_future(asyncio.ensure_future(self._should_stop.wait())) + done, _ = await asyncio.wait((task_wait, task_stop), return_when=asyncio.FIRST_COMPLETED) + if task_stop in done: + task_wait.cancel() + return await self._create_new_session() # TODO: not sure why + _, session = task_wait.result() + return session + + async def release(self, session: QuerySessionAsync) -> None: + self._queue.put_nowait((1, session)) + logger.debug("Session returned to queue: %s", session._state.session_id) + + def checkout(self, timeout: float = 10) -> "SimpleQuerySessionCheckoutAsync": """WARNING: This API is experimental and could be changed. Return a Session context manager, that opens session on enter and closes session on exit. """ - return SimpleQuerySessionCheckoutAsync(self) + return SimpleQuerySessionCheckoutAsync(self, timeout) async def retry_operation_async( self, callee: Callable, retry_settings: Optional[RetrySettings] = None, *args, **kwargs @@ -86,7 +141,19 @@ async def wrapped_callee(): return await retry_operation_async(wrapped_callee, retry_settings) async def stop(self, timeout=None): - pass # TODO: implement + self._should_stop.set() + + tasks = [] + while True: + try: + _, session = self._queue.get_nowait() + tasks.append(session.delete()) + except asyncio.QueueEmpty: + break + + await asyncio.gather(*tasks) + + logger.debug("All session were deleted.") async def __aenter__(self): return self @@ -96,13 +163,14 @@ async def __aexit__(self, exc_type, exc_val, exc_tb): class SimpleQuerySessionCheckoutAsync: - def __init__(self, pool: QuerySessionPoolAsync): + def __init__(self, pool: QuerySessionPoolAsync, timeout: float): self._pool = pool - self._session = QuerySessionAsync(pool._driver) + self._timeout = timeout + self._session = None async def __aenter__(self) -> QuerySessionAsync: - await self._session.create() + self._session = await self._pool.acquire(self._timeout) return self._session async def __aexit__(self, exc_type, exc_val, exc_tb): - await self._session.delete() + await self._pool.release(self._session) From 12d10a060ecb7d653048c50e3940c0bea69d4118 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 166/429] fix existing tests --- tests/aio/query/test_query_session_pool.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/aio/query/test_query_session_pool.py b/tests/aio/query/test_query_session_pool.py index e544f7b6..208597dc 100644 --- a/tests/aio/query/test_query_session_pool.py +++ b/tests/aio/query/test_query_session_pool.py @@ -10,8 +10,6 @@ async def test_checkout_provides_created_session(self, pool: QuerySessionPoolAsy async with pool.checkout() as session: assert session._state._state == QuerySessionStateEnum.CREATED - assert session._state._state == QuerySessionStateEnum.CLOSED - @pytest.mark.asyncio async def test_oneshot_query_normal(self, pool: QuerySessionPoolAsync): res = await pool.execute_with_retries("select 1;") @@ -19,6 +17,7 @@ async def test_oneshot_query_normal(self, pool: QuerySessionPoolAsync): @pytest.mark.asyncio async def test_oneshot_ddl_query(self, pool: QuerySessionPoolAsync): + await pool.execute_with_retries("drop table if exists Queen;") await pool.execute_with_retries("create table Queen(key UInt64, PRIMARY KEY (key));") await pool.execute_with_retries("drop table Queen;") From f1a3a8e398e755172c1353eeeb5a98149a00048e Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 167/429] new tests for session pool --- tests/aio/query/conftest.py | 6 ++-- tests/aio/query/test_query_session_pool.py | 42 ++++++++++++++++++++++ ydb/aio/query/pool.py | 4 +-- 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/tests/aio/query/conftest.py b/tests/aio/query/conftest.py index 0fbdbd38..44db2a8a 100644 --- a/tests/aio/query/conftest.py +++ b/tests/aio/query/conftest.py @@ -29,6 +29,6 @@ async def tx(session): @pytest.fixture -def pool(driver): - pool = QuerySessionPoolAsync(driver) - yield pool +async def pool(driver): + async with QuerySessionPoolAsync(driver) as pool: + yield pool diff --git a/tests/aio/query/test_query_session_pool.py b/tests/aio/query/test_query_session_pool.py index 208597dc..dccde5c1 100644 --- a/tests/aio/query/test_query_session_pool.py +++ b/tests/aio/query/test_query_session_pool.py @@ -53,3 +53,45 @@ async def callee(session: QuerySessionAsync): with pytest.raises(CustomException): await pool.retry_operation_async(callee) + + + @pytest.mark.asyncio + async def test_pool_size_limit_logic(self, pool: QuerySessionPoolAsync): + target_size = 5 + pool._size = target_size + ids = set() + + for i in range(1, target_size + 1): + session = await pool.acquire(timeout=0.5) + assert pool._current_size == i + assert session._state.session_id not in ids + ids.add(session._state.session_id) + + with pytest.raises(ydb.SessionPoolEmpty): + await pool.acquire(timeout=0.5) + + await pool.release(session) + + session = await pool.acquire(timeout=0.5) + assert pool._current_size == target_size + assert session._state.session_id in ids + + @pytest.mark.asyncio + async def test_checkout_do_not_increase_size(self, pool: QuerySessionPoolAsync): + session_id = None + for _ in range(10): + async with pool.checkout() as session: + if session_id is None: + session_id = session._state.session_id + assert pool._current_size == 1 + assert session_id == session._state.session_id + + @pytest.mark.asyncio + async def test_pool_recreates_bad_sessions(self, pool: QuerySessionPoolAsync): + async with pool.checkout() as session: + session_id = session._state.session_id + await session.delete() + + async with pool.checkout() as session: + assert session_id != session._state.session_id + assert pool._current_size == 1 diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 8e6afd3b..32ebf564 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -51,7 +51,7 @@ async def acquire(self, timeout: float) -> QuerySessionAsync: try: _, session = self._queue.get_nowait() logger.debug(f"Acquired active session from queue: {session._state.session_id}") - return session + return session if session._state.attached else await self._create_new_session() except asyncio.QueueEmpty: pass @@ -64,7 +64,7 @@ async def acquire(self, timeout: float) -> QuerySessionAsync: try: self._waiters += 1 session = await self._get_session_with_timeout(timeout) - return session + return session if session._state.attached else await self._create_new_session() except asyncio.TimeoutError: raise issues.SessionPoolEmpty("Timeout on acquire session") finally: From 10d4eb048f1f3d2e626b6206497f54afcc04d506 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 168/429] style fixes --- tests/aio/query/test_query_session_pool.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/aio/query/test_query_session_pool.py b/tests/aio/query/test_query_session_pool.py index dccde5c1..381ac102 100644 --- a/tests/aio/query/test_query_session_pool.py +++ b/tests/aio/query/test_query_session_pool.py @@ -54,7 +54,6 @@ async def callee(session: QuerySessionAsync): with pytest.raises(CustomException): await pool.retry_operation_async(callee) - @pytest.mark.asyncio async def test_pool_size_limit_logic(self, pool: QuerySessionPoolAsync): target_size = 5 From 63865859abb1f4930b911082d14e91727bc041ad Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 169/429] new tests on query session pool --- tests/aio/query/test_query_session_pool.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/aio/query/test_query_session_pool.py b/tests/aio/query/test_query_session_pool.py index 381ac102..228f2557 100644 --- a/tests/aio/query/test_query_session_pool.py +++ b/tests/aio/query/test_query_session_pool.py @@ -94,3 +94,22 @@ async def test_pool_recreates_bad_sessions(self, pool: QuerySessionPoolAsync): async with pool.checkout() as session: assert session_id != session._state.session_id assert pool._current_size == 1 + + @pytest.mark.asyncio + async def test_acquire_from_closed_pool_raises(self, pool: QuerySessionPoolAsync): + await pool.stop() + with pytest.raises(RuntimeError): + await pool.acquire(1) + + @pytest.mark.asyncio + async def test_no_session_leak(self, driver, docker_project): + pool = ydb.aio.QuerySessionPoolAsync(driver, 1) + docker_project.stop() + try: + await pool.acquire(timeout=0.5) + except ydb.Error: + pass + assert pool._current_size == 0 + + docker_project.start() + await pool.stop() From 28e9b91695047d12e38fde9e8cb905c9d948f740 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 170/429] sync query session pool --- tests/query/test_query_session_pool.py | 57 +++++++++++++++++++- ydb/query/pool.py | 73 ++++++++++++++++++++++---- 2 files changed, 119 insertions(+), 11 deletions(-) diff --git a/tests/query/test_query_session_pool.py b/tests/query/test_query_session_pool.py index 3c66c613..0d4eaec0 100644 --- a/tests/query/test_query_session_pool.py +++ b/tests/query/test_query_session_pool.py @@ -9,8 +9,6 @@ def test_checkout_provides_created_session(self, pool: QuerySessionPool): with pool.checkout() as session: assert session._state._state == QuerySessionStateEnum.CREATED - assert session._state._state == QuerySessionStateEnum.CLOSED - def test_oneshot_query_normal(self, pool: QuerySessionPool): res = pool.execute_with_retries("select 1;") assert len(res) == 1 @@ -47,3 +45,58 @@ def callee(session: QuerySessionSync): with pytest.raises(CustomException): pool.retry_operation_sync(callee) + + def test_pool_size_limit_logic(self, pool: QuerySessionPool): + target_size = 5 + pool._size = target_size + ids = set() + + for i in range(1, target_size + 1): + session = pool.acquire(timeout=0.5) + assert pool._current_size == i + assert session._state.session_id not in ids + ids.add(session._state.session_id) + + with pytest.raises(ydb.SessionPoolEmpty): + pool.acquire(timeout=0.5) + + pool.release(session) + + session = pool.acquire(timeout=0.5) + assert pool._current_size == target_size + assert session._state.session_id in ids + + def test_checkout_do_not_increase_size(self, pool: QuerySessionPool): + session_id = None + for _ in range(10): + with pool.checkout() as session: + if session_id is None: + session_id = session._state.session_id + assert pool._current_size == 1 + assert session_id == session._state.session_id + + def test_pool_recreates_bad_sessions(self, pool: QuerySessionPool): + with pool.checkout() as session: + session_id = session._state.session_id + session.delete() + + with pool.checkout() as session: + assert session_id != session._state.session_id + assert pool._current_size == 1 + + def test_acquire_from_closed_pool_raises(self, pool: QuerySessionPool): + pool.stop() + with pytest.raises(RuntimeError): + pool.acquire(1) + + def test_no_session_leak(self, driver_sync, docker_project): + pool = ydb.QuerySessionPool(driver_sync, 1) + docker_project.stop() + try: + pool.acquire(timeout=0.5) + except ydb.Error: + pass + assert pool._current_size == 0 + + docker_project.start() + pool.stop() diff --git a/ydb/query/pool.py b/ydb/query/pool.py index afe39f06..836e2084 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -4,6 +4,8 @@ Optional, List, ) +import threading +import queue from .session import ( QuerySessionSync, @@ -12,6 +14,7 @@ RetrySettings, retry_operation_sync, ) +from .. import issues from .. import convert from .._grpc.grpcwrapper import common_utils @@ -22,20 +25,61 @@ class QuerySessionPool: """QuerySessionPool is an object to simplify operations with sessions of Query Service.""" - def __init__(self, driver: common_utils.SupportedDriverType): + def __init__(self, driver: common_utils.SupportedDriverType, size: int = 10): """ :param driver: A driver instance """ logger.warning("QuerySessionPool is an experimental API, which could be changed.") self._driver = driver - - def checkout(self) -> "SimpleQuerySessionCheckout": + self._queue = queue.PriorityQueue() + self._current_size = 0 + self._size = size + self._should_stop = threading.Event() + self._lock = threading.RLock() + + def _create_new_session(self): + session = QuerySessionSync(self._driver) + session.create() + logger.debug(f"New session was created for pool. Session id: {session._state.session_id}") + return session + + def acquire(self, timeout: float) -> QuerySessionSync: + with self._lock: + if self._should_stop.is_set(): + logger.error("An attempt to take session from closed session pool.") + raise RuntimeError("An attempt to take session from closed session pool.") + + try: + _, session = self._queue.get_nowait() + logger.debug(f"Acquired active session from queue: {session._state.session_id}") + return session if session._state.attached else self._create_new_session() + except queue.Empty: + pass + + if self._current_size < self._size: + logger.debug(f"Session pool is not large enough: {self._current_size} < {self._size}, will create new one.") + session = self._create_new_session() + self._current_size += 1 + return session + + try: + _, session = self._queue.get(block=True, timeout=timeout) + return session if session._state.attached else self._create_new_session() + except queue.Empty: + raise issues.SessionPoolEmpty("Timeout on acquire session") + + def release(self, session: QuerySessionSync) -> None: + with self._lock: + self._queue.put_nowait((1, session)) + logger.debug("Session returned to queue: %s", session._state.session_id) + + def checkout(self, timeout: float = 10) -> "SimpleQuerySessionCheckout": """WARNING: This API is experimental and could be changed. Return a Session context manager, that opens session on enter and closes session on exit. """ - return SimpleQuerySessionCheckout(self) + return SimpleQuerySessionCheckout(self, timeout) def retry_operation_sync(self, callee: Callable, retry_settings: Optional[RetrySettings] = None, *args, **kwargs): """WARNING: This API is experimental and could be changed. @@ -85,7 +129,17 @@ def wrapped_callee(): return retry_operation_sync(wrapped_callee, retry_settings) def stop(self, timeout=None): - pass # TODO: implement + with self._lock: + self._should_stop.set() + while True: + try: + _, session = self._queue.get_nowait() + session.delete() + except queue.Empty: + break + + logger.debug("All session were deleted.") + def __enter__(self): return self @@ -95,13 +149,14 @@ def __exit__(self, exc_type, exc_val, exc_tb): class SimpleQuerySessionCheckout: - def __init__(self, pool: QuerySessionPool): + def __init__(self, pool: QuerySessionPool, timeout: float): self._pool = pool - self._session = QuerySessionSync(pool._driver) + self._timeout = timeout + self._session = None def __enter__(self) -> QuerySessionSync: - self._session.create() + self._session = self._pool.acquire(self._timeout) return self._session def __exit__(self, exc_type, exc_val, exc_tb): - self._session.delete() + self._pool.release(self._session) From dc3161effa60f9e84afbf9ab1fe1b6f1e1ba9716 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 171/429] update default pool size to 100 --- ydb/aio/query/pool.py | 2 +- ydb/query/pool.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 32ebf564..ffb8e6d2 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -23,7 +23,7 @@ class QuerySessionPoolAsync: """QuerySessionPoolAsync is an object to simplify operations with sessions of Query Service.""" - def __init__(self, driver: common_utils.SupportedDriverType, size: int = 10): + def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): """ :param driver: A driver instance :param size: Size of session pool diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 836e2084..ebc368c9 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -25,7 +25,7 @@ class QuerySessionPool: """QuerySessionPool is an object to simplify operations with sessions of Query Service.""" - def __init__(self, driver: common_utils.SupportedDriverType, size: int = 10): + def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): """ :param driver: A driver instance """ From 79e6bda9ac0ba1783e28e2e959c390f92ba8b58e Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 172/429] style fixes --- ydb/query/pool.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ydb/query/pool.py b/ydb/query/pool.py index ebc368c9..c7d80549 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -58,7 +58,9 @@ def acquire(self, timeout: float) -> QuerySessionSync: pass if self._current_size < self._size: - logger.debug(f"Session pool is not large enough: {self._current_size} < {self._size}, will create new one.") + logger.debug( + f"Session pool is not large enough: {self._current_size} < {self._size}, will create new one." + ) session = self._create_new_session() self._current_size += 1 return session @@ -140,7 +142,6 @@ def stop(self, timeout=None): logger.debug("All session were deleted.") - def __enter__(self): return self From 6e460012e0535492009dd7219b368b33eb26c7b6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 173/429] refactor dead session handle logic --- ydb/aio/query/pool.py | 8 ++++++-- ydb/query/pool.py | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index ffb8e6d2..9ff25944 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -50,8 +50,12 @@ async def acquire(self, timeout: float) -> QuerySessionAsync: try: _, session = self._queue.get_nowait() - logger.debug(f"Acquired active session from queue: {session._state.session_id}") - return session if session._state.attached else await self._create_new_session() + if session._state.attached: + logger.debug(f"Acquired active session from queue: {session._state.session_id}") + return session + else: + self._current_size -= 1 + logger.debug(f"Acquired dead session from queue: {session._state.session_id}") except asyncio.QueueEmpty: pass diff --git a/ydb/query/pool.py b/ydb/query/pool.py index c7d80549..b35faa2d 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -52,8 +52,12 @@ def acquire(self, timeout: float) -> QuerySessionSync: try: _, session = self._queue.get_nowait() - logger.debug(f"Acquired active session from queue: {session._state.session_id}") - return session if session._state.attached else self._create_new_session() + if session._state.attached: + logger.debug(f"Acquired active session from queue: {session._state.session_id}") + return session + else: + self._current_size -= 1 + logger.debug(f"Acquired dead session from queue: {session._state.session_id}") except queue.Empty: pass From 42a22fe5ba55d9f88938c395cb26e6f8572aa1f4 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 174/429] add bad session handler to execute query --- ydb/aio/query/session.py | 1 + ydb/aio/query/transaction.py | 1 + ydb/query/base.py | 25 ++++++++++++++----------- ydb/query/session.py | 1 + ydb/query/transaction.py | 1 + 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index 627a41d8..b04f388f 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -139,6 +139,7 @@ async def execute( lambda resp: base.wrap_execute_query_response( rpc_state=None, response_pb=resp, + session_state=self._state, settings=self._settings, ), ) diff --git a/ydb/aio/query/transaction.py b/ydb/aio/query/transaction.py index 429ba125..f56596ac 100644 --- a/ydb/aio/query/transaction.py +++ b/ydb/aio/query/transaction.py @@ -146,6 +146,7 @@ async def execute( lambda resp: base.wrap_execute_query_response( rpc_state=None, response_pb=resp, + session_state=self._session_state, tx=self, commit_tx=commit_tx, settings=self.session._settings, diff --git a/ydb/query/base.py b/ydb/query/base.py index 55087d0c..8486b98e 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -165,9 +165,23 @@ def create_execute_query_request( ) +def bad_session_handler(func): + @functools.wraps(func) + def decorator(rpc_state, response_pb, session_state: IQuerySessionState, *args, **kwargs): + try: + return func(rpc_state, response_pb, session_state, *args, **kwargs) + except issues.BadSession: + session_state.reset() + raise + + return decorator + + +@bad_session_handler def wrap_execute_query_response( rpc_state: RpcState, response_pb: _apis.ydb_query.ExecuteQueryResponsePart, + session_state: IQuerySessionState, tx: Optional["BaseQueryTxContext"] = None, commit_tx: Optional[bool] = False, settings: Optional[QueryClientSettings] = None, @@ -179,14 +193,3 @@ def wrap_execute_query_response( tx._move_to_commited() return convert.ResultSet.from_message(response_pb.result_set, settings) - -def bad_session_handler(func): - @functools.wraps(func) - def decorator(rpc_state, response_pb, session_state: IQuerySessionState, *args, **kwargs): - try: - return func(rpc_state, response_pb, session_state, *args, **kwargs) - except issues.BadSession: - session_state.reset() - raise - - return decorator diff --git a/ydb/query/session.py b/ydb/query/session.py index 4b051dc1..11a06f23 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -318,6 +318,7 @@ def execute( lambda resp: base.wrap_execute_query_response( rpc_state=None, response_pb=resp, + session_state=self._state, settings=self._settings, ), ) diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index be7396b1..626cb216 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -427,6 +427,7 @@ def execute( lambda resp: base.wrap_execute_query_response( rpc_state=None, response_pb=resp, + session_state=self._session_state, tx=self, commit_tx=commit_tx, settings=self.session._settings, From abbcda122ebfa660ea50a8c3f72b8f1dd5a5f30b Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 175/429] style fixes --- ydb/query/base.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ydb/query/base.py b/ydb/query/base.py index 8486b98e..12e23a44 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -192,4 +192,3 @@ def wrap_execute_query_response( if tx and commit_tx: tx._move_to_commited() return convert.ResultSet.from_message(response_pb.result_set, settings) - From 88e9796b38906a167e9774c0ac5d842ada82a68a Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 176/429] change read slo job --- tests/slo/src/jobs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/slo/src/jobs.py b/tests/slo/src/jobs.py index 3fb1833a..cea319fc 100644 --- a/tests/slo/src/jobs.py +++ b/tests/slo/src/jobs.py @@ -155,8 +155,8 @@ def run_reads_query(driver, query, max_id, metrics, limiter, runtime, timeout): with limiter: def check_result(result): - res = next(result) - assert res.rows[0] + with result: + pass params = RequestParams( pool=pool, From aad72ca946c873a5386fc33b41ac55c54d87d6cb Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 177/429] change tx commit lifecycle --- ydb/query/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ydb/query/base.py b/ydb/query/base.py index 12e23a44..9372cbcf 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -187,8 +187,9 @@ def wrap_execute_query_response( settings: Optional[QueryClientSettings] = None, ) -> convert.ResultSet: issues._process_response(response_pb) - if tx and response_pb.tx_meta and not tx.tx_id: - tx._move_to_beginned(response_pb.tx_meta.id) if tx and commit_tx: tx._move_to_commited() + elif tx and response_pb.tx_meta and not tx.tx_id: + tx._move_to_beginned(response_pb.tx_meta.id) + return convert.ResultSet.from_message(response_pb.result_set, settings) From 480d3d5fb5c9ccec4948f603808daf8500cfc4ef Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 178/429] try to reorganize acquire logic --- ydb/query/pool.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ydb/query/pool.py b/ydb/query/pool.py index b35faa2d..c986afb4 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -50,30 +50,30 @@ def acquire(self, timeout: float) -> QuerySessionSync: logger.error("An attempt to take session from closed session pool.") raise RuntimeError("An attempt to take session from closed session pool.") + session = None try: _, session = self._queue.get_nowait() + except queue.Empty: + pass + + if session is None and self._current_size == self._size: + try: + _, session = self._queue.get(block=True, timeout=timeout) + except queue.Empty: + raise issues.SessionPoolEmpty("Timeout on acquire session") + + if session is not None: if session._state.attached: logger.debug(f"Acquired active session from queue: {session._state.session_id}") return session else: self._current_size -= 1 logger.debug(f"Acquired dead session from queue: {session._state.session_id}") - except queue.Empty: - pass - - if self._current_size < self._size: - logger.debug( - f"Session pool is not large enough: {self._current_size} < {self._size}, will create new one." - ) - session = self._create_new_session() - self._current_size += 1 - return session - try: - _, session = self._queue.get(block=True, timeout=timeout) - return session if session._state.attached else self._create_new_session() - except queue.Empty: - raise issues.SessionPoolEmpty("Timeout on acquire session") + logger.debug(f"Session pool is not large enough: {self._current_size} < {self._size}, will create new one.") + session = self._create_new_session() + self._current_size += 1 + return session def release(self, session: QuerySessionSync) -> None: with self._lock: From a309fe52004676b22a5c6fa484d96ead7abe171f Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 179/429] update thread name --- tests/slo/src/jobs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/slo/src/jobs.py b/tests/slo/src/jobs.py index cea319fc..4fe0cd37 100644 --- a/tests/slo/src/jobs.py +++ b/tests/slo/src/jobs.py @@ -182,7 +182,7 @@ def run_read_jobs_query(args, driver, tb_name, max_id, metrics): futures = [] for _ in range(args.read_threads): future = threading.Thread( - name="slo_run_read", + name="slo_run_read_query", target=run_reads_query, args=(driver, read_q, max_id, metrics, read_limiter, args.time, args.read_timeout / 1000), ) @@ -306,7 +306,7 @@ def run_write_jobs_query(args, driver, tb_name, max_id, metrics): futures = [] for _ in range(args.write_threads): future = threading.Thread( - name="slo_run_write", + name="slo_run_write_query", target=run_writes_query, args=(driver, write_q, row_generator, metrics, write_limiter, args.time, args.write_timeout / 1000), ) From a812257fb397517d48e159442f24ace35a626815 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 180/429] update async query session pool --- ydb/aio/query/pool.py | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 9ff25944..7ad8d8e7 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -48,31 +48,33 @@ async def acquire(self, timeout: float) -> QuerySessionAsync: logger.error("An attempt to take session from closed session pool.") raise RuntimeError("An attempt to take session from closed session pool.") + session = None try: _, session = self._queue.get_nowait() + except asyncio.QueueEmpty: + pass + + if session is None and self._current_size == self._size: + try: + self._waiters += 1 + session = await self._get_session_with_timeout(timeout) + except asyncio.TimeoutError: + raise issues.SessionPoolEmpty("Timeout on acquire session") + finally: + self._waiters -= 1 + + if session is not None: if session._state.attached: logger.debug(f"Acquired active session from queue: {session._state.session_id}") return session else: self._current_size -= 1 logger.debug(f"Acquired dead session from queue: {session._state.session_id}") - except asyncio.QueueEmpty: - pass - - if self._current_size < self._size: - logger.debug(f"Session pool is not large enough: {self._current_size} < {self._size}, will create new one.") - session = await self._create_new_session() - self._current_size += 1 - return session - try: - self._waiters += 1 - session = await self._get_session_with_timeout(timeout) - return session if session._state.attached else await self._create_new_session() - except asyncio.TimeoutError: - raise issues.SessionPoolEmpty("Timeout on acquire session") - finally: - self._waiters -= 1 + logger.debug(f"Session pool is not large enough: {self._current_size} < {self._size}, will create new one.") + session = await self._create_new_session() + self._current_size += 1 + return session async def _get_session_with_timeout(self, timeout: float): task_wait = asyncio.ensure_future(asyncio.wait_for(self._queue.get(), timeout=timeout)) From 2f6f9b3a36dbadd4699d4655bcb6027459413a28 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 181/429] refactor asyncio pool timeout --- tests/aio/query/test_query_session_pool.py | 16 +++++--- ydb/aio/query/pool.py | 44 ++++++++++++---------- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/tests/aio/query/test_query_session_pool.py b/tests/aio/query/test_query_session_pool.py index 228f2557..1fc736da 100644 --- a/tests/aio/query/test_query_session_pool.py +++ b/tests/aio/query/test_query_session_pool.py @@ -61,17 +61,17 @@ async def test_pool_size_limit_logic(self, pool: QuerySessionPoolAsync): ids = set() for i in range(1, target_size + 1): - session = await pool.acquire(timeout=0.5) + session = await pool.acquire_wih_timeout(timeout=0.5) assert pool._current_size == i assert session._state.session_id not in ids ids.add(session._state.session_id) with pytest.raises(ydb.SessionPoolEmpty): - await pool.acquire(timeout=0.5) + await pool.acquire_wih_timeout(timeout=0.5) await pool.release(session) - session = await pool.acquire(timeout=0.5) + session = await pool.acquire_wih_timeout(timeout=0.5) assert pool._current_size == target_size assert session._state.session_id in ids @@ -99,14 +99,20 @@ async def test_pool_recreates_bad_sessions(self, pool: QuerySessionPoolAsync): async def test_acquire_from_closed_pool_raises(self, pool: QuerySessionPoolAsync): await pool.stop() with pytest.raises(RuntimeError): - await pool.acquire(1) + await pool.acquire() + + @pytest.mark.asyncio + async def test_acquire_with_timeout_from_closed_pool_raises(self, pool: QuerySessionPoolAsync): + await pool.stop() + with pytest.raises(RuntimeError): + await pool.acquire_wih_timeout(timeout=0.5) @pytest.mark.asyncio async def test_no_session_leak(self, driver, docker_project): pool = ydb.aio.QuerySessionPoolAsync(driver, 1) docker_project.stop() try: - await pool.acquire(timeout=0.5) + await pool.acquire_wih_timeout(timeout=0.5) except ydb.Error: pass assert pool._current_size == 0 diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 7ad8d8e7..abee1c39 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -43,7 +43,7 @@ async def _create_new_session(self): logger.debug(f"New session was created for pool. Session id: {session._state.session_id}") return session - async def acquire(self, timeout: float) -> QuerySessionAsync: + async def acquire(self) -> QuerySessionAsync: if self._should_stop.is_set(): logger.error("An attempt to take session from closed session pool.") raise RuntimeError("An attempt to take session from closed session pool.") @@ -55,13 +55,7 @@ async def acquire(self, timeout: float) -> QuerySessionAsync: pass if session is None and self._current_size == self._size: - try: - self._waiters += 1 - session = await self._get_session_with_timeout(timeout) - except asyncio.TimeoutError: - raise issues.SessionPoolEmpty("Timeout on acquire session") - finally: - self._waiters -= 1 + _, session = await self._queue.get() if session is not None: if session._state.attached: @@ -76,21 +70,28 @@ async def acquire(self, timeout: float) -> QuerySessionAsync: self._current_size += 1 return session - async def _get_session_with_timeout(self, timeout: float): - task_wait = asyncio.ensure_future(asyncio.wait_for(self._queue.get(), timeout=timeout)) - task_stop = asyncio.ensure_future(asyncio.ensure_future(self._should_stop.wait())) - done, _ = await asyncio.wait((task_wait, task_stop), return_when=asyncio.FIRST_COMPLETED) - if task_stop in done: - task_wait.cancel() - return await self._create_new_session() # TODO: not sure why - _, session = task_wait.result() - return session + async def acquire_wih_timeout(self, timeout: float): + if self._should_stop.is_set(): + logger.error("An attempt to take session from closed session pool.") + raise RuntimeError("An attempt to take session from closed session pool.") + + try: + task_wait = asyncio.ensure_future(asyncio.wait_for(self.acquire(), timeout=timeout)) + task_stop = asyncio.ensure_future(asyncio.ensure_future(self._should_stop.wait())) + done, _ = await asyncio.wait((task_wait, task_stop), return_when=asyncio.FIRST_COMPLETED) + if task_stop in done: + task_wait.cancel() + return await self._create_new_session() # TODO: not sure why + session = task_wait.result() + return session + except asyncio.TimeoutError: + raise issues.SessionPoolEmpty("Timeout on acquire session") async def release(self, session: QuerySessionAsync) -> None: self._queue.put_nowait((1, session)) logger.debug("Session returned to queue: %s", session._state.session_id) - def checkout(self, timeout: float = 10) -> "SimpleQuerySessionCheckoutAsync": + def checkout(self, timeout: Optional[float] = None) -> "SimpleQuerySessionCheckoutAsync": """WARNING: This API is experimental and could be changed. Return a Session context manager, that opens session on enter and closes session on exit. """ @@ -169,13 +170,16 @@ async def __aexit__(self, exc_type, exc_val, exc_tb): class SimpleQuerySessionCheckoutAsync: - def __init__(self, pool: QuerySessionPoolAsync, timeout: float): + def __init__(self, pool: QuerySessionPoolAsync, timeout: Optional[float]): self._pool = pool self._timeout = timeout self._session = None async def __aenter__(self) -> QuerySessionAsync: - self._session = await self._pool.acquire(self._timeout) + if self._timeout and self._timeout > 0: + self._session = await self._pool.acquire_wih_timeout(self._timeout) + else: + self._session = await self._pool.acquire() return self._session async def __aexit__(self, exc_type, exc_val, exc_tb): From 1c0807fcc121794f1c580863b8e2d68865167b58 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 182/429] refactor sync pool timeout --- ydb/query/pool.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ydb/query/pool.py b/ydb/query/pool.py index c986afb4..b5050702 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -4,6 +4,7 @@ Optional, List, ) +import time import threading import queue @@ -56,6 +57,7 @@ def acquire(self, timeout: float) -> QuerySessionSync: except queue.Empty: pass + start = time.monotonic() if session is None and self._current_size == self._size: try: _, session = self._queue.get(block=True, timeout=timeout) @@ -72,6 +74,11 @@ def acquire(self, timeout: float) -> QuerySessionSync: logger.debug(f"Session pool is not large enough: {self._current_size} < {self._size}, will create new one.") session = self._create_new_session() + + finish = time.monotonic() + if finish - start > timeout: + session.delete() + raise issues.SessionPoolEmpty("Timeout on acquire session") self._current_size += 1 return session From 40d0d08807ebcbb08b02af98d7274e5adfa8c7d0 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 183/429] style fix --- ydb/aio/query/pool.py | 2 +- ydb/query/pool.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index abee1c39..189d545a 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -85,7 +85,7 @@ async def acquire_wih_timeout(self, timeout: float): session = task_wait.result() return session except asyncio.TimeoutError: - raise issues.SessionPoolEmpty("Timeout on acquire session") + raise issues.SessionPoolEmpty("Timeout on acquire session") async def release(self, session: QuerySessionAsync) -> None: self._queue.put_nowait((1, session)) diff --git a/ydb/query/pool.py b/ydb/query/pool.py index b5050702..20a1cbab 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -79,6 +79,7 @@ def acquire(self, timeout: float) -> QuerySessionSync: if finish - start > timeout: session.delete() raise issues.SessionPoolEmpty("Timeout on acquire session") + self._current_size += 1 return session From e37cae25ffc2be000efe070f590d1735bf528948 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 184/429] query session pool timeout refactor --- ydb/aio/query/session.py | 11 +++++++---- ydb/query/pool.py | 12 +++++------- ydb/query/session.py | 28 +++++++++++++++++++--------- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index b04f388f..c3d0a6a3 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -8,6 +8,7 @@ from .transaction import QueryTxContextAsync from .. import _utilities from ... import issues +from ...settings import BaseRequestSettings from ..._grpc.grpcwrapper import common_utils from ..._grpc.grpcwrapper import ydb_query_public_types as _ydb_query_public @@ -62,7 +63,7 @@ async def _check_session_status_loop(self) -> None: self._state.reset() self._state._change_state(QuerySessionStateEnum.CLOSED) - async def delete(self) -> None: + async def delete(self, settings: Optional[BaseRequestSettings] = None) -> None: """WARNING: This API is experimental and could be changed. Deletes a Session of Query Service on server side and releases resources. @@ -73,10 +74,10 @@ async def delete(self) -> None: return self._state._check_invalid_transition(QuerySessionStateEnum.CLOSED) - await self._delete_call() + await self._delete_call(settings=settings) self._stream.cancel() - async def create(self) -> "QuerySessionAsync": + async def create(self, settings: Optional[BaseRequestSettings] = None) -> "QuerySessionAsync": """WARNING: This API is experimental and could be changed. Creates a Session of Query Service on server side and attaches it. @@ -87,7 +88,7 @@ async def create(self) -> "QuerySessionAsync": return self._state._check_invalid_transition(QuerySessionStateEnum.CREATED) - await self._create_call() + await self._create_call(settings=settings) await self._attach() return self @@ -110,6 +111,7 @@ async def execute( syntax: base.QuerySyntax = None, exec_mode: base.QueryExecMode = None, concurrent_result_sets: bool = False, + settings: Optional[BaseRequestSettings] = None, ) -> AsyncResponseContextIterator: """WARNING: This API is experimental and could be changed. @@ -132,6 +134,7 @@ async def execute( exec_mode=exec_mode, parameters=parameters, concurrent_result_sets=concurrent_result_sets, + settings=settings, ) return AsyncResponseContextIterator( diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 20a1cbab..4c28d0cf 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -17,6 +17,7 @@ ) from .. import issues from .. import convert +from ..settings import BaseRequestSettings from .._grpc.grpcwrapper import common_utils @@ -39,9 +40,9 @@ def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): self._should_stop = threading.Event() self._lock = threading.RLock() - def _create_new_session(self): + def _create_new_session(self, timeout: float): session = QuerySessionSync(self._driver) - session.create() + session.create(settings=BaseRequestSettings().with_timeout(timeout)) logger.debug(f"New session was created for pool. Session id: {session._state.session_id}") return session @@ -73,12 +74,9 @@ def acquire(self, timeout: float) -> QuerySessionSync: logger.debug(f"Acquired dead session from queue: {session._state.session_id}") logger.debug(f"Session pool is not large enough: {self._current_size} < {self._size}, will create new one.") - session = self._create_new_session() - finish = time.monotonic() - if finish - start > timeout: - session.delete() - raise issues.SessionPoolEmpty("Timeout on acquire session") + time_left = timeout - (finish - start) + session = self._create_new_session(time_left) self._current_size += 1 return session diff --git a/ydb/query/session.py b/ydb/query/session.py index 11a06f23..dcefb963 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -1,6 +1,7 @@ import abc import enum import logging +import time import threading from typing import ( Iterable, @@ -10,6 +11,7 @@ from . import base from .. import _apis, issues, _utilities +from ..settings import BaseRequestSettings from ..connection import _RpcState as RpcState from .._grpc.grpcwrapper import common_utils from .._grpc.grpcwrapper import ydb_query as _ydb_query @@ -136,29 +138,32 @@ def __init__(self, driver: common_utils.SupportedDriverType, settings: Optional[ self._settings = settings if settings is not None else base.QueryClientSettings() self._state = QuerySessionState(settings) - def _create_call(self) -> "BaseQuerySession": + def _create_call(self, settings: Optional[BaseRequestSettings] = None) -> "BaseQuerySession": return self._driver( _apis.ydb_query.CreateSessionRequest(), _apis.QueryService.Stub, _apis.QueryService.CreateSession, wrap_result=wrapper_create_session, wrap_args=(self._state, self), + settings=settings, ) - def _delete_call(self) -> "BaseQuerySession": + def _delete_call(self, settings: Optional[BaseRequestSettings] = None) -> "BaseQuerySession": return self._driver( _apis.ydb_query.DeleteSessionRequest(session_id=self._state.session_id), _apis.QueryService.Stub, _apis.QueryService.DeleteSession, wrap_result=wrapper_delete_session, wrap_args=(self._state, self), + settings=settings, ) - def _attach_call(self) -> Iterable[_apis.ydb_query.SessionState]: + def _attach_call(self, settings: Optional[BaseRequestSettings] = None) -> Iterable[_apis.ydb_query.SessionState]: return self._driver( _apis.ydb_query.AttachSessionRequest(session_id=self._state.session_id), _apis.QueryService.Stub, _apis.QueryService.AttachSession, + settings=settings, ) def _execute_call( @@ -169,6 +174,7 @@ def _execute_call( exec_mode: base.QueryExecMode = None, parameters: dict = None, concurrent_result_sets: bool = False, + settings: Optional[BaseRequestSettings] = None, ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: request = base.create_execute_query_request( query=query, @@ -186,6 +192,7 @@ def _execute_call( request.to_proto(), _apis.QueryService.Stub, _apis.QueryService.ExecuteQuery, + settings=settings, ) @@ -196,8 +203,8 @@ class QuerySessionSync(BaseQuerySession): _stream = None - def _attach(self) -> None: - self._stream = self._attach_call() + def _attach(self, settings: Optional[BaseRequestSettings] = None) -> None: + self._stream = self._attach_call(settings=settings) status_stream = _utilities.SyncResponseIterator( self._stream, lambda response: common_utils.ServerStatus.from_proto(response), @@ -228,7 +235,7 @@ def _check_session_status_loop(self, status_stream: _utilities.SyncResponseItera self._state.reset() self._state._change_state(QuerySessionStateEnum.CLOSED) - def delete(self) -> None: + def delete(self, settings: Optional[BaseRequestSettings] = None) -> None: """WARNING: This API is experimental and could be changed. Deletes a Session of Query Service on server side and releases resources. @@ -239,10 +246,10 @@ def delete(self) -> None: return self._state._check_invalid_transition(QuerySessionStateEnum.CLOSED) - self._delete_call() + self._delete_call(settings=settings) self._stream.cancel() - def create(self) -> "QuerySessionSync": + def create(self, settings: Optional[BaseRequestSettings] = None) -> "QuerySessionSync": """WARNING: This API is experimental and could be changed. Creates a Session of Query Service on server side and attaches it. @@ -253,7 +260,8 @@ def create(self) -> "QuerySessionSync": return self._state._check_invalid_transition(QuerySessionStateEnum.CREATED) - self._create_call() + + self._create_call(settings=settings) self._attach() return self @@ -289,6 +297,7 @@ def execute( syntax: base.QuerySyntax = None, exec_mode: base.QueryExecMode = None, concurrent_result_sets: bool = False, + settings: Optional[BaseRequestSettings] = None, ) -> base.SyncResponseContextIterator: """WARNING: This API is experimental and could be changed. @@ -311,6 +320,7 @@ def execute( exec_mode=exec_mode, parameters=parameters, concurrent_result_sets=concurrent_result_sets, + settings=settings, ) return base.SyncResponseContextIterator( From 01c02eefa3217896144f33568c67d26adfee6c6d Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 185/429] aio query session pool redesign --- tests/aio/query/test_query_session_pool.py | 13 +++++----- ydb/aio/query/pool.py | 29 +++++++--------------- ydb/query/session.py | 1 - 3 files changed, 16 insertions(+), 27 deletions(-) diff --git a/tests/aio/query/test_query_session_pool.py b/tests/aio/query/test_query_session_pool.py index 1fc736da..bd67e6db 100644 --- a/tests/aio/query/test_query_session_pool.py +++ b/tests/aio/query/test_query_session_pool.py @@ -1,3 +1,4 @@ +import asyncio import pytest import ydb from ydb.aio.query.pool import QuerySessionPoolAsync @@ -61,17 +62,17 @@ async def test_pool_size_limit_logic(self, pool: QuerySessionPoolAsync): ids = set() for i in range(1, target_size + 1): - session = await pool.acquire_wih_timeout(timeout=0.5) + session = await pool.acquire() assert pool._current_size == i assert session._state.session_id not in ids ids.add(session._state.session_id) - with pytest.raises(ydb.SessionPoolEmpty): - await pool.acquire_wih_timeout(timeout=0.5) + with pytest.raises(asyncio.TimeoutError): + await asyncio.wait_for(pool.acquire(), timeout=0.5) await pool.release(session) - session = await pool.acquire_wih_timeout(timeout=0.5) + session = await pool.acquire() assert pool._current_size == target_size assert session._state.session_id in ids @@ -105,14 +106,14 @@ async def test_acquire_from_closed_pool_raises(self, pool: QuerySessionPoolAsync async def test_acquire_with_timeout_from_closed_pool_raises(self, pool: QuerySessionPoolAsync): await pool.stop() with pytest.raises(RuntimeError): - await pool.acquire_wih_timeout(timeout=0.5) + await asyncio.wait_for(pool.acquire(), timeout=0.5) @pytest.mark.asyncio async def test_no_session_leak(self, driver, docker_project): pool = ydb.aio.QuerySessionPoolAsync(driver, 1) docker_project.stop() try: - await pool.acquire_wih_timeout(timeout=0.5) + await asyncio.wait_for(pool.acquire(), timeout=0.5) except ydb.Error: pass assert pool._current_size == 0 diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 189d545a..6e6dd6a5 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -55,7 +55,13 @@ async def acquire(self) -> QuerySessionAsync: pass if session is None and self._current_size == self._size: - _, session = await self._queue.get() + queue_get = asyncio.ensure_future(self._queue.get()) + task_stop = asyncio.ensure_future(asyncio.ensure_future(self._should_stop.wait())) + done, _ = await asyncio.wait((queue_get, task_stop), return_when=asyncio.FIRST_COMPLETED) + if task_stop in done: + queue_get.cancel() + return await self._create_new_session() # TODO: not sure why + _, session = queue_get.result() if session is not None: if session._state.attached: @@ -70,23 +76,6 @@ async def acquire(self) -> QuerySessionAsync: self._current_size += 1 return session - async def acquire_wih_timeout(self, timeout: float): - if self._should_stop.is_set(): - logger.error("An attempt to take session from closed session pool.") - raise RuntimeError("An attempt to take session from closed session pool.") - - try: - task_wait = asyncio.ensure_future(asyncio.wait_for(self.acquire(), timeout=timeout)) - task_stop = asyncio.ensure_future(asyncio.ensure_future(self._should_stop.wait())) - done, _ = await asyncio.wait((task_wait, task_stop), return_when=asyncio.FIRST_COMPLETED) - if task_stop in done: - task_wait.cancel() - return await self._create_new_session() # TODO: not sure why - session = task_wait.result() - return session - except asyncio.TimeoutError: - raise issues.SessionPoolEmpty("Timeout on acquire session") - async def release(self, session: QuerySessionAsync) -> None: self._queue.put_nowait((1, session)) logger.debug("Session returned to queue: %s", session._state.session_id) @@ -170,14 +159,14 @@ async def __aexit__(self, exc_type, exc_val, exc_tb): class SimpleQuerySessionCheckoutAsync: - def __init__(self, pool: QuerySessionPoolAsync, timeout: Optional[float]): + def __init__(self, pool: QuerySessionPoolAsync, timeout: Optional[float] = None): self._pool = pool self._timeout = timeout self._session = None async def __aenter__(self) -> QuerySessionAsync: if self._timeout and self._timeout > 0: - self._session = await self._pool.acquire_wih_timeout(self._timeout) + self._session = await self._pool.acquire_with_timeout(self._timeout) else: self._session = await self._pool.acquire() return self._session diff --git a/ydb/query/session.py b/ydb/query/session.py index dcefb963..15842b28 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -1,7 +1,6 @@ import abc import enum import logging -import time import threading from typing import ( Iterable, From c23701543dc1e4fcdd11e8262b2b4b532b2d23d1 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 186/429] style fixes --- ydb/aio/query/pool.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 6e6dd6a5..44b1d15b 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -9,7 +9,6 @@ from .session import ( QuerySessionAsync, ) -from ... import issues from ...retries import ( RetrySettings, retry_operation_async, From de5515397608d8ed96006f4aa67c4130501b7be9 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 187/429] review fixes --- tests/aio/query/test_query_session_pool.py | 9 ++++---- tests/query/test_query_session_pool.py | 11 +++++---- ydb/aio/query/pool.py | 27 ++++++++++------------ ydb/query/pool.py | 10 ++++---- 4 files changed, 28 insertions(+), 29 deletions(-) diff --git a/tests/aio/query/test_query_session_pool.py b/tests/aio/query/test_query_session_pool.py index bd67e6db..395952a2 100644 --- a/tests/aio/query/test_query_session_pool.py +++ b/tests/aio/query/test_query_session_pool.py @@ -68,13 +68,14 @@ async def test_pool_size_limit_logic(self, pool: QuerySessionPoolAsync): ids.add(session._state.session_id) with pytest.raises(asyncio.TimeoutError): - await asyncio.wait_for(pool.acquire(), timeout=0.5) + await asyncio.wait_for(pool.acquire(), timeout=0.1) + last_id = session._state.session_id await pool.release(session) session = await pool.acquire() + assert session._state.session_id == last_id assert pool._current_size == target_size - assert session._state.session_id in ids @pytest.mark.asyncio async def test_checkout_do_not_increase_size(self, pool: QuerySessionPoolAsync): @@ -106,14 +107,14 @@ async def test_acquire_from_closed_pool_raises(self, pool: QuerySessionPoolAsync async def test_acquire_with_timeout_from_closed_pool_raises(self, pool: QuerySessionPoolAsync): await pool.stop() with pytest.raises(RuntimeError): - await asyncio.wait_for(pool.acquire(), timeout=0.5) + await asyncio.wait_for(pool.acquire(), timeout=0.1) @pytest.mark.asyncio async def test_no_session_leak(self, driver, docker_project): pool = ydb.aio.QuerySessionPoolAsync(driver, 1) docker_project.stop() try: - await asyncio.wait_for(pool.acquire(), timeout=0.5) + await asyncio.wait_for(pool.acquire(), timeout=0.1) except ydb.Error: pass assert pool._current_size == 0 diff --git a/tests/query/test_query_session_pool.py b/tests/query/test_query_session_pool.py index 0d4eaec0..35a83988 100644 --- a/tests/query/test_query_session_pool.py +++ b/tests/query/test_query_session_pool.py @@ -52,19 +52,20 @@ def test_pool_size_limit_logic(self, pool: QuerySessionPool): ids = set() for i in range(1, target_size + 1): - session = pool.acquire(timeout=0.5) + session = pool.acquire(timeout=0.1) assert pool._current_size == i assert session._state.session_id not in ids ids.add(session._state.session_id) with pytest.raises(ydb.SessionPoolEmpty): - pool.acquire(timeout=0.5) + pool.acquire(timeout=0.1) + last_id = session._state.session_id pool.release(session) - session = pool.acquire(timeout=0.5) + session = pool.acquire(timeout=0.1) + assert session._state.session_id == last_id assert pool._current_size == target_size - assert session._state.session_id in ids def test_checkout_do_not_increase_size(self, pool: QuerySessionPool): session_id = None @@ -93,7 +94,7 @@ def test_no_session_leak(self, driver_sync, docker_project): pool = ydb.QuerySessionPool(driver_sync, 1) docker_project.stop() try: - pool.acquire(timeout=0.5) + pool.acquire(timeout=0.1) except ydb.Error: pass assert pool._current_size == 0 diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 44b1d15b..152262c5 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -32,7 +32,7 @@ def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): self._driver = driver self._size = size self._should_stop = asyncio.Event() - self._queue = asyncio.PriorityQueue() + self._queue = asyncio.Queue() self._current_size = 0 self._waiters = 0 @@ -49,7 +49,7 @@ async def acquire(self) -> QuerySessionAsync: session = None try: - _, session = self._queue.get_nowait() + session = self._queue.get_nowait() except asyncio.QueueEmpty: pass @@ -59,8 +59,9 @@ async def acquire(self) -> QuerySessionAsync: done, _ = await asyncio.wait((queue_get, task_stop), return_when=asyncio.FIRST_COMPLETED) if task_stop in done: queue_get.cancel() - return await self._create_new_session() # TODO: not sure why - _, session = queue_get.result() + return await self._create_new_session() + task_stop.cancel() + session = queue_get.result() if session is not None: if session._state.attached: @@ -76,15 +77,15 @@ async def acquire(self) -> QuerySessionAsync: return session async def release(self, session: QuerySessionAsync) -> None: - self._queue.put_nowait((1, session)) + self._queue.put_nowait(session) logger.debug("Session returned to queue: %s", session._state.session_id) - def checkout(self, timeout: Optional[float] = None) -> "SimpleQuerySessionCheckoutAsync": + def checkout(self) -> "SimpleQuerySessionCheckoutAsync": """WARNING: This API is experimental and could be changed. Return a Session context manager, that opens session on enter and closes session on exit. """ - return SimpleQuerySessionCheckoutAsync(self, timeout) + return SimpleQuerySessionCheckoutAsync(self) async def retry_operation_async( self, callee: Callable, retry_settings: Optional[RetrySettings] = None, *args, **kwargs @@ -135,13 +136,13 @@ async def wrapped_callee(): return await retry_operation_async(wrapped_callee, retry_settings) - async def stop(self, timeout=None): + async def stop(self): self._should_stop.set() tasks = [] while True: try: - _, session = self._queue.get_nowait() + session = self._queue.get_nowait() tasks.append(session.delete()) except asyncio.QueueEmpty: break @@ -158,16 +159,12 @@ async def __aexit__(self, exc_type, exc_val, exc_tb): class SimpleQuerySessionCheckoutAsync: - def __init__(self, pool: QuerySessionPoolAsync, timeout: Optional[float] = None): + def __init__(self, pool: QuerySessionPoolAsync): self._pool = pool - self._timeout = timeout self._session = None async def __aenter__(self) -> QuerySessionAsync: - if self._timeout and self._timeout > 0: - self._session = await self._pool.acquire_with_timeout(self._timeout) - else: - self._session = await self._pool.acquire() + self._session = await self._pool.acquire() return self._session async def __aexit__(self, exc_type, exc_val, exc_tb): diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 4c28d0cf..a0502311 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -34,7 +34,7 @@ def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): logger.warning("QuerySessionPool is an experimental API, which could be changed.") self._driver = driver - self._queue = queue.PriorityQueue() + self._queue = queue.Queue() self._current_size = 0 self._size = size self._should_stop = threading.Event() @@ -54,14 +54,14 @@ def acquire(self, timeout: float) -> QuerySessionSync: session = None try: - _, session = self._queue.get_nowait() + session = self._queue.get_nowait() except queue.Empty: pass start = time.monotonic() if session is None and self._current_size == self._size: try: - _, session = self._queue.get(block=True, timeout=timeout) + session = self._queue.get(block=True, timeout=timeout) except queue.Empty: raise issues.SessionPoolEmpty("Timeout on acquire session") @@ -83,7 +83,7 @@ def acquire(self, timeout: float) -> QuerySessionSync: def release(self, session: QuerySessionSync) -> None: with self._lock: - self._queue.put_nowait((1, session)) + self._queue.put_nowait(session) logger.debug("Session returned to queue: %s", session._state.session_id) def checkout(self, timeout: float = 10) -> "SimpleQuerySessionCheckout": @@ -145,7 +145,7 @@ def stop(self, timeout=None): self._should_stop.set() while True: try: - _, session = self._queue.get_nowait() + session = self._queue.get_nowait() session.delete() except queue.Empty: break From bbdb0a9d5df191d78ab89b032a833ef5b78614f3 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:20:46 +0300 Subject: [PATCH 188/429] review fixes --- ydb/aio/query/pool.py | 8 ++++++++ ydb/query/pool.py | 22 ++++++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 152262c5..a888605b 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -1,5 +1,6 @@ import asyncio import logging +import functools from typing import ( Callable, Optional, @@ -35,6 +36,7 @@ def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): self._queue = asyncio.Queue() self._current_size = 0 self._waiters = 0 + self._loop = asyncio.get_running_loop() async def _create_new_session(self): session = QuerySessionAsync(self._driver) @@ -157,6 +159,12 @@ async def __aenter__(self): async def __aexit__(self, exc_type, exc_val, exc_tb): await self.stop() + def __del__(self): + if self._should_stop.is_set() or self._loop.is_closed(): + return + + self._loop.call_soon(functools.partial(self.stop)) + class SimpleQuerySessionCheckoutAsync: def __init__(self, pool: QuerySessionPoolAsync): diff --git a/ydb/query/pool.py b/ydb/query/pool.py index a0502311..6276a40e 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -47,7 +47,8 @@ def _create_new_session(self, timeout: float): return session def acquire(self, timeout: float) -> QuerySessionSync: - with self._lock: + acquired = self._lock.acquire(timeout=timeout) + try: if self._should_stop.is_set(): logger.error("An attempt to take session from closed session pool.") raise RuntimeError("An attempt to take session from closed session pool.") @@ -80,11 +81,13 @@ def acquire(self, timeout: float) -> QuerySessionSync: self._current_size += 1 return session + finally: + if acquired: + self._lock.release() def release(self, session: QuerySessionSync) -> None: - with self._lock: - self._queue.put_nowait(session) - logger.debug("Session returned to queue: %s", session._state.session_id) + self._queue.put_nowait(session) + logger.debug("Session returned to queue: %s", session._state.session_id) def checkout(self, timeout: float = 10) -> "SimpleQuerySessionCheckout": """WARNING: This API is experimental and could be changed. @@ -140,8 +143,9 @@ def wrapped_callee(): return retry_operation_sync(wrapped_callee, retry_settings) - def stop(self, timeout=None): - with self._lock: + def stop(self, timeout=-1): + acquired = self._lock.acquire(timeout=timeout) + try: self._should_stop.set() while True: try: @@ -151,6 +155,9 @@ def stop(self, timeout=None): break logger.debug("All session were deleted.") + finally: + if acquired: + self._lock.release() def __enter__(self): return self @@ -158,6 +165,9 @@ def __enter__(self): def __exit__(self, exc_type, exc_val, exc_tb): self.stop() + def __del__(self): + self.stop() + class SimpleQuerySessionCheckout: def __init__(self, pool: QuerySessionPool, timeout: float): From 1d26890dc67c2c01049b94abd030488c2c6d0678 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Sep 2024 15:24:30 +0300 Subject: [PATCH 189/429] rename interfaces --- examples/basic_example_v2/basic_example.py | 4 +- .../basic_example_v2/basic_example_async.py | 22 +++++------ examples/query-service/basic_example.py | 2 +- .../query-service/basic_example_asyncio.py | 4 +- tests/aio/query/conftest.py | 8 ++-- tests/aio/query/test_query_session.py | 30 +++++++-------- tests/aio/query/test_query_session_pool.py | 38 +++++++++---------- tests/aio/query/test_query_transaction.py | 28 +++++++------- tests/query/conftest.py | 4 +- tests/query/test_query_session.py | 30 +++++++-------- tests/query/test_query_session_pool.py | 8 ++-- tests/query/test_query_transaction.py | 28 +++++++------- ydb/aio/__init__.py | 2 +- ydb/aio/query/__init__.py | 8 ++-- ydb/aio/query/pool.py | 18 ++++----- ydb/aio/query/session.py | 14 +++---- ydb/aio/query/transaction.py | 6 +-- ydb/query/__init__.py | 8 ++-- ydb/query/pool.py | 10 ++--- ydb/query/session.py | 12 +++--- ydb/query/transaction.py | 4 +- 21 files changed, 144 insertions(+), 144 deletions(-) diff --git a/examples/basic_example_v2/basic_example.py b/examples/basic_example_v2/basic_example.py index 40aef03d..7bb61f69 100644 --- a/examples/basic_example_v2/basic_example.py +++ b/examples/basic_example_v2/basic_example.py @@ -140,7 +140,7 @@ def select_with_parameters(pool: ydb.QuerySessionPool, series_id, season_id, epi # calls instead to avoid additional hops to YDB cluster and allow more efficient # execution of queries. def explicit_transaction_control(pool: ydb.QuerySessionPool, series_id, season_id, episode_id): - def callee(session: ydb.QuerySessionSync): + def callee(session: ydb.QuerySession): query = """ DECLARE $seriesId AS Int64; DECLARE $seasonId AS Int64; @@ -175,7 +175,7 @@ def callee(session: ydb.QuerySessionSync): def huge_select(pool: ydb.QuerySessionPool): - def callee(session: ydb.QuerySessionSync): + def callee(session: ydb.QuerySession): query = """SELECT * from episodes;""" with session.transaction().execute( diff --git a/examples/basic_example_v2/basic_example_async.py b/examples/basic_example_v2/basic_example_async.py index f57ec491..ad66462a 100644 --- a/examples/basic_example_v2/basic_example_async.py +++ b/examples/basic_example_v2/basic_example_async.py @@ -58,7 +58,7 @@ """ -async def fill_tables_with_data(pool: ydb.aio.QuerySessionPoolAsync): +async def fill_tables_with_data(pool: ydb.aio.QuerySessionPool): print("\nFilling tables with data...") await pool.execute_with_retries( FillDataQuery, @@ -70,7 +70,7 @@ async def fill_tables_with_data(pool: ydb.aio.QuerySessionPoolAsync): ) -async def select_simple(pool: ydb.aio.QuerySessionPoolAsync): +async def select_simple(pool: ydb.aio.QuerySessionPool): print("\nCheck series table...") result_sets = await pool.execute_with_retries( """ @@ -96,7 +96,7 @@ async def select_simple(pool: ydb.aio.QuerySessionPoolAsync): return first_set -async def upsert_simple(pool: ydb.aio.QuerySessionPoolAsync): +async def upsert_simple(pool: ydb.aio.QuerySessionPool): print("\nPerforming UPSERT into episodes...") await pool.execute_with_retries( @@ -106,7 +106,7 @@ async def upsert_simple(pool: ydb.aio.QuerySessionPoolAsync): ) -async def select_with_parameters(pool: ydb.aio.QuerySessionPoolAsync, series_id, season_id, episode_id): +async def select_with_parameters(pool: ydb.aio.QuerySessionPool, series_id, season_id, episode_id): result_sets = await pool.execute_with_retries( """ DECLARE $seriesId AS Int64; @@ -138,8 +138,8 @@ async def select_with_parameters(pool: ydb.aio.QuerySessionPoolAsync, series_id, # In most cases it's better to use transaction control settings in session.transaction # calls instead to avoid additional hops to YDB cluster and allow more efficient # execution of queries. -async def explicit_transaction_control(pool: ydb.aio.QuerySessionPoolAsync, series_id, season_id, episode_id): - async def callee(session: ydb.aio.QuerySessionAsync): +async def explicit_transaction_control(pool: ydb.aio.QuerySessionPool, series_id, season_id, episode_id): + async def callee(session: ydb.aio.QuerySession): query = """ DECLARE $seriesId AS Int64; DECLARE $seasonId AS Int64; @@ -173,8 +173,8 @@ async def callee(session: ydb.aio.QuerySessionAsync): return await pool.retry_operation_async(callee) -async def huge_select(pool: ydb.aio.QuerySessionPoolAsync): - async def callee(session: ydb.aio.QuerySessionAsync): +async def huge_select(pool: ydb.aio.QuerySessionPool): + async def callee(session: ydb.aio.QuerySession): query = """SELECT * from episodes;""" async with await session.transaction().execute( @@ -189,12 +189,12 @@ async def callee(session: ydb.aio.QuerySessionAsync): return await pool.retry_operation_async(callee) -async def drop_tables(pool: ydb.aio.QuerySessionPoolAsync): +async def drop_tables(pool: ydb.aio.QuerySessionPool): print("\nCleaning up existing tables...") await pool.execute_with_retries(DropTablesQuery) -async def create_tables(pool: ydb.aio.QuerySessionPoolAsync): +async def create_tables(pool: ydb.aio.QuerySessionPool): print("\nCreating table series...") await pool.execute_with_retries( """ @@ -246,7 +246,7 @@ async def run(endpoint, database): ) as driver: await driver.wait(timeout=5, fail_fast=True) - async with ydb.aio.QuerySessionPoolAsync(driver) as pool: + async with ydb.aio.QuerySessionPool(driver) as pool: await drop_tables(pool) await create_tables(pool) diff --git a/examples/query-service/basic_example.py b/examples/query-service/basic_example.py index cfbb3042..854c2dfe 100644 --- a/examples/query-service/basic_example.py +++ b/examples/query-service/basic_example.py @@ -82,7 +82,7 @@ def callee(session): pool.retry_operation_sync(callee) - def callee(session: ydb.QuerySessionSync): + def callee(session: ydb.QuerySession): query_print = """select $a""" print("=" * 50) diff --git a/examples/query-service/basic_example_asyncio.py b/examples/query-service/basic_example_asyncio.py index cd7a4919..c26db535 100644 --- a/examples/query-service/basic_example_asyncio.py +++ b/examples/query-service/basic_example_asyncio.py @@ -15,7 +15,7 @@ async def main(): except TimeoutError: raise RuntimeError("Connect failed to YDB") - pool = ydb.aio.QuerySessionPoolAsync(driver) + pool = ydb.aio.QuerySessionPool(driver) print("=" * 50) print("DELETE TABLE IF EXISTS") @@ -83,7 +83,7 @@ async def callee(session): await pool.retry_operation_async(callee) - async def callee(session: ydb.aio.QuerySessionAsync): + async def callee(session: ydb.aio.QuerySession): query_print = """select $a""" print("=" * 50) diff --git a/tests/aio/query/conftest.py b/tests/aio/query/conftest.py index 44db2a8a..27d96343 100644 --- a/tests/aio/query/conftest.py +++ b/tests/aio/query/conftest.py @@ -1,11 +1,11 @@ import pytest -from ydb.aio.query.session import QuerySessionAsync -from ydb.aio.query.pool import QuerySessionPoolAsync +from ydb.aio.query.session import QuerySession +from ydb.aio.query.pool import QuerySessionPool @pytest.fixture async def session(driver): - session = QuerySessionAsync(driver) + session = QuerySession(driver) yield session @@ -30,5 +30,5 @@ async def tx(session): @pytest.fixture async def pool(driver): - async with QuerySessionPoolAsync(driver) as pool: + async with QuerySessionPool(driver) as pool: yield pool diff --git a/tests/aio/query/test_query_session.py b/tests/aio/query/test_query_session.py index 117e39af..0bd06fba 100644 --- a/tests/aio/query/test_query_session.py +++ b/tests/aio/query/test_query_session.py @@ -1,14 +1,14 @@ import pytest -from ydb.aio.query.session import QuerySessionAsync +from ydb.aio.query.session import QuerySession -def _check_session_state_empty(session: QuerySessionAsync): +def _check_session_state_empty(session: QuerySession): assert session._state.session_id is None assert session._state.node_id is None assert not session._state.attached -def _check_session_state_full(session: QuerySessionAsync): +def _check_session_state_full(session: QuerySession): assert session._state.session_id is not None assert session._state.node_id is not None assert session._state.attached @@ -16,7 +16,7 @@ def _check_session_state_full(session: QuerySessionAsync): class TestAsyncQuerySession: @pytest.mark.asyncio - async def test_session_normal_lifecycle(self, session: QuerySessionAsync): + async def test_session_normal_lifecycle(self, session: QuerySession): _check_session_state_empty(session) await session.create() @@ -26,7 +26,7 @@ async def test_session_normal_lifecycle(self, session: QuerySessionAsync): _check_session_state_empty(session) @pytest.mark.asyncio - async def test_second_create_do_nothing(self, session: QuerySessionAsync): + async def test_second_create_do_nothing(self, session: QuerySession): await session.create() _check_session_state_full(session) @@ -40,30 +40,30 @@ async def test_second_create_do_nothing(self, session: QuerySessionAsync): assert session._state.node_id == node_id_before @pytest.mark.asyncio - async def test_second_delete_do_nothing(self, session: QuerySessionAsync): + async def test_second_delete_do_nothing(self, session: QuerySession): await session.create() await session.delete() await session.delete() @pytest.mark.asyncio - async def test_delete_before_create_not_possible(self, session: QuerySessionAsync): + async def test_delete_before_create_not_possible(self, session: QuerySession): with pytest.raises(RuntimeError): await session.delete() @pytest.mark.asyncio - async def test_create_after_delete_not_possible(self, session: QuerySessionAsync): + async def test_create_after_delete_not_possible(self, session: QuerySession): await session.create() await session.delete() with pytest.raises(RuntimeError): await session.create() - def test_transaction_before_create_raises(self, session: QuerySessionAsync): + def test_transaction_before_create_raises(self, session: QuerySession): with pytest.raises(RuntimeError): session.transaction() @pytest.mark.asyncio - async def test_transaction_after_delete_raises(self, session: QuerySessionAsync): + async def test_transaction_after_delete_raises(self, session: QuerySession): await session.create() await session.delete() @@ -72,24 +72,24 @@ async def test_transaction_after_delete_raises(self, session: QuerySessionAsync) session.transaction() @pytest.mark.asyncio - async def test_transaction_after_create_not_raises(self, session: QuerySessionAsync): + async def test_transaction_after_create_not_raises(self, session: QuerySession): await session.create() session.transaction() @pytest.mark.asyncio - async def test_execute_before_create_raises(self, session: QuerySessionAsync): + async def test_execute_before_create_raises(self, session: QuerySession): with pytest.raises(RuntimeError): await session.execute("select 1;") @pytest.mark.asyncio - async def test_execute_after_delete_raises(self, session: QuerySessionAsync): + async def test_execute_after_delete_raises(self, session: QuerySession): await session.create() await session.delete() with pytest.raises(RuntimeError): await session.execute("select 1;") @pytest.mark.asyncio - async def test_basic_execute(self, session: QuerySessionAsync): + async def test_basic_execute(self, session: QuerySession): await session.create() it = await session.execute("select 1;") result_sets = [result_set async for result_set in it] @@ -100,7 +100,7 @@ async def test_basic_execute(self, session: QuerySessionAsync): assert list(result_sets[0].rows[0].values()) == [1] @pytest.mark.asyncio - async def test_two_results(self, session: QuerySessionAsync): + async def test_two_results(self, session: QuerySession): await session.create() res = [] diff --git a/tests/aio/query/test_query_session_pool.py b/tests/aio/query/test_query_session_pool.py index 395952a2..26b12082 100644 --- a/tests/aio/query/test_query_session_pool.py +++ b/tests/aio/query/test_query_session_pool.py @@ -1,42 +1,42 @@ import asyncio import pytest import ydb -from ydb.aio.query.pool import QuerySessionPoolAsync -from ydb.aio.query.session import QuerySessionAsync, QuerySessionStateEnum +from ydb.aio.query.pool import QuerySessionPool +from ydb.aio.query.session import QuerySession, QuerySessionStateEnum -class TestQuerySessionPoolAsync: +class TestQuerySessionPool: @pytest.mark.asyncio - async def test_checkout_provides_created_session(self, pool: QuerySessionPoolAsync): + async def test_checkout_provides_created_session(self, pool: QuerySessionPool): async with pool.checkout() as session: assert session._state._state == QuerySessionStateEnum.CREATED @pytest.mark.asyncio - async def test_oneshot_query_normal(self, pool: QuerySessionPoolAsync): + async def test_oneshot_query_normal(self, pool: QuerySessionPool): res = await pool.execute_with_retries("select 1;") assert len(res) == 1 @pytest.mark.asyncio - async def test_oneshot_ddl_query(self, pool: QuerySessionPoolAsync): + async def test_oneshot_ddl_query(self, pool: QuerySessionPool): await pool.execute_with_retries("drop table if exists Queen;") await pool.execute_with_retries("create table Queen(key UInt64, PRIMARY KEY (key));") await pool.execute_with_retries("drop table Queen;") @pytest.mark.asyncio - async def test_oneshot_query_raises(self, pool: QuerySessionPoolAsync): + async def test_oneshot_query_raises(self, pool: QuerySessionPool): with pytest.raises(ydb.GenericError): await pool.execute_with_retries("Is this the real life? Is this just fantasy?") @pytest.mark.asyncio - async def test_retry_op_uses_created_session(self, pool: QuerySessionPoolAsync): - async def callee(session: QuerySessionAsync): + async def test_retry_op_uses_created_session(self, pool: QuerySessionPool): + async def callee(session: QuerySession): assert session._state._state == QuerySessionStateEnum.CREATED await pool.retry_operation_async(callee) @pytest.mark.asyncio - async def test_retry_op_normal(self, pool: QuerySessionPoolAsync): - async def callee(session: QuerySessionAsync): + async def test_retry_op_normal(self, pool: QuerySessionPool): + async def callee(session: QuerySession): async with session.transaction() as tx: iterator = await tx.execute("select 1;", commit_tx=True) return [result_set async for result_set in iterator] @@ -45,18 +45,18 @@ async def callee(session: QuerySessionAsync): assert len(res) == 1 @pytest.mark.asyncio - async def test_retry_op_raises(self, pool: QuerySessionPoolAsync): + async def test_retry_op_raises(self, pool: QuerySessionPool): class CustomException(Exception): pass - async def callee(session: QuerySessionAsync): + async def callee(session: QuerySession): raise CustomException() with pytest.raises(CustomException): await pool.retry_operation_async(callee) @pytest.mark.asyncio - async def test_pool_size_limit_logic(self, pool: QuerySessionPoolAsync): + async def test_pool_size_limit_logic(self, pool: QuerySessionPool): target_size = 5 pool._size = target_size ids = set() @@ -78,7 +78,7 @@ async def test_pool_size_limit_logic(self, pool: QuerySessionPoolAsync): assert pool._current_size == target_size @pytest.mark.asyncio - async def test_checkout_do_not_increase_size(self, pool: QuerySessionPoolAsync): + async def test_checkout_do_not_increase_size(self, pool: QuerySessionPool): session_id = None for _ in range(10): async with pool.checkout() as session: @@ -88,7 +88,7 @@ async def test_checkout_do_not_increase_size(self, pool: QuerySessionPoolAsync): assert session_id == session._state.session_id @pytest.mark.asyncio - async def test_pool_recreates_bad_sessions(self, pool: QuerySessionPoolAsync): + async def test_pool_recreates_bad_sessions(self, pool: QuerySessionPool): async with pool.checkout() as session: session_id = session._state.session_id await session.delete() @@ -98,20 +98,20 @@ async def test_pool_recreates_bad_sessions(self, pool: QuerySessionPoolAsync): assert pool._current_size == 1 @pytest.mark.asyncio - async def test_acquire_from_closed_pool_raises(self, pool: QuerySessionPoolAsync): + async def test_acquire_from_closed_pool_raises(self, pool: QuerySessionPool): await pool.stop() with pytest.raises(RuntimeError): await pool.acquire() @pytest.mark.asyncio - async def test_acquire_with_timeout_from_closed_pool_raises(self, pool: QuerySessionPoolAsync): + async def test_acquire_with_timeout_from_closed_pool_raises(self, pool: QuerySessionPool): await pool.stop() with pytest.raises(RuntimeError): await asyncio.wait_for(pool.acquire(), timeout=0.1) @pytest.mark.asyncio async def test_no_session_leak(self, driver, docker_project): - pool = ydb.aio.QuerySessionPoolAsync(driver, 1) + pool = ydb.aio.QuerySessionPool(driver, 1) docker_project.stop() try: await asyncio.wait_for(pool.acquire(), timeout=0.1) diff --git a/tests/aio/query/test_query_transaction.py b/tests/aio/query/test_query_transaction.py index e332b086..47222d0b 100644 --- a/tests/aio/query/test_query_transaction.py +++ b/tests/aio/query/test_query_transaction.py @@ -1,73 +1,73 @@ import pytest -from ydb.aio.query.transaction import QueryTxContextAsync +from ydb.aio.query.transaction import QueryTxContext from ydb.query.transaction import QueryTxStateEnum class TestAsyncQueryTransaction: @pytest.mark.asyncio - async def test_tx_begin(self, tx: QueryTxContextAsync): + async def test_tx_begin(self, tx: QueryTxContext): assert tx.tx_id is None await tx.begin() assert tx.tx_id is not None @pytest.mark.asyncio - async def test_tx_allow_double_commit(self, tx: QueryTxContextAsync): + async def test_tx_allow_double_commit(self, tx: QueryTxContext): await tx.begin() await tx.commit() await tx.commit() @pytest.mark.asyncio - async def test_tx_allow_double_rollback(self, tx: QueryTxContextAsync): + async def test_tx_allow_double_rollback(self, tx: QueryTxContext): await tx.begin() await tx.rollback() await tx.rollback() @pytest.mark.asyncio - async def test_tx_commit_before_begin(self, tx: QueryTxContextAsync): + async def test_tx_commit_before_begin(self, tx: QueryTxContext): await tx.commit() assert tx._tx_state._state == QueryTxStateEnum.COMMITTED @pytest.mark.asyncio - async def test_tx_rollback_before_begin(self, tx: QueryTxContextAsync): + async def test_tx_rollback_before_begin(self, tx: QueryTxContext): await tx.rollback() assert tx._tx_state._state == QueryTxStateEnum.ROLLBACKED @pytest.mark.asyncio - async def test_tx_first_execute_begins_tx(self, tx: QueryTxContextAsync): + async def test_tx_first_execute_begins_tx(self, tx: QueryTxContext): await tx.execute("select 1;") await tx.commit() @pytest.mark.asyncio - async def test_interactive_tx_commit(self, tx: QueryTxContextAsync): + async def test_interactive_tx_commit(self, tx: QueryTxContext): await tx.execute("select 1;", commit_tx=True) with pytest.raises(RuntimeError): await tx.execute("select 1;") @pytest.mark.asyncio - async def test_tx_execute_raises_after_commit(self, tx: QueryTxContextAsync): + async def test_tx_execute_raises_after_commit(self, tx: QueryTxContext): await tx.begin() await tx.commit() with pytest.raises(RuntimeError): await tx.execute("select 1;") @pytest.mark.asyncio - async def test_tx_execute_raises_after_rollback(self, tx: QueryTxContextAsync): + async def test_tx_execute_raises_after_rollback(self, tx: QueryTxContext): await tx.begin() await tx.rollback() with pytest.raises(RuntimeError): await tx.execute("select 1;") @pytest.mark.asyncio - async def test_context_manager_rollbacks_tx(self, tx: QueryTxContextAsync): + async def test_context_manager_rollbacks_tx(self, tx: QueryTxContext): async with tx: await tx.begin() assert tx._tx_state._state == QueryTxStateEnum.ROLLBACKED @pytest.mark.asyncio - async def test_context_manager_normal_flow(self, tx: QueryTxContextAsync): + async def test_context_manager_normal_flow(self, tx: QueryTxContext): async with tx: await tx.begin() await tx.execute("select 1;") @@ -76,7 +76,7 @@ async def test_context_manager_normal_flow(self, tx: QueryTxContextAsync): assert tx._tx_state._state == QueryTxStateEnum.COMMITTED @pytest.mark.asyncio - async def test_context_manager_does_not_hide_exceptions(self, tx: QueryTxContextAsync): + async def test_context_manager_does_not_hide_exceptions(self, tx: QueryTxContext): class CustomException(Exception): pass @@ -85,7 +85,7 @@ class CustomException(Exception): raise CustomException() @pytest.mark.asyncio - async def test_execute_as_context_manager(self, tx: QueryTxContextAsync): + async def test_execute_as_context_manager(self, tx: QueryTxContext): await tx.begin() async with await tx.execute("select 1;") as results: diff --git a/tests/query/conftest.py b/tests/query/conftest.py index 277aaeba..fa37b82e 100644 --- a/tests/query/conftest.py +++ b/tests/query/conftest.py @@ -1,11 +1,11 @@ import pytest -from ydb.query.session import QuerySessionSync +from ydb.query.session import QuerySession from ydb.query.pool import QuerySessionPool @pytest.fixture def session(driver_sync): - session = QuerySessionSync(driver_sync) + session = QuerySession(driver_sync) yield session diff --git a/tests/query/test_query_session.py b/tests/query/test_query_session.py index 89b899bd..a3f49cc4 100644 --- a/tests/query/test_query_session.py +++ b/tests/query/test_query_session.py @@ -1,22 +1,22 @@ import pytest -from ydb.query.session import QuerySessionSync +from ydb.query.session import QuerySession -def _check_session_state_empty(session: QuerySessionSync): +def _check_session_state_empty(session: QuerySession): assert session._state.session_id is None assert session._state.node_id is None assert not session._state.attached -def _check_session_state_full(session: QuerySessionSync): +def _check_session_state_full(session: QuerySession): assert session._state.session_id is not None assert session._state.node_id is not None assert session._state.attached class TestQuerySession: - def test_session_normal_lifecycle(self, session: QuerySessionSync): + def test_session_normal_lifecycle(self, session: QuerySession): _check_session_state_empty(session) session.create() @@ -25,7 +25,7 @@ def test_session_normal_lifecycle(self, session: QuerySessionSync): session.delete() _check_session_state_empty(session) - def test_second_create_do_nothing(self, session: QuerySessionSync): + def test_second_create_do_nothing(self, session: QuerySession): session.create() _check_session_state_full(session) @@ -38,27 +38,27 @@ def test_second_create_do_nothing(self, session: QuerySessionSync): assert session._state.session_id == session_id_before assert session._state.node_id == node_id_before - def test_second_delete_do_nothing(self, session: QuerySessionSync): + def test_second_delete_do_nothing(self, session: QuerySession): session.create() session.delete() session.delete() - def test_delete_before_create_not_possible(self, session: QuerySessionSync): + def test_delete_before_create_not_possible(self, session: QuerySession): with pytest.raises(RuntimeError): session.delete() - def test_create_after_delete_not_possible(self, session: QuerySessionSync): + def test_create_after_delete_not_possible(self, session: QuerySession): session.create() session.delete() with pytest.raises(RuntimeError): session.create() - def test_transaction_before_create_raises(self, session: QuerySessionSync): + def test_transaction_before_create_raises(self, session: QuerySession): with pytest.raises(RuntimeError): session.transaction() - def test_transaction_after_delete_raises(self, session: QuerySessionSync): + def test_transaction_after_delete_raises(self, session: QuerySession): session.create() session.delete() @@ -66,21 +66,21 @@ def test_transaction_after_delete_raises(self, session: QuerySessionSync): with pytest.raises(RuntimeError): session.transaction() - def test_transaction_after_create_not_raises(self, session: QuerySessionSync): + def test_transaction_after_create_not_raises(self, session: QuerySession): session.create() session.transaction() - def test_execute_before_create_raises(self, session: QuerySessionSync): + def test_execute_before_create_raises(self, session: QuerySession): with pytest.raises(RuntimeError): session.execute("select 1;") - def test_execute_after_delete_raises(self, session: QuerySessionSync): + def test_execute_after_delete_raises(self, session: QuerySession): session.create() session.delete() with pytest.raises(RuntimeError): session.execute("select 1;") - def test_basic_execute(self, session: QuerySessionSync): + def test_basic_execute(self, session: QuerySession): session.create() it = session.execute("select 1;") result_sets = [result_set for result_set in it] @@ -90,7 +90,7 @@ def test_basic_execute(self, session: QuerySessionSync): assert len(result_sets[0].columns) == 1 assert list(result_sets[0].rows[0].values()) == [1] - def test_two_results(self, session: QuerySessionSync): + def test_two_results(self, session: QuerySession): session.create() res = [] diff --git a/tests/query/test_query_session_pool.py b/tests/query/test_query_session_pool.py index 35a83988..cb476fa8 100644 --- a/tests/query/test_query_session_pool.py +++ b/tests/query/test_query_session_pool.py @@ -1,7 +1,7 @@ import pytest import ydb from ydb.query.pool import QuerySessionPool -from ydb.query.session import QuerySessionSync, QuerySessionStateEnum +from ydb.query.session import QuerySession, QuerySessionStateEnum class TestQuerySessionPool: @@ -22,13 +22,13 @@ def test_oneshot_query_raises(self, pool: QuerySessionPool): pool.execute_with_retries("Is this the real life? Is this just fantasy?") def test_retry_op_uses_created_session(self, pool: QuerySessionPool): - def callee(session: QuerySessionSync): + def callee(session: QuerySession): assert session._state._state == QuerySessionStateEnum.CREATED pool.retry_operation_sync(callee) def test_retry_op_normal(self, pool: QuerySessionPool): - def callee(session: QuerySessionSync): + def callee(session: QuerySession): with session.transaction() as tx: iterator = tx.execute("select 1;", commit_tx=True) return [result_set for result_set in iterator] @@ -40,7 +40,7 @@ def test_retry_op_raises(self, pool: QuerySessionPool): class CustomException(Exception): pass - def callee(session: QuerySessionSync): + def callee(session: QuerySession): raise CustomException() with pytest.raises(CustomException): diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 07a43fa6..9e78988a 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -1,62 +1,62 @@ import pytest -from ydb.query.transaction import QueryTxContextSync +from ydb.query.transaction import QueryTxContext from ydb.query.transaction import QueryTxStateEnum class TestQueryTransaction: - def test_tx_begin(self, tx: QueryTxContextSync): + def test_tx_begin(self, tx: QueryTxContext): assert tx.tx_id is None tx.begin() assert tx.tx_id is not None - def test_tx_allow_double_commit(self, tx: QueryTxContextSync): + def test_tx_allow_double_commit(self, tx: QueryTxContext): tx.begin() tx.commit() tx.commit() - def test_tx_allow_double_rollback(self, tx: QueryTxContextSync): + def test_tx_allow_double_rollback(self, tx: QueryTxContext): tx.begin() tx.rollback() tx.rollback() - def test_tx_commit_before_begin(self, tx: QueryTxContextSync): + def test_tx_commit_before_begin(self, tx: QueryTxContext): tx.commit() assert tx._tx_state._state == QueryTxStateEnum.COMMITTED - def test_tx_rollback_before_begin(self, tx: QueryTxContextSync): + def test_tx_rollback_before_begin(self, tx: QueryTxContext): tx.rollback() assert tx._tx_state._state == QueryTxStateEnum.ROLLBACKED - def test_tx_first_execute_begins_tx(self, tx: QueryTxContextSync): + def test_tx_first_execute_begins_tx(self, tx: QueryTxContext): tx.execute("select 1;") tx.commit() - def test_interactive_tx_commit(self, tx: QueryTxContextSync): + def test_interactive_tx_commit(self, tx: QueryTxContext): tx.execute("select 1;", commit_tx=True) with pytest.raises(RuntimeError): tx.execute("select 1;") - def test_tx_execute_raises_after_commit(self, tx: QueryTxContextSync): + def test_tx_execute_raises_after_commit(self, tx: QueryTxContext): tx.begin() tx.commit() with pytest.raises(RuntimeError): tx.execute("select 1;") - def test_tx_execute_raises_after_rollback(self, tx: QueryTxContextSync): + def test_tx_execute_raises_after_rollback(self, tx: QueryTxContext): tx.begin() tx.rollback() with pytest.raises(RuntimeError): tx.execute("select 1;") - def test_context_manager_rollbacks_tx(self, tx: QueryTxContextSync): + def test_context_manager_rollbacks_tx(self, tx: QueryTxContext): with tx: tx.begin() assert tx._tx_state._state == QueryTxStateEnum.ROLLBACKED - def test_context_manager_normal_flow(self, tx: QueryTxContextSync): + def test_context_manager_normal_flow(self, tx: QueryTxContext): with tx: tx.begin() tx.execute("select 1;") @@ -64,7 +64,7 @@ def test_context_manager_normal_flow(self, tx: QueryTxContextSync): assert tx._tx_state._state == QueryTxStateEnum.COMMITTED - def test_context_manager_does_not_hide_exceptions(self, tx: QueryTxContextSync): + def test_context_manager_does_not_hide_exceptions(self, tx: QueryTxContext): class CustomException(Exception): pass @@ -72,7 +72,7 @@ class CustomException(Exception): with tx: raise CustomException() - def test_execute_as_context_manager(self, tx: QueryTxContextSync): + def test_execute_as_context_manager(self, tx: QueryTxContext): tx.begin() with tx.execute("select 1;") as results: diff --git a/ydb/aio/__init__.py b/ydb/aio/__init__.py index 0e7d4e74..a755713d 100644 --- a/ydb/aio/__init__.py +++ b/ydb/aio/__init__.py @@ -1,3 +1,3 @@ from .driver import Driver # noqa from .table import SessionPool, retry_operation # noqa -from .query import QuerySessionPoolAsync, QuerySessionAsync # noqa +from .query import QuerySessionPool, QuerySession # noqa diff --git a/ydb/aio/query/__init__.py b/ydb/aio/query/__init__.py index 829d7b54..ea5273d7 100644 --- a/ydb/aio/query/__init__.py +++ b/ydb/aio/query/__init__.py @@ -1,7 +1,7 @@ __all__ = [ - "QuerySessionPoolAsync", - "QuerySessionAsync", + "QuerySessionPool", + "QuerySession", ] -from .pool import QuerySessionPoolAsync -from .session import QuerySessionAsync +from .pool import QuerySessionPool +from .session import QuerySession diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index a888605b..90ab7d74 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -8,7 +8,7 @@ ) from .session import ( - QuerySessionAsync, + QuerySession, ) from ...retries import ( RetrySettings, @@ -20,8 +20,8 @@ logger = logging.getLogger(__name__) -class QuerySessionPoolAsync: - """QuerySessionPoolAsync is an object to simplify operations with sessions of Query Service.""" +class QuerySessionPool: + """QuerySessionPool is an object to simplify operations with sessions of Query Service.""" def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): """ @@ -29,7 +29,7 @@ def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): :param size: Size of session pool """ - logger.warning("QuerySessionPoolAsync is an experimental API, which could be changed.") + logger.warning("QuerySessionPool is an experimental API, which could be changed.") self._driver = driver self._size = size self._should_stop = asyncio.Event() @@ -39,12 +39,12 @@ def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): self._loop = asyncio.get_running_loop() async def _create_new_session(self): - session = QuerySessionAsync(self._driver) + session = QuerySession(self._driver) await session.create() logger.debug(f"New session was created for pool. Session id: {session._state.session_id}") return session - async def acquire(self) -> QuerySessionAsync: + async def acquire(self) -> QuerySession: if self._should_stop.is_set(): logger.error("An attempt to take session from closed session pool.") raise RuntimeError("An attempt to take session from closed session pool.") @@ -78,7 +78,7 @@ async def acquire(self) -> QuerySessionAsync: self._current_size += 1 return session - async def release(self, session: QuerySessionAsync) -> None: + async def release(self, session: QuerySession) -> None: self._queue.put_nowait(session) logger.debug("Session returned to queue: %s", session._state.session_id) @@ -167,11 +167,11 @@ def __del__(self): class SimpleQuerySessionCheckoutAsync: - def __init__(self, pool: QuerySessionPoolAsync): + def __init__(self, pool: QuerySessionPool): self._pool = pool self._session = None - async def __aenter__(self) -> QuerySessionAsync: + async def __aenter__(self) -> QuerySession: self._session = await self._pool.acquire() return self._session diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index c3d0a6a3..5f51b671 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -5,7 +5,7 @@ ) from .base import AsyncResponseContextIterator -from .transaction import QueryTxContextAsync +from .transaction import QueryTxContext from .. import _utilities from ... import issues from ...settings import BaseRequestSettings @@ -19,7 +19,7 @@ ) -class QuerySessionAsync(BaseQuerySession): +class QuerySession(BaseQuerySession): """Session object for Query Service. It is not recommended to control session's lifecycle manually - use a QuerySessionPool is always a better choise. """ @@ -33,7 +33,7 @@ def __init__( settings: Optional[base.QueryClientSettings] = None, loop: asyncio.AbstractEventLoop = None, ): - super(QuerySessionAsync, self).__init__(driver, settings) + super(QuerySession, self).__init__(driver, settings) self._loop = loop if loop is not None else asyncio.get_running_loop() async def _attach(self) -> None: @@ -77,12 +77,12 @@ async def delete(self, settings: Optional[BaseRequestSettings] = None) -> None: await self._delete_call(settings=settings) self._stream.cancel() - async def create(self, settings: Optional[BaseRequestSettings] = None) -> "QuerySessionAsync": + async def create(self, settings: Optional[BaseRequestSettings] = None) -> "QuerySession": """WARNING: This API is experimental and could be changed. Creates a Session of Query Service on server side and attaches it. - :return: QuerySessionSync object. + :return: QuerySession object. """ if self._state._already_in(QuerySessionStateEnum.CREATED): return @@ -93,11 +93,11 @@ async def create(self, settings: Optional[BaseRequestSettings] = None) -> "Query return self - def transaction(self, tx_mode=None) -> QueryTxContextAsync: + def transaction(self, tx_mode=None) -> QueryTxContext: self._state._check_session_ready_to_use() tx_mode = tx_mode if tx_mode else _ydb_query_public.QuerySerializableReadWrite() - return QueryTxContextAsync( + return QueryTxContext( self._driver, self._state, self, diff --git a/ydb/aio/query/transaction.py b/ydb/aio/query/transaction.py index f56596ac..0e3ab602 100644 --- a/ydb/aio/query/transaction.py +++ b/ydb/aio/query/transaction.py @@ -15,8 +15,8 @@ logger = logging.getLogger(__name__) -class QueryTxContextAsync(BaseQueryTxContext): - async def __aenter__(self) -> "QueryTxContextAsync": +class QueryTxContext(BaseQueryTxContext): + async def __aenter__(self) -> "QueryTxContext": """ Enters a context manager and returns a transaction @@ -47,7 +47,7 @@ async def _ensure_prev_stream_finished(self) -> None: pass self._prev_stream = None - async def begin(self, settings: Optional[BaseRequestSettings] = None) -> "QueryTxContextAsync": + async def begin(self, settings: Optional[BaseRequestSettings] = None) -> "QueryTxContext": """WARNING: This API is experimental and could be changed. Explicitly begins a transaction diff --git a/ydb/query/__init__.py b/ydb/query/__init__.py index 40e512cd..1e950bb7 100644 --- a/ydb/query/__init__.py +++ b/ydb/query/__init__.py @@ -5,7 +5,7 @@ "QueryStaleReadOnly", "QuerySessionPool", "QueryClientSync", - "QuerySessionSync", + "QuerySession", ] import logging @@ -14,7 +14,7 @@ QueryClientSettings, ) -from .session import QuerySessionSync +from .session import QuerySession from .._grpc.grpcwrapper import common_utils from .._grpc.grpcwrapper.ydb_query_public_types import ( @@ -35,5 +35,5 @@ def __init__(self, driver: common_utils.SupportedDriverType, query_client_settin self._driver = driver self._settings = query_client_settings - def session(self) -> QuerySessionSync: - return QuerySessionSync(self._driver, self._settings) + def session(self) -> QuerySession: + return QuerySession(self._driver, self._settings) diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 6276a40e..4152706d 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -9,7 +9,7 @@ import queue from .session import ( - QuerySessionSync, + QuerySession, ) from ..retries import ( RetrySettings, @@ -41,12 +41,12 @@ def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): self._lock = threading.RLock() def _create_new_session(self, timeout: float): - session = QuerySessionSync(self._driver) + session = QuerySession(self._driver) session.create(settings=BaseRequestSettings().with_timeout(timeout)) logger.debug(f"New session was created for pool. Session id: {session._state.session_id}") return session - def acquire(self, timeout: float) -> QuerySessionSync: + def acquire(self, timeout: float) -> QuerySession: acquired = self._lock.acquire(timeout=timeout) try: if self._should_stop.is_set(): @@ -85,7 +85,7 @@ def acquire(self, timeout: float) -> QuerySessionSync: if acquired: self._lock.release() - def release(self, session: QuerySessionSync) -> None: + def release(self, session: QuerySession) -> None: self._queue.put_nowait(session) logger.debug("Session returned to queue: %s", session._state.session_id) @@ -175,7 +175,7 @@ def __init__(self, pool: QuerySessionPool, timeout: float): self._timeout = timeout self._session = None - def __enter__(self) -> QuerySessionSync: + def __enter__(self) -> QuerySession: self._session = self._pool.acquire(self._timeout) return self._session diff --git a/ydb/query/session.py b/ydb/query/session.py index 15842b28..66e86501 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -16,7 +16,7 @@ from .._grpc.grpcwrapper import ydb_query as _ydb_query from .._grpc.grpcwrapper import ydb_query_public_types as _ydb_query_public -from .transaction import QueryTxContextSync +from .transaction import QueryTxContext logger = logging.getLogger(__name__) @@ -195,7 +195,7 @@ def _execute_call( ) -class QuerySessionSync(BaseQuerySession): +class QuerySession(BaseQuerySession): """Session object for Query Service. It is not recommended to control session's lifecycle manually - use a QuerySessionPool is always a better choise. """ @@ -248,12 +248,12 @@ def delete(self, settings: Optional[BaseRequestSettings] = None) -> None: self._delete_call(settings=settings) self._stream.cancel() - def create(self, settings: Optional[BaseRequestSettings] = None) -> "QuerySessionSync": + def create(self, settings: Optional[BaseRequestSettings] = None) -> "QuerySession": """WARNING: This API is experimental and could be changed. Creates a Session of Query Service on server side and attaches it. - :return: QuerySessionSync object. + :return: QuerySession object. """ if self._state._already_in(QuerySessionStateEnum.CREATED): return @@ -265,7 +265,7 @@ def create(self, settings: Optional[BaseRequestSettings] = None) -> "QuerySessio return self - def transaction(self, tx_mode: Optional[base.BaseQueryTxMode] = None) -> QueryTxContextSync: + def transaction(self, tx_mode: Optional[base.BaseQueryTxMode] = None) -> QueryTxContext: """WARNING: This API is experimental and could be changed. Creates a transaction context manager with specified transaction mode. @@ -282,7 +282,7 @@ def transaction(self, tx_mode: Optional[base.BaseQueryTxMode] = None) -> QueryTx tx_mode = tx_mode if tx_mode else _ydb_query_public.QuerySerializableReadWrite() - return QueryTxContextSync( + return QueryTxContext( self._driver, self._state, self, diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 626cb216..9ad3552f 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -294,7 +294,7 @@ def _move_to_commited(self) -> None: self._tx_state._change_state(QueryTxStateEnum.COMMITTED) -class QueryTxContextSync(BaseQueryTxContext): +class QueryTxContext(BaseQueryTxContext): def __enter__(self) -> "BaseQueryTxContext": """ Enters a context manager and returns a transaction @@ -326,7 +326,7 @@ def _ensure_prev_stream_finished(self) -> None: pass self._prev_stream = None - def begin(self, settings: Optional[BaseRequestSettings] = None) -> "QueryTxContextSync": + def begin(self, settings: Optional[BaseRequestSettings] = None) -> "QueryTxContext": """WARNING: This API is experimental and could be changed. Explicitly begins a transaction From 94ca12d811e3d72e9a355743c1d7d9ff444b1159 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 5 Sep 2024 19:51:13 +0300 Subject: [PATCH 190/429] Remove connection from pool before waiting for results --- ydb/aio/connection.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ydb/aio/connection.py b/ydb/aio/connection.py index 9c661490..1f328a37 100644 --- a/ydb/aio/connection.py +++ b/ydb/aio/connection.py @@ -227,7 +227,7 @@ async def connection_ready(self, ready_timeout=10): await asyncio.wait_for(self._channel.channel_ready(), timeout=ready_timeout) - async def close(self, grace: float = None): + async def close(self, grace: float = 30): """ Closes the underlying gRPC channel :param: grace: If a grace period is specified, this method wait until all active @@ -239,12 +239,12 @@ async def close(self, grace: float = None): self.closing = True - if self.calls: - await asyncio.wait(self.calls.values(), timeout=grace) - for callback in self._cleanup_callbacks: callback(self) + if self.calls: + await asyncio.wait(self.calls.values(), timeout=grace) + await self.destroy() async def __aenter__(self): From 198a6e5214898cf493db2b0c1f5dea785ce7ea54 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 6 Sep 2024 11:43:51 +0300 Subject: [PATCH 191/429] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad1c163b..46090c0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +* SLO tests for query service +* Fix connection close mechanism + ## 3.16.0 ## * Async implementation of Query Service SDK * New basic example with Query Service SDK From 683d5b0cf2d2232b43bfe35c1cd612ce16d10e4d Mon Sep 17 00:00:00 2001 From: robot Date: Fri, 6 Sep 2024 08:59:00 +0000 Subject: [PATCH 192/429] Release: 3.16.1 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46090c0b..705201c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.16.1 ## * SLO tests for query service * Fix connection close mechanism diff --git a/setup.py b/setup.py index 50991b05..9e6ee922 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.16.0", # AUTOVERSION + version="3.16.1", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 76caab7b..96a11891 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.16.0" +VERSION = "3.16.1" From f27ce06a70d8113f3bffdea5ba21d02586eebad7 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 9 Sep 2024 11:09:37 +0300 Subject: [PATCH 193/429] review fixes --- ydb/query/pool.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 4152706d..012bf8b7 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -40,14 +40,15 @@ def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): self._should_stop = threading.Event() self._lock = threading.RLock() - def _create_new_session(self, timeout: float): + def _create_new_session(self, timeout: Optional[float]): session = QuerySession(self._driver) session.create(settings=BaseRequestSettings().with_timeout(timeout)) logger.debug(f"New session was created for pool. Session id: {session._state.session_id}") return session - def acquire(self, timeout: float) -> QuerySession: - acquired = self._lock.acquire(timeout=timeout) + def acquire(self, timeout: Optional[float] = None) -> QuerySession: + lock_acquire_timeout = timeout if timeout is not None else -1 + acquired = self._lock.acquire(timeout=lock_acquire_timeout) try: if self._should_stop.is_set(): logger.error("An attempt to take session from closed session pool.") @@ -76,7 +77,7 @@ def acquire(self, timeout: float) -> QuerySession: logger.debug(f"Session pool is not large enough: {self._current_size} < {self._size}, will create new one.") finish = time.monotonic() - time_left = timeout - (finish - start) + time_left = timeout - (finish - start) if timeout is not None else None session = self._create_new_session(time_left) self._current_size += 1 @@ -89,7 +90,7 @@ def release(self, session: QuerySession) -> None: self._queue.put_nowait(session) logger.debug("Session returned to queue: %s", session._state.session_id) - def checkout(self, timeout: float = 10) -> "SimpleQuerySessionCheckout": + def checkout(self, timeout: Optional[float] = None) -> "SimpleQuerySessionCheckout": """WARNING: This API is experimental and could be changed. Return a Session context manager, that opens session on enter and closes session on exit. """ @@ -109,7 +110,7 @@ def retry_operation_sync(self, callee: Callable, retry_settings: Optional[RetryS retry_settings = RetrySettings() if retry_settings is None else retry_settings def wrapped_callee(): - with self.checkout() as session: + with self.checkout(timeout=retry_settings.max_session_acquire_timeout) as session: return callee(session, *args, **kwargs) return retry_operation_sync(wrapped_callee, retry_settings) @@ -137,14 +138,15 @@ def execute_with_retries( retry_settings = RetrySettings() if retry_settings is None else retry_settings def wrapped_callee(): - with self.checkout() as session: + with self.checkout(timeout=retry_settings.max_session_acquire_timeout) as session: it = session.execute(query, parameters, *args, **kwargs) return [result_set for result_set in it] return retry_operation_sync(wrapped_callee, retry_settings) - def stop(self, timeout=-1): - acquired = self._lock.acquire(timeout=timeout) + def stop(self, timeout=None): + acquire_timeout = timeout if timeout is not None else -1 + acquired = self._lock.acquire(timeout=acquire_timeout) try: self._should_stop.set() while True: @@ -170,7 +172,7 @@ def __del__(self): class SimpleQuerySessionCheckout: - def __init__(self, pool: QuerySessionPool, timeout: float): + def __init__(self, pool: QuerySessionPool, timeout: Optional[float]): self._pool = pool self._timeout = timeout self._session = None From eb98ede2bd6e4d929fa7089e729ad1cac1c47db3 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 9 Sep 2024 11:14:58 +0300 Subject: [PATCH 194/429] bump typing-extensions to fix CI --- test-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-requirements.txt b/test-requirements.txt index 705bf22f..fcf5779b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -34,7 +34,7 @@ pyjwt==2.0.0 requests==2.31.0 texttable==1.6.4 toml==0.10.2 -typing-extensions==3.10.0.0 +typing-extensions==4.12.2 urllib3==1.26.6 websocket-client==0.59.0 zipp==3.19.1 From 4bb2566afcc40fb45e60947687f9ecabd4a36832 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 9 Sep 2024 11:36:52 +0300 Subject: [PATCH 195/429] review fixes --- ydb/aio/query/pool.py | 6 +++--- ydb/query/pool.py | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 90ab7d74..f0b962c3 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -1,6 +1,5 @@ import asyncio import logging -import functools from typing import ( Callable, Optional, @@ -61,7 +60,8 @@ async def acquire(self) -> QuerySession: done, _ = await asyncio.wait((queue_get, task_stop), return_when=asyncio.FIRST_COMPLETED) if task_stop in done: queue_get.cancel() - return await self._create_new_session() + raise RuntimeError("An attempt to take session from closed session pool.") + task_stop.cancel() session = queue_get.result() @@ -163,7 +163,7 @@ def __del__(self): if self._should_stop.is_set() or self._loop.is_closed(): return - self._loop.call_soon(functools.partial(self.stop)) + self._loop.call_soon(self.stop) class SimpleQuerySessionCheckoutAsync: diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 012bf8b7..1ee9ea83 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -47,6 +47,8 @@ def _create_new_session(self, timeout: Optional[float]): return session def acquire(self, timeout: Optional[float] = None) -> QuerySession: + start = time.monotonic() + lock_acquire_timeout = timeout if timeout is not None else -1 acquired = self._lock.acquire(timeout=lock_acquire_timeout) try: @@ -60,6 +62,9 @@ def acquire(self, timeout: Optional[float] = None) -> QuerySession: except queue.Empty: pass + finish = time.monotonic() + timeout = timeout - (finish - start) if timeout is not None else None + start = time.monotonic() if session is None and self._current_size == self._size: try: From bf0568d8ada60558453867fd9af2b7c32c666ac2 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 10:00:39 +0300 Subject: [PATCH 196/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 705201c1..70a42cfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Query Session Pool redesign + ## 3.16.1 ## * SLO tests for query service * Fix connection close mechanism From 3a6e5f72fd2e37157c319366d40657fef9d68abe Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 10 Sep 2024 07:37:37 +0000 Subject: [PATCH 197/429] Release: 3.17.0 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70a42cfe..762bc52e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.17.0 ## * Query Session Pool redesign ## 3.16.1 ## diff --git a/setup.py b/setup.py index 9e6ee922..8b765b93 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.16.1", # AUTOVERSION + version="3.17.0", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 96a11891..8bc0d971 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.16.1" +VERSION = "3.17.0" From 91565b063e1322776a09fda3634756a2951164b5 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:35:41 +0300 Subject: [PATCH 198/429] autogenerated docs workflow --- .github/workflows/docs.yml | 18 ++++++++++++++++++ docs/conf.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..97dc09d0 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,18 @@ +name: Deploy Sphinx documentation to Github Pages + +on: + push: + branches: [master, autogenetated_docs] # branch to trigger deployment + +jobs: + pages: + runs-on: ubuntu-20.04 + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + permissions: + pages: write + id-token: write + steps: + - id: deployment + uses: sphinx-notes/pages@v3 \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index f8cc5f6d..12812338 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,7 +20,7 @@ # -- Project information ----------------------------------------------------- project = 'ydb' -copyright = '2021, yandex' +copyright = '2024, yandex' author = 'yandex' # The short X.Y version From 3e4036b7f6d4f8f31e5062d6fae38c0c617b559b Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:35:41 +0300 Subject: [PATCH 199/429] Add link to docs on README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index cfc57eb2..db7c3de2 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,12 @@ YDB Python SDK Officially supported Python client for YDB. +--- + +**Documentation**: https://ydb-platform.github.io/ydb-python-sdk + +--- + ## Quickstart ### Prerequisites From 617750e319093b426909a36002c51b906f039048 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:35:41 +0300 Subject: [PATCH 200/429] change docs theme --- docs/conf.py | 20 ++++++++++---------- docs/requirements.txt | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 docs/requirements.txt diff --git a/docs/conf.py b/docs/conf.py index 12812338..b48901a6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -39,11 +39,11 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.viewcode', - 'sphinx.ext.todo', - 'sphinx.ext.napoleon', - 'sphinx.ext.coverage', + 'sphinx.ext.autodoc', + 'sphinx.ext.viewcode', + 'sphinx.ext.todo', + 'sphinx.ext.napoleon', + 'sphinx.ext.coverage', ] # Add any paths that contain templates here, relative to this directory. @@ -79,13 +79,13 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +html_theme = 'sphinx_rtd_theme' html_theme_options = { - 'fixed_sidebar': True, - 'page_width': '1140px', - 'show_related': True, - 'show_powered_by': False + 'fixed_sidebar': True, + 'page_width': '1140px', + 'show_related': True, + 'show_powered_by': False } # Theme options are theme-specific and customize the look and feel of a theme diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..438b963c --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +sphinx_rtd_theme==2.0.0 \ No newline at end of file From 6508d8829969cfc8365f33b16685b6cfbcffc263 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:35:41 +0300 Subject: [PATCH 201/429] try to add logo --- docs/_static/logo.svg | 4 ++++ docs/conf.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 docs/_static/logo.svg diff --git a/docs/_static/logo.svg b/docs/_static/logo.svg new file mode 100644 index 00000000..0a813215 --- /dev/null +++ b/docs/_static/logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/docs/conf.py b/docs/conf.py index b48901a6..1e4f0a8b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -88,6 +88,8 @@ 'show_powered_by': False } +html_logo = '_static/logo.svg' + # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. @@ -97,7 +99,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['.static'] +html_static_path = ['_static'] # Custom sidebar templates, must be a dictionary that maps document names # to template names. From ecb2cd7cf9966df2a9c14c0848ca19292d04509c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:35:41 +0300 Subject: [PATCH 202/429] add favicon --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index 1e4f0a8b..0f6fc3fc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -89,6 +89,7 @@ } html_logo = '_static/logo.svg' +html_favicon = '_static/logo.svg' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the From 218562f844bc77ed13feeba0eefec1b3391535a6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:35:41 +0300 Subject: [PATCH 203/429] overview doc added --- docs/index.rst | 7 +++---- docs/overview.rst | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 docs/overview.rst diff --git a/docs/index.rst b/docs/index.rst index 9a69b2bc..fd03336a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,18 +3,17 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to ydb's documentation! +YDB Python SDK =============================== .. toctree:: - :maxdepth: 10 + :maxdepth: 3 + overview ydb.rst examples.rst - - Indices and tables ================== diff --git a/docs/overview.rst b/docs/overview.rst new file mode 100644 index 00000000..d6853e24 --- /dev/null +++ b/docs/overview.rst @@ -0,0 +1,50 @@ +Project Homepage +================ + +YDB Python SDK is hosted on GitHub at https://github.com/ydb-platform/ydb-python-sdk under the ydb-platform organization. + +Releases and project status are available on Pypi at https://pypi.org/project/ydb. + +The most recent published version of this documentation should be at https://ydb-platform.github.io/ydb-python-sdk. + +Installation +============ + +Prerequisites +------------- + +* Python 3.8 or higher; +* `pip` version 9.0.1 or higher; + +If necessary, upgrade your version of `pip`: + +:: + $ python -m pip install --upgrade pip + +If you cannot upgrade `pip` due to a system-owned installation, you can run the example in a virtualenv: + +:: + $ python -m pip install virtualenv + $ virtualenv venv + $ source venv/bin/activate + $ python -m pip install --upgrade pip + +Installation via Pypi +--------------------- + +To install YDB Python SDK through Pypi execute the following command: + +:: + $ pip install ydb + +Community +========= + +You can ask your questions in official Telegram chats: +**EN** `Official YDB chat `_. +**RU** `Official YDB chat `_. + + +Bugs and feature enhancements to YDB Python SDK should be reported on the `GitHub +issue tracker +`_. \ No newline at end of file From c9021029dfe972d5143352ee815a80f6d4a39cc4 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:35:41 +0300 Subject: [PATCH 204/429] format fixes --- docs/index.rst | 2 +- docs/overview.rst | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index fd03336a..5beb4e32 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,7 +7,7 @@ YDB Python SDK =============================== .. toctree:: - :maxdepth: 3 + :maxdepth: 4 overview ydb.rst diff --git a/docs/overview.rst b/docs/overview.rst index d6853e24..06227924 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -16,14 +16,12 @@ Prerequisites * Python 3.8 or higher; * `pip` version 9.0.1 or higher; -If necessary, upgrade your version of `pip`: +If necessary, upgrade your version of `pip`:: -:: $ python -m pip install --upgrade pip -If you cannot upgrade `pip` due to a system-owned installation, you can run the example in a virtualenv: +If you cannot upgrade `pip` due to a system-owned installation, you can run the example in a virtualenv:: -:: $ python -m pip install virtualenv $ virtualenv venv $ source venv/bin/activate @@ -32,17 +30,17 @@ If you cannot upgrade `pip` due to a system-owned installation, you can run the Installation via Pypi --------------------- -To install YDB Python SDK through Pypi execute the following command: - -:: +To install YDB Python SDK through Pypi execute the following command:: + $ pip install ydb Community ========= You can ask your questions in official Telegram chats: -**EN** `Official YDB chat `_. -**RU** `Official YDB chat `_. + +* **EN** `YDB chat `_. +* **RU** `YDB chat `_. Bugs and feature enhancements to YDB Python SDK should be reported on the `GitHub From a15c05f057066f7930745308fa988fb2656d4730 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:35:41 +0300 Subject: [PATCH 205/429] update overview doc --- docs/conf.py | 1 + docs/overview.rst | 18 +++++++++--------- docs/requirements.txt | 3 ++- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0f6fc3fc..761a37ca 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -44,6 +44,7 @@ 'sphinx.ext.todo', 'sphinx.ext.napoleon', 'sphinx.ext.coverage', + 'sphinx_copybutton', ] # Add any paths that contain templates here, relative to this directory. diff --git a/docs/overview.rst b/docs/overview.rst index 06227924..aba9fc8f 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -14,25 +14,25 @@ Prerequisites ------------- * Python 3.8 or higher; -* `pip` version 9.0.1 or higher; +* ``pip`` version 9.0.1 or higher; -If necessary, upgrade your version of `pip`:: +If necessary, upgrade your version of ``pip``:: - $ python -m pip install --upgrade pip + python -m pip install --upgrade pip If you cannot upgrade `pip` due to a system-owned installation, you can run the example in a virtualenv:: - $ python -m pip install virtualenv - $ virtualenv venv - $ source venv/bin/activate - $ python -m pip install --upgrade pip + python -m pip install virtualenv + virtualenv venv + source venv/bin/activate + python -m pip install --upgrade pip Installation via Pypi --------------------- To install YDB Python SDK through Pypi execute the following command:: - - $ pip install ydb + + pip install ydb Community ========= diff --git a/docs/requirements.txt b/docs/requirements.txt index 438b963c..f8306480 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1 +1,2 @@ -sphinx_rtd_theme==2.0.0 \ No newline at end of file +sphinx_rtd_theme==2.0.0 +sphinx-copybutton==0.5.2 From 1a7347a958ad86e7575f8258d479d8a5d284ffe2 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:35:41 +0300 Subject: [PATCH 206/429] restructure docs --- docs/{ydb.rst => apireference.rst} | 4 ++-- docs/index.rst | 6 +++--- docs/overview.rst | 13 ++++++++----- 3 files changed, 13 insertions(+), 10 deletions(-) rename docs/{ydb.rst => apireference.rst} (97%) diff --git a/docs/ydb.rst b/docs/apireference.rst similarity index 97% rename from docs/ydb.rst rename to docs/apireference.rst index 53297005..0653d7bb 100644 --- a/docs/ydb.rst +++ b/docs/apireference.rst @@ -1,5 +1,5 @@ -ydb -=== +YDB API Reference +================= .. toctree:: :caption: Contents: diff --git a/docs/index.rst b/docs/index.rst index 5beb4e32..acd3ecf5 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,11 +7,11 @@ YDB Python SDK =============================== .. toctree:: - :maxdepth: 4 + :maxdepth: 3 overview - ydb.rst - examples.rst + examples + apireference Indices and tables diff --git a/docs/overview.rst b/docs/overview.rst index aba9fc8f..56e2fa3f 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -1,5 +1,8 @@ +Overview +======== + Project Homepage -================ +---------------- YDB Python SDK is hosted on GitHub at https://github.com/ydb-platform/ydb-python-sdk under the ydb-platform organization. @@ -8,10 +11,10 @@ Releases and project status are available on Pypi at https://pypi.org/project/yd The most recent published version of this documentation should be at https://ydb-platform.github.io/ydb-python-sdk. Installation -============ +------------ Prerequisites -------------- +^^^^^^^^^^^^^ * Python 3.8 or higher; * ``pip`` version 9.0.1 or higher; @@ -28,14 +31,14 @@ If you cannot upgrade `pip` due to a system-owned installation, you can run the python -m pip install --upgrade pip Installation via Pypi ---------------------- +^^^^^^^^^^^^^^^^^^^^^ To install YDB Python SDK through Pypi execute the following command:: pip install ydb Community -========= +--------- You can ask your questions in official Telegram chats: From de09626dcd7544d3aa9ee5d6a803c9d3c7524c32 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:35:41 +0300 Subject: [PATCH 207/429] quick start docs --- docs/index.rst | 1 + docs/overview.rst | 26 ----------------------- docs/quickstart.rst | 52 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 26 deletions(-) create mode 100644 docs/quickstart.rst diff --git a/docs/index.rst b/docs/index.rst index acd3ecf5..184a35ab 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,6 +10,7 @@ YDB Python SDK :maxdepth: 3 overview + quickstart examples apireference diff --git a/docs/overview.rst b/docs/overview.rst index 56e2fa3f..4313b91c 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -10,32 +10,6 @@ Releases and project status are available on Pypi at https://pypi.org/project/yd The most recent published version of this documentation should be at https://ydb-platform.github.io/ydb-python-sdk. -Installation ------------- - -Prerequisites -^^^^^^^^^^^^^ - -* Python 3.8 or higher; -* ``pip`` version 9.0.1 or higher; - -If necessary, upgrade your version of ``pip``:: - - python -m pip install --upgrade pip - -If you cannot upgrade `pip` due to a system-owned installation, you can run the example in a virtualenv:: - - python -m pip install virtualenv - virtualenv venv - source venv/bin/activate - python -m pip install --upgrade pip - -Installation via Pypi -^^^^^^^^^^^^^^^^^^^^^ - -To install YDB Python SDK through Pypi execute the following command:: - - pip install ydb Community --------- diff --git a/docs/quickstart.rst b/docs/quickstart.rst new file mode 100644 index 00000000..ab3bf04d --- /dev/null +++ b/docs/quickstart.rst @@ -0,0 +1,52 @@ +Quick Start +=========== + +Installation +------------ + +Prerequisites +^^^^^^^^^^^^^ + +* Python 3.8 or higher; +* ``pip`` version 9.0.1 or higher; + +If necessary, upgrade your version of ``pip``:: + + python -m pip install --upgrade pip + +If you cannot upgrade `pip` due to a system-owned installation, you can run the example in a virtualenv:: + + python -m pip install virtualenv + virtualenv venv + source venv/bin/activate + python -m pip install --upgrade pip + +Installation via Pypi +^^^^^^^^^^^^^^^^^^^^^ + +To install YDB Python SDK through Pypi execute the following command:: + + pip install ydb + +Usage +----- + +Import ydb package: + +.. code-block:: python + + import ydb + +Driver initialization: + +.. code-block:: python + + endpoint = "grpc://localhost:2136" # your ydb endpoint + database = "/local" # your ydb database + + with ydb.Driver( + endpoint=endpoint, + database=database, + credentials=ydb.credentials_from_env_variables(), + ) as driver: + driver.wait(timeout=5, fail_fast=True) From b9ff6a8da5a2f7d37ee3caaa91cc2cf955e9422b Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:35:41 +0300 Subject: [PATCH 208/429] temp --- docs/quickstart.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index ab3bf04d..f7b91a3a 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -50,3 +50,7 @@ Driver initialization: credentials=ydb.credentials_from_env_variables(), ) as driver: driver.wait(timeout=5, fail_fast=True) + + +>>> print("hello world") +hello world From 5f37bd04efe9a81c3f26642a2eab8762e09cae0d Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:35:41 +0300 Subject: [PATCH 209/429] usage docs --- docs/quickstart.rst | 69 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 4 deletions(-) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index f7b91a3a..5bfc8b94 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -31,13 +31,15 @@ To install YDB Python SDK through Pypi execute the following command:: Usage ----- -Import ydb package: +Import Package +^^^^^^^^^^^^^^ .. code-block:: python import ydb -Driver initialization: +Driver Initialization +^^^^^^^^^^^^^^^^^^^^^ .. code-block:: python @@ -51,6 +53,65 @@ Driver initialization: ) as driver: driver.wait(timeout=5, fail_fast=True) +SessionPool Initialization +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: python + + with ydb.QuerySessionPool(driver) as pool: + pass + +Query Execution +^^^^^^^^^^^^^^^ + +Python SDK supports queries described by YQL syntax. +There are two primary methods for executing queries, each with different properties and use cases: + +* ``pool.execute_with_retries``: + * Buffers the entire result set in client memory. + * Automatically retries execution in case of retriable issues. + * Does not allow specifying a transaction execution mode. + * Recommended for one-off queries that are expected to produce small result sets. + +* ``tx.execute``: + * Returns an iterator over the query results, allowing processing of results that may not fit into client memory. + * Retries must be handled manually via `pool.retry_operation_sync`. + * Allows specifying a transaction execution mode. + * Recommended for scenarios where `pool.execute_with_retries` is insufficient. + + +Usage of ``pool.execute_with_retries()``: + +.. code-block:: python + + pool.execute_with_retries("DROP TABLE IF EXISTS example") + pool.execute_with_retries("CREATE TABLE example(key UInt64, value String, PRIMARY KEY (key))") + + pool.execute_with_retries("INSERT INTO example (key, value) VALUES (1, 'luffy')") + + res = pool.execute_with_retries("SELECT COUNT(*) AS rows_count FROM example") + +>>> res[0].rows_count +1 + +Example of ``tx.execute()``: + +.. code-block:: python + + def callee(session: ydb.QuerySessionSync): + with session.transaction() as tx: + with tx.execute( + "INSERT INTO example (key, value) VALUES (2, 'zoro')" + ): + pass + + with tx.execute( + "INSERT INTO example (key, value) VALUES (3, 'sanji')", + commit_tx=True, + ): + pass + + pool.retry_operation_sync(callee) + + ->>> print("hello world") -hello world From 91a14ab53399522f2d4c16b978aa0038cb66c80d Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:35:41 +0300 Subject: [PATCH 210/429] Update examples --- docs/examples.rst | 202 +++++++++++++++++++++++++++++++------------- docs/quickstart.rst | 2 + 2 files changed, 147 insertions(+), 57 deletions(-) diff --git a/docs/examples.rst b/docs/examples.rst index 920d1292..4f8dee84 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -1,67 +1,155 @@ Examples =============== -ydb -^^^ +Basic example +^^^^^^^^^^^^^ + +All examples in this section are parts of `basic example `_. + +For deeper upderstanding it is better to read the whole example. Create table ------------ -:: - - ... create an instance of Driver ... - - description = ( - ydb.TableDescription() - .with_primary_keys('key1', 'key2') - .with_columns( - ydb.Column('key1', ydb.OptionalType(ydb.PrimitiveType.Uint64)), - ydb.Column('key2', ydb.OptionalType(ydb.PrimitiveType.Uint64)), - ydb.Column('value', ydb.OptionalType(ydb.PrimitiveType.Utf8)) - ) - .with_profile( - ydb.TableProfile() - .with_partitioning_policy( - ydb.PartitioningPolicy() - .with_explicit_partitions( - ydb.ExplicitPartitions( - ( - ydb.KeyBound((100, )), - ydb.KeyBound((300, 100)), - ydb.KeyBound((400, )), - ) - ) - ) - ) - ) - ) - - session = driver.table_client.session().create() - session.create_table('/my/table/', description) - - -Read table +.. code-block:: python + + def create_tables(pool: ydb.QuerySessionPool): + print("\nCreating table series...") + pool.execute_with_retries( + """ + CREATE table `series` ( + `series_id` Int64, + `title` Utf8, + `series_info` Utf8, + `release_date` Date, + PRIMARY KEY (`series_id`) + ) + """ + ) + + print("\nCreating table seasons...") + pool.execute_with_retries( + """ + CREATE table `seasons` ( + `series_id` Int64, + `season_id` Int64, + `title` Utf8, + `first_aired` Date, + `last_aired` Date, + PRIMARY KEY (`series_id`, `season_id`) + ) + """ + ) + + print("\nCreating table episodes...") + pool.execute_with_retries( + """ + CREATE table `episodes` ( + `series_id` Int64, + `season_id` Int64, + `episode_id` Int64, + `title` Utf8, + `air_date` Date, + PRIMARY KEY (`series_id`, `season_id`, `episode_id`) + ) + """ + ) + + +Upsert Simple +------------- + +.. code-block:: python + + def upsert_simple(pool: ydb.QuerySessionPool): + print("\nPerforming UPSERT into episodes...") + + pool.execute_with_retries( + """ + UPSERT INTO episodes (series_id, season_id, episode_id, title) VALUES (2, 6, 1, "TBD"); + """ + ) + + +Simple Select ---------- -:: - - .... initialize driver and session .... - - key_prefix_type = ydb.TupleType().add_element( - ydb.OptionalType(ydb.PrimitiveType.Uint64).add_element( - ydb.OptionalType(ydb.PrimitiveType.Utf8)) - async_table_iterator = session.read_table( - '/my/table', - columns=('KeyColumn0', 'KeyColumn1', 'ValueColumn'), - ydb.KeyRange( - ydb.KeyBound((100, 'hundred'), key_prefix_type) - ydb.KeyBound((200, 'two-hundreds'), key_prefix_type) - ) + +.. code-block:: python + + def select_simple(pool: ydb.QuerySessionPool): + print("\nCheck series table...") + result_sets = pool.execute_with_retries( + """ + SELECT + series_id, + title, + release_date + FROM series + WHERE series_id = 1; + """, + ) + first_set = result_sets[0] + for row in first_set.rows: + print( + "series, id: ", + row.series_id, + ", title: ", + row.title, + ", release date: ", + row.release_date, ) - while True: - try: - chunk_future = next(table_iterator) - chunk = chunk_future.result() # or any other way to await - ... additional data processing ... - except StopIteration: - break + return first_set + +Select With Parameters +---------------------- + +.. code-block:: python + + def select_with_parameters(pool: ydb.QuerySessionPool, series_id, season_id, episode_id): + result_sets = pool.execute_with_retries( + """ + DECLARE $seriesId AS Int64; + DECLARE $seasonId AS Int64; + DECLARE $episodeId AS Int64; + + SELECT + title, + air_date + FROM episodes + WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; + """, + { + "$seriesId": series_id, # could be defined implicit + "$seasonId": (season_id, ydb.PrimitiveType.Int64), # could be defined via tuple + "$episodeId": ydb.TypedValue(episode_id, ydb.PrimitiveType.Int64), # could be defined via special class + }, + ) + + print("\n> select_with_parameters:") + first_set = result_sets[0] + for row in first_set.rows: + print("episode title:", row.title, ", air date:", row.air_date) + + return first_set + +Huge Select +----------- + +.. code-block:: python + + def huge_select(pool: ydb.QuerySessionPool): + def callee(session: ydb.QuerySessionSync): + query = """SELECT * from episodes;""" + + with session.transaction().execute( + query, + commit_tx=True, + ) as result_sets: + print("\n> Huge SELECT call") + for result_set in result_sets: + for row in result_set.rows: + print("episode title:", row.title, ", air date:", row.air_date) + + return pool.retry_operation_sync(callee) + diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 5bfc8b94..cb1d1062 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -68,12 +68,14 @@ Python SDK supports queries described by YQL syntax. There are two primary methods for executing queries, each with different properties and use cases: * ``pool.execute_with_retries``: + * Buffers the entire result set in client memory. * Automatically retries execution in case of retriable issues. * Does not allow specifying a transaction execution mode. * Recommended for one-off queries that are expected to produce small result sets. * ``tx.execute``: + * Returns an iterator over the query results, allowing processing of results that may not fit into client memory. * Retries must be handled manually via `pool.retry_operation_sync`. * Allows specifying a transaction execution mode. From 4709becae3fc14f3f97b76cb83fdf951f313ad83 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:35:41 +0300 Subject: [PATCH 211/429] add query service to api reference --- docs/apireference.rst | 69 ++++++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 21 deletions(-) diff --git a/docs/apireference.rst b/docs/apireference.rst index 0653d7bb..5b78525e 100644 --- a/docs/apireference.rst +++ b/docs/apireference.rst @@ -33,8 +33,38 @@ DriverConfig ------------------------ -Table -^^^^^ +Query Service +^^^^^^^^^^^^^ + +QuerySessionPool +~~~~~~~~~~~~~~~~ + +.. autoclass:: QuerySessionPool + :members: + :inherited-members: + :undoc-members: + +QuerySessionSync +~~~~~~~~~~~~~~~~ + +.. autoclass:: QuerySessionSync + :members: + :inherited-members: + :undoc-members: + +QueryTxContextSync +~~~~~~~~~~~~~~~~~~ + +.. autoclass:: QueryTxContextSync + :members: + :inherited-members: + :undoc-members: + +------------------------ + +Table Service +^^^^^^^^^^^^^ + TableClient ~~~~~~~~~~~ .. autoclass:: TableClient @@ -50,6 +80,14 @@ TableClientSettings :inherited-members: :undoc-members: +Session Pool +~~~~~~~~~~~~ + +.. autoclass:: SessionPool + :members: + :inherited-members: + :undoc-members: + Session ~~~~~~~ @@ -66,6 +104,14 @@ Transaction Context :inherited-members: :undoc-members: +DataQuery +^^^^^^^^^ + +.. autoclass:: DataQuery + :members: + :inherited-members: + :undoc-members: + -------------------------- Scheme @@ -81,17 +127,6 @@ SchemeClient ------------------ -Session Pool -^^^^^^^^^^^^ - -.. autoclass:: SessionPool - :members: - :inherited-members: - :undoc-members: - ------------------------------ - - Result Sets ^^^^^^^^^^^ @@ -101,11 +136,3 @@ Result Sets :undoc-members: ----------------------------- - -DataQuery -^^^^^^^^^ - -.. autoclass:: DataQuery - :members: - :inherited-members: - :undoc-members: From 53874aa6e694b27c4337c41d7e4d96d87534b345 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:38:53 +0300 Subject: [PATCH 212/429] update autogenerated docs with aio reference --- docs/apireference.rst | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/apireference.rst b/docs/apireference.rst index 5b78525e..7d0cf489 100644 --- a/docs/apireference.rst +++ b/docs/apireference.rst @@ -22,6 +22,15 @@ Driver object :undoc-members: +Driver object (AsyncIO) +~~~~~~~~~~~~~ + +.. autoclass:: ydb.aio.Driver + :members: + :inherited-members: + :undoc-members: + + DriverConfig ~~~~~~~~~~~~ @@ -44,18 +53,18 @@ QuerySessionPool :inherited-members: :undoc-members: -QuerySessionSync +QuerySession ~~~~~~~~~~~~~~~~ -.. autoclass:: QuerySessionSync +.. autoclass:: QuerySession :members: :inherited-members: :undoc-members: -QueryTxContextSync +QueryTxContext ~~~~~~~~~~~~~~~~~~ -.. autoclass:: QueryTxContextSync +.. autoclass:: QueryTxContext :members: :inherited-members: :undoc-members: From f601499ea96381808a15032ef4f0d1c711a2153c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 13:50:03 +0300 Subject: [PATCH 213/429] extent public api with QueryTxContext --- docs/apireference.rst | 24 ++++++++++++------------ ydb/aio/query/__init__.py | 2 ++ ydb/query/__init__.py | 2 ++ 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/docs/apireference.rst b/docs/apireference.rst index 7d0cf489..118a03b9 100644 --- a/docs/apireference.rst +++ b/docs/apireference.rst @@ -16,7 +16,7 @@ Driver Driver object ~~~~~~~~~~~~~ -.. autoclass:: Driver +.. autoclass:: ydb.Driver :members: :inherited-members: :undoc-members: @@ -34,7 +34,7 @@ Driver object (AsyncIO) DriverConfig ~~~~~~~~~~~~ -.. autoclass:: DriverConfig +.. autoclass:: ydb.DriverConfig :members: :inherited-members: :undoc-members: @@ -48,7 +48,7 @@ Query Service QuerySessionPool ~~~~~~~~~~~~~~~~ -.. autoclass:: QuerySessionPool +.. autoclass:: ydb.QuerySessionPool :members: :inherited-members: :undoc-members: @@ -56,7 +56,7 @@ QuerySessionPool QuerySession ~~~~~~~~~~~~~~~~ -.. autoclass:: QuerySession +.. autoclass:: ydb.QuerySession :members: :inherited-members: :undoc-members: @@ -64,7 +64,7 @@ QuerySession QueryTxContext ~~~~~~~~~~~~~~~~~~ -.. autoclass:: QueryTxContext +.. autoclass:: ydb.QueryTxContext :members: :inherited-members: :undoc-members: @@ -76,7 +76,7 @@ Table Service TableClient ~~~~~~~~~~~ -.. autoclass:: TableClient +.. autoclass:: ydb.TableClient :members: :inherited-members: :undoc-members: @@ -84,7 +84,7 @@ TableClient TableClientSettings ~~~~~~~~~~~~~~~~~~~ -.. autoclass:: TableClientSettings +.. autoclass:: ydb.TableClientSettings :members: :inherited-members: :undoc-members: @@ -92,7 +92,7 @@ TableClientSettings Session Pool ~~~~~~~~~~~~ -.. autoclass:: SessionPool +.. autoclass:: ydb.SessionPool :members: :inherited-members: :undoc-members: @@ -100,7 +100,7 @@ Session Pool Session ~~~~~~~ -.. autoclass:: Session +.. autoclass:: ydb.Session :members: :inherited-members: :undoc-members: @@ -108,7 +108,7 @@ Session Transaction Context ~~~~~~~~~~~~~~~~~~~ -.. autoclass:: TxContext +.. autoclass:: ydb.TxContext :members: :inherited-members: :undoc-members: @@ -116,7 +116,7 @@ Transaction Context DataQuery ^^^^^^^^^ -.. autoclass:: DataQuery +.. autoclass:: ydb.DataQuery :members: :inherited-members: :undoc-members: @@ -129,7 +129,7 @@ Scheme SchemeClient ~~~~~~~~~~~~ -.. autoclass:: SchemeClient +.. autoclass:: ydb.SchemeClient :members: :inherited-members: :undoc-members: diff --git a/ydb/aio/query/__init__.py b/ydb/aio/query/__init__.py index ea5273d7..8e7dd4fd 100644 --- a/ydb/aio/query/__init__.py +++ b/ydb/aio/query/__init__.py @@ -1,7 +1,9 @@ __all__ = [ "QuerySessionPool", "QuerySession", + "QueryTxContext", ] from .pool import QuerySessionPool from .session import QuerySession +from .transaction import QueryTxContext diff --git a/ydb/query/__init__.py b/ydb/query/__init__.py index 1e950bb7..7431332e 100644 --- a/ydb/query/__init__.py +++ b/ydb/query/__init__.py @@ -6,6 +6,7 @@ "QuerySessionPool", "QueryClientSync", "QuerySession", + "QueryTxContext", ] import logging @@ -15,6 +16,7 @@ ) from .session import QuerySession +from .transaction import QueryTxContext from .._grpc.grpcwrapper import common_utils from .._grpc.grpcwrapper.ydb_query_public_types import ( From 1850b73112afc03ca83c165e7ed80ae618cc0fa3 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 15:58:22 +0300 Subject: [PATCH 214/429] change doc structure --- docs/apireference.rst | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/apireference.rst b/docs/apireference.rst index 118a03b9..5e3ce93f 100644 --- a/docs/apireference.rst +++ b/docs/apireference.rst @@ -7,11 +7,8 @@ YDB API Reference .. module:: ydb -Module contents ---------------- - Driver -^^^^^^ +------ Driver object ~~~~~~~~~~~~~ @@ -43,7 +40,7 @@ DriverConfig ------------------------ Query Service -^^^^^^^^^^^^^ +------------- QuerySessionPool ~~~~~~~~~~~~~~~~ @@ -72,7 +69,7 @@ QueryTxContext ------------------------ Table Service -^^^^^^^^^^^^^ +------------- TableClient ~~~~~~~~~~~ @@ -114,7 +111,7 @@ Transaction Context :undoc-members: DataQuery -^^^^^^^^^ +--------- .. autoclass:: ydb.DataQuery :members: @@ -124,7 +121,7 @@ DataQuery -------------------------- Scheme -^^^^^^ +------ SchemeClient ~~~~~~~~~~~~ @@ -137,7 +134,7 @@ SchemeClient ------------------ Result Sets -^^^^^^^^^^^ +----------- .. autoclass:: ydb.convert._ResultSet :members: From e3d499e0d00c586cff898e2940d24319d99d137d Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 17:17:21 +0300 Subject: [PATCH 215/429] try to combine sync and async api ref --- docs/apireference.rst | 47 +++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/docs/apireference.rst b/docs/apireference.rst index 5e3ce93f..82960198 100644 --- a/docs/apireference.rst +++ b/docs/apireference.rst @@ -10,16 +10,20 @@ YDB API Reference Driver ------ -Driver object -~~~~~~~~~~~~~ - .. autoclass:: ydb.Driver :members: :inherited-members: :undoc-members: -Driver object (AsyncIO) +.. autoclass:: ydb.DriverConfig + :members: + :inherited-members: + :undoc-members: + :exclude-members: database, ca_cert, channel_options, secure_channel, endpoint, endpoints, credentials, use_all_nodes, root_certificates, certificate_chain, private_key, grpc_keep_alive_timeout, table_client_settings, primary_user_agent + + +AsyncIO ~~~~~~~~~~~~~ .. autoclass:: ydb.aio.Driver @@ -28,44 +32,57 @@ Driver object (AsyncIO) :undoc-members: -DriverConfig -~~~~~~~~~~~~ +------------------------ -.. autoclass:: ydb.DriverConfig +Common +------------- + +.. autoclass:: ydb.BaseRequestSettings :members: :inherited-members: :undoc-members: - :exclude-members: database, ca_cert, channel_options, secure_channel, endpoint, endpoints, credentials, use_all_nodes, root_certificates, certificate_chain, private_key, grpc_keep_alive_timeout, table_client_settings, primary_user_agent ------------------------ Query Service ------------- -QuerySessionPool -~~~~~~~~~~~~~~~~ - .. autoclass:: ydb.QuerySessionPool :members: :inherited-members: :undoc-members: -QuerySession -~~~~~~~~~~~~~~~~ .. autoclass:: ydb.QuerySession :members: :inherited-members: :undoc-members: -QueryTxContext -~~~~~~~~~~~~~~~~~~ .. autoclass:: ydb.QueryTxContext :members: :inherited-members: :undoc-members: + +AsyncIO +~~~~~~~ + +.. autoclass:: ydb.aio.QuerySessionPool + :members: + :inherited-members: + :undoc-members: + +.. autoclass:: ydb.aio.QuerySession + :members: + :inherited-members: + :undoc-members: + +.. autoclass:: ydb.aio.QueryTxContext + :members: + :inherited-members: + :undoc-members: + ------------------------ Table Service From c56fbce33ab762343cd54dd06a52827a8841d9ef Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 17:26:09 +0300 Subject: [PATCH 216/429] Update BaseRequestSettings type hints --- ydb/settings.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ydb/settings.py b/ydb/settings.py index 6739a46f..019b75a8 100644 --- a/ydb/settings.py +++ b/ydb/settings.py @@ -39,7 +39,7 @@ def make_copy(self): .with_need_rpc_auth(self.need_rpc_auth) ) - def with_compression(self, compression): + def with_compression(self, compression) -> "BaseRequestSettings": """ Enables compression for the specific RPC :param compression: An RPCCompression enum value. @@ -48,11 +48,11 @@ def with_compression(self, compression): self.compression = compression return self - def with_need_rpc_auth(self, need_rpc_auth): + def with_need_rpc_auth(self, need_rpc_auth) -> "BaseRequestSettings": self.need_rpc_auth = need_rpc_auth return self - def with_header(self, key, value): + def with_header(self, key, value) -> "BaseRequestSettings": """ Adds a key-value pair to the request headers. :param key: A string with a header key. @@ -62,7 +62,7 @@ def with_header(self, key, value): self.headers.append((key, value)) return self - def with_trace_id(self, trace_id): + def with_trace_id(self, trace_id) -> "BaseRequestSettings": """ Includes trace id for RPC headers :param trace_id: A trace id string @@ -71,7 +71,7 @@ def with_trace_id(self, trace_id): self.trace_id = trace_id return self - def with_request_type(self, request_type): + def with_request_type(self, request_type) -> "BaseRequestSettings": """ Includes request type for RPC headers :param request_type: A request type string @@ -80,7 +80,7 @@ def with_request_type(self, request_type): self.request_type = request_type return self - def with_operation_timeout(self, timeout): + def with_operation_timeout(self, timeout) -> "BaseRequestSettings": """ Indicates that client is no longer interested in the result of operation after the specified duration starting from the time operation arrives at the server. @@ -89,12 +89,12 @@ def with_operation_timeout(self, timeout): Timeout of operation does not tell anything about its result, it might be completed successfully or cancelled on server. :param timeout: - :return: + :return: The self instance """ self.operation_timeout = timeout return self - def with_cancel_after(self, timeout): + def with_cancel_after(self, timeout) -> "BaseRequestSettings": """ Server will try to cancel the operation after the specified duration starting from the time the operation arrives at server. @@ -102,12 +102,12 @@ def with_cancel_after(self, timeout): sent back to client if it was waiting for the operation result. In case when cancellation isn't possible, no action will be performed. :param timeout: - :return: + :return: The self instance """ self.cancel_after = timeout return self - def with_timeout(self, timeout): + def with_timeout(self, timeout) -> "BaseRequestSettings": """ Client-side timeout to complete request. Since YDB doesn't support request cancellation at this moment, this feature should be From 52b9587f395af3faa34fd864c9ee87cfdfd0d22f Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 17:30:43 +0300 Subject: [PATCH 217/429] restructure docs --- docs/apireference.rst | 69 ++++++++++++++++++++++++++++++++----------- ydb/aio/__init__.py | 2 +- 2 files changed, 53 insertions(+), 18 deletions(-) diff --git a/docs/apireference.rst b/docs/apireference.rst index 82960198..39960526 100644 --- a/docs/apireference.rst +++ b/docs/apireference.rst @@ -10,48 +10,80 @@ YDB API Reference Driver ------ -.. autoclass:: ydb.Driver +DriverConfig +^^^^^^^^^^^^ + +.. autoclass:: ydb.DriverConfig :members: :inherited-members: :undoc-members: + :exclude-members: database, ca_cert, channel_options, secure_channel, endpoint, endpoints, credentials, use_all_nodes, root_certificates, certificate_chain, private_key, grpc_keep_alive_timeout, table_client_settings, primary_user_agent -.. autoclass:: ydb.DriverConfig +Driver +^^^^^^ + +.. autoclass:: ydb.Driver :members: :inherited-members: :undoc-members: - :exclude-members: database, ca_cert, channel_options, secure_channel, endpoint, endpoints, credentials, use_all_nodes, root_certificates, certificate_chain, private_key, grpc_keep_alive_timeout, table_client_settings, primary_user_agent -AsyncIO -~~~~~~~~~~~~~ +Driver (AsyncIO) +^^^^^^^^^^^^^^^ .. autoclass:: ydb.aio.Driver :members: :inherited-members: :undoc-members: - ------------------------ Common ------------- +BaseRequestSettings +^^^^^^^^^^^^^^^^^^^ + .. autoclass:: ydb.BaseRequestSettings :members: :inherited-members: :undoc-members: + +Result Sets +^^^^^^^^^^^ + +.. autoclass:: ydb.convert._ResultSet + :members: + :inherited-members: + :undoc-members: + + ------------------------ Query Service ------------- +QueryClientSettings +^^^^^^^^^^^^^^^^^^^ + +.. autoclass:: ydb.QueryClientSettings + :members: + :inherited-members: + :undoc-members: + + +QuerySessionPool +^^^^^^^^^^^^^^^^ + .. autoclass:: ydb.QuerySessionPool :members: :inherited-members: :undoc-members: +QuerySession +^^^^^^^^^^^^ .. autoclass:: ydb.QuerySession :members: @@ -59,30 +91,42 @@ Query Service :undoc-members: +QueryTxContext +^^^^^^^^^^^^^^ + .. autoclass:: ydb.QueryTxContext :members: :inherited-members: :undoc-members: -AsyncIO -~~~~~~~ +QuerySessionPool (AsyncIO) +^^^^^^^^^^^^^^^^^^^^^^^^^^ .. autoclass:: ydb.aio.QuerySessionPool :members: :inherited-members: :undoc-members: + +QuerySession (AsyncIO) +^^^^^^^^^^^^^^^^^^^^^^ + .. autoclass:: ydb.aio.QuerySession :members: :inherited-members: :undoc-members: + +QueryTxContext (AsyncIO) +^^^^^^^^^^^^^^^^^^^^^^^^ + .. autoclass:: ydb.aio.QueryTxContext :members: :inherited-members: :undoc-members: + ------------------------ Table Service @@ -150,12 +194,3 @@ SchemeClient ------------------ -Result Sets ------------ - -.. autoclass:: ydb.convert._ResultSet - :members: - :inherited-members: - :undoc-members: - ------------------------------ diff --git a/ydb/aio/__init__.py b/ydb/aio/__init__.py index a755713d..1c9c887c 100644 --- a/ydb/aio/__init__.py +++ b/ydb/aio/__init__.py @@ -1,3 +1,3 @@ from .driver import Driver # noqa from .table import SessionPool, retry_operation # noqa -from .query import QuerySessionPool, QuerySession # noqa +from .query import QuerySessionPool, QuerySession, QueryTxContext # noqa From e0507bfdb30dca4872810c4a0b8111f98fe85ba0 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 17:39:35 +0300 Subject: [PATCH 218/429] reformat headers in docs --- docs/apireference.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/apireference.rst b/docs/apireference.rst index 39960526..4832e103 100644 --- a/docs/apireference.rst +++ b/docs/apireference.rst @@ -133,14 +133,14 @@ Table Service ------------- TableClient -~~~~~~~~~~~ +^^^^^^^^^^^ .. autoclass:: ydb.TableClient :members: :inherited-members: :undoc-members: TableClientSettings -~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^ .. autoclass:: ydb.TableClientSettings :members: @@ -148,7 +148,7 @@ TableClientSettings :undoc-members: Session Pool -~~~~~~~~~~~~ +^^^^^^^^^^^^ .. autoclass:: ydb.SessionPool :members: @@ -156,7 +156,7 @@ Session Pool :undoc-members: Session -~~~~~~~ +^^^^^^^ .. autoclass:: ydb.Session :members: @@ -164,7 +164,7 @@ Session :undoc-members: Transaction Context -~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^ .. autoclass:: ydb.TxContext :members: @@ -172,7 +172,7 @@ Transaction Context :undoc-members: DataQuery ---------- +^^^^^^^^^ .. autoclass:: ydb.DataQuery :members: @@ -185,7 +185,7 @@ Scheme ------ SchemeClient -~~~~~~~~~~~~ +^^^^^^^^^^^^ .. autoclass:: ydb.SchemeClient :members: From 3f817460e4990a89ff3244c35b163ab1b324bbbd Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 17:41:19 +0300 Subject: [PATCH 219/429] exclude slots from BaseRequestSettings docs --- docs/apireference.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/apireference.rst b/docs/apireference.rst index 4832e103..a20f7de3 100644 --- a/docs/apireference.rst +++ b/docs/apireference.rst @@ -49,6 +49,7 @@ BaseRequestSettings :members: :inherited-members: :undoc-members: + :exclude-members: trace_id, request_type, timeout, cancel_after, operation_timeout, compression, need_rpc_auth, headers, make_copy, tracer Result Sets From cdae01eac4c8da1fae3a45bf1095ba2488c752d2 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 17:49:37 +0300 Subject: [PATCH 220/429] Add query tx modes to docs --- docs/apireference.rst | 38 +++++++++++++++++++ .../grpcwrapper/ydb_query_public_types.py | 22 +++++++++++ ydb/query/__init__.py | 4 +- 3 files changed, 63 insertions(+), 1 deletion(-) diff --git a/docs/apireference.rst b/docs/apireference.rst index a20f7de3..f4f10cbd 100644 --- a/docs/apireference.rst +++ b/docs/apireference.rst @@ -128,6 +128,44 @@ QueryTxContext (AsyncIO) :undoc-members: +Query Tx Mode +^^^^^^^^^^^^^ + +.. autoclass:: ydb.BaseQueryTxMode + :members: + :inherited-members: + :undoc-members: + :exclude-members: name, to_proto + + +.. autoclass:: ydb.QueryOnlineReadOnly + :members: + :inherited-members: + :undoc-members: + :exclude-members: name, to_proto + + +.. autoclass:: ydb.QuerySerializableReadWrite + :members: + :inherited-members: + :undoc-members: + :exclude-members: name, to_proto + + +.. autoclass:: ydb.QuerySnapshotReadOnly + :members: + :inherited-members: + :undoc-members: + :exclude-members: name, to_proto + + +.. autoclass:: ydb.QueryStaleReadOnly + :members: + :inherited-members: + :undoc-members: + :exclude-members: name, to_proto + + ------------------------ Table Service diff --git a/ydb/_grpc/grpcwrapper/ydb_query_public_types.py b/ydb/_grpc/grpcwrapper/ydb_query_public_types.py index d79a2967..23c3c4f9 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query_public_types.py +++ b/ydb/_grpc/grpcwrapper/ydb_query_public_types.py @@ -11,6 +11,7 @@ class BaseQueryTxMode(IToProto): + """Abstract class for Query Transaction Modes.""" @property @abc.abstractmethod def name(self) -> str: @@ -18,6 +19,10 @@ def name(self) -> str: class QuerySnapshotReadOnly(BaseQueryTxMode): + """All the read operations within a transaction access the database snapshot. + All the data reads are consistent. The snapshot is taken when the transaction begins, + meaning the transaction sees all changes committed before it began. + """ def __init__(self): self._name = "snapshot_read_only" @@ -30,6 +35,9 @@ def to_proto(self) -> ydb_query_pb2.SnapshotModeSettings: class QuerySerializableReadWrite(BaseQueryTxMode): + """This mode guarantees that the result of successful parallel transactions is equivalent + to their serial execution, and there are no read anomalies for successful transactions. + """ def __init__(self): self._name = "serializable_read_write" @@ -42,6 +50,15 @@ def to_proto(self) -> ydb_query_pb2.SerializableModeSettings: class QueryOnlineReadOnly(BaseQueryTxMode): + """Each read operation in the transaction is reading the data that is most recent at execution time. + The consistency of retrieved data depends on the allow_inconsistent_reads setting: + * false (consistent reads): Each individual read operation returns consistent data, + but no consistency is guaranteed between reads. + Reading the same table range twice may return different results. + * true (inconsistent reads): Even the data fetched by a particular + read operation may contain inconsistent results. + """ + def __init__(self, allow_inconsistent_reads: bool = False): self.allow_inconsistent_reads = allow_inconsistent_reads self._name = "online_read_only" @@ -55,6 +72,11 @@ def to_proto(self) -> ydb_query_pb2.OnlineModeSettings: class QueryStaleReadOnly(BaseQueryTxMode): + """Read operations within a transaction may return results that are slightly out-of-date + (lagging by fractions of a second). Each individual read returns consistent data, + but no consistency between different reads is guaranteed. + """ + def __init__(self): self._name = "stale_read_only" diff --git a/ydb/query/__init__.py b/ydb/query/__init__.py index 7431332e..0f818789 100644 --- a/ydb/query/__init__.py +++ b/ydb/query/__init__.py @@ -1,10 +1,11 @@ __all__ = [ + "BaseQueryTxMode", "QueryOnlineReadOnly", "QuerySerializableReadWrite", "QuerySnapshotReadOnly", "QueryStaleReadOnly", "QuerySessionPool", - "QueryClientSync", + "QueryClientSettings", "QuerySession", "QueryTxContext", ] @@ -20,6 +21,7 @@ from .._grpc.grpcwrapper import common_utils from .._grpc.grpcwrapper.ydb_query_public_types import ( + BaseQueryTxMode, QueryOnlineReadOnly, QuerySerializableReadWrite, QuerySnapshotReadOnly, From 1dbbd3fa7c6d0c1d0f7201678d854c5897a40e42 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 18:07:16 +0300 Subject: [PATCH 221/429] add retrysettings to docs --- docs/apireference.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/apireference.rst b/docs/apireference.rst index f4f10cbd..52cf78a4 100644 --- a/docs/apireference.rst +++ b/docs/apireference.rst @@ -52,6 +52,14 @@ BaseRequestSettings :exclude-members: trace_id, request_type, timeout, cancel_after, operation_timeout, compression, need_rpc_auth, headers, make_copy, tracer +RetrySettings +^^^^^^^^^^^^^ + +.. autoclass:: ydb.RetrySettings + :members: + :inherited-members: + :undoc-members: + Result Sets ^^^^^^^^^^^ From 0abe50bc5459697cd95f0ad1ee5f50f71fca8d15 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 18:09:37 +0300 Subject: [PATCH 222/429] small fixes --- docs/apireference.rst | 1 + docs/overview.rst | 6 +----- ydb/_grpc/grpcwrapper/ydb_query_public_types.py | 3 +++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/apireference.rst b/docs/apireference.rst index 52cf78a4..1d6a2821 100644 --- a/docs/apireference.rst +++ b/docs/apireference.rst @@ -60,6 +60,7 @@ RetrySettings :inherited-members: :undoc-members: + Result Sets ^^^^^^^^^^^ diff --git a/docs/overview.rst b/docs/overview.rst index 4313b91c..81abf94d 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -14,11 +14,7 @@ The most recent published version of this documentation should be at https://ydb Community --------- -You can ask your questions in official Telegram chats: - -* **EN** `YDB chat `_. -* **RU** `YDB chat `_. - +You can ask your questions in official Telegram chats: `EN `_ | `RU `_. Bugs and feature enhancements to YDB Python SDK should be reported on the `GitHub issue tracker diff --git a/ydb/_grpc/grpcwrapper/ydb_query_public_types.py b/ydb/_grpc/grpcwrapper/ydb_query_public_types.py index 23c3c4f9..9888a677 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query_public_types.py +++ b/ydb/_grpc/grpcwrapper/ydb_query_public_types.py @@ -12,6 +12,7 @@ class BaseQueryTxMode(IToProto): """Abstract class for Query Transaction Modes.""" + @property @abc.abstractmethod def name(self) -> str: @@ -23,6 +24,7 @@ class QuerySnapshotReadOnly(BaseQueryTxMode): All the data reads are consistent. The snapshot is taken when the transaction begins, meaning the transaction sees all changes committed before it began. """ + def __init__(self): self._name = "snapshot_read_only" @@ -38,6 +40,7 @@ class QuerySerializableReadWrite(BaseQueryTxMode): """This mode guarantees that the result of successful parallel transactions is equivalent to their serial execution, and there are no read anomalies for successful transactions. """ + def __init__(self): self._name = "serializable_read_write" From 52c6fece4a5db228d777269071963c12d4ceb320 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Sep 2024 18:22:32 +0300 Subject: [PATCH 223/429] remove source button from docs --- docs/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 761a37ca..13d7e22d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -92,6 +92,8 @@ html_logo = '_static/logo.svg' html_favicon = '_static/logo.svg' +html_show_sourcelink = False + # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. From 6a6b2234e3484d08dd7e6dd9f3cbbbdc4eafec8a Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 11 Sep 2024 10:51:23 +0300 Subject: [PATCH 224/429] refactor docstrings --- ydb/aio/query/pool.py | 17 ++++++++++++++++- ydb/aio/query/session.py | 1 + ydb/aio/query/transaction.py | 1 + ydb/query/pool.py | 24 ++++++++++++++++++++++-- ydb/query/session.py | 2 ++ ydb/query/transaction.py | 1 + 6 files changed, 43 insertions(+), 3 deletions(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index f0b962c3..e8d53438 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -44,6 +44,13 @@ async def _create_new_session(self): return session async def acquire(self) -> QuerySession: + """WARNING: This API is experimental and could be changed. + + Acquire a session from Session Pool. + + :return A QuerySession object. + """ + if self._should_stop.is_set(): logger.error("An attempt to take session from closed session pool.") raise RuntimeError("An attempt to take session from closed session pool.") @@ -79,12 +86,18 @@ async def acquire(self) -> QuerySession: return session async def release(self, session: QuerySession) -> None: + """WARNING: This API is experimental and could be changed. + + Release a session back to Session Pool. + """ + self._queue.put_nowait(session) logger.debug("Session returned to queue: %s", session._state.session_id) def checkout(self) -> "SimpleQuerySessionCheckoutAsync": """WARNING: This API is experimental and could be changed. - Return a Session context manager, that opens session on enter and closes session on exit. + + Return a Session context manager, that acquires session on enter and releases session on exit. """ return SimpleQuerySessionCheckoutAsync(self) @@ -93,6 +106,7 @@ async def retry_operation_async( self, callee: Callable, retry_settings: Optional[RetrySettings] = None, *args, **kwargs ): """WARNING: This API is experimental and could be changed. + Special interface to execute a bunch of commands with session in a safe, retriable way. :param callee: A function, that works with session. @@ -118,6 +132,7 @@ async def execute_with_retries( **kwargs, ) -> List[convert.ResultSet]: """WARNING: This API is experimental and could be changed. + Special interface to execute a one-shot queries in a safe, retriable way. Note: this method loads all data from stream before return, do not use this method with huge read queries. diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index 5f51b671..4c1c1a10 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -116,6 +116,7 @@ async def execute( """WARNING: This API is experimental and could be changed. Sends a query to Query Service + :param query: (YQL or SQL text) to be executed. :param syntax: Syntax of the query, which is a one from the following choises: 1) QuerySyntax.YQL_V1, which is default; diff --git a/ydb/aio/query/transaction.py b/ydb/aio/query/transaction.py index 0e3ab602..b115a4b4 100644 --- a/ydb/aio/query/transaction.py +++ b/ydb/aio/query/transaction.py @@ -114,6 +114,7 @@ async def execute( """WARNING: This API is experimental and could be changed. Sends a query to Query Service + :param query: (YQL or SQL text) to be executed. :param parameters: dict with parameters and YDB types; :param commit_tx: A special flag that allows transaction commit. diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 1ee9ea83..839d8688 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -29,7 +29,8 @@ class QuerySessionPool: def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): """ - :param driver: A driver instance + :param driver: A driver instance. + :param size: Max size of Session Pool. """ logger.warning("QuerySessionPool is an experimental API, which could be changed.") @@ -47,6 +48,15 @@ def _create_new_session(self, timeout: Optional[float]): return session def acquire(self, timeout: Optional[float] = None) -> QuerySession: + """WARNING: This API is experimental and could be changed. + + Acquire a session from Session Pool. + + :param timeout: A timeout to wait in seconds. + + :return A QuerySession object. + """ + start = time.monotonic() lock_acquire_timeout = timeout if timeout is not None else -1 @@ -92,18 +102,27 @@ def acquire(self, timeout: Optional[float] = None) -> QuerySession: self._lock.release() def release(self, session: QuerySession) -> None: + """WARNING: This API is experimental and could be changed. + + Release a session back to Session Pool. + """ + self._queue.put_nowait(session) logger.debug("Session returned to queue: %s", session._state.session_id) def checkout(self, timeout: Optional[float] = None) -> "SimpleQuerySessionCheckout": """WARNING: This API is experimental and could be changed. - Return a Session context manager, that opens session on enter and closes session on exit. + + Return a Session context manager, that acquires session on enter and releases session on exit. + + :param timeout: A timeout to wait in seconds. """ return SimpleQuerySessionCheckout(self, timeout) def retry_operation_sync(self, callee: Callable, retry_settings: Optional[RetrySettings] = None, *args, **kwargs): """WARNING: This API is experimental and could be changed. + Special interface to execute a bunch of commands with session in a safe, retriable way. :param callee: A function, that works with session. @@ -129,6 +148,7 @@ def execute_with_retries( **kwargs, ) -> List[convert.ResultSet]: """WARNING: This API is experimental and could be changed. + Special interface to execute a one-shot queries in a safe, retriable way. Note: this method loads all data from stream before return, do not use this method with huge read queries. diff --git a/ydb/query/session.py b/ydb/query/session.py index 66e86501..5b4db26c 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -269,6 +269,7 @@ def transaction(self, tx_mode: Optional[base.BaseQueryTxMode] = None) -> QueryTx """WARNING: This API is experimental and could be changed. Creates a transaction context manager with specified transaction mode. + :param tx_mode: Transaction mode, which is a one from the following choises: 1) QuerySerializableReadWrite() which is default mode; 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); @@ -301,6 +302,7 @@ def execute( """WARNING: This API is experimental and could be changed. Sends a query to Query Service + :param query: (YQL or SQL text) to be executed. :param syntax: Syntax of the query, which is a one from the following choises: 1) QuerySyntax.YQL_V1, which is default; diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 9ad3552f..21ba0279 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -394,6 +394,7 @@ def execute( """WARNING: This API is experimental and could be changed. Sends a query to Query Service + :param query: (YQL or SQL text) to be executed. :param parameters: dict with parameters and YDB types; :param commit_tx: A special flag that allows transaction commit. From 6289a11bb3541f413f31c7d39f883545181a6ec7 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 11 Sep 2024 15:35:43 +0300 Subject: [PATCH 225/429] Add an ability to create async indexes --- ydb/table.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ydb/table.py b/ydb/table.py index ac9f9304..cfcffb17 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -297,6 +297,10 @@ def with_global_index(self): self._pb.global_index.SetInParent() return self + def with_global_async_index(self): + self._pb.global_async_index.SetInParent() + return self + def with_index_columns(self, *columns): for column in columns: self._pb.index_columns.append(column) From 610697ff6d2b15425358df1a9809fed69c97106f Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 11 Sep 2024 15:42:28 +0300 Subject: [PATCH 226/429] change target branch to main for docs --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 97dc09d0..07b7645f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,7 +2,7 @@ name: Deploy Sphinx documentation to Github Pages on: push: - branches: [master, autogenetated_docs] # branch to trigger deployment + branches: [main] # branch to trigger deployment jobs: pages: From 2e94f73c88c986277584dce32ef1fa50aa228fcd Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 11 Sep 2024 15:59:50 +0300 Subject: [PATCH 227/429] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 762bc52e..e3db58ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +* New autogenerated docs +* Add an ability to create async index + ## 3.17.0 ## * Query Session Pool redesign From ce35b8476df995b1c6dc7fd6b0add2d51da29b23 Mon Sep 17 00:00:00 2001 From: robot Date: Wed, 11 Sep 2024 13:00:42 +0000 Subject: [PATCH 228/429] Release: 3.17.1 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3db58ac..385b0188 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.17.1 ## * New autogenerated docs * Add an ability to create async index diff --git a/setup.py b/setup.py index 8b765b93..b8df2dd1 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.17.0", # AUTOVERSION + version="3.17.1", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 8bc0d971..b0ef9f36 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.17.0" +VERSION = "3.17.1" From 47b04602ab0ac5ce4fa77c42b95051035267c7b6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 17 Sep 2024 15:59:19 +0300 Subject: [PATCH 229/429] Add data_columns support in TableIndex --- ydb/table.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ydb/table.py b/ydb/table.py index cfcffb17..01f5e52b 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -290,6 +290,7 @@ def __init__(self, name): self._pb.name = name self.name = name self.index_columns = [] + self.data_columns = [] # output only. self.status = None @@ -307,6 +308,12 @@ def with_index_columns(self, *columns): self.index_columns.append(column) return self + def with_data_columns(self, *columns): + for column in columns: + self._pb.data_columns.append(column) + self.data_columns.append(column) + return self + def to_pb(self): return self._pb From 07406de5e01b94c5211636d75f11462a1e693ec3 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 17 Sep 2024 16:27:30 +0300 Subject: [PATCH 230/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 385b0188..5b058f7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Add data_columns support in TableIndex + ## 3.17.1 ## * New autogenerated docs * Add an ability to create async index From 67dfc170685d394da5f85890c80817fee7c4dc58 Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 17 Sep 2024 13:28:26 +0000 Subject: [PATCH 231/429] Release: 3.17.2 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b058f7a..aad3897f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.17.2 ## * Add data_columns support in TableIndex ## 3.17.1 ## diff --git a/setup.py b/setup.py index b8df2dd1..c3c4cd3e 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.17.1", # AUTOVERSION + version="3.17.2", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index b0ef9f36..1115cbbc 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.17.1" +VERSION = "3.17.2" From b6c02ea2060423ee32f5fceef979cb98bbfff9ff Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 19 Sep 2024 14:22:06 +0300 Subject: [PATCH 232/429] Remove experimental warn from query service --- ydb/aio/query/pool.py | 21 +++++---------------- ydb/aio/query/session.py | 12 +++--------- ydb/aio/query/transaction.py | 16 ++++------------ ydb/query/__init__.py | 1 - ydb/query/pool.py | 21 +++++---------------- ydb/query/session.py | 16 ++++------------ ydb/query/transaction.py | 16 ++++------------ 7 files changed, 25 insertions(+), 78 deletions(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index e8d53438..086e326a 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -28,7 +28,6 @@ def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): :param size: Size of session pool """ - logger.warning("QuerySessionPool is an experimental API, which could be changed.") self._driver = driver self._size = size self._should_stop = asyncio.Event() @@ -44,9 +43,7 @@ async def _create_new_session(self): return session async def acquire(self) -> QuerySession: - """WARNING: This API is experimental and could be changed. - - Acquire a session from Session Pool. + """Acquire a session from Session Pool. :return A QuerySession object. """ @@ -86,18 +83,14 @@ async def acquire(self) -> QuerySession: return session async def release(self, session: QuerySession) -> None: - """WARNING: This API is experimental and could be changed. - - Release a session back to Session Pool. + """Release a session back to Session Pool. """ self._queue.put_nowait(session) logger.debug("Session returned to queue: %s", session._state.session_id) def checkout(self) -> "SimpleQuerySessionCheckoutAsync": - """WARNING: This API is experimental and could be changed. - - Return a Session context manager, that acquires session on enter and releases session on exit. + """Return a Session context manager, that acquires session on enter and releases session on exit. """ return SimpleQuerySessionCheckoutAsync(self) @@ -105,9 +98,7 @@ def checkout(self) -> "SimpleQuerySessionCheckoutAsync": async def retry_operation_async( self, callee: Callable, retry_settings: Optional[RetrySettings] = None, *args, **kwargs ): - """WARNING: This API is experimental and could be changed. - - Special interface to execute a bunch of commands with session in a safe, retriable way. + """Special interface to execute a bunch of commands with session in a safe, retriable way. :param callee: A function, that works with session. :param retry_settings: RetrySettings object. @@ -131,9 +122,7 @@ async def execute_with_retries( *args, **kwargs, ) -> List[convert.ResultSet]: - """WARNING: This API is experimental and could be changed. - - Special interface to execute a one-shot queries in a safe, retriable way. + """Special interface to execute a one-shot queries in a safe, retriable way. Note: this method loads all data from stream before return, do not use this method with huge read queries. diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index 4c1c1a10..779eb3f0 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -64,9 +64,7 @@ async def _check_session_status_loop(self) -> None: self._state._change_state(QuerySessionStateEnum.CLOSED) async def delete(self, settings: Optional[BaseRequestSettings] = None) -> None: - """WARNING: This API is experimental and could be changed. - - Deletes a Session of Query Service on server side and releases resources. + """Deletes a Session of Query Service on server side and releases resources. :return: None """ @@ -78,9 +76,7 @@ async def delete(self, settings: Optional[BaseRequestSettings] = None) -> None: self._stream.cancel() async def create(self, settings: Optional[BaseRequestSettings] = None) -> "QuerySession": - """WARNING: This API is experimental and could be changed. - - Creates a Session of Query Service on server side and attaches it. + """Creates a Session of Query Service on server side and attaches it. :return: QuerySession object. """ @@ -113,9 +109,7 @@ async def execute( concurrent_result_sets: bool = False, settings: Optional[BaseRequestSettings] = None, ) -> AsyncResponseContextIterator: - """WARNING: This API is experimental and could be changed. - - Sends a query to Query Service + """Sends a query to Query Service :param query: (YQL or SQL text) to be executed. :param syntax: Syntax of the query, which is a one from the following choises: diff --git a/ydb/aio/query/transaction.py b/ydb/aio/query/transaction.py index b115a4b4..5b63a32b 100644 --- a/ydb/aio/query/transaction.py +++ b/ydb/aio/query/transaction.py @@ -48,9 +48,7 @@ async def _ensure_prev_stream_finished(self) -> None: self._prev_stream = None async def begin(self, settings: Optional[BaseRequestSettings] = None) -> "QueryTxContext": - """WARNING: This API is experimental and could be changed. - - Explicitly begins a transaction + """Explicitly begins a transaction :param settings: An additional request settings BaseRequestSettings; @@ -60,9 +58,7 @@ async def begin(self, settings: Optional[BaseRequestSettings] = None) -> "QueryT return self async def commit(self, settings: Optional[BaseRequestSettings] = None) -> None: - """WARNING: This API is experimental and could be changed. - - Calls commit on a transaction if it is open otherwise is no-op. If transaction execution + """Calls commit on a transaction if it is open otherwise is no-op. If transaction execution failed then this method raises PreconditionFailed. :param settings: An additional request settings BaseRequestSettings; @@ -81,9 +77,7 @@ async def commit(self, settings: Optional[BaseRequestSettings] = None) -> None: await self._commit_call(settings) async def rollback(self, settings: Optional[BaseRequestSettings] = None) -> None: - """WARNING: This API is experimental and could be changed. - - Calls rollback on a transaction if it is open otherwise is no-op. If transaction execution + """Calls rollback on a transaction if it is open otherwise is no-op. If transaction execution failed then this method raises PreconditionFailed. :param settings: An additional request settings BaseRequestSettings; @@ -111,9 +105,7 @@ async def execute( concurrent_result_sets: Optional[bool] = False, settings: Optional[BaseRequestSettings] = None, ) -> AsyncResponseContextIterator: - """WARNING: This API is experimental and could be changed. - - Sends a query to Query Service + """Sends a query to Query Service :param query: (YQL or SQL text) to be executed. :param parameters: dict with parameters and YDB types; diff --git a/ydb/query/__init__.py b/ydb/query/__init__.py index 0f818789..59dd7992 100644 --- a/ydb/query/__init__.py +++ b/ydb/query/__init__.py @@ -35,7 +35,6 @@ class QueryClientSync: def __init__(self, driver: common_utils.SupportedDriverType, query_client_settings: QueryClientSettings = None): - logger.warning("QueryClientSync is an experimental API, which could be changed.") self._driver = driver self._settings = query_client_settings diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 839d8688..fa220bb5 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -33,7 +33,6 @@ def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): :param size: Max size of Session Pool. """ - logger.warning("QuerySessionPool is an experimental API, which could be changed.") self._driver = driver self._queue = queue.Queue() self._current_size = 0 @@ -48,9 +47,7 @@ def _create_new_session(self, timeout: Optional[float]): return session def acquire(self, timeout: Optional[float] = None) -> QuerySession: - """WARNING: This API is experimental and could be changed. - - Acquire a session from Session Pool. + """Acquire a session from Session Pool. :param timeout: A timeout to wait in seconds. @@ -102,18 +99,14 @@ def acquire(self, timeout: Optional[float] = None) -> QuerySession: self._lock.release() def release(self, session: QuerySession) -> None: - """WARNING: This API is experimental and could be changed. - - Release a session back to Session Pool. + """Release a session back to Session Pool. """ self._queue.put_nowait(session) logger.debug("Session returned to queue: %s", session._state.session_id) def checkout(self, timeout: Optional[float] = None) -> "SimpleQuerySessionCheckout": - """WARNING: This API is experimental and could be changed. - - Return a Session context manager, that acquires session on enter and releases session on exit. + """Return a Session context manager, that acquires session on enter and releases session on exit. :param timeout: A timeout to wait in seconds. """ @@ -121,9 +114,7 @@ def checkout(self, timeout: Optional[float] = None) -> "SimpleQuerySessionChecko return SimpleQuerySessionCheckout(self, timeout) def retry_operation_sync(self, callee: Callable, retry_settings: Optional[RetrySettings] = None, *args, **kwargs): - """WARNING: This API is experimental and could be changed. - - Special interface to execute a bunch of commands with session in a safe, retriable way. + """Special interface to execute a bunch of commands with session in a safe, retriable way. :param callee: A function, that works with session. :param retry_settings: RetrySettings object. @@ -147,9 +138,7 @@ def execute_with_retries( *args, **kwargs, ) -> List[convert.ResultSet]: - """WARNING: This API is experimental and could be changed. - - Special interface to execute a one-shot queries in a safe, retriable way. + """Special interface to execute a one-shot queries in a safe, retriable way. Note: this method loads all data from stream before return, do not use this method with huge read queries. diff --git a/ydb/query/session.py b/ydb/query/session.py index 5b4db26c..e13540d3 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -235,9 +235,7 @@ def _check_session_status_loop(self, status_stream: _utilities.SyncResponseItera self._state._change_state(QuerySessionStateEnum.CLOSED) def delete(self, settings: Optional[BaseRequestSettings] = None) -> None: - """WARNING: This API is experimental and could be changed. - - Deletes a Session of Query Service on server side and releases resources. + """Deletes a Session of Query Service on server side and releases resources. :return: None """ @@ -249,9 +247,7 @@ def delete(self, settings: Optional[BaseRequestSettings] = None) -> None: self._stream.cancel() def create(self, settings: Optional[BaseRequestSettings] = None) -> "QuerySession": - """WARNING: This API is experimental and could be changed. - - Creates a Session of Query Service on server side and attaches it. + """Creates a Session of Query Service on server side and attaches it. :return: QuerySession object. """ @@ -266,9 +262,7 @@ def create(self, settings: Optional[BaseRequestSettings] = None) -> "QuerySessio return self def transaction(self, tx_mode: Optional[base.BaseQueryTxMode] = None) -> QueryTxContext: - """WARNING: This API is experimental and could be changed. - - Creates a transaction context manager with specified transaction mode. + """Creates a transaction context manager with specified transaction mode. :param tx_mode: Transaction mode, which is a one from the following choises: 1) QuerySerializableReadWrite() which is default mode; @@ -299,9 +293,7 @@ def execute( concurrent_result_sets: bool = False, settings: Optional[BaseRequestSettings] = None, ) -> base.SyncResponseContextIterator: - """WARNING: This API is experimental and could be changed. - - Sends a query to Query Service + """Sends a query to Query Service :param query: (YQL or SQL text) to be executed. :param syntax: Syntax of the query, which is a one from the following choises: diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 21ba0279..d9c0dfcb 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -327,9 +327,7 @@ def _ensure_prev_stream_finished(self) -> None: self._prev_stream = None def begin(self, settings: Optional[BaseRequestSettings] = None) -> "QueryTxContext": - """WARNING: This API is experimental and could be changed. - - Explicitly begins a transaction + """Explicitly begins a transaction :param settings: An additional request settings BaseRequestSettings; @@ -340,9 +338,7 @@ def begin(self, settings: Optional[BaseRequestSettings] = None) -> "QueryTxConte return self def commit(self, settings: Optional[BaseRequestSettings] = None) -> None: - """WARNING: This API is experimental and could be changed. - - Calls commit on a transaction if it is open otherwise is no-op. If transaction execution + """Calls commit on a transaction if it is open otherwise is no-op. If transaction execution failed then this method raises PreconditionFailed. :param settings: An additional request settings BaseRequestSettings; @@ -361,9 +357,7 @@ def commit(self, settings: Optional[BaseRequestSettings] = None) -> None: self._commit_call(settings) def rollback(self, settings: Optional[BaseRequestSettings] = None) -> None: - """WARNING: This API is experimental and could be changed. - - Calls rollback on a transaction if it is open otherwise is no-op. If transaction execution + """Calls rollback on a transaction if it is open otherwise is no-op. If transaction execution failed then this method raises PreconditionFailed. :param settings: An additional request settings BaseRequestSettings; @@ -391,9 +385,7 @@ def execute( concurrent_result_sets: Optional[bool] = False, settings: Optional[BaseRequestSettings] = None, ) -> base.SyncResponseContextIterator: - """WARNING: This API is experimental and could be changed. - - Sends a query to Query Service + """Sends a query to Query Service :param query: (YQL or SQL text) to be executed. :param parameters: dict with parameters and YDB types; From e1c83d5066f3ec18ba5e20b46d36b410770b5cc2 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 19 Sep 2024 14:25:25 +0300 Subject: [PATCH 233/429] style fixes --- ydb/aio/query/pool.py | 6 ++---- ydb/query/pool.py | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 086e326a..6d116600 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -83,15 +83,13 @@ async def acquire(self) -> QuerySession: return session async def release(self, session: QuerySession) -> None: - """Release a session back to Session Pool. - """ + """Release a session back to Session Pool.""" self._queue.put_nowait(session) logger.debug("Session returned to queue: %s", session._state.session_id) def checkout(self) -> "SimpleQuerySessionCheckoutAsync": - """Return a Session context manager, that acquires session on enter and releases session on exit. - """ + """Return a Session context manager, that acquires session on enter and releases session on exit.""" return SimpleQuerySessionCheckoutAsync(self) diff --git a/ydb/query/pool.py b/ydb/query/pool.py index fa220bb5..4c51a971 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -99,8 +99,7 @@ def acquire(self, timeout: Optional[float] = None) -> QuerySession: self._lock.release() def release(self, session: QuerySession) -> None: - """Release a session back to Session Pool. - """ + """Release a session back to Session Pool.""" self._queue.put_nowait(session) logger.debug("Session returned to queue: %s", session._state.session_id) From 8928b00dc94a177033ed39a9746f6720da45b7c8 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 19 Sep 2024 15:00:30 +0300 Subject: [PATCH 234/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aad3897f..c72ecbca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Remove experimental warn from query service + ## 3.17.2 ## * Add data_columns support in TableIndex From 2e6ad265ba8386d24d1bb7d1f7ac830a21ca9aed Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 24 Sep 2024 13:58:45 +0300 Subject: [PATCH 235/429] Ability to batch messages in topic reader --- tests/topics/test_topic_reader.py | 21 ++++++------- tests/topics/test_topic_writer.py | 30 +++++++++--------- ydb/_topic_reader/topic_reader_asyncio.py | 38 ++++++++++++++++------- 3 files changed, 51 insertions(+), 38 deletions(-) diff --git a/tests/topics/test_topic_reader.py b/tests/topics/test_topic_reader.py index 362be059..74c8bccd 100644 --- a/tests/topics/test_topic_reader.py +++ b/tests/topics/test_topic_reader.py @@ -40,15 +40,14 @@ async def test_read_and_commit_with_close_reader(self, driver, topic_with_messag assert message != message2 async def test_read_and_commit_with_ack(self, driver, topic_with_messages, topic_consumer): - reader = driver.topic_client.reader(topic_with_messages, topic_consumer) - batch = await reader.receive_batch() - await reader.commit_with_ack(batch) + async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: + message = await reader.receive_message() + await reader.commit_with_ack(message) - reader = driver.topic_client.reader(topic_with_messages, topic_consumer) - batch2 = await reader.receive_batch() - assert batch.messages[0] != batch2.messages[0] + async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: + batch = await reader.receive_batch() - await reader.close() + assert message != batch.messages[0] async def test_read_compressed_messages(self, driver, topic_path, topic_consumer): async with driver.topic_client.writer(topic_path, codec=ydb.TopicCodec.GZIP) as writer: @@ -147,12 +146,12 @@ def test_read_and_commit_with_close_reader(self, driver_sync, topic_with_message def test_read_and_commit_with_ack(self, driver_sync, topic_with_messages, topic_consumer): reader = driver_sync.topic_client.reader(topic_with_messages, topic_consumer) - batch = reader.receive_batch() - reader.commit_with_ack(batch) + message = reader.receive_message() + reader.commit_with_ack(message) reader = driver_sync.topic_client.reader(topic_with_messages, topic_consumer) - batch2 = reader.receive_batch() - assert batch.messages[0] != batch2.messages[0] + batch = reader.receive_batch() + assert message != batch.messages[0] def test_read_compressed_messages(self, driver_sync, topic_path, topic_consumer): with driver_sync.topic_client.writer(topic_path, codec=ydb.TopicCodec.GZIP) as writer: diff --git a/tests/topics/test_topic_writer.py b/tests/topics/test_topic_writer.py index 3817e34d..dfc3cdd0 100644 --- a/tests/topics/test_topic_writer.py +++ b/tests/topics/test_topic_writer.py @@ -41,10 +41,9 @@ async def test_random_producer_id(self, driver: ydb.aio.Driver, topic_path, topi async with driver.topic_client.writer(topic_path) as writer: await writer.write(ydb.TopicWriterMessage(data="123".encode())) - batch1 = await topic_reader.receive_batch() - batch2 = await topic_reader.receive_batch() + batch = await topic_reader.receive_batch() - assert batch1.messages[0].producer_id != batch2.messages[0].producer_id + assert batch.messages[0].producer_id != batch.messages[1].producer_id async def test_auto_flush_on_close(self, driver: ydb.aio.Driver, topic_path): async with driver.topic_client.writer( @@ -83,12 +82,12 @@ async def test_write_multi_message_with_ack( assert batch.messages[0].seqno == 1 assert batch.messages[0].data == "123".encode() - # remove second recieve batch when implement batching - # https://github.com/ydb-platform/ydb-python-sdk/issues/142 - batch = await topic_reader.receive_batch() - assert batch.messages[0].offset == 1 - assert batch.messages[0].seqno == 2 - assert batch.messages[0].data == "456".encode() + # # remove second recieve batch when implement batching + # # https://github.com/ydb-platform/ydb-python-sdk/issues/142 + # batch = await topic_reader.receive_batch() + assert batch.messages[1].offset == 1 + assert batch.messages[1].seqno == 2 + assert batch.messages[1].data == "456".encode() @pytest.mark.parametrize( "codec", @@ -186,10 +185,9 @@ def test_random_producer_id( with driver_sync.topic_client.writer(topic_path) as writer: writer.write(ydb.TopicWriterMessage(data="123".encode())) - batch1 = topic_reader_sync.receive_batch() - batch2 = topic_reader_sync.receive_batch() + batch = topic_reader_sync.receive_batch() - assert batch1.messages[0].producer_id != batch2.messages[0].producer_id + assert batch.messages[0].producer_id != batch.messages[1].producer_id def test_write_multi_message_with_ack( self, driver_sync: ydb.Driver, topic_path, topic_reader_sync: ydb.TopicReader @@ -210,10 +208,10 @@ def test_write_multi_message_with_ack( # remove second recieve batch when implement batching # https://github.com/ydb-platform/ydb-python-sdk/issues/142 - batch = topic_reader_sync.receive_batch() - assert batch.messages[0].offset == 1 - assert batch.messages[0].seqno == 2 - assert batch.messages[0].data == "456".encode() + # batch = topic_reader_sync.receive_batch() + assert batch.messages[1].offset == 1 + assert batch.messages[1].seqno == 2 + assert batch.messages[1].data == "456".encode() @pytest.mark.parametrize( "codec", diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 81c6d9f4..5004d25d 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -3,9 +3,9 @@ import asyncio import concurrent.futures import gzip +import random import typing from asyncio import Task -from collections import deque from typing import Optional, Set, Dict, Union, Callable import ydb @@ -264,7 +264,7 @@ class ReaderStream: _state_changed: asyncio.Event _closed: bool - _message_batches: typing.Deque[datatypes.PublicBatch] + _message_batches: typing.Dict[int, datatypes.PublicBatch] _first_error: asyncio.Future[YdbError] _update_token_interval: Union[int, float] @@ -296,7 +296,7 @@ def __init__( self._closed = False self._first_error = asyncio.get_running_loop().create_future() self._batches_to_decode = asyncio.Queue() - self._message_batches = deque() + self._message_batches = dict() self._update_token_interval = settings.update_token_interval self._get_token_function = get_token_function @@ -359,6 +359,10 @@ async def wait_messages(self): await self._state_changed.wait() self._state_changed.clear() + def _get_random_batch(self): + rnd_id = random.choice(list(self._message_batches.keys())) + return rnd_id, self._message_batches[rnd_id] + def receive_batch_nowait(self): if self._get_first_error(): raise self._get_first_error() @@ -366,22 +370,25 @@ def receive_batch_nowait(self): if not self._message_batches: return None - batch = self._message_batches.popleft() + part_sess_id, batch = self._get_random_batch() self._buffer_release_bytes(batch._bytes_size) + del self._message_batches[part_sess_id] + return batch def receive_message_nowait(self): if self._get_first_error(): raise self._get_first_error() - try: - batch = self._message_batches[0] - message = batch.pop_message() - except IndexError: + if not self._message_batches: return None - if batch.empty(): - self.receive_batch_nowait() + part_sess_id, batch = self._get_random_batch() + + message = batch.messages.pop(0) + if len(batch.messages) == 0: + self._buffer_release_bytes(batch._bytes_size) + del self._message_batches[part_sess_id] return message @@ -605,9 +612,18 @@ async def _decode_batches_loop(self): while True: batch = await self._batches_to_decode.get() await self._decode_batch_inplace(batch) - self._message_batches.append(batch) + self._add_batch_to_queue(batch) self._state_changed.set() + def _add_batch_to_queue(self, batch: datatypes.PublicBatch): + part_sess_id = batch._partition_session.id + if part_sess_id in self._message_batches: + self._message_batches[part_sess_id].messages.extend(batch.messages) + self._message_batches[part_sess_id]._bytes_size += batch._bytes_size + return + + self._message_batches[part_sess_id] = batch + async def _decode_batch_inplace(self, batch): if batch._codec == Codec.CODEC_RAW: return From 0a0725329e10e5dd9660da74a9d2667fb9c4ec54 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 24 Sep 2024 17:48:04 +0300 Subject: [PATCH 236/429] tests fixes --- tests/topics/test_topic_writer.py | 12 +- ydb/_topic_reader/topic_reader_asyncio.py | 19 +-- .../topic_reader_asyncio_test.py | 109 +++++++++--------- 3 files changed, 75 insertions(+), 65 deletions(-) diff --git a/tests/topics/test_topic_writer.py b/tests/topics/test_topic_writer.py index dfc3cdd0..1c47893f 100644 --- a/tests/topics/test_topic_writer.py +++ b/tests/topics/test_topic_writer.py @@ -7,6 +7,8 @@ import ydb.aio +from ydb._topic_common.test_helpers import wait_condition + @pytest.mark.asyncio class TestTopicWriterAsyncIO: @@ -43,6 +45,10 @@ async def test_random_producer_id(self, driver: ydb.aio.Driver, topic_path, topi batch = await topic_reader.receive_batch() + if len(batch.messages) == 1: + batch2 = await topic_reader.receive_batch() + batch.messages.extend(batch2.messages) + assert batch.messages[0].producer_id != batch.messages[1].producer_id async def test_auto_flush_on_close(self, driver: ydb.aio.Driver, topic_path): @@ -201,14 +207,14 @@ def test_write_multi_message_with_ack( ) batch = topic_reader_sync.receive_batch() + if len(batch.messages) == 1: + batch2 = topic_reader_sync.receive_batch() + batch.messages.extend(batch2.messages) assert batch.messages[0].offset == 0 assert batch.messages[0].seqno == 1 assert batch.messages[0].data == "123".encode() - # remove second recieve batch when implement batching - # https://github.com/ydb-platform/ydb-python-sdk/issues/142 - # batch = topic_reader_sync.receive_batch() assert batch.messages[1].offset == 1 assert batch.messages[1].seqno == 2 assert batch.messages[1].data == "456".encode() diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 5004d25d..5dcae1ee 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -6,6 +6,7 @@ import random import typing from asyncio import Task +from collections import OrderedDict from typing import Optional, Set, Dict, Union, Callable import ydb @@ -296,7 +297,7 @@ def __init__( self._closed = False self._first_error = asyncio.get_running_loop().create_future() self._batches_to_decode = asyncio.Queue() - self._message_batches = dict() + self._message_batches = OrderedDict() self._update_token_interval = settings.update_token_interval self._get_token_function = get_token_function @@ -359,9 +360,9 @@ async def wait_messages(self): await self._state_changed.wait() self._state_changed.clear() - def _get_random_batch(self): - rnd_id = random.choice(list(self._message_batches.keys())) - return rnd_id, self._message_batches[rnd_id] + def _get_first_batch(self) -> typing.Tuple[int, datatypes.PublicBatch]: + first_id, batch = self._message_batches.popitem(last = False) + return first_id, batch def receive_batch_nowait(self): if self._get_first_error(): @@ -370,9 +371,8 @@ def receive_batch_nowait(self): if not self._message_batches: return None - part_sess_id, batch = self._get_random_batch() + _, batch = self._get_first_batch() self._buffer_release_bytes(batch._bytes_size) - del self._message_batches[part_sess_id] return batch @@ -383,12 +383,15 @@ def receive_message_nowait(self): if not self._message_batches: return None - part_sess_id, batch = self._get_random_batch() + part_sess_id, batch = self._get_first_batch() message = batch.messages.pop(0) + if len(batch.messages) == 0: self._buffer_release_bytes(batch._bytes_size) - del self._message_batches[part_sess_id] + else: + # TODO: we should somehow release bytes from single message as well + self._message_batches[part_sess_id] = batch return message diff --git a/ydb/_topic_reader/topic_reader_asyncio_test.py b/ydb/_topic_reader/topic_reader_asyncio_test.py index 9af91b1b..f74b7d7e 100644 --- a/ydb/_topic_reader/topic_reader_asyncio_test.py +++ b/ydb/_topic_reader/topic_reader_asyncio_test.py @@ -4,7 +4,7 @@ import datetime import gzip import typing -from collections import deque +from collections import OrderedDict from dataclasses import dataclass from unittest import mock @@ -52,9 +52,9 @@ def default_executor(): executor.shutdown() -def stub_partition_session(): +def stub_partition_session(id: int = 0): return datatypes.PartitionSession( - id=0, + id=id, state=datatypes.PartitionSession.State.Active, topic_path="asd", partition_id=1, @@ -212,10 +212,10 @@ def create_message( _commit_end_offset=partition_session._next_message_start_commit_offset + offset_delta, ) - async def send_message(self, stream_reader, message: PublicMessage): - await self.send_batch(stream_reader, [message]) + async def send_message(self, stream_reader, message: PublicMessage, new_batch=True): + await self.send_batch(stream_reader, [message], new_batch=new_batch) - async def send_batch(self, stream_reader, batch: typing.List[PublicMessage]): + async def send_batch(self, stream_reader, batch: typing.List[PublicMessage], new_batch=True): if len(batch) == 0: return @@ -223,10 +223,16 @@ async def send_batch(self, stream_reader, batch: typing.List[PublicMessage]): for message in batch: assert message._partition_session is first_message._partition_session + partition_session_id = first_message._partition_session.id + def batch_count(): return len(stream_reader._message_batches) + def batch_size(): + return len(stream_reader._message_batches[partition_session_id].messages) + initial_batches = batch_count() + initial_batch_size = batch_size() if not new_batch else 0 stream = stream_reader._stream # type: StreamMock stream.from_server.put_nowait( @@ -261,7 +267,10 @@ def batch_count(): ), ) ) - await wait_condition(lambda: batch_count() > initial_batches) + if new_batch: + await wait_condition(lambda: batch_count() > initial_batches) + else: + await wait_condition(lambda: batch_size() > initial_batch_size) async def test_unknown_error(self, stream, stream_reader_finish_with_error): class TestError(Exception): @@ -412,15 +421,11 @@ async def test_commit_ranges_for_received_messages( m2._commit_start_offset = m1.offset + 1 await self.send_message(stream_reader_started, m1) - await self.send_message(stream_reader_started, m2) - - await stream_reader_started.wait_messages() - received = stream_reader_started.receive_batch_nowait().messages - assert received == [m1] + await self.send_message(stream_reader_started, m2, new_batch=False) await stream_reader_started.wait_messages() received = stream_reader_started.receive_batch_nowait().messages - assert received == [m2] + assert received == [m1, m2] await stream_reader_started.close(False) @@ -860,7 +865,7 @@ def reader_batch_count(): assert stream_reader._buffer_size_bytes == initial_buffer_size - bytes_size - last_batch = stream_reader._message_batches[-1] + _, last_batch = stream_reader._message_batches.popitem() assert last_batch == PublicBatch( messages=[ PublicMessage( @@ -1059,74 +1064,74 @@ async def test_read_batches(self, stream_reader, partition_session, second_parti @pytest.mark.parametrize( "batches_before,expected_message,batches_after", [ - ([], None, []), + ({}, None, {}), ( - [ - PublicBatch( + { + 0: PublicBatch( messages=[stub_message(1)], _partition_session=stub_partition_session(), _bytes_size=0, _codec=Codec.CODEC_RAW, ) - ], + }, stub_message(1), - [], + {}, ), ( - [ - PublicBatch( + { + 0: PublicBatch( messages=[stub_message(1), stub_message(2)], _partition_session=stub_partition_session(), _bytes_size=0, _codec=Codec.CODEC_RAW, ), - PublicBatch( + 1: PublicBatch( messages=[stub_message(3), stub_message(4)], - _partition_session=stub_partition_session(), + _partition_session=stub_partition_session(1), _bytes_size=0, _codec=Codec.CODEC_RAW, ), - ], + }, stub_message(1), - [ - PublicBatch( + { + 0: PublicBatch( messages=[stub_message(2)], _partition_session=stub_partition_session(), _bytes_size=0, _codec=Codec.CODEC_RAW, ), - PublicBatch( + 1: PublicBatch( messages=[stub_message(3), stub_message(4)], - _partition_session=stub_partition_session(), + _partition_session=stub_partition_session(1), _bytes_size=0, _codec=Codec.CODEC_RAW, ), - ], + }, ), ( - [ - PublicBatch( + { + 0: PublicBatch( messages=[stub_message(1)], _partition_session=stub_partition_session(), _bytes_size=0, _codec=Codec.CODEC_RAW, ), - PublicBatch( + 1: PublicBatch( messages=[stub_message(2), stub_message(3)], - _partition_session=stub_partition_session(), + _partition_session=stub_partition_session(1), _bytes_size=0, _codec=Codec.CODEC_RAW, ), - ], + }, stub_message(1), - [ - PublicBatch( + { + 1: PublicBatch( messages=[stub_message(2), stub_message(3)], - _partition_session=stub_partition_session(), + _partition_session=stub_partition_session(1), _bytes_size=0, _codec=Codec.CODEC_RAW, ) - ], + }, ), ], ) @@ -1137,11 +1142,11 @@ async def test_read_message( expected_message: PublicMessage, batches_after: typing.List[datatypes.PublicBatch], ): - stream_reader._message_batches = deque(batches_before) + stream_reader._message_batches = OrderedDict(batches_before) mess = stream_reader.receive_message_nowait() assert mess == expected_message - assert list(stream_reader._message_batches) == batches_after + assert dict(stream_reader._message_batches) == batches_after async def test_receive_batch_nowait(self, stream, stream_reader, partition_session): assert stream_reader.receive_batch_nowait() is None @@ -1152,30 +1157,21 @@ async def test_receive_batch_nowait(self, stream, stream_reader, partition_sessi await self.send_message(stream_reader, mess1) mess2 = self.create_message(partition_session, 2, 1) - await self.send_message(stream_reader, mess2) + await self.send_message(stream_reader, mess2, new_batch=False) assert stream_reader._buffer_size_bytes == initial_buffer_size - 2 * self.default_batch_size received = stream_reader.receive_batch_nowait() assert received == PublicBatch( - messages=[mess1], + messages=[mess1, mess2], _partition_session=mess1._partition_session, - _bytes_size=self.default_batch_size, - _codec=Codec.CODEC_RAW, - ) - - received = stream_reader.receive_batch_nowait() - assert received == PublicBatch( - messages=[mess2], - _partition_session=mess2._partition_session, - _bytes_size=self.default_batch_size, + _bytes_size=self.default_batch_size * 2, _codec=Codec.CODEC_RAW, ) assert stream_reader._buffer_size_bytes == initial_buffer_size - assert StreamReadMessage.ReadRequest(self.default_batch_size) == stream.from_client.get_nowait().client_message - assert StreamReadMessage.ReadRequest(self.default_batch_size) == stream.from_client.get_nowait().client_message + assert StreamReadMessage.ReadRequest(self.default_batch_size * 2) == stream.from_client.get_nowait().client_message with pytest.raises(asyncio.QueueEmpty): stream.from_client.get_nowait() @@ -1186,13 +1182,18 @@ async def test_receive_message_nowait(self, stream, stream_reader, partition_ses initial_buffer_size = stream_reader._buffer_size_bytes await self.send_batch( - stream_reader, [self.create_message(partition_session, 1, 1), self.create_message(partition_session, 2, 1)] + stream_reader, + [ + self.create_message(partition_session, 1, 1), + self.create_message(partition_session, 2, 1), + ], ) await self.send_batch( stream_reader, [ self.create_message(partition_session, 10, 1), ], + new_batch=False, ) assert stream_reader._buffer_size_bytes == initial_buffer_size - 2 * self.default_batch_size From 60a45044a58099dd7a6922f4823f82dca9e475e9 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 24 Sep 2024 17:50:42 +0300 Subject: [PATCH 237/429] style fixes --- tests/topics/test_topic_writer.py | 2 -- ydb/_topic_reader/topic_reader_asyncio.py | 3 +-- ydb/_topic_reader/topic_reader_asyncio_test.py | 4 +++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/topics/test_topic_writer.py b/tests/topics/test_topic_writer.py index 1c47893f..c7a7c959 100644 --- a/tests/topics/test_topic_writer.py +++ b/tests/topics/test_topic_writer.py @@ -7,8 +7,6 @@ import ydb.aio -from ydb._topic_common.test_helpers import wait_condition - @pytest.mark.asyncio class TestTopicWriterAsyncIO: diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 5dcae1ee..0a24a86b 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -3,7 +3,6 @@ import asyncio import concurrent.futures import gzip -import random import typing from asyncio import Task from collections import OrderedDict @@ -361,7 +360,7 @@ async def wait_messages(self): self._state_changed.clear() def _get_first_batch(self) -> typing.Tuple[int, datatypes.PublicBatch]: - first_id, batch = self._message_batches.popitem(last = False) + first_id, batch = self._message_batches.popitem(last=False) return first_id, batch def receive_batch_nowait(self): diff --git a/ydb/_topic_reader/topic_reader_asyncio_test.py b/ydb/_topic_reader/topic_reader_asyncio_test.py index f74b7d7e..19fb71e8 100644 --- a/ydb/_topic_reader/topic_reader_asyncio_test.py +++ b/ydb/_topic_reader/topic_reader_asyncio_test.py @@ -1171,7 +1171,9 @@ async def test_receive_batch_nowait(self, stream, stream_reader, partition_sessi assert stream_reader._buffer_size_bytes == initial_buffer_size - assert StreamReadMessage.ReadRequest(self.default_batch_size * 2) == stream.from_client.get_nowait().client_message + assert ( + StreamReadMessage.ReadRequest(self.default_batch_size * 2) == stream.from_client.get_nowait().client_message + ) with pytest.raises(asyncio.QueueEmpty): stream.from_client.get_nowait() From 8d9caa279edf16c7aec6e57bd21f0d094fe0689c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 25 Sep 2024 11:51:06 +0300 Subject: [PATCH 238/429] add .dockerignore not to copy the whole repo for slo --- .dockerignore | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..90fe8e80 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +* +!tests/slo +!ydb/ +!README.md +!requirements.txt +!pyproject.toml +!setup.py \ No newline at end of file From 528d99e420a949f3b11599089a589bf18d5ea769 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 25 Sep 2024 12:00:36 +0300 Subject: [PATCH 239/429] add .dockerignore not to copy the whole repo for slo --- .dockerignore | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..90fe8e80 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +* +!tests/slo +!ydb/ +!README.md +!requirements.txt +!pyproject.toml +!setup.py \ No newline at end of file From b0cce074b2d073b1a99dcaef5bcd0f55335467ac Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 25 Sep 2024 12:01:33 +0300 Subject: [PATCH 240/429] Revert "add .dockerignore not to copy the whole repo for slo" This reverts commit 8d9caa279edf16c7aec6e57bd21f0d094fe0689c. --- .dockerignore | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 90fe8e80..00000000 --- a/.dockerignore +++ /dev/null @@ -1,7 +0,0 @@ -* -!tests/slo -!ydb/ -!README.md -!requirements.txt -!pyproject.toml -!setup.py \ No newline at end of file From f2b8a55a87bc101b09ba2236fd6d3e03a2df0971 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 25 Sep 2024 13:52:20 +0300 Subject: [PATCH 241/429] change docker base image to python slim --- tests/slo/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/slo/Dockerfile b/tests/slo/Dockerfile index e705e624..7a8cc494 100644 --- a/tests/slo/Dockerfile +++ b/tests/slo/Dockerfile @@ -1,7 +1,9 @@ -FROM python:3.8 +FROM python:3.8-slim COPY . /src WORKDIR /src -RUN python -m pip install --upgrade pip && python -m pip install -e . && python -m pip install -r tests/slo/requirements.txt +RUN python -m pip install --no-cache-dir --upgrade pip && \ + python -m pip install --no-cache-dir -e . && \ + python -m pip install --no-cache-dir -r tests/slo/requirements.txt WORKDIR tests/slo ARG SDK_SERVICE ENV SDK_SERVICE=$SDK_SERVICE From c84538d39d7d92daa6ad39ba6c03ec3c32fa5f97 Mon Sep 17 00:00:00 2001 From: Alexander <56935749+alex2211-put@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:30:00 +0300 Subject: [PATCH 242/429] Removing loop name from asyncio.create_task (#489) * Update topic_writer_asyncio.py * Update topic_reader_asyncio.py * Update topic_writer_asyncio.py * Update topic_reader_asyncio.py fix linters * Update topic_reader_asyncio.py * Update topic_reader_asyncio.py * Update topic_reader_asyncio.py * Update topic_reader_asyncio.py * add wrapper for asyncio.create_task * fix linters * fix linters * fix linters * fix linters * fix linters * fix linters * fix linters * split setting task name during function declaration stage * fix tests * fix tests * fix linters * fix linters * fix linters * fix tests --- ydb/_topic_common/common.py | 13 ++++++++++ ydb/_topic_common/common_test.py | 15 +++++++++++- ydb/_topic_reader/topic_reader_asyncio.py | 30 +++++++++++++++++++---- ydb/_topic_writer/topic_writer_asyncio.py | 26 ++++++++++++++++---- 4 files changed, 73 insertions(+), 11 deletions(-) diff --git a/ydb/_topic_common/common.py b/ydb/_topic_common/common.py index 7a97336e..8241dda4 100644 --- a/ydb/_topic_common/common.py +++ b/ydb/_topic_common/common.py @@ -1,5 +1,6 @@ import asyncio import concurrent.futures +import sys import threading import typing from typing import Optional @@ -29,6 +30,18 @@ def wrapper(rpc_state, response_pb, driver=None): return wrapper +if sys.hexversion < 0x03080000: + + def wrap_set_name_for_asyncio_task(task: asyncio.Task, task_name: str) -> asyncio.Task: + return task + +else: + + def wrap_set_name_for_asyncio_task(task: asyncio.Task, task_name: str) -> asyncio.Task: + task.set_name(task_name) + return task + + _shared_event_loop_lock = threading.Lock() _shared_event_loop: Optional[asyncio.AbstractEventLoop] = None diff --git a/ydb/_topic_common/common_test.py b/ydb/_topic_common/common_test.py index b31f9af9..32261520 100644 --- a/ydb/_topic_common/common_test.py +++ b/ydb/_topic_common/common_test.py @@ -6,7 +6,7 @@ import grpc import pytest -from .common import CallFromSyncToAsync +from .common import CallFromSyncToAsync, wrap_set_name_for_asyncio_task from .._grpc.grpcwrapper.common_utils import ( GrpcWrapperAsyncIO, ServerStatus, @@ -75,6 +75,19 @@ async def async_failed(): with pytest.raises(TestError): await callback_from_asyncio(async_failed) + async def test_task_name_on_asyncio_task(self): + task_name = "asyncio task" + loop = asyncio.get_running_loop() + + async def some_async_task(): + await asyncio.sleep(0) + return 1 + + asyncio_task = loop.create_task(some_async_task()) + wrap_set_name_for_asyncio_task(asyncio_task, task_name=task_name) + + assert asyncio_task.get_name() == task_name + @pytest.mark.asyncio class TestGrpcWrapperAsyncIO: diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 81c6d9f4..752e0a1f 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -10,6 +10,7 @@ import ydb from .. import _apis, issues +from .._topic_common import common as topic_common from .._utilities import AtomicCounter from ..aio import Driver from ..issues import Error as YdbError, _process_response @@ -87,7 +88,8 @@ async def __aexit__(self, exc_type, exc_val, exc_tb): def __del__(self): if not self._closed: - self._loop.create_task(self.close(flush=False), name="close reader") + task = self._loop.create_task(self.close(flush=False)) + topic_common.wrap_set_name_for_asyncio_task(task, task_name="close reader") async def wait_message(self): """ @@ -337,12 +339,30 @@ async def _start(self, stream: IGrpcWrapperAsyncIO, init_message: StreamReadMess self._update_token_event.set() - self._background_tasks.add(asyncio.create_task(self._read_messages_loop(), name="read_messages_loop")) - self._background_tasks.add(asyncio.create_task(self._decode_batches_loop(), name="decode_batches")) + self._background_tasks.add( + topic_common.wrap_set_name_for_asyncio_task( + asyncio.create_task(self._read_messages_loop()), + task_name="read_messages_loop", + ), + ) + self._background_tasks.add( + topic_common.wrap_set_name_for_asyncio_task( + asyncio.create_task(self._decode_batches_loop()), + task_name="decode_batches", + ), + ) if self._get_token_function: - self._background_tasks.add(asyncio.create_task(self._update_token_loop(), name="update_token_loop")) + self._background_tasks.add( + topic_common.wrap_set_name_for_asyncio_task( + asyncio.create_task(self._update_token_loop()), + task_name="update_token_loop", + ), + ) self._background_tasks.add( - asyncio.create_task(self._handle_background_errors(), name="handle_background_errors") + topic_common.wrap_set_name_for_asyncio_task( + asyncio.create_task(self._handle_background_errors()), + task_name="handle_background_errors", + ), ) async def wait_error(self): diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index 585e88ab..c7f88a42 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -28,6 +28,7 @@ issues, ) from .._errors import check_retriable_error +from .._topic_common import common as topic_common from ..retries import RetrySettings from .._grpc.grpcwrapper.ydb_topic_public_types import PublicCodec from .._grpc.grpcwrapper.ydb_topic import ( @@ -231,8 +232,14 @@ def __init__(self, driver: SupportedDriverType, settings: WriterSettings): self._new_messages = asyncio.Queue() self._stop_reason = self._loop.create_future() self._background_tasks = [ - asyncio.create_task(self._connection_loop(), name="connection_loop"), - asyncio.create_task(self._encode_loop(), name="encode_loop"), + topic_common.wrap_set_name_for_asyncio_task( + asyncio.create_task(self._connection_loop()), + task_name="connection_loop", + ), + topic_common.wrap_set_name_for_asyncio_task( + asyncio.create_task(self._encode_loop()), + task_name="encode_loop", + ), ] self._state_changed = asyncio.Event() @@ -366,8 +373,14 @@ async def _connection_loop(self): self._stream_connected.set() - send_loop = asyncio.create_task(self._send_loop(stream_writer), name="writer send loop") - receive_loop = asyncio.create_task(self._read_loop(stream_writer), name="writer receive loop") + send_loop = topic_common.wrap_set_name_for_asyncio_task( + asyncio.create_task(self._send_loop(stream_writer)), + task_name="writer send loop", + ) + receive_loop = topic_common.wrap_set_name_for_asyncio_task( + asyncio.create_task(self._read_loop(stream_writer)), + task_name="writer receive loop", + ) tasks = [send_loop, receive_loop] done, _ = await asyncio.wait([send_loop, receive_loop], return_when=asyncio.FIRST_COMPLETED) @@ -653,7 +666,10 @@ async def _start(self, stream: IGrpcWrapperAsyncIO, init_message: StreamWriteMes if self._update_token_interval is not None: self._update_token_event.set() - self._update_token_task = asyncio.create_task(self._update_token_loop(), name="update_token_loop") + self._update_token_task = topic_common.wrap_set_name_for_asyncio_task( + asyncio.create_task(self._update_token_loop()), + task_name="update_token_loop", + ) @staticmethod def _ensure_ok(message: WriterMessagesFromServerToClient): From a1888c72028399139d26d3d1aa6f32e0685cfe76 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 27 Sep 2024 11:26:27 +0300 Subject: [PATCH 243/429] review fixes --- tests/topics/test_topic_writer.py | 50 ++++++++----------- ydb/_topic_reader/topic_reader_asyncio.py | 6 +-- .../topic_reader_asyncio_test.py | 2 +- 3 files changed, 26 insertions(+), 32 deletions(-) diff --git a/tests/topics/test_topic_writer.py b/tests/topics/test_topic_writer.py index c7a7c959..a3cdbe9d 100644 --- a/tests/topics/test_topic_writer.py +++ b/tests/topics/test_topic_writer.py @@ -41,13 +41,10 @@ async def test_random_producer_id(self, driver: ydb.aio.Driver, topic_path, topi async with driver.topic_client.writer(topic_path) as writer: await writer.write(ydb.TopicWriterMessage(data="123".encode())) - batch = await topic_reader.receive_batch() + msg1 = await topic_reader.receive_message() + msg2 = await topic_reader.receive_message() - if len(batch.messages) == 1: - batch2 = await topic_reader.receive_batch() - batch.messages.extend(batch2.messages) - - assert batch.messages[0].producer_id != batch.messages[1].producer_id + assert msg1.producer_id != msg2.producer_id async def test_auto_flush_on_close(self, driver: ydb.aio.Driver, topic_path): async with driver.topic_client.writer( @@ -80,18 +77,16 @@ async def test_write_multi_message_with_ack( assert res1.offset == 0 assert res2.offset == 1 - batch = await topic_reader.receive_batch() + msg1 = await topic_reader.receive_message() + msg2 = await topic_reader.receive_message() - assert batch.messages[0].offset == 0 - assert batch.messages[0].seqno == 1 - assert batch.messages[0].data == "123".encode() + assert msg1.offset == 0 + assert msg1.seqno == 1 + assert msg1.data == "123".encode() - # # remove second recieve batch when implement batching - # # https://github.com/ydb-platform/ydb-python-sdk/issues/142 - # batch = await topic_reader.receive_batch() - assert batch.messages[1].offset == 1 - assert batch.messages[1].seqno == 2 - assert batch.messages[1].data == "456".encode() + assert msg2.offset == 1 + assert msg2.seqno == 2 + assert msg2.data == "456".encode() @pytest.mark.parametrize( "codec", @@ -189,9 +184,10 @@ def test_random_producer_id( with driver_sync.topic_client.writer(topic_path) as writer: writer.write(ydb.TopicWriterMessage(data="123".encode())) - batch = topic_reader_sync.receive_batch() + msg1 = topic_reader_sync.receive_message() + msg2 = topic_reader_sync.receive_message() - assert batch.messages[0].producer_id != batch.messages[1].producer_id + assert msg1.producer_id != msg2.producer_id def test_write_multi_message_with_ack( self, driver_sync: ydb.Driver, topic_path, topic_reader_sync: ydb.TopicReader @@ -204,18 +200,16 @@ def test_write_multi_message_with_ack( ] ) - batch = topic_reader_sync.receive_batch() - if len(batch.messages) == 1: - batch2 = topic_reader_sync.receive_batch() - batch.messages.extend(batch2.messages) + msg1 = topic_reader_sync.receive_message() + msg2 = topic_reader_sync.receive_message() - assert batch.messages[0].offset == 0 - assert batch.messages[0].seqno == 1 - assert batch.messages[0].data == "123".encode() + assert msg1.offset == 0 + assert msg1.seqno == 1 + assert msg1.data == "123".encode() - assert batch.messages[1].offset == 1 - assert batch.messages[1].seqno == 2 - assert batch.messages[1].data == "456".encode() + assert msg2.offset == 1 + assert msg2.seqno == 2 + assert msg2.data == "456".encode() @pytest.mark.parametrize( "codec", diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 0a24a86b..62751c35 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -264,7 +264,7 @@ class ReaderStream: _state_changed: asyncio.Event _closed: bool - _message_batches: typing.Dict[int, datatypes.PublicBatch] + _message_batches: typing.Dict[int, datatypes.PublicBatch] # keys are partition session ID _first_error: asyncio.Future[YdbError] _update_token_interval: Union[int, float] @@ -360,8 +360,8 @@ async def wait_messages(self): self._state_changed.clear() def _get_first_batch(self) -> typing.Tuple[int, datatypes.PublicBatch]: - first_id, batch = self._message_batches.popitem(last=False) - return first_id, batch + partition_session_id, batch = self._message_batches.popitem(last=False) + return partition_session_id, batch def receive_batch_nowait(self): if self._get_first_error(): diff --git a/ydb/_topic_reader/topic_reader_asyncio_test.py b/ydb/_topic_reader/topic_reader_asyncio_test.py index 19fb71e8..77bf57c3 100644 --- a/ydb/_topic_reader/topic_reader_asyncio_test.py +++ b/ydb/_topic_reader/topic_reader_asyncio_test.py @@ -232,7 +232,7 @@ def batch_size(): return len(stream_reader._message_batches[partition_session_id].messages) initial_batches = batch_count() - initial_batch_size = batch_size() if not new_batch else 0 + initial_batch_size = 0 if new_batch else batch_size() stream = stream_reader._stream # type: StreamMock stream.from_server.put_nowait( From 2560e5fdf71f55a93ef2b6123e245abaafdc8377 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 27 Sep 2024 11:59:01 +0300 Subject: [PATCH 244/429] review fixes --- ydb/_topic_reader/datatypes.py | 10 +++++++++- ydb/_topic_reader/topic_reader_asyncio.py | 7 +++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ydb/_topic_reader/datatypes.py b/ydb/_topic_reader/datatypes.py index 28155ea7..0f15ff85 100644 --- a/ydb/_topic_reader/datatypes.py +++ b/ydb/_topic_reader/datatypes.py @@ -7,7 +7,7 @@ from collections import deque from dataclasses import dataclass, field import datetime -from typing import Union, Any, List, Dict, Deque, Optional +from typing import Union, Any, List, Dict, Deque, Optional, Tuple from ydb._grpc.grpcwrapper.ydb_topic import OffsetsRange, Codec from ydb._topic_reader import topic_reader_asyncio @@ -171,3 +171,11 @@ def alive(self) -> bool: def pop_message(self) -> PublicMessage: return self.messages.pop(0) + + def _extend(self, batch: PublicBatch) -> None: + self.messages.extend(batch.messages) + self._bytes_size += batch._bytes_size + + def _pop(self) -> Tuple[List[PublicMessage], bool]: + msgs_left = True if len(self.messages) > 1 else False + return self.messages.pop(0), msgs_left diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 62751c35..92cd78c2 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -384,9 +384,9 @@ def receive_message_nowait(self): part_sess_id, batch = self._get_first_batch() - message = batch.messages.pop(0) + message, msgs_left = batch._pop() - if len(batch.messages) == 0: + if not msgs_left: self._buffer_release_bytes(batch._bytes_size) else: # TODO: we should somehow release bytes from single message as well @@ -620,8 +620,7 @@ async def _decode_batches_loop(self): def _add_batch_to_queue(self, batch: datatypes.PublicBatch): part_sess_id = batch._partition_session.id if part_sess_id in self._message_batches: - self._message_batches[part_sess_id].messages.extend(batch.messages) - self._message_batches[part_sess_id]._bytes_size += batch._bytes_size + self._message_batches[part_sess_id]._extend(batch) return self._message_batches[part_sess_id] = batch From b2e88b5cb1d5ceb1e1e06614c2b121e8875c67c8 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 27 Sep 2024 13:36:59 +0300 Subject: [PATCH 245/429] Implement max_messages on recieve_batch --- ydb/_topic_reader/topic_reader_asyncio.py | 46 +++++++++++++++++++---- ydb/_topic_reader/topic_reader_sync.py | 4 +- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 68ac5451..de8a7f91 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -99,6 +99,7 @@ async def wait_message(self): async def receive_batch( self, + max_messages: typing.Union[int, None] = None, ) -> typing.Union[datatypes.PublicBatch, None]: """ Get one messages batch from reader. @@ -107,7 +108,9 @@ async def receive_batch( use asyncio.wait_for for wait with timeout. """ await self._reconnector.wait_message() - return self._reconnector.receive_batch_nowait() + return self._reconnector.receive_batch_nowait( + max_messages=max_messages, + ) async def receive_message(self) -> typing.Optional[datatypes.PublicMessage]: """ @@ -214,8 +217,10 @@ async def wait_message(self): await self._state_changed.wait() self._state_changed.clear() - def receive_batch_nowait(self): - return self._stream_reader.receive_batch_nowait() + def receive_batch_nowait(self, max_messages: Optional[int] = None): + return self._stream_reader.receive_batch_nowait( + max_messages=max_messages, + ) def receive_message_nowait(self): return self._stream_reader.receive_message_nowait() @@ -383,17 +388,44 @@ def _get_first_batch(self) -> typing.Tuple[int, datatypes.PublicBatch]: partition_session_id, batch = self._message_batches.popitem(last=False) return partition_session_id, batch - def receive_batch_nowait(self): + def _cut_batch_by_max_messages( + batch: datatypes.PublicBatch, + max_messages: int, + ) -> typing.Tuple[datatypes.PublicBatch, datatypes.PublicBatch]: + initial_length = len(batch.messages) + one_message_size = batch._bytes_size // initial_length + + new_batch = datatypes.PublicBatch( + messages=batch.messages[:max_messages], + _partition_session=batch._partition_session, + _bytes_size=one_message_size*max_messages, + _codec=batch._codec, + ) + + batch.messages = batch.messages[max_messages:] + batch._bytes_size = one_message_size * (initial_length - max_messages) + + return new_batch, batch + + def receive_batch_nowait(self, max_messages: Optional[int] = None): if self._get_first_error(): raise self._get_first_error() if not self._message_batches: return None - _, batch = self._get_first_batch() - self._buffer_release_bytes(batch._bytes_size) + part_sess_id, batch = self._get_first_batch() + + if max_messages is None or len(batch.messages) <= max_messages: + self._buffer_release_bytes(batch._bytes_size) + return batch + + cutted_batch, remaining_batch = self._cut_batch_by_max_messages(batch, max_messages) + + self._message_batches[part_sess_id] = remaining_batch + self._buffer_release_bytes(cutted_batch._bytes_size) - return batch + return cutted_batch def receive_message_nowait(self): if self._get_first_error(): diff --git a/ydb/_topic_reader/topic_reader_sync.py b/ydb/_topic_reader/topic_reader_sync.py index c266de82..3048d3c4 100644 --- a/ydb/_topic_reader/topic_reader_sync.py +++ b/ydb/_topic_reader/topic_reader_sync.py @@ -103,7 +103,9 @@ def receive_batch( self._check_closed() return self._caller.safe_call_with_result( - self._async_reader.receive_batch(), + self._async_reader.receive_batch( + max_messages=max_messages, + ), timeout, ) From b68cdd46adb00d702146e92e3e7a72116a6d3d6d Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 27 Sep 2024 13:36:59 +0300 Subject: [PATCH 246/429] style fixes --- ydb/_topic_reader/topic_reader_asyncio.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index de8a7f91..5c177e8b 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -389,8 +389,8 @@ def _get_first_batch(self) -> typing.Tuple[int, datatypes.PublicBatch]: return partition_session_id, batch def _cut_batch_by_max_messages( - batch: datatypes.PublicBatch, - max_messages: int, + batch: datatypes.PublicBatch, + max_messages: int, ) -> typing.Tuple[datatypes.PublicBatch, datatypes.PublicBatch]: initial_length = len(batch.messages) one_message_size = batch._bytes_size // initial_length @@ -398,7 +398,7 @@ def _cut_batch_by_max_messages( new_batch = datatypes.PublicBatch( messages=batch.messages[:max_messages], _partition_session=batch._partition_session, - _bytes_size=one_message_size*max_messages, + _bytes_size=one_message_size * max_messages, _codec=batch._codec, ) From 56e37000037ab4c2181831c52d19e3ea850bdef3 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 27 Sep 2024 13:36:59 +0300 Subject: [PATCH 247/429] added tests on max_messages --- ydb/_topic_reader/topic_reader_asyncio.py | 1 + .../topic_reader_asyncio_test.py | 90 +++++++++++++++++++ 2 files changed, 91 insertions(+) diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 5c177e8b..74747a67 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -389,6 +389,7 @@ def _get_first_batch(self) -> typing.Tuple[int, datatypes.PublicBatch]: return partition_session_id, batch def _cut_batch_by_max_messages( + self, batch: datatypes.PublicBatch, max_messages: int, ) -> typing.Tuple[datatypes.PublicBatch, datatypes.PublicBatch]: diff --git a/ydb/_topic_reader/topic_reader_asyncio_test.py b/ydb/_topic_reader/topic_reader_asyncio_test.py index 77bf57c3..40565133 100644 --- a/ydb/_topic_reader/topic_reader_asyncio_test.py +++ b/ydb/_topic_reader/topic_reader_asyncio_test.py @@ -1148,6 +1148,96 @@ async def test_read_message( assert mess == expected_message assert dict(stream_reader._message_batches) == batches_after + @pytest.mark.parametrize( + "batches_before,max_messages,actual_messages,batches_after", + [ + ( + { + 0: PublicBatch( + messages=[stub_message(1)], + _partition_session=stub_partition_session(), + _bytes_size=0, + _codec=Codec.CODEC_RAW, + ) + }, + None, + 1, + {}, + ), + ( + { + 0: PublicBatch( + messages=[stub_message(1), stub_message(2)], + _partition_session=stub_partition_session(), + _bytes_size=0, + _codec=Codec.CODEC_RAW, + ), + 1: PublicBatch( + messages=[stub_message(3), stub_message(4)], + _partition_session=stub_partition_session(1), + _bytes_size=0, + _codec=Codec.CODEC_RAW, + ), + }, + 1, + 1, + { + 1: PublicBatch( + messages=[stub_message(3), stub_message(4)], + _partition_session=stub_partition_session(1), + _bytes_size=0, + _codec=Codec.CODEC_RAW, + ), + 0: PublicBatch( + messages=[stub_message(2)], + _partition_session=stub_partition_session(), + _bytes_size=0, + _codec=Codec.CODEC_RAW, + ), + }, + ), + ( + { + 0: PublicBatch( + messages=[stub_message(1)], + _partition_session=stub_partition_session(), + _bytes_size=0, + _codec=Codec.CODEC_RAW, + ), + 1: PublicBatch( + messages=[stub_message(2), stub_message(3)], + _partition_session=stub_partition_session(1), + _bytes_size=0, + _codec=Codec.CODEC_RAW, + ), + }, + 100, + 1, + { + 1: PublicBatch( + messages=[stub_message(2), stub_message(3)], + _partition_session=stub_partition_session(1), + _bytes_size=0, + _codec=Codec.CODEC_RAW, + ) + }, + ), + ], + ) + async def test_read_batch_max_messages( + self, + stream_reader, + batches_before: typing.List[datatypes.PublicBatch], + max_messages: typing.Optional[int], + actual_messages: int, + batches_after: typing.List[datatypes.PublicBatch], + ): + stream_reader._message_batches = OrderedDict(batches_before) + batch = stream_reader.receive_batch_nowait(max_messages=max_messages) + + assert len(batch.messages) == actual_messages + assert stream_reader._message_batches == OrderedDict(batches_after) + async def test_receive_batch_nowait(self, stream, stream_reader, partition_session): assert stream_reader.receive_batch_nowait() is None From ffdd843a10a0419c42e2ffce90d56c5b61907dde Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 27 Sep 2024 13:47:20 +0300 Subject: [PATCH 248/429] refactor cutting new batch --- ydb/_topic_reader/datatypes.py | 16 ++++++++++++++++ ydb/_topic_reader/topic_reader_asyncio.py | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ydb/_topic_reader/datatypes.py b/ydb/_topic_reader/datatypes.py index 0f15ff85..3e0a2797 100644 --- a/ydb/_topic_reader/datatypes.py +++ b/ydb/_topic_reader/datatypes.py @@ -179,3 +179,19 @@ def _extend(self, batch: PublicBatch) -> None: def _pop(self) -> Tuple[List[PublicMessage], bool]: msgs_left = True if len(self.messages) > 1 else False return self.messages.pop(0), msgs_left + + def _pop_batch(self, size: int) -> PublicBatch: + initial_length = len(self.messages) + one_message_size = self._bytes_size // initial_length + + new_batch = PublicBatch( + messages=self.messages[:size], + _partition_session=self._partition_session, + _bytes_size=one_message_size * size, + _codec=self._codec, + ) + + self.messages = self.messages[size:] + self._bytes_size = one_message_size * (initial_length - size) + + return new_batch diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 74747a67..f021ca24 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -421,9 +421,9 @@ def receive_batch_nowait(self, max_messages: Optional[int] = None): self._buffer_release_bytes(batch._bytes_size) return batch - cutted_batch, remaining_batch = self._cut_batch_by_max_messages(batch, max_messages) + cutted_batch = batch._pop_batch(size=max_messages) - self._message_batches[part_sess_id] = remaining_batch + self._message_batches[part_sess_id] = batch self._buffer_release_bytes(cutted_batch._bytes_size) return cutted_batch From 3eedf720a00ecad9a705c3953e4fc3519f15de78 Mon Sep 17 00:00:00 2001 From: Aleksey Myasnikov Date: Mon, 30 Sep 2024 10:56:15 +0300 Subject: [PATCH 249/429] Added badge for API reference (#495) * Added badge for API reference * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index db7c3de2..4cde7ff5 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ YDB Python SDK --- [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/ydb-platform/ydb/blob/main/LICENSE) [![PyPI version](https://badge.fury.io/py/ydb.svg)](https://badge.fury.io/py/ydb) +[![API Reference](https://img.shields.io/badge/API-Reference-lightgreen.svg)](https://ydb-platform.github.io/ydb-python-sdk) [![Functional tests](https://github.com/ydb-platform/ydb-python-sdk/actions/workflows/tests.yaml/badge.svg)](https://github.com/ydb-platform/ydb-python-sdk/actions/workflows/tests.yaml) [![Style checks](https://github.com/ydb-platform/ydb-python-sdk/actions/workflows/style.yaml/badge.svg)](https://github.com/ydb-platform/ydb-python-sdk/actions/workflows/style.yaml) From bf65dc358f12092d24718321ecaa5e3f3aa85ae4 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 30 Sep 2024 11:02:32 +0300 Subject: [PATCH 250/429] review fixes --- ydb/_topic_reader/datatypes.py | 6 +++++- ydb/_topic_reader/topic_reader_asyncio.py | 20 -------------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/ydb/_topic_reader/datatypes.py b/ydb/_topic_reader/datatypes.py index 3e0a2797..d3ecd180 100644 --- a/ydb/_topic_reader/datatypes.py +++ b/ydb/_topic_reader/datatypes.py @@ -182,6 +182,10 @@ def _pop(self) -> Tuple[List[PublicMessage], bool]: def _pop_batch(self, size: int) -> PublicBatch: initial_length = len(self.messages) + + if size >= initial_length: + raise ValueError("Pop batch with size >= actual size is not supported.") + one_message_size = self._bytes_size // initial_length new_batch = PublicBatch( @@ -192,6 +196,6 @@ def _pop_batch(self, size: int) -> PublicBatch: ) self.messages = self.messages[size:] - self._bytes_size = one_message_size * (initial_length - size) + self._bytes_size = self._bytes_size - new_batch._bytes_size return new_batch diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index f021ca24..4926246f 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -388,26 +388,6 @@ def _get_first_batch(self) -> typing.Tuple[int, datatypes.PublicBatch]: partition_session_id, batch = self._message_batches.popitem(last=False) return partition_session_id, batch - def _cut_batch_by_max_messages( - self, - batch: datatypes.PublicBatch, - max_messages: int, - ) -> typing.Tuple[datatypes.PublicBatch, datatypes.PublicBatch]: - initial_length = len(batch.messages) - one_message_size = batch._bytes_size // initial_length - - new_batch = datatypes.PublicBatch( - messages=batch.messages[:max_messages], - _partition_session=batch._partition_session, - _bytes_size=one_message_size * max_messages, - _codec=batch._codec, - ) - - batch.messages = batch.messages[max_messages:] - batch._bytes_size = one_message_size * (initial_length - max_messages) - - return new_batch, batch - def receive_batch_nowait(self, max_messages: Optional[int] = None): if self._get_first_error(): raise self._get_first_error() From 6edda440c45447b87c95d88b48b92910d006462a Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 30 Sep 2024 13:46:17 +0300 Subject: [PATCH 251/429] review fixes --- ydb/_topic_reader/datatypes.py | 10 +++++----- ydb/_topic_reader/topic_reader_asyncio.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ydb/_topic_reader/datatypes.py b/ydb/_topic_reader/datatypes.py index d3ecd180..01501638 100644 --- a/ydb/_topic_reader/datatypes.py +++ b/ydb/_topic_reader/datatypes.py @@ -180,22 +180,22 @@ def _pop(self) -> Tuple[List[PublicMessage], bool]: msgs_left = True if len(self.messages) > 1 else False return self.messages.pop(0), msgs_left - def _pop_batch(self, size: int) -> PublicBatch: + def _pop_batch(self, message_count: int) -> PublicBatch: initial_length = len(self.messages) - if size >= initial_length: + if message_count >= initial_length: raise ValueError("Pop batch with size >= actual size is not supported.") one_message_size = self._bytes_size // initial_length new_batch = PublicBatch( - messages=self.messages[:size], + messages=self.messages[:message_count], _partition_session=self._partition_session, - _bytes_size=one_message_size * size, + _bytes_size=one_message_size * message_count, _codec=self._codec, ) - self.messages = self.messages[size:] + self.messages = self.messages[message_count:] self._bytes_size = self._bytes_size - new_batch._bytes_size return new_batch diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 4926246f..6833492d 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -401,7 +401,7 @@ def receive_batch_nowait(self, max_messages: Optional[int] = None): self._buffer_release_bytes(batch._bytes_size) return batch - cutted_batch = batch._pop_batch(size=max_messages) + cutted_batch = batch._pop_batch(message_count=max_messages) self._message_batches[part_sess_id] = batch self._buffer_release_bytes(cutted_batch._bytes_size) From 10de36bc3a6258210f21c068a4748f0c36747d3b Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 30 Sep 2024 13:58:56 +0300 Subject: [PATCH 252/429] fix bytes_size on tests --- ydb/_topic_reader/topic_reader_asyncio_test.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ydb/_topic_reader/topic_reader_asyncio_test.py b/ydb/_topic_reader/topic_reader_asyncio_test.py index 40565133..4c76cd1d 100644 --- a/ydb/_topic_reader/topic_reader_asyncio_test.py +++ b/ydb/_topic_reader/topic_reader_asyncio_test.py @@ -1156,7 +1156,7 @@ async def test_read_message( 0: PublicBatch( messages=[stub_message(1)], _partition_session=stub_partition_session(), - _bytes_size=0, + _bytes_size=4, _codec=Codec.CODEC_RAW, ) }, @@ -1169,13 +1169,13 @@ async def test_read_message( 0: PublicBatch( messages=[stub_message(1), stub_message(2)], _partition_session=stub_partition_session(), - _bytes_size=0, + _bytes_size=4, _codec=Codec.CODEC_RAW, ), 1: PublicBatch( messages=[stub_message(3), stub_message(4)], _partition_session=stub_partition_session(1), - _bytes_size=0, + _bytes_size=4, _codec=Codec.CODEC_RAW, ), }, @@ -1185,13 +1185,13 @@ async def test_read_message( 1: PublicBatch( messages=[stub_message(3), stub_message(4)], _partition_session=stub_partition_session(1), - _bytes_size=0, + _bytes_size=4, _codec=Codec.CODEC_RAW, ), 0: PublicBatch( messages=[stub_message(2)], _partition_session=stub_partition_session(), - _bytes_size=0, + _bytes_size=2, _codec=Codec.CODEC_RAW, ), }, @@ -1201,13 +1201,13 @@ async def test_read_message( 0: PublicBatch( messages=[stub_message(1)], _partition_session=stub_partition_session(), - _bytes_size=0, + _bytes_size=4, _codec=Codec.CODEC_RAW, ), 1: PublicBatch( messages=[stub_message(2), stub_message(3)], _partition_session=stub_partition_session(1), - _bytes_size=0, + _bytes_size=4, _codec=Codec.CODEC_RAW, ), }, @@ -1217,7 +1217,7 @@ async def test_read_message( 1: PublicBatch( messages=[stub_message(2), stub_message(3)], _partition_session=stub_partition_session(1), - _bytes_size=0, + _bytes_size=4, _codec=Codec.CODEC_RAW, ) }, From 53ecc0f6c1f458cac1ed603c7e983b7055a71ae2 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 30 Sep 2024 14:33:17 +0300 Subject: [PATCH 253/429] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c72ecbca..8ebbdcbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ +* Ability to batch messages in topic reader +* Implement max_messages on recieve_batch +* Added badge for API reference * Remove experimental warn from query service +* Remove asyncio task names for python below 3.8 ## 3.17.2 ## * Add data_columns support in TableIndex From ede35b0063000d097b8a50c8304ab74adeb67a72 Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 30 Sep 2024 11:34:03 +0000 Subject: [PATCH 254/429] Release: 3.18.0 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ebbdcbe..e5bad2c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.0 ## * Ability to batch messages in topic reader * Implement max_messages on recieve_batch * Added badge for API reference diff --git a/setup.py b/setup.py index c3c4cd3e..7614921b 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.17.2", # AUTOVERSION + version="3.18.0", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 1115cbbc..ed2ab66d 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.17.2" +VERSION = "3.18.0" From 95e04f9cb9f2cf816d33fd6c8dbc1a064f5fa8a4 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 2 Oct 2024 12:26:23 +0300 Subject: [PATCH 255/429] Add an ability to use both driver config and driver args --- ydb/driver.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ydb/driver.py b/ydb/driver.py index ecd3319e..d4e0ba32 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -214,6 +214,19 @@ def get_config( endpoint, database, root_certificates, credentials, **kwargs ) return driver_config + + if driver_config.endpoint is None and endpoint is not None: + driver_config.endpoint = endpoint + + if driver_config.database is None and database is not None: + driver_config.database = database + + if driver_config.credentials is None and credentials is not None: + driver_config.credentials = credentials + + if driver_config.root_certificates is None and root_certificates is not None: + driver_config.root_certificates = root_certificates + return driver_config From 598776ed727baffb558f01133230925f563a39f2 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 2 Oct 2024 12:36:00 +0300 Subject: [PATCH 256/429] another approach --- ydb/driver.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ydb/driver.py b/ydb/driver.py index d4e0ba32..90c55d61 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -190,6 +190,11 @@ def set_grpc_keep_alive_timeout(self, timeout): self.grpc_keep_alive_timeout = timeout return self + def _update_attrs_by_kwargs(self, kwargs: dict): + for key, value in kwargs.items(): + if getattr(self, key) is None: + setattr(self, key, value) + ConnectionParams = DriverConfig @@ -215,17 +220,12 @@ def get_config( ) return driver_config - if driver_config.endpoint is None and endpoint is not None: - driver_config.endpoint = endpoint - - if driver_config.database is None and database is not None: - driver_config.database = database - - if driver_config.credentials is None and credentials is not None: - driver_config.credentials = credentials + kwargs["endpoint"] = endpoint + kwargs["database"] = database + kwargs["root_certificates"] = root_certificates + kwargs["credentials"] = credentials - if driver_config.root_certificates is None and root_certificates is not None: - driver_config.root_certificates = root_certificates + driver_config._update_attrs_by_kwargs(kwargs) return driver_config From 84a29ff6d60e6a09f9535a8b334e8fb36a1a2975 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 2 Oct 2024 18:35:23 +0300 Subject: [PATCH 257/429] Add docs about installation from sources --- docs/quickstart.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index cb1d1062..fd7fb130 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -28,6 +28,15 @@ To install YDB Python SDK through Pypi execute the following command:: pip install ydb + +Installation From Sources +^^^^^^^^^^^^^^^^^^^^^^^^^ + +To install YDB Python SDK from sources execute the following command from the root of repository:: + + pip install -e . + + Usage ----- From 78c3a5cc7e90e3b92d28ce32ee3ced66399a4706 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 2 Oct 2024 18:26:08 +0300 Subject: [PATCH 258/429] temp --- ydb/credentials.py | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/ydb/credentials.py b/ydb/credentials.py index ab502798..86913698 100644 --- a/ydb/credentials.py +++ b/ydb/credentials.py @@ -185,7 +185,45 @@ def _wrap_static_credentials_response(rpc_state, response): class StaticCredentials(AbstractExpiringTokenCredentials): def __init__(self, driver_config, user, password="", tracer=None): super(StaticCredentials, self).__init__(tracer) - self.driver_config = driver_config + + from .driver import DriverConfig + + self.driver_config = DriverConfig( + endpoint=driver_config.endpoint, + database=driver_config.database, + root_certificates=driver_config.root_certificates, + ) + self.user = user + self.password = password + self.request_timeout = 10 + + def _make_token_request(self): + conn = connection.Connection.ready_factory(self.driver_config.endpoint, self.driver_config) + assert conn is not None, "Failed to establish connection in to %s" % self.driver_config.endpoint + try: + result = conn( + ydb_auth_pb2.LoginRequest(user=self.user, password=self.password), + ydb_auth_v1_pb2_grpc.AuthServiceStub, + "Login", + _wrap_static_credentials_response, + settings_impl.BaseRequestSettings().with_timeout(self.request_timeout).with_need_rpc_auth(False), + ) + finally: + conn.close() + return {"expires_in": 30 * 60, "access_token": result.token} + + +class UserPasswordCredentials(AbstractExpiringTokenCredentials): + def __init__(self, user, password, endpoint, database, root_certificates=None, tracer=None): + super(UserPasswordCredentials).__init__(tracer) + + from .driver import DriverConfig # to prevent circular dependencies + + self.driver_config = DriverConfig( + endpoint=endpoint, + database=database, + root_certificates=root_certificates, + ) self.user = user self.password = password self.request_timeout = 10 From aaf60a8e0e4de13aa031152ec1b41ab7e7c678e6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 3 Oct 2024 11:24:50 +0300 Subject: [PATCH 259/429] add example --- examples/static-credentials/__main__.py | 23 +++++++++ examples/static-credentials/example.py | 66 +++++++++++++++++++++++++ ydb/credentials.py | 3 +- ydb/driver.py | 20 +++++--- 4 files changed, 105 insertions(+), 7 deletions(-) create mode 100644 examples/static-credentials/__main__.py create mode 100644 examples/static-credentials/example.py diff --git a/examples/static-credentials/__main__.py b/examples/static-credentials/__main__.py new file mode 100644 index 00000000..900396ed --- /dev/null +++ b/examples/static-credentials/__main__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +import argparse +from example import run + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description="""\033[92mStatic Credentials example.\x1b[0m\n""", + ) + parser.add_argument("-e", "--endpoint", help="Endpoint url to use", default="grpc://localhost:2136") + parser.add_argument("-d", "--database", help="Name of the database to use", default="/local") + parser.add_argument("-u", "--user", help="User to auth with", default="root") + parser.add_argument("-p", "--password", help="Password from user to auth with", default="1234") + + args = parser.parse_args() + + run( + endpoint=args.endpoint, + database=args.database, + user=args.user, + password=args.password, + ) diff --git a/examples/static-credentials/example.py b/examples/static-credentials/example.py new file mode 100644 index 00000000..96a3d15f --- /dev/null +++ b/examples/static-credentials/example.py @@ -0,0 +1,66 @@ +import ydb + + +def test_driver_works(driver: ydb.Driver): + driver.wait(5) + pool = ydb.QuerySessionPool(driver) + pool.execute_with_retries("SELECT 1") + print("everything is fine") + + +def auth_with_static_credentials_old(endpoint: str, database: str, user: str, password: str): + driver_config_temp = ydb.DriverConfig( + endpoint=endpoint, + database=database, + ) + creds = ydb.StaticCredentials( + driver_config=driver_config_temp, + user=user, + password=password, + ) + + driver_config = ydb.DriverConfig( + endpoint=endpoint, + database=database, + credentials=creds, + ) + + with ydb.Driver(driver_config=driver_config) as driver: + test_driver_works(driver) + + +def auth_with_static_credentials_new(endpoint: str, database: str, user: str, password: str): + driver_config = ydb.DriverConfig( + endpoint, + database, + ) + creds = ydb.StaticCredentials( + driver_config, + user, + password, + ) + + with ydb.Driver(driver_config=driver_config, credentials=creds) as driver: + test_driver_works(driver) + + +def auth_with_user_password_credentials(endpoint: str, database: str, user: str, password: str): + driver_config = ydb.DriverConfig( + endpoint=endpoint, + database=database, + credentials=ydb.UserPasswordCredentials( + user=user, + password=password, + endpoint=endpoint, + database=database, + ), + ) + + with ydb.Driver(driver_config=driver_config) as driver: + test_driver_works(driver) + + +def run(endpoint: str, database: str, user: str, password: str): + auth_with_static_credentials_old(endpoint, database, user, password) + auth_with_static_credentials_new(endpoint, database, user, password) + auth_with_user_password_credentials(endpoint, database, user, password) diff --git a/ydb/credentials.py b/ydb/credentials.py index 86913698..a3e054ce 100644 --- a/ydb/credentials.py +++ b/ydb/credentials.py @@ -215,7 +215,7 @@ def _make_token_request(self): class UserPasswordCredentials(AbstractExpiringTokenCredentials): def __init__(self, user, password, endpoint, database, root_certificates=None, tracer=None): - super(UserPasswordCredentials).__init__(tracer) + super(UserPasswordCredentials, self).__init__(tracer) from .driver import DriverConfig # to prevent circular dependencies @@ -224,6 +224,7 @@ def __init__(self, user, password, endpoint, database, root_certificates=None, t database=database, root_certificates=root_certificates, ) + self.user = user self.password = password self.request_timeout = 10 diff --git a/ydb/driver.py b/ydb/driver.py index 90c55d61..27dc7080 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -1,12 +1,16 @@ # -*- coding: utf-8 -*- +import grpc +import logging +import os +from typing import Any # noqa + from . import credentials as credentials_impl, table, scheme, pool from . import tracing -import os -import grpc from . import iam from . import _utilities -from typing import Any # noqa + +logger = logging.getLogger(__name__) class RPCCompression: @@ -190,9 +194,13 @@ def set_grpc_keep_alive_timeout(self, timeout): self.grpc_keep_alive_timeout = timeout return self - def _update_attrs_by_kwargs(self, kwargs: dict): + def _update_attrs_by_kwargs(self, **kwargs): for key, value in kwargs.items(): - if getattr(self, key) is None: + if value is not None: + if getattr(self, key) is not None: + logger.warning( + f"Arg {key} was used in both DriverConfig and Driver. Value from Driver will be used." + ) setattr(self, key, value) @@ -225,7 +233,7 @@ def get_config( kwargs["root_certificates"] = root_certificates kwargs["credentials"] = credentials - driver_config._update_attrs_by_kwargs(kwargs) + driver_config._update_attrs_by_kwargs(**kwargs) return driver_config From c41c7aebfedd84b3d86cc71d1ea8eaaa034f6c88 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 3 Oct 2024 11:28:51 +0300 Subject: [PATCH 260/429] style fixes --- ydb/driver.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ydb/driver.py b/ydb/driver.py index 27dc7080..4c6b6eb5 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -176,7 +176,7 @@ def default_from_endpoint_and_database(cls, endpoint, database, root_certificate database, credentials=default_credentials(credentials), root_certificates=root_certificates, - **kwargs + **kwargs, ) @classmethod @@ -187,7 +187,7 @@ def default_from_connection_string(cls, connection_string, root_certificates=Non database, credentials=default_credentials(credentials), root_certificates=root_certificates, - **kwargs + **kwargs, ) def set_grpc_keep_alive_timeout(self, timeout): @@ -215,7 +215,7 @@ def get_config( root_certificates=None, credentials=None, config_class=DriverConfig, - **kwargs + **kwargs, ): if driver_config is None: if connection_string is not None: @@ -249,7 +249,7 @@ def __init__( database=None, root_certificates=None, credentials=None, - **kwargs + **kwargs, ): """ Constructs a driver instance to be used in table and scheme clients. From 30fbf409636e7e1b7cfad8840b35ae7a3c53553c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 3 Oct 2024 17:15:50 +0300 Subject: [PATCH 261/429] update docs --- docs/examples.rst | 154 +------------------------------- docs/examples/basic_example.rst | 152 +++++++++++++++++++++++++++++++ 2 files changed, 155 insertions(+), 151 deletions(-) create mode 100644 docs/examples/basic_example.rst diff --git a/docs/examples.rst b/docs/examples.rst index 4f8dee84..403745d8 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -1,155 +1,7 @@ Examples =============== -Basic example -^^^^^^^^^^^^^ - -All examples in this section are parts of `basic example `_. - -For deeper upderstanding it is better to read the whole example. - -Create table ------------- - -.. code-block:: python - - def create_tables(pool: ydb.QuerySessionPool): - print("\nCreating table series...") - pool.execute_with_retries( - """ - CREATE table `series` ( - `series_id` Int64, - `title` Utf8, - `series_info` Utf8, - `release_date` Date, - PRIMARY KEY (`series_id`) - ) - """ - ) - - print("\nCreating table seasons...") - pool.execute_with_retries( - """ - CREATE table `seasons` ( - `series_id` Int64, - `season_id` Int64, - `title` Utf8, - `first_aired` Date, - `last_aired` Date, - PRIMARY KEY (`series_id`, `season_id`) - ) - """ - ) - - print("\nCreating table episodes...") - pool.execute_with_retries( - """ - CREATE table `episodes` ( - `series_id` Int64, - `season_id` Int64, - `episode_id` Int64, - `title` Utf8, - `air_date` Date, - PRIMARY KEY (`series_id`, `season_id`, `episode_id`) - ) - """ - ) - - -Upsert Simple -------------- - -.. code-block:: python - - def upsert_simple(pool: ydb.QuerySessionPool): - print("\nPerforming UPSERT into episodes...") - - pool.execute_with_retries( - """ - UPSERT INTO episodes (series_id, season_id, episode_id, title) VALUES (2, 6, 1, "TBD"); - """ - ) - - -Simple Select ----------- - -.. code-block:: python - - def select_simple(pool: ydb.QuerySessionPool): - print("\nCheck series table...") - result_sets = pool.execute_with_retries( - """ - SELECT - series_id, - title, - release_date - FROM series - WHERE series_id = 1; - """, - ) - first_set = result_sets[0] - for row in first_set.rows: - print( - "series, id: ", - row.series_id, - ", title: ", - row.title, - ", release date: ", - row.release_date, - ) - - return first_set - -Select With Parameters ----------------------- - -.. code-block:: python - - def select_with_parameters(pool: ydb.QuerySessionPool, series_id, season_id, episode_id): - result_sets = pool.execute_with_retries( - """ - DECLARE $seriesId AS Int64; - DECLARE $seasonId AS Int64; - DECLARE $episodeId AS Int64; - - SELECT - title, - air_date - FROM episodes - WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; - """, - { - "$seriesId": series_id, # could be defined implicit - "$seasonId": (season_id, ydb.PrimitiveType.Int64), # could be defined via tuple - "$episodeId": ydb.TypedValue(episode_id, ydb.PrimitiveType.Int64), # could be defined via special class - }, - ) - - print("\n> select_with_parameters:") - first_set = result_sets[0] - for row in first_set.rows: - print("episode title:", row.title, ", air date:", row.air_date) - - return first_set - -Huge Select ------------ - -.. code-block:: python - - def huge_select(pool: ydb.QuerySessionPool): - def callee(session: ydb.QuerySessionSync): - query = """SELECT * from episodes;""" - - with session.transaction().execute( - query, - commit_tx=True, - ) as result_sets: - print("\n> Huge SELECT call") - for result_set in result_sets: - for row in result_set.rows: - print("episode title:", row.title, ", air date:", row.air_date) - - return pool.retry_operation_sync(callee) +.. toctree:: + :maxdepth: 3 + examples/basic_example \ No newline at end of file diff --git a/docs/examples/basic_example.rst b/docs/examples/basic_example.rst new file mode 100644 index 00000000..e7f38737 --- /dev/null +++ b/docs/examples/basic_example.rst @@ -0,0 +1,152 @@ +Basic example +============= + +All examples in this section are parts of `basic example `_. + +For deeper upderstanding it is better to read the whole example. + +Create table +------------ + +.. code-block:: python + + def create_tables(pool: ydb.QuerySessionPool): + print("\nCreating table series...") + pool.execute_with_retries( + """ + CREATE table `series` ( + `series_id` Int64, + `title` Utf8, + `series_info` Utf8, + `release_date` Date, + PRIMARY KEY (`series_id`) + ) + """ + ) + + print("\nCreating table seasons...") + pool.execute_with_retries( + """ + CREATE table `seasons` ( + `series_id` Int64, + `season_id` Int64, + `title` Utf8, + `first_aired` Date, + `last_aired` Date, + PRIMARY KEY (`series_id`, `season_id`) + ) + """ + ) + + print("\nCreating table episodes...") + pool.execute_with_retries( + """ + CREATE table `episodes` ( + `series_id` Int64, + `season_id` Int64, + `episode_id` Int64, + `title` Utf8, + `air_date` Date, + PRIMARY KEY (`series_id`, `season_id`, `episode_id`) + ) + """ + ) + + +Upsert Simple +------------- + +.. code-block:: python + + def upsert_simple(pool: ydb.QuerySessionPool): + print("\nPerforming UPSERT into episodes...") + + pool.execute_with_retries( + """ + UPSERT INTO episodes (series_id, season_id, episode_id, title) VALUES (2, 6, 1, "TBD"); + """ + ) + + +Simple Select +---------- + +.. code-block:: python + + def select_simple(pool: ydb.QuerySessionPool): + print("\nCheck series table...") + result_sets = pool.execute_with_retries( + """ + SELECT + series_id, + title, + release_date + FROM series + WHERE series_id = 1; + """, + ) + first_set = result_sets[0] + for row in first_set.rows: + print( + "series, id: ", + row.series_id, + ", title: ", + row.title, + ", release date: ", + row.release_date, + ) + + return first_set + +Select With Parameters +---------------------- + +.. code-block:: python + + def select_with_parameters(pool: ydb.QuerySessionPool, series_id, season_id, episode_id): + result_sets = pool.execute_with_retries( + """ + DECLARE $seriesId AS Int64; + DECLARE $seasonId AS Int64; + DECLARE $episodeId AS Int64; + + SELECT + title, + air_date + FROM episodes + WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId; + """, + { + "$seriesId": series_id, # could be defined implicit + "$seasonId": (season_id, ydb.PrimitiveType.Int64), # could be defined via tuple + "$episodeId": ydb.TypedValue(episode_id, ydb.PrimitiveType.Int64), # could be defined via special class + }, + ) + + print("\n> select_with_parameters:") + first_set = result_sets[0] + for row in first_set.rows: + print("episode title:", row.title, ", air date:", row.air_date) + + return first_set + +Huge Select +----------- + +.. code-block:: python + + def huge_select(pool: ydb.QuerySessionPool): + def callee(session: ydb.QuerySessionSync): + query = """SELECT * from episodes;""" + + with session.transaction().execute( + query, + commit_tx=True, + ) as result_sets: + print("\n> Huge SELECT call") + for result_set in result_sets: + for row in result_set.rows: + print("episode title:", row.title, ", air date:", row.air_date) + + return pool.retry_operation_sync(callee) + From d36e407c43a103fe5785336a4fa1abc51f56c745 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 3 Oct 2024 17:17:31 +0300 Subject: [PATCH 262/429] temporary allow to publish docs from branch --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 07b7645f..82bb9a71 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,7 +2,7 @@ name: Deploy Sphinx documentation to Github Pages on: push: - branches: [main] # branch to trigger deployment + branches: [main, fix_driver_and_driver_config_collision] # branch to trigger deployment jobs: pages: From f24ae46cf2318d383423d1afd62b65e1b87ef0d4 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 3 Oct 2024 17:41:38 +0300 Subject: [PATCH 263/429] Describe all authentication methods in docs --- docs/examples.rst | 3 +- docs/examples/authentication.rst | 133 +++++++++++++++++++++++++ examples/static-credentials/example.py | 10 +- 3 files changed, 140 insertions(+), 6 deletions(-) create mode 100644 docs/examples/authentication.rst diff --git a/docs/examples.rst b/docs/examples.rst index 403745d8..8d7cbf3c 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -4,4 +4,5 @@ Examples .. toctree:: :maxdepth: 3 - examples/basic_example \ No newline at end of file + examples/basic_example + examples/authentication \ No newline at end of file diff --git a/docs/examples/authentication.rst b/docs/examples/authentication.rst new file mode 100644 index 00000000..02fffddd --- /dev/null +++ b/docs/examples/authentication.rst @@ -0,0 +1,133 @@ +Authentication +============== + +There are several ways to authenticate through YDB Python SDK. + +Anonymous Credentials +--------------------- + +Full executable example `here `_. + +.. code-block:: python + + driver = ydb.Driver( + endpoint=os.getenv("YDB_ENDPOINT"), + database=os.getenv("YDB_DATABASE"), + credentials=ydb.AnonymousCredentials(), + ) + + +Access Token Credentials +------------------------ + +Full executable example `here `_. + +.. code-block:: python + + driver = ydb.Driver( + endpoint=os.getenv("YDB_ENDPOINT"), + database=os.getenv("YDB_DATABASE"), + credentials=ydb.AccessTokenCredentials(os.getenv("YDB_ACCESS_TOKEN_CREDENTIALS")), + ) + + +Static Credentials (Legacy) +--------------------------- +This method is legacy, use UserPasswordCredentials instead. + +Full executable example `here `_. + + +.. code-block:: python + + driver_config = ydb.DriverConfig( + endpoint=endpoint, + database=database, + ) + creds = ydb.StaticCredentials( + driver_config=driver_config, + user=user, + password=password, + ) + + driver = ydb.Driver( + driver_config=driver_config, + credentials=creds, + ) + + +User Password Credentials +------------------------- + +Full executable example `here `_. + +.. code-block:: python + + driver_config = ydb.DriverConfig( + endpoint=endpoint, + database=database, + credentials=ydb.UserPasswordCredentials( + user=user, + password=password, + endpoint=endpoint, + database=database, + ), + ) + + driver = ydb.Driver(driver_config=driver_config) + + +Service Accaount Credentials +---------------------------- + +Full executable example `here `_. + +.. code-block:: python + + driver = ydb.Driver( + endpoint=os.getenv("YDB_ENDPOINT"), + database=os.getenv("YDB_DATABASE"), + credentials=ydb.iam.ServiceAccountCredentials.from_file( + os.getenv("SA_KEY_FILE"), + ), + ) + + +OAuth 2.0 Token Exchange Credentials +------------------------------------ + +Full executable example `here `_. + +.. code-block:: python + + driver = ydb.Driver( + endpoint=args.endpoint, + database=args.database, + root_certificates=ydb.load_ydb_root_certificate(), + credentials=ydb.oauth2_token_exchange.Oauth2TokenExchangeCredentials( + token_endpoint=args.token_endpoint, + audience=args.audience, + subject_token_source=ydb.oauth2_token_exchange.JwtTokenSource( + signing_method="RS256", + private_key_file=args.private_key_file, + key_id=args.key_id, + issuer=args.issuer, + subject=args.subject, + audience=args.audience, + ), + ), + ) + + +Metadata Credentials +-------------------- + +Full executable example `here `_. + +.. code-block:: python + + driver = ydb.Driver( + endpoint=os.getenv("YDB_ENDPOINT"), + database=os.getenv("YDB_DATABASE"), + credentials=ydb.iam.MetadataUrlCredentials(), + ) diff --git a/examples/static-credentials/example.py b/examples/static-credentials/example.py index 96a3d15f..e45da5a3 100644 --- a/examples/static-credentials/example.py +++ b/examples/static-credentials/example.py @@ -31,13 +31,13 @@ def auth_with_static_credentials_old(endpoint: str, database: str, user: str, pa def auth_with_static_credentials_new(endpoint: str, database: str, user: str, password: str): driver_config = ydb.DriverConfig( - endpoint, - database, + endpoint=endpoint, + database=database, ) creds = ydb.StaticCredentials( - driver_config, - user, - password, + driver_config=driver_config, + user=user, + password=password, ) with ydb.Driver(driver_config=driver_config, credentials=creds) as driver: From e3a2f98dfc5ffebe620e01ea4937e857684a2077 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 4 Oct 2024 14:05:13 +0300 Subject: [PATCH 264/429] new way to create static credentials --- examples/static-credentials/example.py | 12 ++++++++++++ ydb/credentials.py | 24 +++++++++++++++++++----- ydb/driver.py | 14 ++++++++------ 3 files changed, 39 insertions(+), 11 deletions(-) diff --git a/examples/static-credentials/example.py b/examples/static-credentials/example.py index e45da5a3..d269da60 100644 --- a/examples/static-credentials/example.py +++ b/examples/static-credentials/example.py @@ -44,6 +44,17 @@ def auth_with_static_credentials_new(endpoint: str, database: str, user: str, pa test_driver_works(driver) +def auth_with_static_credentials_new2(endpoint: str, database: str, user: str, password: str): + driver_config = ydb.DriverConfig( + endpoint=endpoint, + database=database, + credentials=ydb.StaticCredentials.from_user_password(user, password), + ) + + with ydb.Driver(driver_config=driver_config) as driver: + test_driver_works(driver) + + def auth_with_user_password_credentials(endpoint: str, database: str, user: str, password: str): driver_config = ydb.DriverConfig( endpoint=endpoint, @@ -63,4 +74,5 @@ def auth_with_user_password_credentials(endpoint: str, database: str, user: str, def run(endpoint: str, database: str, user: str, password: str): auth_with_static_credentials_old(endpoint, database, user, password) auth_with_static_credentials_new(endpoint, database, user, password) + auth_with_static_credentials_new2(endpoint, database, user, password) auth_with_user_password_credentials(endpoint, database, user, password) diff --git a/ydb/credentials.py b/ydb/credentials.py index a3e054ce..7b823b25 100644 --- a/ydb/credentials.py +++ b/ydb/credentials.py @@ -188,15 +188,20 @@ def __init__(self, driver_config, user, password="", tracer=None): from .driver import DriverConfig - self.driver_config = DriverConfig( - endpoint=driver_config.endpoint, - database=driver_config.database, - root_certificates=driver_config.root_certificates, - ) + if driver_config is not None: + self.driver_config = DriverConfig( + endpoint=driver_config.endpoint, + database=driver_config.database, + root_certificates=driver_config.root_certificates, + ) self.user = user self.password = password self.request_timeout = 10 + @classmethod + def from_user_password(cls, user: str, password: str, tracer=None): + return cls(None, user, password, tracer) + def _make_token_request(self): conn = connection.Connection.ready_factory(self.driver_config.endpoint, self.driver_config) assert conn is not None, "Failed to establish connection in to %s" % self.driver_config.endpoint @@ -212,6 +217,15 @@ def _make_token_request(self): conn.close() return {"expires_in": 30 * 60, "access_token": result.token} + def _update_driver_config(self, driver_config): + from .driver import DriverConfig + + self.driver_config = DriverConfig( + endpoint=driver_config.endpoint, + database=driver_config.database, + root_certificates=driver_config.root_certificates, + ) + class UserPasswordCredentials(AbstractExpiringTokenCredentials): def __init__(self, user, password, endpoint, database, root_certificates=None, tracer=None): diff --git a/ydb/driver.py b/ydb/driver.py index 4c6b6eb5..b811bd76 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -226,14 +226,16 @@ def get_config( driver_config = config_class.default_from_endpoint_and_database( endpoint, database, root_certificates, credentials, **kwargs ) - return driver_config + else: + kwargs["endpoint"] = endpoint + kwargs["database"] = database + kwargs["root_certificates"] = root_certificates + kwargs["credentials"] = credentials - kwargs["endpoint"] = endpoint - kwargs["database"] = database - kwargs["root_certificates"] = root_certificates - kwargs["credentials"] = credentials + driver_config._update_attrs_by_kwargs(**kwargs) - driver_config._update_attrs_by_kwargs(**kwargs) + if isinstance(driver_config.credentials, credentials_impl.StaticCredentials): + driver_config.credentials._update_driver_config(driver_config) return driver_config From dff73035a2f4fccb3b2f6dd00342579afd943f47 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 4 Oct 2024 16:05:20 +0300 Subject: [PATCH 265/429] make _update_driver_config common method to all credentials --- ydb/credentials.py | 3 +++ ydb/driver.py | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ydb/credentials.py b/ydb/credentials.py index 7b823b25..882ea6a1 100644 --- a/ydb/credentials.py +++ b/ydb/credentials.py @@ -45,6 +45,9 @@ def get_auth_token(self) -> str: return token return "" + def _update_driver_config(self, driver_config): + pass + class OneToManyValue(object): def __init__(self): diff --git a/ydb/driver.py b/ydb/driver.py index b811bd76..0e59301b 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -234,8 +234,7 @@ def get_config( driver_config._update_attrs_by_kwargs(**kwargs) - if isinstance(driver_config.credentials, credentials_impl.StaticCredentials): - driver_config.credentials._update_driver_config(driver_config) + driver_config.credentials._update_driver_config(driver_config) return driver_config From 257f5c42bf618360785e91c9be217c9edd389496 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 4 Oct 2024 16:35:25 +0300 Subject: [PATCH 266/429] remove UserPasswordCredentials --- docs/examples/authentication.rst | 35 ++------------ examples/static-credentials/example.py | 63 ++------------------------ ydb/credentials.py | 32 ------------- 3 files changed, 7 insertions(+), 123 deletions(-) diff --git a/docs/examples/authentication.rst b/docs/examples/authentication.rst index 02fffddd..9f489172 100644 --- a/docs/examples/authentication.rst +++ b/docs/examples/authentication.rst @@ -31,9 +31,8 @@ Full executable example `here `_. @@ -43,41 +42,13 @@ Full executable example `here `_. - -.. code-block:: python - - driver_config = ydb.DriverConfig( - endpoint=endpoint, - database=database, - credentials=ydb.UserPasswordCredentials( - user=user, - password=password, - endpoint=endpoint, - database=database, - ), + credentials=ydb.StaticCredentials.from_user_password(user, password), ) driver = ydb.Driver(driver_config=driver_config) -Service Accaount Credentials +Service Account Credentials ---------------------------- Full executable example `here `_. diff --git a/examples/static-credentials/example.py b/examples/static-credentials/example.py index d269da60..71409f5c 100644 --- a/examples/static-credentials/example.py +++ b/examples/static-credentials/example.py @@ -4,47 +4,11 @@ def test_driver_works(driver: ydb.Driver): driver.wait(5) pool = ydb.QuerySessionPool(driver) - pool.execute_with_retries("SELECT 1") - print("everything is fine") + result = pool.execute_with_retries("SELECT 1 as cnt") + assert result[0].rows[0].cnt == 1 -def auth_with_static_credentials_old(endpoint: str, database: str, user: str, password: str): - driver_config_temp = ydb.DriverConfig( - endpoint=endpoint, - database=database, - ) - creds = ydb.StaticCredentials( - driver_config=driver_config_temp, - user=user, - password=password, - ) - - driver_config = ydb.DriverConfig( - endpoint=endpoint, - database=database, - credentials=creds, - ) - - with ydb.Driver(driver_config=driver_config) as driver: - test_driver_works(driver) - - -def auth_with_static_credentials_new(endpoint: str, database: str, user: str, password: str): - driver_config = ydb.DriverConfig( - endpoint=endpoint, - database=database, - ) - creds = ydb.StaticCredentials( - driver_config=driver_config, - user=user, - password=password, - ) - - with ydb.Driver(driver_config=driver_config, credentials=creds) as driver: - test_driver_works(driver) - - -def auth_with_static_credentials_new2(endpoint: str, database: str, user: str, password: str): +def auth_with_static_credentials(endpoint: str, database: str, user: str, password: str): driver_config = ydb.DriverConfig( endpoint=endpoint, database=database, @@ -55,24 +19,5 @@ def auth_with_static_credentials_new2(endpoint: str, database: str, user: str, p test_driver_works(driver) -def auth_with_user_password_credentials(endpoint: str, database: str, user: str, password: str): - driver_config = ydb.DriverConfig( - endpoint=endpoint, - database=database, - credentials=ydb.UserPasswordCredentials( - user=user, - password=password, - endpoint=endpoint, - database=database, - ), - ) - - with ydb.Driver(driver_config=driver_config) as driver: - test_driver_works(driver) - - def run(endpoint: str, database: str, user: str, password: str): - auth_with_static_credentials_old(endpoint, database, user, password) - auth_with_static_credentials_new(endpoint, database, user, password) - auth_with_static_credentials_new2(endpoint, database, user, password) - auth_with_user_password_credentials(endpoint, database, user, password) + auth_with_static_credentials(endpoint, database, user, password) diff --git a/ydb/credentials.py b/ydb/credentials.py index 882ea6a1..ab721d0b 100644 --- a/ydb/credentials.py +++ b/ydb/credentials.py @@ -230,38 +230,6 @@ def _update_driver_config(self, driver_config): ) -class UserPasswordCredentials(AbstractExpiringTokenCredentials): - def __init__(self, user, password, endpoint, database, root_certificates=None, tracer=None): - super(UserPasswordCredentials, self).__init__(tracer) - - from .driver import DriverConfig # to prevent circular dependencies - - self.driver_config = DriverConfig( - endpoint=endpoint, - database=database, - root_certificates=root_certificates, - ) - - self.user = user - self.password = password - self.request_timeout = 10 - - def _make_token_request(self): - conn = connection.Connection.ready_factory(self.driver_config.endpoint, self.driver_config) - assert conn is not None, "Failed to establish connection in to %s" % self.driver_config.endpoint - try: - result = conn( - ydb_auth_pb2.LoginRequest(user=self.user, password=self.password), - ydb_auth_v1_pb2_grpc.AuthServiceStub, - "Login", - _wrap_static_credentials_response, - settings_impl.BaseRequestSettings().with_timeout(self.request_timeout).with_need_rpc_auth(False), - ) - finally: - conn.close() - return {"expires_in": 30 * 60, "access_token": result.token} - - class AnonymousCredentials(Credentials): @staticmethod def auth_metadata(): From ae3f8f913353b2d5a29929caf9b148df86c60aa7 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 4 Oct 2024 16:54:14 +0300 Subject: [PATCH 267/429] add unit tests to static credentials --- tests/auth/test_static_credentials.py | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/auth/test_static_credentials.py diff --git a/tests/auth/test_static_credentials.py b/tests/auth/test_static_credentials.py new file mode 100644 index 00000000..c6d2d640 --- /dev/null +++ b/tests/auth/test_static_credentials.py @@ -0,0 +1,50 @@ +import pytest +import ydb + +from concurrent.futures import TimeoutError + + +USERNAME = "root" +PASSWORD = "1234" + + +def check_driver_works(driver): + driver.wait(timeout=15) + pool = ydb.QuerySessionPool(driver) + result = pool.execute_with_retries("SELECT 1 as cnt") + assert result[0].rows[0].cnt == 1 + + +def test_static_credentials_default(endpoint, database): + driver_config = ydb.DriverConfig( + endpoint, + database + ) + credentials = ydb.StaticCredentials(driver_config, USERNAME, PASSWORD) + + with ydb.Driver(driver_config=driver_config, credentials=credentials) as driver: + check_driver_works(driver) + + +def test_static_credentials_classmethod(endpoint, database): + driver_config = ydb.DriverConfig( + endpoint, + database, + credentials=ydb.StaticCredentials.from_user_password(USERNAME, PASSWORD) + ) + + with ydb.Driver(driver_config=driver_config) as driver: + check_driver_works(driver) + + +def test_static_credentials_wrong_creds(endpoint, database): + driver_config = ydb.DriverConfig( + endpoint, + database, + credentials=ydb.StaticCredentials.from_user_password(USERNAME, PASSWORD*2) + ) + + with pytest.raises(TimeoutError): + with ydb.Driver(driver_config=driver_config) as driver: + driver.wait(5) + From ff72d74c037be213d90a491b276a51becf98e6aa Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 4 Oct 2024 16:56:15 +0300 Subject: [PATCH 268/429] style fixes --- tests/auth/test_static_credentials.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/auth/test_static_credentials.py b/tests/auth/test_static_credentials.py index c6d2d640..4371c460 100644 --- a/tests/auth/test_static_credentials.py +++ b/tests/auth/test_static_credentials.py @@ -18,7 +18,7 @@ def check_driver_works(driver): def test_static_credentials_default(endpoint, database): driver_config = ydb.DriverConfig( endpoint, - database + database, ) credentials = ydb.StaticCredentials(driver_config, USERNAME, PASSWORD) @@ -30,7 +30,7 @@ def test_static_credentials_classmethod(endpoint, database): driver_config = ydb.DriverConfig( endpoint, database, - credentials=ydb.StaticCredentials.from_user_password(USERNAME, PASSWORD) + credentials=ydb.StaticCredentials.from_user_password(USERNAME, PASSWORD), ) with ydb.Driver(driver_config=driver_config) as driver: @@ -41,10 +41,9 @@ def test_static_credentials_wrong_creds(endpoint, database): driver_config = ydb.DriverConfig( endpoint, database, - credentials=ydb.StaticCredentials.from_user_password(USERNAME, PASSWORD*2) + credentials=ydb.StaticCredentials.from_user_password(USERNAME, PASSWORD*2), ) with pytest.raises(TimeoutError): with ydb.Driver(driver_config=driver_config) as driver: driver.wait(5) - From 4675d5767a17c73a521ce5d00e860cac8010c565 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 4 Oct 2024 16:59:14 +0300 Subject: [PATCH 269/429] fix test --- tests/auth/test_static_credentials.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/auth/test_static_credentials.py b/tests/auth/test_static_credentials.py index 4371c460..a9239f2a 100644 --- a/tests/auth/test_static_credentials.py +++ b/tests/auth/test_static_credentials.py @@ -1,8 +1,6 @@ import pytest import ydb -from concurrent.futures import TimeoutError - USERNAME = "root" PASSWORD = "1234" @@ -41,9 +39,9 @@ def test_static_credentials_wrong_creds(endpoint, database): driver_config = ydb.DriverConfig( endpoint, database, - credentials=ydb.StaticCredentials.from_user_password(USERNAME, PASSWORD*2), + credentials=ydb.StaticCredentials.from_user_password(USERNAME, PASSWORD * 2), ) - with pytest.raises(TimeoutError): + with pytest.raises(ydb.ConnectionFailure): with ydb.Driver(driver_config=driver_config) as driver: - driver.wait(5) + driver.wait(5, fail_fast=True) From df79b1766e090065feac0c7e0ab2cbf32e5320c7 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 4 Oct 2024 19:04:27 +0300 Subject: [PATCH 270/429] Update driver.py --- ydb/driver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ydb/driver.py b/ydb/driver.py index 0e59301b..1559b0d0 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -234,7 +234,8 @@ def get_config( driver_config._update_attrs_by_kwargs(**kwargs) - driver_config.credentials._update_driver_config(driver_config) + if driver_config.credentials is not None: + driver_config.credentials._update_driver_config(driver_config) return driver_config From eaf6807dc67d1691a4f3db1b85e3fdd139e30b9c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 4 Oct 2024 19:35:24 +0300 Subject: [PATCH 271/429] Update docs.yml --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 82bb9a71..568e881f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,7 +2,7 @@ name: Deploy Sphinx documentation to Github Pages on: push: - branches: [main, fix_driver_and_driver_config_collision] # branch to trigger deployment + branches: [main] # branch to trigger deployment jobs: pages: @@ -15,4 +15,4 @@ jobs: id-token: write steps: - id: deployment - uses: sphinx-notes/pages@v3 \ No newline at end of file + uses: sphinx-notes/pages@v3 From e4fbe7f0e655db8e7a361a6f505cdc237b9a3506 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 7 Oct 2024 11:03:52 +0300 Subject: [PATCH 272/429] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5bad2c6..079bab7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +* Add an ability to use both driver config and driver args +* Added new way to create StaticCredentials + ## 3.18.0 ## * Ability to batch messages in topic reader * Implement max_messages on recieve_batch From 42140daae379ed55f89793b7d5a83bcb10c7a7e9 Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 7 Oct 2024 08:04:31 +0000 Subject: [PATCH 273/429] Release: 3.18.1 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 079bab7a..66180896 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.1 ## * Add an ability to use both driver config and driver args * Added new way to create StaticCredentials diff --git a/setup.py b/setup.py index 7614921b..d8b7ddeb 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.0", # AUTOVERSION + version="3.18.1", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index ed2ab66d..f890bc72 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.0" +VERSION = "3.18.1" From e84da70e38bf72766927ac3869f51bd0a1508837 Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Mon, 7 Oct 2024 17:13:26 +0300 Subject: [PATCH 274/429] add uuid tests --- tests/query/test_query_parameters.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/query/test_query_parameters.py b/tests/query/test_query_parameters.py index 4fccca0f..950a2dfc 100644 --- a/tests/query/test_query_parameters.py +++ b/tests/query/test_query_parameters.py @@ -1,3 +1,5 @@ +import uuid + import pytest import ydb @@ -152,3 +154,27 @@ class CustomClass: typed_value = ydb.TypedValue(expected_value) with pytest.raises(ValueError): pool.execute_with_retries(query, parameters={"$a": typed_value}) + + +def test_uuid_send(pool: ydb.QuerySessionPool): + val = uuid.UUID("52F84CBA-B15A-4BF2-9696-161ECA74CB5D") + query = """ +DECLARE $val AS UUID; + +SELECT CAST($val AS Utf8) AS value +""" + res = pool.execute_with_retries(query, parameters={"$val": ydb.TypedValue(val, ydb.PrimitiveType.UUID)}) + actual_value = res[0].rows[0]["value"] + assert actual_value.upper() == str(val).upper() + + +def test_uuid_read(pool: ydb.QuerySessionPool): + val = uuid.UUID("52F84CBA-B15A-4BF2-9696-161ECA74CB5D") + query = """ +DECLARE $val AS Utf8; + +SELECT CAST($val AS UUID) AS value +""" + res = pool.execute_with_retries(query, parameters={"$val": ydb.TypedValue(str(val), ydb.PrimitiveType.Utf8)}) + actual_value = res[0].rows[0]["value"] + assert actual_value.hex.upper() == val.hex.upper() From b4505f395c08b5979f71fb54a04331315c04348d Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 9 Oct 2024 11:32:19 +0300 Subject: [PATCH 275/429] fix arcadia compatibility --- ydb/_grpc/common/__init__.py | 10 +++++++++- ydb/draft/_apis.py | 12 ++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ydb/_grpc/common/__init__.py b/ydb/_grpc/common/__init__.py index 3b56178b..bab864e0 100644 --- a/ydb/_grpc/common/__init__.py +++ b/ydb/_grpc/common/__init__.py @@ -10,7 +10,15 @@ protobuf_version = Version(google.protobuf.__version__) # for compatible with arcadia -if _utilities.check_module_exists("ydb.public.api"): +if _utilities.check_module_exists("contrib.ydb.public.api"): + from contrib.ydb.public.api.grpc import * # noqa + + sys.modules["ydb._grpc.common"] = sys.modules["contrib.ydb.public.api.grpc"] + + from contrib.ydb.public.api import protos + + sys.modules["ydb._grpc.common.protos"] = sys.modules["contrib.ydb.public.api.protos"] +elif _utilities.check_module_exists("ydb.public.api"): from ydb.public.api.grpc import * # noqa sys.modules["ydb._grpc.common"] = sys.modules["ydb.public.api.grpc"] diff --git a/ydb/draft/_apis.py b/ydb/draft/_apis.py index 5b878677..d7b93b0a 100644 --- a/ydb/draft/_apis.py +++ b/ydb/draft/_apis.py @@ -14,10 +14,14 @@ from .._grpc.common.draft import ( ydb_dynamic_config_v1_pb2_grpc, ) - - from .._grpc.common.draft.protos import ( - ydb_dynamic_config_pb2, - ) + try: + from .._grpc.common.draft.protos import ( + ydb_dynamic_config_pb2, + ) + except ImportError: + from .._grpc.common.protos.draft import ( + ydb_dynamic_config_pb2, + ) ydb_dynamic_config = ydb_dynamic_config_pb2 From 4d6ce5c5cfbb486072f13e2c577caa44d3fb6830 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 9 Oct 2024 13:58:10 +0300 Subject: [PATCH 276/429] style fixes --- ydb/draft/_apis.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ydb/draft/_apis.py b/ydb/draft/_apis.py index d7b93b0a..e3f63387 100644 --- a/ydb/draft/_apis.py +++ b/ydb/draft/_apis.py @@ -14,6 +14,7 @@ from .._grpc.common.draft import ( ydb_dynamic_config_v1_pb2_grpc, ) + try: from .._grpc.common.draft.protos import ( ydb_dynamic_config_pb2, From 3702d4f4e6c4b834b46a29fb2eba22c2c75c9434 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 9 Oct 2024 16:36:50 +0300 Subject: [PATCH 277/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66180896..870ba5c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Fix compatibility with arcadia + ## 3.18.1 ## * Add an ability to use both driver config and driver args * Added new way to create StaticCredentials From de53d9b0095bf0a5114b8bc4f901354ea2872c54 Mon Sep 17 00:00:00 2001 From: robot Date: Wed, 9 Oct 2024 13:37:32 +0000 Subject: [PATCH 278/429] Release: 3.18.2 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 870ba5c9..0d18b05b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.2 ## * Fix compatibility with arcadia ## 3.18.1 ## diff --git a/setup.py b/setup.py index d8b7ddeb..5e3793b0 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.1", # AUTOVERSION + version="3.18.2", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index f890bc72..836184b5 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.1" +VERSION = "3.18.2" From d52cc61fb9bf9b578c28c92f4f26cfbaaf4463e0 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 14 Oct 2024 14:57:22 +0300 Subject: [PATCH 279/429] Add build method to QueryOnlineReadOnly mode --- ydb/_grpc/grpcwrapper/ydb_query_public_types.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ydb/_grpc/grpcwrapper/ydb_query_public_types.py b/ydb/_grpc/grpcwrapper/ydb_query_public_types.py index 9888a677..fc952652 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query_public_types.py +++ b/ydb/_grpc/grpcwrapper/ydb_query_public_types.py @@ -70,6 +70,10 @@ def __init__(self, allow_inconsistent_reads: bool = False): def name(self): return self._name + def with_allow_inconsistent_reads(self) -> "QueryOnlineReadOnly": + self.allow_inconsistent_reads = True + return self + def to_proto(self) -> ydb_query_pb2.OnlineModeSettings: return ydb_query_pb2.OnlineModeSettings(allow_inconsistent_reads=self.allow_inconsistent_reads) From 4890ce51a6dfb1f9414aa1f5c56043f36e6ff446 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 15 Oct 2024 13:33:17 +0300 Subject: [PATCH 280/429] Hide session management for table client methods --- ydb/aio/table.py | 105 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/ydb/aio/table.py b/ydb/aio/table.py index 3c25f7d2..df9b5eb9 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -13,6 +13,7 @@ _scan_query_request_factory, _wrap_scan_query_response, BaseTxContext, + TableDescription, ) from . import _utilities from ydb import _apis, _session_impl @@ -139,6 +140,11 @@ async def rename_tables(self, rename_items, settings=None): # pylint: disable=W class TableClient(BaseTableClient): + def __init__(self, driver, table_client_settings=None): + # type:(ydb.Driver, ydb.TableClientSettings) -> None + super().__init__(driver=driver, table_client_settings=table_client_settings) + self._pool: SessionPool = SessionPool(self._driver, 10) + def session(self): return Session(self._driver, self._table_client_settings) @@ -158,6 +164,105 @@ async def scan_query(self, query, parameters=None, settings=None): # pylint: di lambda resp: _wrap_scan_query_response(resp, self._table_client_settings), ) + async def create_table( + self, + path: str, + table_description: TableDescription, + settings: typing.Optional[settings_impl.BaseRequestSettings] = None, + ): + """ + Create a YDB table. + + :param path: A table path + :param table_description: A description of table to create. An instance TableDescription + :param settings: An instance of BaseRequestSettings that describes how rpc should invoked. + + :return: A description of created scheme entry or error otherwise. + """ + async def callee(session: Session): + return await session.create_table(path=path, table_description=table_description, settings=settings) + + return await self._pool.retry_operation(callee) + + async def drop_table( + self, + path: str, + settings: typing.Optional[settings_impl.BaseRequestSettings] = None, + ): + async def callee(session: Session): + return await session.drop_table(path=path, settings=settings) + + return await self._pool.retry_operation(callee) + + async def alter_table( + self, + path, + add_columns=None, + drop_columns=None, + settings=None, + alter_attributes=None, + add_indexes=None, + drop_indexes=None, + set_ttl_settings=None, + drop_ttl_settings=None, + add_column_families=None, + alter_column_families=None, + alter_storage_settings=None, + set_compaction_policy=None, + alter_partitioning_settings=None, + set_key_bloom_filter=None, + set_read_replicas_settings=None, + ): + async def callee(session: Session): + return await session.alter_table( + path=path, + add_columns=add_columns, + drop_columns=drop_columns, + settings=settings, + alter_attributes=alter_attributes, + add_indexes=add_indexes, + drop_indexes=drop_indexes, + set_ttl_settings=set_ttl_settings, + drop_ttl_settings=drop_ttl_settings, + add_column_families=add_column_families, + alter_column_families=alter_column_families, + alter_storage_settings=alter_storage_settings, + set_compaction_policy=set_compaction_policy, + alter_partitioning_settings=alter_partitioning_settings, + set_key_bloom_filter=set_key_bloom_filter, + set_read_replicas_settings=set_read_replicas_settings, + ) + + return await self._pool.retry_operation(callee) + + async def describe_table(self, path, settings=None): + async def callee(session: Session): + return await session.describe_table(path=path, settings=settings) + + return await self._pool.retry_operation(callee) + + async def copy_table(self, source_path, destination_path, settings=None): + async def callee(session: Session): + return await session.copy_table( + source_path=source_path, + destination_path=destination_path, + settings=settings, + ) + + return await self._pool.retry_operation(callee) + + async def copy_tables(self, source_destination_pairs, settings=None): + async def callee(session: Session): + return await session.copy_tables(source_destination_pairs=source_destination_pairs, settings=settings) + + return await self._pool.retry_operation(callee) + + async def rename_tables(self, rename_items, settings=None): + async def callee(session: Session): + return await session.rename_tables(rename_items=rename_items, settings=settings) + + return await self._pool.retry_operation(callee) + class TxContext(BaseTxContext): async def __aenter__(self): From e7104d376651cc1f15b0c105ac2437bff793e1c6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 15 Oct 2024 14:59:40 +0300 Subject: [PATCH 281/429] sync methods --- ydb/table.py | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/ydb/table.py b/ydb/table.py index 01f5e52b..9bf91556 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -4,6 +4,7 @@ from abc import abstractmethod import logging import enum +import typing from . import ( issues, @@ -1193,6 +1194,11 @@ def bulk_upsert(self, table_path, rows, column_types, settings=None): class TableClient(BaseTableClient): + def __init__(self, driver, table_client_settings=None): + # type:(ydb.Driver, ydb.TableClientSettings) -> None + super().__init__(driver=driver, table_client_settings=table_client_settings) + self._pool: SessionPool = SessionPool(self._driver, 10) + def async_scan_query(self, query, parameters=None, settings=None): # type: (ydb.ScanQuery, tuple, ydb.BaseRequestSettings) -> ydb.AsyncResponseIterator request = _scan_query_request_factory(query, parameters, settings) @@ -1219,6 +1225,105 @@ def async_bulk_upsert(self, table_path, rows, column_types, settings=None): (), ) + def create_table( + self, + path: str, + table_description: TableDescription, + settings: typing.Optional[settings_impl.BaseRequestSettings] = None, + ): + """ + Create a YDB table. + + :param path: A table path + :param table_description: A description of table to create. An instance TableDescription + :param settings: An instance of BaseRequestSettings that describes how rpc should invoked. + + :return: A description of created scheme entry or error otherwise. + """ + def callee(session: Session): + return session.create_table(path=path, table_description=table_description, settings=settings) + + return self._pool.retry_operation_sync(callee) + + def drop_table( + self, + path: str, + settings: typing.Optional[settings_impl.BaseRequestSettings] = None, + ): + def callee(session: Session): + return session.drop_table(path=path, settings=settings) + + return self._pool.retry_operation_sync(callee) + + def alter_table( + self, + path, + add_columns=None, + drop_columns=None, + settings=None, + alter_attributes=None, + add_indexes=None, + drop_indexes=None, + set_ttl_settings=None, + drop_ttl_settings=None, + add_column_families=None, + alter_column_families=None, + alter_storage_settings=None, + set_compaction_policy=None, + alter_partitioning_settings=None, + set_key_bloom_filter=None, + set_read_replicas_settings=None, + ): + def callee(session: Session): + return session.alter_table( + path=path, + add_columns=add_columns, + drop_columns=drop_columns, + settings=settings, + alter_attributes=alter_attributes, + add_indexes=add_indexes, + drop_indexes=drop_indexes, + set_ttl_settings=set_ttl_settings, + drop_ttl_settings=drop_ttl_settings, + add_column_families=add_column_families, + alter_column_families=alter_column_families, + alter_storage_settings=alter_storage_settings, + set_compaction_policy=set_compaction_policy, + alter_partitioning_settings=alter_partitioning_settings, + set_key_bloom_filter=set_key_bloom_filter, + set_read_replicas_settings=set_read_replicas_settings, + ) + + return self._pool.retry_operation_sync(callee) + + def describe_table(self, path, settings=None): + def callee(session: Session): + return session.describe_table(path=path, settings=settings) + + return self._pool.retry_operation_sync(callee) + + def copy_table(self, source_path, destination_path, settings=None): + def callee(session: Session): + return session.copy_table( + source_path=source_path, + destination_path=destination_path, + settings=settings, + ) + + return self._pool.retry_operation_sync(callee) + + def copy_tables(self, source_destination_pairs, settings=None): + def callee(session: Session): + return session.copy_tables(source_destination_pairs=source_destination_pairs, settings=settings) + + return self._pool.retry_operation_sync(callee) + + def rename_tables(self, rename_items, settings=None): + def callee(session: Session): + return session.rename_tables(rename_items=rename_items, settings=settings) + + return self._pool.retry_operation_sync(callee) + def _make_index_description(index): result = TableIndex(index.name).with_index_columns(*tuple(col for col in index.index_columns)) From 2480312a124c4ac2668a31e1fe7438fad13faf68 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 15 Oct 2024 17:32:37 +0300 Subject: [PATCH 282/429] add tests --- tests/aio/test_table_client.py | 88 ++++++++++++++++++++++++++++++++ tests/table/test_table_client.py | 85 ++++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+) create mode 100644 tests/aio/test_table_client.py create mode 100644 tests/table/test_table_client.py diff --git a/tests/aio/test_table_client.py b/tests/aio/test_table_client.py new file mode 100644 index 00000000..b4f3a5ea --- /dev/null +++ b/tests/aio/test_table_client.py @@ -0,0 +1,88 @@ +import pytest +import ydb + + +class TestTableClient: + @pytest.mark.asyncio + async def test_create_table(self, driver: ydb.aio.Driver): + client = driver.table_client + table_name = "/local/testtableclient" + try: + await client.drop_table(table_name) + except ydb.SchemeError: + pass + + with pytest.raises(ydb.SchemeError): + await client.describe_table(table_name) + + description = ( + ydb.TableDescription() + .with_primary_keys("key1", "key2") + .with_columns( + ydb.Column("key1", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("key2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("value", ydb.OptionalType(ydb.PrimitiveType.Utf8)), + ) + ) + + await client.create_table(table_name, description) + + actual_description = await client.describe_table(table_name) + + assert actual_description.columns == description.columns + + @pytest.mark.asyncio + async def test_alter_table(self, driver: ydb.aio.Driver): + client = driver.table_client + + table_name = "/local/testtableclient" + try: + await client.drop_table(table_name) + except ydb.SchemeError: + pass + + description = ( + ydb.TableDescription() + .with_primary_keys("key1", "key2") + .with_columns( + ydb.Column("key1", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("key2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("value", ydb.OptionalType(ydb.PrimitiveType.Utf8)), + ) + ) + + await client.create_table(table_name, description) + + await client.alter_table(table_name, add_columns=[ + ydb.Column("value2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ]) + + description = await client.describe_table(table_name) + assert len(description.columns) == 4 + + @pytest.mark.asyncio + async def test_copy_table(self, driver: ydb.aio.Driver): + client = driver.table_client + table_name = "/local/testtableclient" + try: + await client.drop_table(table_name) + except ydb.SchemeError: + pass + + description = ( + ydb.TableDescription() + .with_primary_keys("key1", "key2") + .with_columns( + ydb.Column("key1", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("key2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("value", ydb.OptionalType(ydb.PrimitiveType.Utf8)), + ) + ) + + await client.create_table(table_name, description) + + await client.copy_table(table_name, table_name + "_copy") + + copied_description = await client.describe_table(table_name + "_copy") + + assert description.columns == copied_description.columns diff --git a/tests/table/test_table_client.py b/tests/table/test_table_client.py new file mode 100644 index 00000000..615c1828 --- /dev/null +++ b/tests/table/test_table_client.py @@ -0,0 +1,85 @@ +import pytest +import ydb + + +class TestTableClient: + def test_create_table(self, driver_sync: ydb.Driver): + client = driver_sync.table_client + table_name = "/local/testtableclient" + try: + client.drop_table(table_name) + except ydb.SchemeError: + pass + + with pytest.raises(ydb.SchemeError): + client.describe_table(table_name) + + description = ( + ydb.TableDescription() + .with_primary_keys("key1", "key2") + .with_columns( + ydb.Column("key1", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("key2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("value", ydb.OptionalType(ydb.PrimitiveType.Utf8)), + ) + ) + + client.create_table(table_name, description) + + actual_description = client.describe_table(table_name) + + assert actual_description.columns == description.columns + + def test_alter_table(self, driver_sync: ydb.Driver): + client = driver_sync.table_client + + table_name = "/local/testtableclient" + try: + client.drop_table(table_name) + except ydb.SchemeError: + pass + + description = ( + ydb.TableDescription() + .with_primary_keys("key1", "key2") + .with_columns( + ydb.Column("key1", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("key2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("value", ydb.OptionalType(ydb.PrimitiveType.Utf8)), + ) + ) + + client.create_table(table_name, description) + + client.alter_table(table_name, add_columns=[ + ydb.Column("value2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ]) + + description = client.describe_table(table_name) + assert len(description.columns) == 4 + + def test_copy_table(self, driver_sync: ydb.Driver): + client = driver_sync.table_client + table_name = "/local/testtableclient" + try: + client.drop_table(table_name) + except ydb.SchemeError: + pass + + description = ( + ydb.TableDescription() + .with_primary_keys("key1", "key2") + .with_columns( + ydb.Column("key1", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("key2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("value", ydb.OptionalType(ydb.PrimitiveType.Utf8)), + ) + ) + + client.create_table(table_name, description) + + client.copy_table(table_name, table_name + "_copy") + + copied_description = client.describe_table(table_name + "_copy") + + assert description.columns == copied_description.columns From f5e568eff5dfbf5b79168f60aa1f9d85808ef73d Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 15 Oct 2024 17:38:16 +0300 Subject: [PATCH 283/429] close pool on driver close --- ydb/aio/driver.py | 4 ++++ ydb/driver.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ydb/aio/driver.py b/ydb/aio/driver.py index 0f4f3630..ad03b207 100644 --- a/ydb/aio/driver.py +++ b/ydb/aio/driver.py @@ -59,3 +59,7 @@ def __init__( self.scheme_client = scheme.SchemeClient(self) self.table_client = table.TableClient(self, config.table_client_settings) self.topic_client = topic.TopicClientAsyncIO(self, config.topic_client_settings) + + async def stop(self, timeout=10): + await self.table_client._pool.stop(timeout) + await super().stop(timeout=timeout) diff --git a/ydb/driver.py b/ydb/driver.py index 1559b0d0..8c8b9ecd 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -282,3 +282,7 @@ def __init__( self.scheme_client = scheme.SchemeClient(self) self.table_client = table.TableClient(self, driver_config.table_client_settings) self.topic_client = topic.TopicClient(self, driver_config.topic_client_settings) + + def stop(self): + self.table_client._pool.stop() + super().stop() From e538b8d8ef7dae22b7c22fc2f1e416fbbdaffb79 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 15 Oct 2024 17:58:37 +0300 Subject: [PATCH 284/429] add tableclient destructors --- ydb/aio/table.py | 4 ++++ ydb/table.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/ydb/aio/table.py b/ydb/aio/table.py index df9b5eb9..2dc5a8bf 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -145,6 +145,10 @@ def __init__(self, driver, table_client_settings=None): super().__init__(driver=driver, table_client_settings=table_client_settings) self._pool: SessionPool = SessionPool(self._driver, 10) + def __del__(self): + if not self._pool._terminating: + asyncio.get_running_loop.call_soon(self._pool.stop) + def session(self): return Session(self._driver, self._table_client_settings) diff --git a/ydb/table.py b/ydb/table.py index 9bf91556..1d998e95 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -1199,6 +1199,9 @@ def __init__(self, driver, table_client_settings=None): super().__init__(driver=driver, table_client_settings=table_client_settings) self._pool: SessionPool = SessionPool(self._driver, 10) + def __del__(self): + self._pool.close() + def async_scan_query(self, query, parameters=None, settings=None): # type: (ydb.ScanQuery, tuple, ydb.BaseRequestSettings) -> ydb.AsyncResponseIterator request = _scan_query_request_factory(query, parameters, settings) From b09f33f825ca7864884d7ca424f321d5fda53ac6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 15 Oct 2024 18:03:05 +0300 Subject: [PATCH 285/429] style fixes --- tests/aio/test_table_client.py | 9 ++++++--- tests/table/test_table_client.py | 9 ++++++--- ydb/aio/table.py | 1 + ydb/table.py | 1 + 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/aio/test_table_client.py b/tests/aio/test_table_client.py index b4f3a5ea..6eb93dbb 100644 --- a/tests/aio/test_table_client.py +++ b/tests/aio/test_table_client.py @@ -53,9 +53,12 @@ async def test_alter_table(self, driver: ydb.aio.Driver): await client.create_table(table_name, description) - await client.alter_table(table_name, add_columns=[ - ydb.Column("value2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), - ]) + await client.alter_table( + table_name, + add_columns=[ + ydb.Column("value2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ] + ) description = await client.describe_table(table_name) assert len(description.columns) == 4 diff --git a/tests/table/test_table_client.py b/tests/table/test_table_client.py index 615c1828..7d7c82c8 100644 --- a/tests/table/test_table_client.py +++ b/tests/table/test_table_client.py @@ -51,9 +51,12 @@ def test_alter_table(self, driver_sync: ydb.Driver): client.create_table(table_name, description) - client.alter_table(table_name, add_columns=[ - ydb.Column("value2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), - ]) + client.alter_table( + table_name, + add_columns=[ + ydb.Column("value2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ] + ) description = client.describe_table(table_name) assert len(description.columns) == 4 diff --git a/ydb/aio/table.py b/ydb/aio/table.py index 2dc5a8bf..046bc01e 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -183,6 +183,7 @@ async def create_table( :return: A description of created scheme entry or error otherwise. """ + async def callee(session: Session): return await session.create_table(path=path, table_description=table_description, settings=settings) diff --git a/ydb/table.py b/ydb/table.py index 1d998e95..224cbf9a 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -1243,6 +1243,7 @@ def create_table( :return: A description of created scheme entry or error otherwise. """ + def callee(session: Session): return session.create_table(path=path, table_description=table_description, settings=settings) From b57e9474e9a046dc6248364aee83d40225f6e2fa Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 15 Oct 2024 18:06:37 +0300 Subject: [PATCH 286/429] style fixes --- tests/aio/test_table_client.py | 2 +- tests/table/test_table_client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/aio/test_table_client.py b/tests/aio/test_table_client.py index 6eb93dbb..89c0ba75 100644 --- a/tests/aio/test_table_client.py +++ b/tests/aio/test_table_client.py @@ -57,7 +57,7 @@ async def test_alter_table(self, driver: ydb.aio.Driver): table_name, add_columns=[ ydb.Column("value2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), - ] + ], ) description = await client.describe_table(table_name) diff --git a/tests/table/test_table_client.py b/tests/table/test_table_client.py index 7d7c82c8..f4e121c8 100644 --- a/tests/table/test_table_client.py +++ b/tests/table/test_table_client.py @@ -55,7 +55,7 @@ def test_alter_table(self, driver_sync: ydb.Driver): table_name, add_columns=[ ydb.Column("value2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), - ] + ], ) description = client.describe_table(table_name) From 1a06f3e2aa44c63e18df33d1461837d28a5d59f0 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 15 Oct 2024 18:48:37 +0300 Subject: [PATCH 287/429] add type hints & docstrings to TableClient --- ydb/aio/table.py | 149 +++++++++++++++++++++++++++++++++++++--------- ydb/table.py | 151 ++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 243 insertions(+), 57 deletions(-) diff --git a/ydb/aio/table.py b/ydb/aio/table.py index 046bc01e..96ecda94 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -3,6 +3,14 @@ import time import typing +from typing import ( + Any, + Dict, + List, + Optional, + Tuple, +) + import ydb from ydb import issues, settings as settings_impl, table @@ -172,16 +180,16 @@ async def create_table( self, path: str, table_description: TableDescription, - settings: typing.Optional[settings_impl.BaseRequestSettings] = None, - ): + settings: Optional[settings_impl.BaseRequestSettings] = None, + ) -> ydb.Operation: """ Create a YDB table. :param path: A table path - :param table_description: A description of table to create. An instance TableDescription - :param settings: An instance of BaseRequestSettings that describes how rpc should invoked. + :param table_description: TableDescription instanse. + :param settings: An instance of BaseRequestSettings that describes how rpc should be invoked. - :return: A description of created scheme entry or error otherwise. + :return: Operation or YDB error otherwise. """ async def callee(session: Session): @@ -192,8 +200,17 @@ async def callee(session: Session): async def drop_table( self, path: str, - settings: typing.Optional[settings_impl.BaseRequestSettings] = None, - ): + settings: Optional[settings_impl.BaseRequestSettings] = None, + ) -> ydb.Operation: + """ + Drop a YDB table. + + :param path: A table path + :param settings: An instance of BaseRequestSettings that describes how rpc should be invoked. + + :return: Operation or YDB error otherwise. + """ + async def callee(session: Session): return await session.drop_table(path=path, settings=settings) @@ -201,23 +218,45 @@ async def callee(session: Session): async def alter_table( self, - path, - add_columns=None, - drop_columns=None, - settings=None, - alter_attributes=None, - add_indexes=None, - drop_indexes=None, - set_ttl_settings=None, - drop_ttl_settings=None, - add_column_families=None, - alter_column_families=None, - alter_storage_settings=None, - set_compaction_policy=None, - alter_partitioning_settings=None, - set_key_bloom_filter=None, - set_read_replicas_settings=None, - ): + path: str, + add_columns: Optional[List[ydb.Column]] = None, + drop_columns: Optional[List[str]] = None, + settings: Optional[settings_impl.BaseRequestSettings] = None, + alter_attributes: Optional[Optional[Dict[str, str]]] = None, + add_indexes: Optional[List[ydb.TableIndex]] = None, + drop_indexes: Optional[List[str]] = None, + set_ttl_settings: Optional[ydb.TtlSettings] = None, + drop_ttl_settings: Optional[Any] = None, + add_column_families: Optional[List[ydb.ColumnFamily]] = None, + alter_column_families: Optional[List[ydb.ColumnFamily]] = None, + alter_storage_settings: Optional[ydb.StorageSettings] = None, + set_compaction_policy: Optional[str] = None, + alter_partitioning_settings: Optional[ydb.PartitioningSettings] = None, + set_key_bloom_filter: Optional[ydb.FeatureFlag] = None, + set_read_replicas_settings: Optional[ydb.ReadReplicasSettings] = None, + ) -> ydb.Operation: + """ + Alter a YDB table. + + :param path: A table path + :param add_columns: List of ydb.Column to add + :param drop_columns: List of column names to drop + :param settings: An instance of BaseRequestSettings that describes how rpc should be invoked. + :param alter_attributes: Dict of attributes to alter + :param add_indexes: List of ydb.TableIndex to add + :param drop_indexes: List of index names to drop + :param set_ttl_settings: ydb.TtlSettings to set + :param drop_ttl_settings: Any to drop + :param add_column_families: List of ydb.ColumnFamily to add + :param alter_column_families: List of ydb.ColumnFamily to alter + :param alter_storage_settings: ydb.StorageSettings to alter + :param set_compaction_policy: Compaction policy + :param alter_partitioning_settings: ydb.PartitioningSettings to alter + :param set_key_bloom_filter: ydb.FeatureFlag to set key bloom filter + + :return: Operation or YDB error otherwise. + """ + async def callee(session: Session): return await session.alter_table( path=path, @@ -240,13 +279,41 @@ async def callee(session: Session): return await self._pool.retry_operation(callee) - async def describe_table(self, path, settings=None): + async def describe_table( + self, + path: str, + settings: Optional[settings_impl.BaseRequestSettings] = None, + ) -> ydb.TableSchemeEntry: + """ + Describe a YDB table. + + :param path: A table path + :param settings: An instance of BaseRequestSettings that describes how rpc should be invoked. + + :return: TableSchemeEntry or YDB error otherwise. + """ + async def callee(session: Session): return await session.describe_table(path=path, settings=settings) return await self._pool.retry_operation(callee) - async def copy_table(self, source_path, destination_path, settings=None): + async def copy_table( + self, + source_path: str, + destination_path: str, + settings: Optional[settings_impl.BaseRequestSettings] = None, + ) -> ydb.Operation: + """ + Copy a YDB table. + + :param source_path: A table path + :param destination_path: Destination table path + :param settings: An instance of BaseRequestSettings that describes how rpc should be invoked. + + :return: Operation or YDB error otherwise. + """ + async def callee(session: Session): return await session.copy_table( source_path=source_path, @@ -256,13 +323,39 @@ async def callee(session: Session): return await self._pool.retry_operation(callee) - async def copy_tables(self, source_destination_pairs, settings=None): + async def copy_tables( + self, + source_destination_pairs: List[Tuple[str, str]], + settings: Optional[settings_impl.BaseRequestSettings] = None + ) -> ydb.Operation: + """ + Copy a YDB tables. + + :param source_destination_pairs: List of tuples (source_path, destination_path) + :param settings: An instance of BaseRequestSettings that describes how rpc should be invoked. + + :return: Operation or YDB error otherwise. + """ + async def callee(session: Session): return await session.copy_tables(source_destination_pairs=source_destination_pairs, settings=settings) return await self._pool.retry_operation(callee) - async def rename_tables(self, rename_items, settings=None): + async def rename_tables( + self, + rename_items: List[Tuple[str, str]], + settings=None + ) -> ydb.Operation: + """ + Rename a YDB tables. + + :param rename_items: List of tuples (current_name, desired_name) + :param settings: An instance of BaseRequestSettings that describes how rpc should be invoked. + + :return: Operation or YDB error otherwise. + """ + async def callee(session: Session): return await session.rename_tables(rename_items=rename_items, settings=settings) diff --git a/ydb/table.py b/ydb/table.py index 224cbf9a..87d5476b 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -6,6 +6,14 @@ import enum import typing +from typing import ( + Any, + Dict, + List, + Optional, + Tuple, +) + from . import ( issues, convert, @@ -1200,7 +1208,7 @@ def __init__(self, driver, table_client_settings=None): self._pool: SessionPool = SessionPool(self._driver, 10) def __del__(self): - self._pool.close() + self._pool.stop() def async_scan_query(self, query, parameters=None, settings=None): # type: (ydb.ScanQuery, tuple, ydb.BaseRequestSettings) -> ydb.AsyncResponseIterator @@ -1232,16 +1240,16 @@ def create_table( self, path: str, table_description: TableDescription, - settings: typing.Optional[settings_impl.BaseRequestSettings] = None, - ): + settings: Optional[settings_impl.BaseRequestSettings] = None, + ) -> ydb.Operation: """ Create a YDB table. :param path: A table path - :param table_description: A description of table to create. An instance TableDescription - :param settings: An instance of BaseRequestSettings that describes how rpc should invoked. + :param table_description: TableDescription instanse. + :param settings: An instance of BaseRequestSettings that describes how rpc should be invoked. - :return: A description of created scheme entry or error otherwise. + :return: Operation or YDB error otherwise. """ def callee(session: Session): @@ -1252,8 +1260,17 @@ def callee(session: Session): def drop_table( self, path: str, - settings: typing.Optional[settings_impl.BaseRequestSettings] = None, - ): + settings: Optional[settings_impl.BaseRequestSettings] = None, + ) -> ydb.Operation: + """ + Drop a YDB table. + + :param path: A table path + :param settings: An instance of BaseRequestSettings that describes how rpc should be invoked. + + :return: Operation or YDB error otherwise. + """ + def callee(session: Session): return session.drop_table(path=path, settings=settings) @@ -1261,23 +1278,45 @@ def callee(session: Session): def alter_table( self, - path, - add_columns=None, - drop_columns=None, - settings=None, - alter_attributes=None, - add_indexes=None, - drop_indexes=None, - set_ttl_settings=None, - drop_ttl_settings=None, - add_column_families=None, - alter_column_families=None, - alter_storage_settings=None, - set_compaction_policy=None, - alter_partitioning_settings=None, - set_key_bloom_filter=None, - set_read_replicas_settings=None, - ): + path: str, + add_columns: Optional[List[ydb.Column]] = None, + drop_columns: Optional[List[str]] = None, + settings: Optional[settings_impl.BaseRequestSettings] = None, + alter_attributes: Optional[Optional[Dict[str, str]]] = None, + add_indexes: Optional[List[ydb.TableIndex]] = None, + drop_indexes: Optional[List[str]] = None, + set_ttl_settings: Optional[ydb.TtlSettings] = None, + drop_ttl_settings: Optional[Any] = None, + add_column_families: Optional[List[ydb.ColumnFamily]] = None, + alter_column_families: Optional[List[ydb.ColumnFamily]] = None, + alter_storage_settings: Optional[ydb.StorageSettings] = None, + set_compaction_policy: Optional[str] = None, + alter_partitioning_settings: Optional[ydb.PartitioningSettings] = None, + set_key_bloom_filter: Optional[ydb.FeatureFlag] = None, + set_read_replicas_settings: Optional[ydb.ReadReplicasSettings] = None, + ) -> ydb.Operation: + """ + Alter a YDB table. + + :param path: A table path + :param add_columns: List of ydb.Column to add + :param drop_columns: List of column names to drop + :param settings: An instance of BaseRequestSettings that describes how rpc should be invoked. + :param alter_attributes: Dict of attributes to alter + :param add_indexes: List of ydb.TableIndex to add + :param drop_indexes: List of index names to drop + :param set_ttl_settings: ydb.TtlSettings to set + :param drop_ttl_settings: Any to drop + :param add_column_families: List of ydb.ColumnFamily to add + :param alter_column_families: List of ydb.ColumnFamily to alter + :param alter_storage_settings: ydb.StorageSettings to alter + :param set_compaction_policy: Compaction policy + :param alter_partitioning_settings: ydb.PartitioningSettings to alter + :param set_key_bloom_filter: ydb.FeatureFlag to set key bloom filter + + :return: Operation or YDB error otherwise. + """ + def callee(session: Session): return session.alter_table( path=path, @@ -1300,13 +1339,41 @@ def callee(session: Session): return self._pool.retry_operation_sync(callee) - def describe_table(self, path, settings=None): + def describe_table( + self, + path: str, + settings: Optional[settings_impl.BaseRequestSettings] = None, + ) -> ydb.TableSchemeEntry: + """ + Describe a YDB table. + + :param path: A table path + :param settings: An instance of BaseRequestSettings that describes how rpc should be invoked. + + :return: TableSchemeEntry or YDB error otherwise. + """ + def callee(session: Session): return session.describe_table(path=path, settings=settings) return self._pool.retry_operation_sync(callee) - def copy_table(self, source_path, destination_path, settings=None): + def copy_table( + self, + source_path: str, + destination_path: str, + settings: Optional[settings_impl.BaseRequestSettings] = None, + ) -> ydb.Operation: + """ + Copy a YDB table. + + :param source_path: A table path + :param destination_path: Destination table path + :param settings: An instance of BaseRequestSettings that describes how rpc should be invoked. + + :return: Operation or YDB error otherwise. + """ + def callee(session: Session): return session.copy_table( source_path=source_path, @@ -1316,13 +1383,39 @@ def callee(session: Session): return self._pool.retry_operation_sync(callee) - def copy_tables(self, source_destination_pairs, settings=None): + def copy_tables( + self, + source_destination_pairs: List[Tuple[str, str]], + settings: Optional[settings_impl.BaseRequestSettings] = None + ) -> ydb.Operation: + """ + Copy a YDB tables. + + :param source_destination_pairs: List of tuples (source_path, destination_path) + :param settings: An instance of BaseRequestSettings that describes how rpc should be invoked. + + :return: Operation or YDB error otherwise. + """ + def callee(session: Session): return session.copy_tables(source_destination_pairs=source_destination_pairs, settings=settings) return self._pool.retry_operation_sync(callee) - def rename_tables(self, rename_items, settings=None): + def rename_tables( + self, + rename_items: List[Tuple[str, str]], + settings=None + ) -> ydb.Operation: + """ + Rename a YDB tables. + + :param rename_items: List of tuples (current_name, desired_name) + :param settings: An instance of BaseRequestSettings that describes how rpc should be invoked. + + :return: Operation or YDB error otherwise. + """ + def callee(session: Session): return session.rename_tables(rename_items=rename_items, settings=settings) From 771fc5cee0828cb7ffa9a21fac8701fdc2cfd46c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 15 Oct 2024 18:51:05 +0300 Subject: [PATCH 288/429] style fixes --- ydb/aio/table.py | 12 ++++++------ ydb/table.py | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ydb/aio/table.py b/ydb/aio/table.py index 96ecda94..f84a06df 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -181,7 +181,7 @@ async def create_table( path: str, table_description: TableDescription, settings: Optional[settings_impl.BaseRequestSettings] = None, - ) -> ydb.Operation: + ) -> "ydb.Operation": """ Create a YDB table. @@ -201,7 +201,7 @@ async def drop_table( self, path: str, settings: Optional[settings_impl.BaseRequestSettings] = None, - ) -> ydb.Operation: + ) -> "ydb.Operation": """ Drop a YDB table. @@ -234,7 +234,7 @@ async def alter_table( alter_partitioning_settings: Optional[ydb.PartitioningSettings] = None, set_key_bloom_filter: Optional[ydb.FeatureFlag] = None, set_read_replicas_settings: Optional[ydb.ReadReplicasSettings] = None, - ) -> ydb.Operation: + ) -> "ydb.Operation": """ Alter a YDB table. @@ -303,7 +303,7 @@ async def copy_table( source_path: str, destination_path: str, settings: Optional[settings_impl.BaseRequestSettings] = None, - ) -> ydb.Operation: + ) -> "ydb.Operation": """ Copy a YDB table. @@ -327,7 +327,7 @@ async def copy_tables( self, source_destination_pairs: List[Tuple[str, str]], settings: Optional[settings_impl.BaseRequestSettings] = None - ) -> ydb.Operation: + ) -> "ydb.Operation": """ Copy a YDB tables. @@ -346,7 +346,7 @@ async def rename_tables( self, rename_items: List[Tuple[str, str]], settings=None - ) -> ydb.Operation: + ) -> "ydb.Operation": """ Rename a YDB tables. diff --git a/ydb/table.py b/ydb/table.py index 87d5476b..f1d19ccd 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -1241,7 +1241,7 @@ def create_table( path: str, table_description: TableDescription, settings: Optional[settings_impl.BaseRequestSettings] = None, - ) -> ydb.Operation: + ) -> "ydb.Operation": """ Create a YDB table. @@ -1261,7 +1261,7 @@ def drop_table( self, path: str, settings: Optional[settings_impl.BaseRequestSettings] = None, - ) -> ydb.Operation: + ) -> "ydb.Operation": """ Drop a YDB table. @@ -1294,7 +1294,7 @@ def alter_table( alter_partitioning_settings: Optional[ydb.PartitioningSettings] = None, set_key_bloom_filter: Optional[ydb.FeatureFlag] = None, set_read_replicas_settings: Optional[ydb.ReadReplicasSettings] = None, - ) -> ydb.Operation: + ) -> "ydb.Operation": """ Alter a YDB table. @@ -1363,7 +1363,7 @@ def copy_table( source_path: str, destination_path: str, settings: Optional[settings_impl.BaseRequestSettings] = None, - ) -> ydb.Operation: + ) -> "ydb.Operation": """ Copy a YDB table. @@ -1387,7 +1387,7 @@ def copy_tables( self, source_destination_pairs: List[Tuple[str, str]], settings: Optional[settings_impl.BaseRequestSettings] = None - ) -> ydb.Operation: + ) -> "ydb.Operation": """ Copy a YDB tables. @@ -1406,7 +1406,7 @@ def rename_tables( self, rename_items: List[Tuple[str, str]], settings=None - ) -> ydb.Operation: + ) -> "ydb.Operation": """ Rename a YDB tables. From 98f7167740654b81ac9f4ae6e6f0e832fae90cb2 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 15 Oct 2024 18:57:58 +0300 Subject: [PATCH 289/429] fix cyclic import errors --- ydb/aio/table.py | 36 ++++++++++++++++++------------------ ydb/table.py | 36 ++++++++++++++++++------------------ 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/ydb/aio/table.py b/ydb/aio/table.py index f84a06df..eccd1fa6 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -179,8 +179,8 @@ async def scan_query(self, query, parameters=None, settings=None): # pylint: di async def create_table( self, path: str, - table_description: TableDescription, - settings: Optional[settings_impl.BaseRequestSettings] = None, + table_description: "TableDescription", + settings: Optional["settings_impl.BaseRequestSettings"] = None, ) -> "ydb.Operation": """ Create a YDB table. @@ -200,7 +200,7 @@ async def callee(session: Session): async def drop_table( self, path: str, - settings: Optional[settings_impl.BaseRequestSettings] = None, + settings: Optional["settings_impl.BaseRequestSettings"] = None, ) -> "ydb.Operation": """ Drop a YDB table. @@ -219,21 +219,21 @@ async def callee(session: Session): async def alter_table( self, path: str, - add_columns: Optional[List[ydb.Column]] = None, + add_columns: Optional[List["ydb.Column"]] = None, drop_columns: Optional[List[str]] = None, - settings: Optional[settings_impl.BaseRequestSettings] = None, + settings: Optional["settings_impl.BaseRequestSettings"] = None, alter_attributes: Optional[Optional[Dict[str, str]]] = None, - add_indexes: Optional[List[ydb.TableIndex]] = None, + add_indexes: Optional[List["ydb.TableIndex"]] = None, drop_indexes: Optional[List[str]] = None, - set_ttl_settings: Optional[ydb.TtlSettings] = None, + set_ttl_settings: Optional["ydb.TtlSettings"] = None, drop_ttl_settings: Optional[Any] = None, - add_column_families: Optional[List[ydb.ColumnFamily]] = None, - alter_column_families: Optional[List[ydb.ColumnFamily]] = None, - alter_storage_settings: Optional[ydb.StorageSettings] = None, + add_column_families: Optional[List["ydb.ColumnFamily"]] = None, + alter_column_families: Optional[List["ydb.ColumnFamily"]] = None, + alter_storage_settings: Optional["ydb.StorageSettings"] = None, set_compaction_policy: Optional[str] = None, - alter_partitioning_settings: Optional[ydb.PartitioningSettings] = None, - set_key_bloom_filter: Optional[ydb.FeatureFlag] = None, - set_read_replicas_settings: Optional[ydb.ReadReplicasSettings] = None, + alter_partitioning_settings: Optional["ydb.PartitioningSettings"] = None, + set_key_bloom_filter: Optional["ydb.FeatureFlag"] = None, + set_read_replicas_settings: Optional["ydb.ReadReplicasSettings"] = None, ) -> "ydb.Operation": """ Alter a YDB table. @@ -282,8 +282,8 @@ async def callee(session: Session): async def describe_table( self, path: str, - settings: Optional[settings_impl.BaseRequestSettings] = None, - ) -> ydb.TableSchemeEntry: + settings: Optional["settings_impl.BaseRequestSettings"] = None, + ) -> "ydb.TableSchemeEntry": """ Describe a YDB table. @@ -302,7 +302,7 @@ async def copy_table( self, source_path: str, destination_path: str, - settings: Optional[settings_impl.BaseRequestSettings] = None, + settings: Optional["settings_impl.BaseRequestSettings"] = None, ) -> "ydb.Operation": """ Copy a YDB table. @@ -326,7 +326,7 @@ async def callee(session: Session): async def copy_tables( self, source_destination_pairs: List[Tuple[str, str]], - settings: Optional[settings_impl.BaseRequestSettings] = None + settings: Optional["settings_impl.BaseRequestSettings"] = None, ) -> "ydb.Operation": """ Copy a YDB tables. @@ -345,7 +345,7 @@ async def callee(session: Session): async def rename_tables( self, rename_items: List[Tuple[str, str]], - settings=None + settings: Optional["settings_impl.BaseRequestSettings"] = None, ) -> "ydb.Operation": """ Rename a YDB tables. diff --git a/ydb/table.py b/ydb/table.py index f1d19ccd..e88ae9b4 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -1239,8 +1239,8 @@ def async_bulk_upsert(self, table_path, rows, column_types, settings=None): def create_table( self, path: str, - table_description: TableDescription, - settings: Optional[settings_impl.BaseRequestSettings] = None, + table_description: "TableDescription", + settings: Optional["settings_impl.BaseRequestSettings"] = None, ) -> "ydb.Operation": """ Create a YDB table. @@ -1260,7 +1260,7 @@ def callee(session: Session): def drop_table( self, path: str, - settings: Optional[settings_impl.BaseRequestSettings] = None, + settings: Optional["settings_impl.BaseRequestSettings"] = None, ) -> "ydb.Operation": """ Drop a YDB table. @@ -1279,21 +1279,21 @@ def callee(session: Session): def alter_table( self, path: str, - add_columns: Optional[List[ydb.Column]] = None, + add_columns: Optional[List["ydb.Column"]] = None, drop_columns: Optional[List[str]] = None, - settings: Optional[settings_impl.BaseRequestSettings] = None, + settings: Optional["settings_impl.BaseRequestSettings"] = None, alter_attributes: Optional[Optional[Dict[str, str]]] = None, - add_indexes: Optional[List[ydb.TableIndex]] = None, + add_indexes: Optional[List["ydb.TableIndex"]] = None, drop_indexes: Optional[List[str]] = None, - set_ttl_settings: Optional[ydb.TtlSettings] = None, + set_ttl_settings: Optional["ydb.TtlSettings"] = None, drop_ttl_settings: Optional[Any] = None, - add_column_families: Optional[List[ydb.ColumnFamily]] = None, - alter_column_families: Optional[List[ydb.ColumnFamily]] = None, - alter_storage_settings: Optional[ydb.StorageSettings] = None, + add_column_families: Optional[List["ydb.ColumnFamily"]] = None, + alter_column_families: Optional[List["ydb.ColumnFamily"]] = None, + alter_storage_settings: Optional["ydb.StorageSettings"] = None, set_compaction_policy: Optional[str] = None, - alter_partitioning_settings: Optional[ydb.PartitioningSettings] = None, - set_key_bloom_filter: Optional[ydb.FeatureFlag] = None, - set_read_replicas_settings: Optional[ydb.ReadReplicasSettings] = None, + alter_partitioning_settings: Optional["ydb.PartitioningSettings"] = None, + set_key_bloom_filter: Optional["ydb.FeatureFlag"] = None, + set_read_replicas_settings: Optional["ydb.ReadReplicasSettings"] = None, ) -> "ydb.Operation": """ Alter a YDB table. @@ -1342,8 +1342,8 @@ def callee(session: Session): def describe_table( self, path: str, - settings: Optional[settings_impl.BaseRequestSettings] = None, - ) -> ydb.TableSchemeEntry: + settings: Optional["settings_impl.BaseRequestSettings"] = None, + ) -> "ydb.TableSchemeEntry": """ Describe a YDB table. @@ -1362,7 +1362,7 @@ def copy_table( self, source_path: str, destination_path: str, - settings: Optional[settings_impl.BaseRequestSettings] = None, + settings: Optional["settings_impl.BaseRequestSettings"] = None, ) -> "ydb.Operation": """ Copy a YDB table. @@ -1386,7 +1386,7 @@ def callee(session: Session): def copy_tables( self, source_destination_pairs: List[Tuple[str, str]], - settings: Optional[settings_impl.BaseRequestSettings] = None + settings: Optional["settings_impl.BaseRequestSettings"] = None ) -> "ydb.Operation": """ Copy a YDB tables. @@ -1405,7 +1405,7 @@ def callee(session: Session): def rename_tables( self, rename_items: List[Tuple[str, str]], - settings=None + settings: Optional["settings_impl.BaseRequestSettings"] = None, ) -> "ydb.Operation": """ Rename a YDB tables. From b0f10ca6fba572b0fc01a93313f30586eb8f3b96 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 15 Oct 2024 19:00:07 +0300 Subject: [PATCH 290/429] style fixes --- ydb/aio/table.py | 2 +- ydb/table.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ydb/aio/table.py b/ydb/aio/table.py index eccd1fa6..d1cdbd5d 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -345,7 +345,7 @@ async def callee(session: Session): async def rename_tables( self, rename_items: List[Tuple[str, str]], - settings: Optional["settings_impl.BaseRequestSettings"] = None, + settings: Optional["settings_impl.BaseRequestSettings"] = None, ) -> "ydb.Operation": """ Rename a YDB tables. diff --git a/ydb/table.py b/ydb/table.py index e88ae9b4..94aee3a8 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -1386,7 +1386,7 @@ def callee(session: Session): def copy_tables( self, source_destination_pairs: List[Tuple[str, str]], - settings: Optional["settings_impl.BaseRequestSettings"] = None + settings: Optional["settings_impl.BaseRequestSettings"] = None, ) -> "ydb.Operation": """ Copy a YDB tables. From b3669322c8a246e61a7a9b4e5487184e7eb1a8ac Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 15 Oct 2024 19:21:01 +0300 Subject: [PATCH 291/429] fix driver arg --- ydb/aio/driver.py | 2 +- ydb/driver.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ydb/aio/driver.py b/ydb/aio/driver.py index ad03b207..e7b970c0 100644 --- a/ydb/aio/driver.py +++ b/ydb/aio/driver.py @@ -61,5 +61,5 @@ def __init__( self.topic_client = topic.TopicClientAsyncIO(self, config.topic_client_settings) async def stop(self, timeout=10): - await self.table_client._pool.stop(timeout) + await self.table_client._pool.stop(timeout=timeout) await super().stop(timeout=timeout) diff --git a/ydb/driver.py b/ydb/driver.py index 8c8b9ecd..271e8b9e 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -283,6 +283,6 @@ def __init__( self.table_client = table.TableClient(self, driver_config.table_client_settings) self.topic_client = topic.TopicClient(self, driver_config.topic_client_settings) - def stop(self): - self.table_client._pool.stop() - super().stop() + def stop(self, timeout=10): + self.table_client._pool.stop(timeout=timeout) + super().stop(timeout=timeout) From a45ec48c69dc7a033d62f31452de6414d7366c78 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 16 Oct 2024 10:17:52 +0300 Subject: [PATCH 292/429] make pool init lazy --- ydb/aio/driver.py | 2 +- ydb/aio/table.py | 26 ++++++++++++++++++++++++-- ydb/driver.py | 2 +- ydb/table.py | 26 ++++++++++++++++++++++++-- 4 files changed, 50 insertions(+), 6 deletions(-) diff --git a/ydb/aio/driver.py b/ydb/aio/driver.py index e7b970c0..9cd6fd2b 100644 --- a/ydb/aio/driver.py +++ b/ydb/aio/driver.py @@ -61,5 +61,5 @@ def __init__( self.topic_client = topic.TopicClientAsyncIO(self, config.topic_client_settings) async def stop(self, timeout=10): - await self.table_client._pool.stop(timeout=timeout) + await self.table_client._stop_pool_if_needed(timeout=timeout) await super().stop(timeout=timeout) diff --git a/ydb/aio/table.py b/ydb/aio/table.py index d1cdbd5d..62e4b099 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -151,11 +151,11 @@ class TableClient(BaseTableClient): def __init__(self, driver, table_client_settings=None): # type:(ydb.Driver, ydb.TableClientSettings) -> None super().__init__(driver=driver, table_client_settings=table_client_settings) - self._pool: SessionPool = SessionPool(self._driver, 10) + self._pool: Optional[SessionPool] = None def __del__(self): if not self._pool._terminating: - asyncio.get_running_loop.call_soon(self._pool.stop) + asyncio.get_running_loop.call_soon(self._stop_pool_if_needed) def session(self): return Session(self._driver, self._table_client_settings) @@ -176,6 +176,14 @@ async def scan_query(self, query, parameters=None, settings=None): # pylint: di lambda resp: _wrap_scan_query_response(resp, self._table_client_settings), ) + def _init_pool_if_needed(self): + if self._pool is None: + self._pool = SessionPool(self._driver, 10) + + async def _stop_pool_if_needed(self, timeout=10): + if self._pool is not None: + await self._pool.stop(timeout=timeout) + async def create_table( self, path: str, @@ -192,6 +200,8 @@ async def create_table( :return: Operation or YDB error otherwise. """ + self._init_pool_if_needed() + async def callee(session: Session): return await session.create_table(path=path, table_description=table_description, settings=settings) @@ -211,6 +221,8 @@ async def drop_table( :return: Operation or YDB error otherwise. """ + self._init_pool_if_needed() + async def callee(session: Session): return await session.drop_table(path=path, settings=settings) @@ -257,6 +269,8 @@ async def alter_table( :return: Operation or YDB error otherwise. """ + self._init_pool_if_needed() + async def callee(session: Session): return await session.alter_table( path=path, @@ -293,6 +307,8 @@ async def describe_table( :return: TableSchemeEntry or YDB error otherwise. """ + self._init_pool_if_needed() + async def callee(session: Session): return await session.describe_table(path=path, settings=settings) @@ -314,6 +330,8 @@ async def copy_table( :return: Operation or YDB error otherwise. """ + self._init_pool_if_needed() + async def callee(session: Session): return await session.copy_table( source_path=source_path, @@ -337,6 +355,8 @@ async def copy_tables( :return: Operation or YDB error otherwise. """ + self._init_pool_if_needed() + async def callee(session: Session): return await session.copy_tables(source_destination_pairs=source_destination_pairs, settings=settings) @@ -356,6 +376,8 @@ async def rename_tables( :return: Operation or YDB error otherwise. """ + self._init_pool_if_needed() + async def callee(session: Session): return await session.rename_tables(rename_items=rename_items, settings=settings) diff --git a/ydb/driver.py b/ydb/driver.py index 271e8b9e..6b35cd56 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -284,5 +284,5 @@ def __init__( self.topic_client = topic.TopicClient(self, driver_config.topic_client_settings) def stop(self, timeout=10): - self.table_client._pool.stop(timeout=timeout) + self.table_client._stop_pool_if_needed(timeout=timeout) super().stop(timeout=timeout) diff --git a/ydb/table.py b/ydb/table.py index 94aee3a8..945e9187 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -1205,10 +1205,10 @@ class TableClient(BaseTableClient): def __init__(self, driver, table_client_settings=None): # type:(ydb.Driver, ydb.TableClientSettings) -> None super().__init__(driver=driver, table_client_settings=table_client_settings) - self._pool: SessionPool = SessionPool(self._driver, 10) + self._pool: Optional[SessionPool] = None def __del__(self): - self._pool.stop() + self._stop_pool_if_needed() def async_scan_query(self, query, parameters=None, settings=None): # type: (ydb.ScanQuery, tuple, ydb.BaseRequestSettings) -> ydb.AsyncResponseIterator @@ -1236,6 +1236,14 @@ def async_bulk_upsert(self, table_path, rows, column_types, settings=None): (), ) + def _init_pool_if_needed(self): + if self._pool is None: + self._pool = SessionPool(self._driver, 10) + + def _stop_pool_if_needed(self, timeout=10): + if self._pool is not None: + self._pool.stop(timeout=timeout) + def create_table( self, path: str, @@ -1252,6 +1260,8 @@ def create_table( :return: Operation or YDB error otherwise. """ + self._init_pool_if_needed() + def callee(session: Session): return session.create_table(path=path, table_description=table_description, settings=settings) @@ -1271,6 +1281,8 @@ def drop_table( :return: Operation or YDB error otherwise. """ + self._init_pool_if_needed() + def callee(session: Session): return session.drop_table(path=path, settings=settings) @@ -1317,6 +1329,8 @@ def alter_table( :return: Operation or YDB error otherwise. """ + self._init_pool_if_needed() + def callee(session: Session): return session.alter_table( path=path, @@ -1353,6 +1367,8 @@ def describe_table( :return: TableSchemeEntry or YDB error otherwise. """ + self._init_pool_if_needed() + def callee(session: Session): return session.describe_table(path=path, settings=settings) @@ -1374,6 +1390,8 @@ def copy_table( :return: Operation or YDB error otherwise. """ + self._init_pool_if_needed() + def callee(session: Session): return session.copy_table( source_path=source_path, @@ -1397,6 +1415,8 @@ def copy_tables( :return: Operation or YDB error otherwise. """ + self._init_pool_if_needed() + def callee(session: Session): return session.copy_tables(source_destination_pairs=source_destination_pairs, settings=settings) @@ -1416,6 +1436,8 @@ def rename_tables( :return: Operation or YDB error otherwise. """ + self._init_pool_if_needed() + def callee(session: Session): return session.rename_tables(rename_items=rename_items, settings=settings) From 7e51e81528ee888111eeee222749bac10ad05ae6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 16 Oct 2024 10:20:32 +0300 Subject: [PATCH 293/429] update tableclient destructor --- ydb/aio/table.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ydb/aio/table.py b/ydb/aio/table.py index 62e4b099..274716ed 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -154,8 +154,7 @@ def __init__(self, driver, table_client_settings=None): self._pool: Optional[SessionPool] = None def __del__(self): - if not self._pool._terminating: - asyncio.get_running_loop.call_soon(self._stop_pool_if_needed) + asyncio.get_running_loop.call_soon(self._stop_pool_if_needed) def session(self): return Session(self._driver, self._table_client_settings) @@ -181,7 +180,7 @@ def _init_pool_if_needed(self): self._pool = SessionPool(self._driver, 10) async def _stop_pool_if_needed(self, timeout=10): - if self._pool is not None: + if self._pool is not None and not self._pool._terminating: await self._pool.stop(timeout=timeout) async def create_table( From 55443183ba6a7eea9606071c856b3dca4f3a1943 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 16 Oct 2024 15:23:38 +0300 Subject: [PATCH 294/429] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d18b05b..286adca7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +* Hide session management for table client methods +* Add build method to QueryOnlineReadOnly mode + ## 3.18.2 ## * Fix compatibility with arcadia From b19ababa35f0bedbf341e6c2d7f059b413fd9f58 Mon Sep 17 00:00:00 2001 From: robot Date: Wed, 16 Oct 2024 12:24:42 +0000 Subject: [PATCH 295/429] Release: 3.18.3 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 286adca7..63967979 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.3 ## * Hide session management for table client methods * Add build method to QueryOnlineReadOnly mode diff --git a/setup.py b/setup.py index 5e3793b0..8c127b63 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.2", # AUTOVERSION + version="3.18.3", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 836184b5..21434224 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.2" +VERSION = "3.18.3" From c531277638fec4da6d39b7bcda0c3e45334a1207 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 21 Oct 2024 13:30:18 +0300 Subject: [PATCH 296/429] Update table.py --- ydb/aio/table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/aio/table.py b/ydb/aio/table.py index 274716ed..a60f210a 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -154,7 +154,7 @@ def __init__(self, driver, table_client_settings=None): self._pool: Optional[SessionPool] = None def __del__(self): - asyncio.get_running_loop.call_soon(self._stop_pool_if_needed) + asyncio.get_running_loop().call_soon(self._stop_pool_if_needed) def session(self): return Session(self._driver, self._table_client_settings) From 8c4f63e5dc927d55ab921925f60b469bbefa2e73 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 21 Oct 2024 13:46:31 +0300 Subject: [PATCH 297/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63967979..b626bb8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Fix table_client desctructor + ## 3.18.3 ## * Hide session management for table client methods * Add build method to QueryOnlineReadOnly mode From ec12288fc89443e3724f4796a319f88d9ac13b14 Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 21 Oct 2024 10:48:43 +0000 Subject: [PATCH 298/429] Release: 3.18.4 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b626bb8b..f3a28ce3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.4 ## * Fix table_client desctructor ## 3.18.3 ## diff --git a/setup.py b/setup.py index 8c127b63..0ead88ba 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.3", # AUTOVERSION + version="3.18.4", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 21434224..2de3e1e8 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.3" +VERSION = "3.18.4" From 96d0d502081c3328212683a12c11d2f6be16ea70 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 22 Oct 2024 10:32:44 +0300 Subject: [PATCH 299/429] Update table.py --- ydb/aio/table.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ydb/aio/table.py b/ydb/aio/table.py index a60f210a..616eaee7 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -154,7 +154,10 @@ def __init__(self, driver, table_client_settings=None): self._pool: Optional[SessionPool] = None def __del__(self): - asyncio.get_running_loop().call_soon(self._stop_pool_if_needed) + try: + asyncio.get_running_loop().call_soon(self._stop_pool_if_needed) + except Exception: + pass def session(self): return Session(self._driver, self._table_client_settings) From cd9f5ee118b7dc410e461435e5629a5cb1c66cf6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 22 Oct 2024 10:57:52 +0300 Subject: [PATCH 300/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3a28ce3..99705413 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Fix table_client desctructor + ## 3.18.4 ## * Fix table_client desctructor From cea4669f1cbb2986f59f4fbd4e15f6bbeee38cee Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 22 Oct 2024 07:58:34 +0000 Subject: [PATCH 301/429] Release: 3.18.5 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99705413..77bb6831 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.5 ## * Fix table_client desctructor ## 3.18.4 ## diff --git a/setup.py b/setup.py index 0ead88ba..3988101f 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.4", # AUTOVERSION + version="3.18.5", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 2de3e1e8..3512c940 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.4" +VERSION = "3.18.5" From 8c4359218c582cdc041db2c53ec1e230788adbdf Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 23 Oct 2024 17:16:21 +0300 Subject: [PATCH 302/429] Add missing ability to configure QueryClientSettings --- ydb/aio/query/pool.py | 12 ++++++++++-- ydb/driver.py | 3 +++ ydb/query/pool.py | 12 ++++++++++-- ydb/query/session.py | 13 ++++++++++++- 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 6d116600..e41769c1 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -13,6 +13,7 @@ RetrySettings, retry_operation_async, ) +from ...query.base import QueryClientSettings from ... import convert from ..._grpc.grpcwrapper import common_utils @@ -22,10 +23,16 @@ class QuerySessionPool: """QuerySessionPool is an object to simplify operations with sessions of Query Service.""" - def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): + def __init__( + self, + driver: common_utils.SupportedDriverType, + size: int = 100, + query_client_settings: Optional[QueryClientSettings] = None, + ): """ :param driver: A driver instance :param size: Size of session pool + :param query_client_settings: ydb.QueryClientSettings object to configure QueryService behavior """ self._driver = driver @@ -35,9 +42,10 @@ def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): self._current_size = 0 self._waiters = 0 self._loop = asyncio.get_running_loop() + self._query_client_settings = query_client_settings async def _create_new_session(self): - session = QuerySession(self._driver) + session = QuerySession(self._driver, settings=self._query_client_settings) await session.create() logger.debug(f"New session was created for pool. Session id: {session._state.session_id}") return session diff --git a/ydb/driver.py b/ydb/driver.py index 1559b0d0..5a9402f6 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -89,6 +89,7 @@ class DriverConfig(object): "secure_channel", "table_client_settings", "topic_client_settings", + "query_client_settings", "endpoints", "primary_user_agent", "tracer", @@ -112,6 +113,7 @@ def __init__( grpc_keep_alive_timeout=None, table_client_settings=None, topic_client_settings=None, + query_client_settings=None, endpoints=None, primary_user_agent="python-library", tracer=None, @@ -159,6 +161,7 @@ def __init__( self.grpc_keep_alive_timeout = grpc_keep_alive_timeout self.table_client_settings = table_client_settings self.topic_client_settings = topic_client_settings + self.query_client_settings = query_client_settings self.primary_user_agent = primary_user_agent self.tracer = tracer if tracer is not None else tracing.Tracer(None) self.grpc_lb_policy_name = grpc_lb_policy_name diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 4c51a971..e74143d0 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -8,6 +8,7 @@ import threading import queue +from .base import QueryClientSettings from .session import ( QuerySession, ) @@ -27,10 +28,16 @@ class QuerySessionPool: """QuerySessionPool is an object to simplify operations with sessions of Query Service.""" - def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): + def __init__( + self, + driver: common_utils.SupportedDriverType, + size: int = 100, + query_client_settings: Optional[QueryClientSettings] = None, + ): """ :param driver: A driver instance. :param size: Max size of Session Pool. + :param query_client_settings: ydb.QueryClientSettings object to configure QueryService behavior """ self._driver = driver @@ -39,9 +46,10 @@ def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100): self._size = size self._should_stop = threading.Event() self._lock = threading.RLock() + self._query_client_settings = query_client_settings def _create_new_session(self, timeout: Optional[float]): - session = QuerySession(self._driver) + session = QuerySession(self._driver, settings=self._query_client_settings) session.create(settings=BaseRequestSettings().with_timeout(timeout)) logger.debug(f"New session was created for pool. Session id: {session._state.session_id}") return session diff --git a/ydb/query/session.py b/ydb/query/session.py index e13540d3..0165f821 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -134,9 +134,20 @@ class BaseQuerySession: def __init__(self, driver: common_utils.SupportedDriverType, settings: Optional[base.QueryClientSettings] = None): self._driver = driver - self._settings = settings if settings is not None else base.QueryClientSettings() + self._settings = self._get_client_settings(driver, settings) self._state = QuerySessionState(settings) + def _get_client_settings( + self, + driver: common_utils.SupportedDriverType, + settings: Optional[base.QueryClientSettings] = None, + ) -> base.QueryClientSettings: + if settings is not None: + return settings + if driver._driver_config.query_client_settings is not None: + return driver._driver_config.query_client_settings + return base.QueryClientSettings() + def _create_call(self, settings: Optional[BaseRequestSettings] = None) -> "BaseQuerySession": return self._driver( _apis.ydb_query.CreateSessionRequest(), From e757eef99c3f645eef891ef0bc019bcbe7c8bde4 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 24 Oct 2024 12:33:35 +0300 Subject: [PATCH 303/429] added tests --- tests/query/test_query_client_settings.py | 151 ++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 tests/query/test_query_client_settings.py diff --git a/tests/query/test_query_client_settings.py b/tests/query/test_query_client_settings.py new file mode 100644 index 00000000..4c875b45 --- /dev/null +++ b/tests/query/test_query_client_settings.py @@ -0,0 +1,151 @@ +import pytest + +import ydb + +from datetime import date, datetime, timedelta, timezone + + +@pytest.fixture +def settings_on(): + settings = ( + ydb.QueryClientSettings() + .with_native_date_in_result_sets(True) + .with_native_datetime_in_result_sets(True) + .with_native_timestamp_in_result_sets(True) + .with_native_interval_in_result_sets(True) + .with_native_json_in_result_sets(True) + ) + return settings + + +@pytest.fixture +def settings_off(): + settings = ( + ydb.QueryClientSettings() + .with_native_date_in_result_sets(False) + .with_native_datetime_in_result_sets(False) + .with_native_timestamp_in_result_sets(False) + .with_native_interval_in_result_sets(False) + .with_native_json_in_result_sets(False) + ) + return settings + + +test_td = timedelta(microseconds=-100) +test_now = datetime.utcnow() +test_today = test_now.date() +test_dt_today = datetime.today() +tz4h = timezone(timedelta(hours=4)) + + +params = pytest.mark.parametrize( + "value,ydb_type,casted_result,uncasted_type", + [ + (test_today, "Date", test_today, int), + (365, "Date", date(1971, 1, 1), int), + (3600 * 24 * 365, "Datetime", datetime(1971, 1, 1, 0, 0), int), + (datetime(1970, 1, 1, 4, 0, tzinfo=tz4h), "Timestamp", datetime(1970, 1, 1, 0, 0), int), + (test_td, "Interval", test_td, int), + (test_now, "Timestamp", test_now, int), + ( + 1511789040123456, + "Timestamp", + datetime.fromisoformat("2017-11-27 13:24:00.123456"), + int, + ), + ('{"foo": "bar"}', "Json", {"foo": "bar"}, str), + ('{"foo": "bar"}', "JsonDocument", {"foo": "bar"}, str), + ], +) + + +class TestQueryClientSettings: + @params + def test_driver_turn_on(self, driver_sync, settings_on, value, ydb_type, casted_result, uncasted_type): + driver_sync._driver_config.query_client_settings = settings_on + pool = ydb.QuerySessionPool(driver_sync) + result = pool.execute_with_retries( + f"DECLARE $param as {ydb_type}; SELECT $param as value", + {"$param": (value, getattr(ydb.PrimitiveType, ydb_type))}, + ) + assert result[0].rows[0].value == casted_result + pool.stop() + + @params + def test_driver_turn_off(self, driver_sync, settings_off, value, ydb_type, casted_result, uncasted_type): + driver_sync._driver_config.query_client_settings = settings_off + pool = ydb.QuerySessionPool(driver_sync) + result = pool.execute_with_retries( + f"DECLARE $param as {ydb_type}; SELECT $param as value", + {"$param": (value, getattr(ydb.PrimitiveType, ydb_type))}, + ) + assert type(result[0].rows[0].value) == uncasted_type + pool.stop() + + @params + def test_session_pool_turn_on(self, driver_sync, settings_on, value, ydb_type, casted_result, uncasted_type): + pool = ydb.QuerySessionPool(driver_sync, query_client_settings=settings_on) + result = pool.execute_with_retries( + f"DECLARE $param as {ydb_type}; SELECT $param as value", + {"$param": (value, getattr(ydb.PrimitiveType, ydb_type))}, + ) + assert result[0].rows[0].value == casted_result + pool.stop() + + @params + def test_session_pool_turn_off(self, driver_sync, settings_off, value, ydb_type, casted_result, uncasted_type): + pool = ydb.QuerySessionPool(driver_sync, query_client_settings=settings_off) + result = pool.execute_with_retries( + f"DECLARE $param as {ydb_type}; SELECT $param as value", + {"$param": (value, getattr(ydb.PrimitiveType, ydb_type))}, + ) + assert type(result[0].rows[0].value) == uncasted_type + pool.stop() + + @pytest.mark.asyncio + @params + async def test_driver_async_turn_on(self, driver, settings_on, value, ydb_type, casted_result, uncasted_type): + driver._driver_config.query_client_settings = settings_on + pool = ydb.aio.QuerySessionPool(driver) + result = await pool.execute_with_retries( + f"DECLARE $param as {ydb_type}; SELECT $param as value", + {"$param": (value, getattr(ydb.PrimitiveType, ydb_type))}, + ) + assert result[0].rows[0].value == casted_result + await pool.stop() + + @pytest.mark.asyncio + @params + async def test_driver_async_turn_off(self, driver, settings_off, value, ydb_type, casted_result, uncasted_type): + driver._driver_config.query_client_settings = settings_off + pool = ydb.aio.QuerySessionPool(driver) + result = await pool.execute_with_retries( + f"DECLARE $param as {ydb_type}; SELECT $param as value", + {"$param": (value, getattr(ydb.PrimitiveType, ydb_type))}, + ) + assert type(result[0].rows[0].value) == uncasted_type + await pool.stop() + + @pytest.mark.asyncio + @params + async def test_session_pool_async_turn_on(self, driver, settings_on, value, ydb_type, casted_result, uncasted_type): + pool = ydb.aio.QuerySessionPool(driver, query_client_settings=settings_on) + result = await pool.execute_with_retries( + f"DECLARE $param as {ydb_type}; SELECT $param as value", + {"$param": (value, getattr(ydb.PrimitiveType, ydb_type))}, + ) + assert result[0].rows[0].value == casted_result + await pool.stop() + + @pytest.mark.asyncio + @params + async def test_session_pool_async_turn_off( + self, driver, settings_off, value, ydb_type, casted_result, uncasted_type + ): + pool = ydb.aio.QuerySessionPool(driver, query_client_settings=settings_off) + result = await pool.execute_with_retries( + f"DECLARE $param as {ydb_type}; SELECT $param as value", + {"$param": (value, getattr(ydb.PrimitiveType, ydb_type))}, + ) + assert type(result[0].rows[0].value) == uncasted_type + await pool.stop() From 54bf667a6fc5c1eb2cde34d34dda32ff43d9e273 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 25 Oct 2024 18:12:40 +0300 Subject: [PATCH 304/429] review fixes --- tests/query/test_query_client_settings.py | 52 ++++++++++------------- ydb/aio/query/pool.py | 1 + ydb/query/pool.py | 1 + 3 files changed, 24 insertions(+), 30 deletions(-) diff --git a/tests/query/test_query_client_settings.py b/tests/query/test_query_client_settings.py index 4c875b45..030cd83d 100644 --- a/tests/query/test_query_client_settings.py +++ b/tests/query/test_query_client_settings.py @@ -2,7 +2,7 @@ import ydb -from datetime import date, datetime, timedelta, timezone +from datetime import date, datetime, timedelta @pytest.fixture @@ -31,37 +31,27 @@ def settings_off(): return settings -test_td = timedelta(microseconds=-100) -test_now = datetime.utcnow() -test_today = test_now.date() -test_dt_today = datetime.today() -tz4h = timezone(timedelta(hours=4)) - - params = pytest.mark.parametrize( - "value,ydb_type,casted_result,uncasted_type", + "value,ydb_type,casted_result,uncasted_result", [ - (test_today, "Date", test_today, int), - (365, "Date", date(1971, 1, 1), int), - (3600 * 24 * 365, "Datetime", datetime(1971, 1, 1, 0, 0), int), - (datetime(1970, 1, 1, 4, 0, tzinfo=tz4h), "Timestamp", datetime(1970, 1, 1, 0, 0), int), - (test_td, "Interval", test_td, int), - (test_now, "Timestamp", test_now, int), + (365, "Date", date(1971, 1, 1), 365), + (3600 * 24 * 365, "Datetime", datetime(1971, 1, 1, 0, 0), 3600 * 24 * 365), + (timedelta(seconds=1), "Interval", timedelta(seconds=1), 1000000), ( 1511789040123456, "Timestamp", datetime.fromisoformat("2017-11-27 13:24:00.123456"), - int, + 1511789040123456, ), - ('{"foo": "bar"}', "Json", {"foo": "bar"}, str), - ('{"foo": "bar"}', "JsonDocument", {"foo": "bar"}, str), + ('{"foo": "bar"}', "Json", {"foo": "bar"}, '{"foo": "bar"}'), + ('{"foo": "bar"}', "JsonDocument", {"foo": "bar"}, '{"foo":"bar"}'), ], ) class TestQueryClientSettings: @params - def test_driver_turn_on(self, driver_sync, settings_on, value, ydb_type, casted_result, uncasted_type): + def test_driver_turn_on(self, driver_sync, settings_on, value, ydb_type, casted_result, uncasted_result): driver_sync._driver_config.query_client_settings = settings_on pool = ydb.QuerySessionPool(driver_sync) result = pool.execute_with_retries( @@ -72,18 +62,18 @@ def test_driver_turn_on(self, driver_sync, settings_on, value, ydb_type, casted_ pool.stop() @params - def test_driver_turn_off(self, driver_sync, settings_off, value, ydb_type, casted_result, uncasted_type): + def test_driver_turn_off(self, driver_sync, settings_off, value, ydb_type, casted_result, uncasted_result): driver_sync._driver_config.query_client_settings = settings_off pool = ydb.QuerySessionPool(driver_sync) result = pool.execute_with_retries( f"DECLARE $param as {ydb_type}; SELECT $param as value", {"$param": (value, getattr(ydb.PrimitiveType, ydb_type))}, ) - assert type(result[0].rows[0].value) == uncasted_type + assert result[0].rows[0].value == uncasted_result pool.stop() @params - def test_session_pool_turn_on(self, driver_sync, settings_on, value, ydb_type, casted_result, uncasted_type): + def test_session_pool_turn_on(self, driver_sync, settings_on, value, ydb_type, casted_result, uncasted_result): pool = ydb.QuerySessionPool(driver_sync, query_client_settings=settings_on) result = pool.execute_with_retries( f"DECLARE $param as {ydb_type}; SELECT $param as value", @@ -93,18 +83,18 @@ def test_session_pool_turn_on(self, driver_sync, settings_on, value, ydb_type, c pool.stop() @params - def test_session_pool_turn_off(self, driver_sync, settings_off, value, ydb_type, casted_result, uncasted_type): + def test_session_pool_turn_off(self, driver_sync, settings_off, value, ydb_type, casted_result, uncasted_result): pool = ydb.QuerySessionPool(driver_sync, query_client_settings=settings_off) result = pool.execute_with_retries( f"DECLARE $param as {ydb_type}; SELECT $param as value", {"$param": (value, getattr(ydb.PrimitiveType, ydb_type))}, ) - assert type(result[0].rows[0].value) == uncasted_type + assert result[0].rows[0].value == uncasted_result pool.stop() @pytest.mark.asyncio @params - async def test_driver_async_turn_on(self, driver, settings_on, value, ydb_type, casted_result, uncasted_type): + async def test_driver_async_turn_on(self, driver, settings_on, value, ydb_type, casted_result, uncasted_result): driver._driver_config.query_client_settings = settings_on pool = ydb.aio.QuerySessionPool(driver) result = await pool.execute_with_retries( @@ -116,19 +106,21 @@ async def test_driver_async_turn_on(self, driver, settings_on, value, ydb_type, @pytest.mark.asyncio @params - async def test_driver_async_turn_off(self, driver, settings_off, value, ydb_type, casted_result, uncasted_type): + async def test_driver_async_turn_off(self, driver, settings_off, value, ydb_type, casted_result, uncasted_result): driver._driver_config.query_client_settings = settings_off pool = ydb.aio.QuerySessionPool(driver) result = await pool.execute_with_retries( f"DECLARE $param as {ydb_type}; SELECT $param as value", {"$param": (value, getattr(ydb.PrimitiveType, ydb_type))}, ) - assert type(result[0].rows[0].value) == uncasted_type + assert result[0].rows[0].value == uncasted_result await pool.stop() @pytest.mark.asyncio @params - async def test_session_pool_async_turn_on(self, driver, settings_on, value, ydb_type, casted_result, uncasted_type): + async def test_session_pool_async_turn_on( + self, driver, settings_on, value, ydb_type, casted_result, uncasted_result + ): pool = ydb.aio.QuerySessionPool(driver, query_client_settings=settings_on) result = await pool.execute_with_retries( f"DECLARE $param as {ydb_type}; SELECT $param as value", @@ -140,12 +132,12 @@ async def test_session_pool_async_turn_on(self, driver, settings_on, value, ydb_ @pytest.mark.asyncio @params async def test_session_pool_async_turn_off( - self, driver, settings_off, value, ydb_type, casted_result, uncasted_type + self, driver, settings_off, value, ydb_type, casted_result, uncasted_result ): pool = ydb.aio.QuerySessionPool(driver, query_client_settings=settings_off) result = await pool.execute_with_retries( f"DECLARE $param as {ydb_type}; SELECT $param as value", {"$param": (value, getattr(ydb.PrimitiveType, ydb_type))}, ) - assert type(result[0].rows[0].value) == uncasted_type + assert result[0].rows[0].value == uncasted_result await pool.stop() diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index e41769c1..db01adce 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -27,6 +27,7 @@ def __init__( self, driver: common_utils.SupportedDriverType, size: int = 100, + *, query_client_settings: Optional[QueryClientSettings] = None, ): """ diff --git a/ydb/query/pool.py b/ydb/query/pool.py index e74143d0..f1fcd173 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -32,6 +32,7 @@ def __init__( self, driver: common_utils.SupportedDriverType, size: int = 100, + *, query_client_settings: Optional[QueryClientSettings] = None, ): """ From 64232a7472f0ea0430a5f88d30abbfc44c09e5ed Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 28 Oct 2024 10:05:48 +0300 Subject: [PATCH 305/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77bb6831..2f37ba70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Add missing ability to configure QueryClientSettings + ## 3.18.5 ## * Fix table_client desctructor From ce4e31dadb8ad57ff7b59c0ebf99c93a4d22f938 Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 28 Oct 2024 07:06:34 +0000 Subject: [PATCH 306/429] Release: 3.18.6 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f37ba70..14d5e64c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.6 ## * Add missing ability to configure QueryClientSettings ## 3.18.5 ## diff --git a/setup.py b/setup.py index 3988101f..d5696fa5 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.5", # AUTOVERSION + version="3.18.6", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 3512c940..4681ebdb 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.5" +VERSION = "3.18.6" From be9195e15c98125e29781b65046f1d929a4fb391 Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Tue, 29 Oct 2024 15:50:59 +0300 Subject: [PATCH 307/429] change uuid --- tests/query/test_query_parameters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/query/test_query_parameters.py b/tests/query/test_query_parameters.py index 950a2dfc..e7404019 100644 --- a/tests/query/test_query_parameters.py +++ b/tests/query/test_query_parameters.py @@ -157,7 +157,7 @@ class CustomClass: def test_uuid_send(pool: ydb.QuerySessionPool): - val = uuid.UUID("52F84CBA-B15A-4BF2-9696-161ECA74CB5D") + val = uuid.UUID("6E73B41C-4EDE-4D08-9CFB-B7462D9E498B") query = """ DECLARE $val AS UUID; @@ -169,7 +169,7 @@ def test_uuid_send(pool: ydb.QuerySessionPool): def test_uuid_read(pool: ydb.QuerySessionPool): - val = uuid.UUID("52F84CBA-B15A-4BF2-9696-161ECA74CB5D") + val = uuid.UUID("6E73B41C-4EDE-4D08-9CFB-B7462D9E498B") query = """ DECLARE $val AS Utf8; From d14d8751434c4f91364fa0a0baa3e279c27f3f37 Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Tue, 29 Oct 2024 15:54:43 +0300 Subject: [PATCH 308/429] remove trailing spaces --- tests/query/test_query_parameters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/query/test_query_parameters.py b/tests/query/test_query_parameters.py index e7404019..4171f5eb 100644 --- a/tests/query/test_query_parameters.py +++ b/tests/query/test_query_parameters.py @@ -161,7 +161,7 @@ def test_uuid_send(pool: ydb.QuerySessionPool): query = """ DECLARE $val AS UUID; -SELECT CAST($val AS Utf8) AS value +SELECT CAST($val AS Utf8) AS value """ res = pool.execute_with_retries(query, parameters={"$val": ydb.TypedValue(val, ydb.PrimitiveType.UUID)}) actual_value = res[0].rows[0]["value"] @@ -173,7 +173,7 @@ def test_uuid_read(pool: ydb.QuerySessionPool): query = """ DECLARE $val AS Utf8; -SELECT CAST($val AS UUID) AS value +SELECT CAST($val AS UUID) AS value """ res = pool.execute_with_retries(query, parameters={"$val": ydb.TypedValue(str(val), ydb.PrimitiveType.Utf8)}) actual_value = res[0].rows[0]["value"] From e0c5cab5f94032da3d770091f93a7b7643965059 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 1 Nov 2024 14:09:12 +0300 Subject: [PATCH 309/429] Add an ability to pass custom event loop to QuerySessionPool --- ydb/aio/query/pool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index db01adce..456896db 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -29,6 +29,7 @@ def __init__( size: int = 100, *, query_client_settings: Optional[QueryClientSettings] = None, + loop: Optional[asyncio.AbstractEventLoop] = None, ): """ :param driver: A driver instance @@ -42,7 +43,7 @@ def __init__( self._queue = asyncio.Queue() self._current_size = 0 self._waiters = 0 - self._loop = asyncio.get_running_loop() + self._loop = asyncio.get_running_loop() if loop is None else loop self._query_client_settings = query_client_settings async def _create_new_session(self): From 7b7f49179ae91349fcc5598d409dc7e1f0166481 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 1 Nov 2024 15:39:32 +0300 Subject: [PATCH 310/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14d5e64c..1e5cad76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Add an ability to pass custom event loop to QuerySessionPool + ## 3.18.6 ## * Add missing ability to configure QueryClientSettings From 6e1287a56fa8c440be2ef520e2510305ad28c1e2 Mon Sep 17 00:00:00 2001 From: robot Date: Fri, 1 Nov 2024 12:40:21 +0000 Subject: [PATCH 311/429] Release: 3.18.7 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e5cad76..d50d1dc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.7 ## * Add an ability to pass custom event loop to QuerySessionPool ## 3.18.6 ## diff --git a/setup.py b/setup.py index d5696fa5..20271169 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.6", # AUTOVERSION + version="3.18.7", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 4681ebdb..27cfcfa7 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.6" +VERSION = "3.18.7" From 543fe081206c8b17180fb1e1ff114a442a6e6ffc Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 1 Nov 2024 18:15:52 +0300 Subject: [PATCH 312/429] Refactor aio tableclient destructor --- ydb/aio/table.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ydb/aio/table.py b/ydb/aio/table.py index 616eaee7..aec32e1a 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -154,10 +154,11 @@ def __init__(self, driver, table_client_settings=None): self._pool: Optional[SessionPool] = None def __del__(self): - try: - asyncio.get_running_loop().call_soon(self._stop_pool_if_needed) - except Exception: - pass + if self._pool is not None and not self._pool._terminating: + try: + asyncio.get_running_loop().create_task(self._stop_pool_if_needed()) + except Exception: + pass def session(self): return Session(self._driver, self._table_client_settings) @@ -185,6 +186,7 @@ def _init_pool_if_needed(self): async def _stop_pool_if_needed(self, timeout=10): if self._pool is not None and not self._pool._terminating: await self._pool.stop(timeout=timeout) + self._pool = None async def create_table( self, From aa6cf819a72fc80506a6f031d5f9f68aeda9d30d Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 1 Nov 2024 18:38:38 +0300 Subject: [PATCH 313/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d50d1dc0..838a0e5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Refactor aio tableclient destructor + ## 3.18.7 ## * Add an ability to pass custom event loop to QuerySessionPool From 92d7119157ca4c0259fe96cb743c1222ca4f9707 Mon Sep 17 00:00:00 2001 From: robot Date: Fri, 1 Nov 2024 15:39:15 +0000 Subject: [PATCH 314/429] Release: 3.18.8 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 838a0e5f..858049b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.8 ## * Refactor aio tableclient destructor ## 3.18.7 ## diff --git a/setup.py b/setup.py index 20271169..e5b2b35c 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.7", # AUTOVERSION + version="3.18.8", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 27cfcfa7..54a3ed39 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.7" +VERSION = "3.18.8" From 4df6be896a71ff6d3b061c8fbd179040d4ba164a Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 8 Nov 2024 12:49:44 +0300 Subject: [PATCH 315/429] Fix attach timeouts --- ydb/aio/query/session.py | 15 +++++++++++--- ydb/query/session.py | 42 +++++++++++++++++++++++++++++++++------- 2 files changed, 47 insertions(+), 10 deletions(-) diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index 779eb3f0..a24ad42b 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -15,6 +15,7 @@ from ...query import base from ...query.session import ( BaseQuerySession, + DEFAULT_ATTACH_FIRST_RESP_TIMEOUT, QuerySessionStateEnum, ) @@ -43,9 +44,17 @@ async def _attach(self) -> None: lambda response: common_utils.ServerStatus.from_proto(response), ) - first_response = await self._status_stream.next() - if first_response.status != issues.StatusCode.SUCCESS: - pass + async def get_first_response(): + first_response = await self._status_stream.next() + if first_response.status != issues.StatusCode.SUCCESS: + self._state.reset() + raise RuntimeError("Failed to attach session") + + try: + await asyncio.wait_for(get_first_response(), DEFAULT_ATTACH_FIRST_RESP_TIMEOUT) + except Exception as e: + self._status_stream.cancel() + raise e self._state.set_attached(True) self._state._change_state(QuerySessionStateEnum.CREATED) diff --git a/ydb/query/session.py b/ydb/query/session.py index 0165f821..d761c82a 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -22,6 +22,9 @@ logger = logging.getLogger(__name__) +DEFAULT_ATTACH_FIRST_RESP_TIMEOUT = 600 + + class QuerySessionStateEnum(enum.Enum): NOT_INITIALIZED = "NOT_INITIALIZED" CREATED = "CREATED" @@ -136,6 +139,12 @@ def __init__(self, driver: common_utils.SupportedDriverType, settings: Optional[ self._driver = driver self._settings = self._get_client_settings(driver, settings) self._state = QuerySessionState(settings) + self._attach_settings: BaseRequestSettings = ( + BaseRequestSettings() + .with_operation_timeout(31536000) # year + .with_cancel_after(31536000) # year + .with_timeout(31536000) # year + ) def _get_client_settings( self, @@ -168,12 +177,12 @@ def _delete_call(self, settings: Optional[BaseRequestSettings] = None) -> "BaseQ settings=settings, ) - def _attach_call(self, settings: Optional[BaseRequestSettings] = None) -> Iterable[_apis.ydb_query.SessionState]: + def _attach_call(self) -> Iterable[_apis.ydb_query.SessionState]: return self._driver( _apis.ydb_query.AttachSessionRequest(session_id=self._state.session_id), _apis.QueryService.Stub, _apis.QueryService.AttachSession, - settings=settings, + settings=self._attach_settings, ) def _execute_call( @@ -213,16 +222,35 @@ class QuerySession(BaseQuerySession): _stream = None - def _attach(self, settings: Optional[BaseRequestSettings] = None) -> None: - self._stream = self._attach_call(settings=settings) + def _attach(self) -> None: + self._stream = self._attach_call() status_stream = _utilities.SyncResponseIterator( self._stream, lambda response: common_utils.ServerStatus.from_proto(response), ) - first_response = next(status_stream) - if first_response.status != issues.StatusCode.SUCCESS: - pass + waiter = _utilities.future() + + def get_first_response(waiter): + first_response = next(status_stream) + if first_response.status != issues.StatusCode.SUCCESS: + self._state.reset() + raise RuntimeError("Failed to attach session") + waiter.set_result(True) + + thread = threading.Thread( + target=get_first_response, + args=(waiter,), + name="first response attach stream thread", + daemon=True, + ) + thread.start() + + try: + waiter.result(timeout=DEFAULT_ATTACH_FIRST_RESP_TIMEOUT) + except Exception as e: + status_stream.cancel() + raise e self._state.set_attached(True) self._state._change_state(QuerySessionStateEnum.CREATED) From 136bcd37cd3e45f677b1c4dabd27b4a9dbb01bb7 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 8 Nov 2024 15:27:16 +0300 Subject: [PATCH 316/429] session attach tests --- tests/query/test_query_session.py | 40 +++++++++++++++++++++++++++++++ ydb/aio/query/session.py | 2 +- ydb/query/session.py | 15 ++++++------ 3 files changed, 49 insertions(+), 8 deletions(-) diff --git a/tests/query/test_query_session.py b/tests/query/test_query_session.py index a3f49cc4..7ebf01a0 100644 --- a/tests/query/test_query_session.py +++ b/tests/query/test_query_session.py @@ -1,4 +1,9 @@ import pytest +import threading +import time +from concurrent.futures import _base as b +from unittest import mock + from ydb.query.session import QuerySession @@ -100,3 +105,38 @@ def test_two_results(self, session: QuerySession): res.append(list(result_set.rows[0].values())) assert res == [[1], [2]] + + def test_thread_leaks(self, session: QuerySession): + session.create() + thread_names = [t.name for t in threading.enumerate()] + assert "first response attach stream thread" not in thread_names + assert "attach stream thread" in thread_names + + def test_first_resp_timeout(self, session: QuerySession): + class FakeStream: + def __iter__(self): + return self + + def __next__(self): + time.sleep(10) + return 1 + + def cancel(self): + pass + + fake_stream = mock.Mock(spec=FakeStream) + + session._attach_call = mock.MagicMock(return_value=fake_stream) + assert session._attach_call() == fake_stream + + session._create_call() + with pytest.raises(b.TimeoutError): + session._attach(0.1) + + fake_stream.cancel.assert_called() + + thread_names = [t.name for t in threading.enumerate()] + assert "first response attach stream thread" not in thread_names + assert "attach stream thread" not in thread_names + + _check_session_state_empty(session) \ No newline at end of file diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index a24ad42b..28ac1b6d 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -47,12 +47,12 @@ async def _attach(self) -> None: async def get_first_response(): first_response = await self._status_stream.next() if first_response.status != issues.StatusCode.SUCCESS: - self._state.reset() raise RuntimeError("Failed to attach session") try: await asyncio.wait_for(get_first_response(), DEFAULT_ATTACH_FIRST_RESP_TIMEOUT) except Exception as e: + self._state.reset() self._status_stream.cancel() raise e diff --git a/ydb/query/session.py b/ydb/query/session.py index d761c82a..ff43c761 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -23,6 +23,7 @@ DEFAULT_ATTACH_FIRST_RESP_TIMEOUT = 600 +DEFAULT_ATTACH_LONG_TIMEOUT = 31536000 # year class QuerySessionStateEnum(enum.Enum): @@ -141,9 +142,9 @@ def __init__(self, driver: common_utils.SupportedDriverType, settings: Optional[ self._state = QuerySessionState(settings) self._attach_settings: BaseRequestSettings = ( BaseRequestSettings() - .with_operation_timeout(31536000) # year - .with_cancel_after(31536000) # year - .with_timeout(31536000) # year + .with_operation_timeout(DEFAULT_ATTACH_LONG_TIMEOUT) + .with_cancel_after(DEFAULT_ATTACH_LONG_TIMEOUT) + .with_timeout(DEFAULT_ATTACH_LONG_TIMEOUT) ) def _get_client_settings( @@ -222,7 +223,7 @@ class QuerySession(BaseQuerySession): _stream = None - def _attach(self) -> None: + def _attach(self, first_resp_timeout: int = DEFAULT_ATTACH_FIRST_RESP_TIMEOUT) -> None: self._stream = self._attach_call() status_stream = _utilities.SyncResponseIterator( self._stream, @@ -234,7 +235,6 @@ def _attach(self) -> None: def get_first_response(waiter): first_response = next(status_stream) if first_response.status != issues.StatusCode.SUCCESS: - self._state.reset() raise RuntimeError("Failed to attach session") waiter.set_result(True) @@ -247,8 +247,9 @@ def get_first_response(waiter): thread.start() try: - waiter.result(timeout=DEFAULT_ATTACH_FIRST_RESP_TIMEOUT) + waiter.result(timeout=first_resp_timeout) except Exception as e: + self._state.reset() status_stream.cancel() raise e @@ -258,7 +259,7 @@ def get_first_response(waiter): threading.Thread( target=self._check_session_status_loop, args=(status_stream,), - name="check session status thread", + name="attach stream thread", daemon=True, ).start() From c781fe9f825f31a2e556252677ef5eb6fd03382c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 8 Nov 2024 15:29:24 +0300 Subject: [PATCH 317/429] style fixes --- tests/query/test_query_session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/query/test_query_session.py b/tests/query/test_query_session.py index 7ebf01a0..6c1bc3e8 100644 --- a/tests/query/test_query_session.py +++ b/tests/query/test_query_session.py @@ -139,4 +139,4 @@ def cancel(self): assert "first response attach stream thread" not in thread_names assert "attach stream thread" not in thread_names - _check_session_state_empty(session) \ No newline at end of file + _check_session_state_empty(session) From 55184e2fb5fb936879567a4754dfdf2dca742ef6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 11 Nov 2024 10:39:52 +0300 Subject: [PATCH 318/429] move wait logic to separate function --- ydb/_utilities.py | 18 ++++++++++++++++++ ydb/aio/_utilities.py | 10 ++++++++++ ydb/aio/query/session.py | 10 +++++----- ydb/query/session.py | 21 +++++---------------- 4 files changed, 38 insertions(+), 21 deletions(-) diff --git a/ydb/_utilities.py b/ydb/_utilities.py index e89b0af3..117c7407 100644 --- a/ydb/_utilities.py +++ b/ydb/_utilities.py @@ -182,3 +182,21 @@ def inc_and_get(self) -> int: with self._lock: self._value += 1 return self._value + + +def get_first_message_with_timeout(status_stream: SyncResponseIterator, timeout: int): + waiter = future() + + def get_first_response(waiter): + first_response = next(status_stream) + waiter.set_result(first_response) + + thread = threading.Thread( + target=get_first_response, + args=(waiter,), + name="first response attach stream thread", + daemon=True, + ) + thread.start() + + return waiter.result(timeout=timeout) diff --git a/ydb/aio/_utilities.py b/ydb/aio/_utilities.py index 454378b0..5bd0f1a0 100644 --- a/ydb/aio/_utilities.py +++ b/ydb/aio/_utilities.py @@ -1,3 +1,6 @@ +import asyncio + + class AsyncResponseIterator(object): def __init__(self, it, wrapper): self.it = it.__aiter__() @@ -21,3 +24,10 @@ async def next(self): async def __anext__(self): return await self._next() + + +async def get_first_message_with_timeout(stream: AsyncResponseIterator, timeout: int): + async def get_first_response(): + return await stream.next() + + return await asyncio.wait_for(get_first_response(), timeout) diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index 28ac1b6d..0561de8c 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -44,13 +44,13 @@ async def _attach(self) -> None: lambda response: common_utils.ServerStatus.from_proto(response), ) - async def get_first_response(): - first_response = await self._status_stream.next() + try: + first_response = await _utilities.get_first_message_with_timeout( + self._status_stream, + DEFAULT_ATTACH_FIRST_RESP_TIMEOUT, + ) if first_response.status != issues.StatusCode.SUCCESS: raise RuntimeError("Failed to attach session") - - try: - await asyncio.wait_for(get_first_response(), DEFAULT_ATTACH_FIRST_RESP_TIMEOUT) except Exception as e: self._state.reset() self._status_stream.cancel() diff --git a/ydb/query/session.py b/ydb/query/session.py index ff43c761..382c922d 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -230,24 +230,13 @@ def _attach(self, first_resp_timeout: int = DEFAULT_ATTACH_FIRST_RESP_TIMEOUT) - lambda response: common_utils.ServerStatus.from_proto(response), ) - waiter = _utilities.future() - - def get_first_response(waiter): - first_response = next(status_stream) + try: + first_response = _utilities.get_first_message_with_timeout( + status_stream, + first_resp_timeout, + ) if first_response.status != issues.StatusCode.SUCCESS: raise RuntimeError("Failed to attach session") - waiter.set_result(True) - - thread = threading.Thread( - target=get_first_response, - args=(waiter,), - name="first response attach stream thread", - daemon=True, - ) - thread.start() - - try: - waiter.result(timeout=first_resp_timeout) except Exception as e: self._state.reset() status_stream.cancel() From 80743e72a3bab485437ac29d11f1d5a1d039bb77 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 18 Nov 2024 17:40:44 +0300 Subject: [PATCH 319/429] Add backslash to database name if needed --- ydb/driver.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ydb/driver.py b/ydb/driver.py index 49bd223c..fa116fe3 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -3,6 +3,7 @@ import logging import os from typing import Any # noqa +from typing import Optional from . import credentials as credentials_impl, table, scheme, pool from . import tracing @@ -143,7 +144,7 @@ def __init__( """ self.endpoint = endpoint - self.database = database + self.database = self._maybe_add_slash(database) self.ca_cert = ca_cert self.channel_options = channel_options self.secure_channel = _utilities.is_secure_protocol(endpoint) @@ -169,7 +170,7 @@ def __init__( self.compression = compression def set_database(self, database): - self.database = database + self.database = self._maybe_add_slash(database) return self @classmethod @@ -206,6 +207,15 @@ def _update_attrs_by_kwargs(self, **kwargs): ) setattr(self, key, value) + def _maybe_add_slash(self, database: Optional[str]) -> Optional[str]: + if not database: + return database + + if database.startswith("/"): + return database + + return f"/{database}" + ConnectionParams = DriverConfig From 6a8b46b155f8cdf8f51ba09b6b23f2355593def1 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 19 Nov 2024 13:31:26 +0300 Subject: [PATCH 320/429] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 858049b9..852d285d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +* Add backslash to database name if needed +* Fix attach session timeouts + ## 3.18.8 ## * Refactor aio tableclient destructor From 6f8a8f229ffa07b8ecab74b9a670156364af79f6 Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 19 Nov 2024 10:32:10 +0000 Subject: [PATCH 321/429] Release: 3.18.9 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 852d285d..4fd4a01e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.9 ## * Add backslash to database name if needed * Fix attach session timeouts diff --git a/setup.py b/setup.py index e5b2b35c..fdbe9615 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.8", # AUTOVERSION + version="3.18.9", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 54a3ed39..038d2277 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.8" +VERSION = "3.18.9" From 10284db596812cb59b71e0b30ec712d2e646fe09 Mon Sep 17 00:00:00 2001 From: Vladislav Polyakov Date: Thu, 28 Nov 2024 14:11:27 +0300 Subject: [PATCH 322/429] Add New GitHub Action for SLO Tests Integration with SDK (#513) * ci: migrate to new slo action * refactor: rename sdk to workload in SLO workflows and metrics --- .github/workflows/slo-report.yml | 22 +++++ .github/workflows/slo.yml | 128 +++++++++++++++++----------- tests/slo/Dockerfile | 11 --- tests/slo/src/jobs.py | 10 +-- tests/slo/src/metrics.py | 141 ++++++++++++++++++++----------- tests/slo/src/runner.py | 9 +- 6 files changed, 202 insertions(+), 119 deletions(-) create mode 100644 .github/workflows/slo-report.yml delete mode 100644 tests/slo/Dockerfile diff --git a/.github/workflows/slo-report.yml b/.github/workflows/slo-report.yml new file mode 100644 index 00000000..29dd5ec0 --- /dev/null +++ b/.github/workflows/slo-report.yml @@ -0,0 +1,22 @@ +name: SLO Report + +on: + workflow_run: + workflows: ['SLO'] + types: + - completed + +jobs: + ydb-slo-action-report: + runs-on: ubuntu-latest + name: Publish YDB SLO Report + permissions: + contents: read + pull-requests: write + if: github.event.workflow_run.conclusion == 'success' + steps: + - name: Publish YDB SLO Report + uses: ydb-platform/ydb-slo-action/report@main + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + github_run_id: ${{ github.event.workflow_run.id }} diff --git a/.github/workflows/slo.yml b/.github/workflows/slo.yml index 4ca0adac..9ea5abd4 100644 --- a/.github/workflows/slo.yml +++ b/.github/workflows/slo.yml @@ -1,70 +1,98 @@ name: SLO on: + push: + branches: + - main pull_request: - branches: [main] + branches: + - main workflow_dispatch: + inputs: + github_pull_request_number: + required: true + slo_workload_duration_seconds: + default: '600' + required: false + slo_workload_read_max_rps: + default: '1000' + required: false + slo_workload_write_max_rps: + default: '100' + required: false jobs: - test-slo: - concurrency: - group: slo-${{ github.ref }} + ydb-slo-action: if: (!contains(github.event.pull_request.labels.*.name, 'no slo')) + name: Run YDB SLO Tests runs-on: ubuntu-latest - name: SLO test - permissions: - checks: write - pull-requests: write - contents: read - issues: write + + strategy: + matrix: + workload: + - sync-table + - sync-query + + concurrency: + group: slo-${{ github.ref }}-${{ matrix.workload }} + cancel-in-progress: true steps: - name: Checkout repository - uses: actions/checkout@v3 - if: env.DOCKER_REPO != null - env: - DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }} + uses: actions/checkout@v4 - - name: Run SLO - uses: ydb-platform/slo-tests@main - if: env.DOCKER_REPO != null - env: - DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }} - continue-on-error: true + - name: Install Python3 + uses: actions/setup-python@v5 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - KUBECONFIG_B64: ${{ secrets.SLO_KUBE_CONFIG }} - AWS_CREDENTIALS_B64: ${{ secrets.SLO_AWS_CREDENTIALS }} - AWS_CONFIG_B64: ${{ secrets.SLO_AWS_CONFIG }} - DOCKER_USERNAME: ${{ secrets.SLO_DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.SLO_DOCKER_PASSWORD }} - DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }} - DOCKER_FOLDER: ${{ secrets.SLO_DOCKER_FOLDER }} - s3_endpoint: ${{ secrets.SLO_S3_ENDPOINT }} - s3_images_folder: ${{ vars.SLO_S3_IMAGES_FOLDER }} - grafana_domain: ${{ vars.SLO_GRAFANA_DOMAIN }} - grafana_dashboard: ${{ vars.SLO_GRAFANA_DASHBOARD }} - ydb_version: 'newest' - timeBetweenPhases: 30 - shutdownTime: 30 + python-version: '3.8' + cache: 'pip' - language_id0: sync-python-table - language0: Python SDK over Table Service - workload_path0: tests/slo - workload_build_context0: ../.. - workload_build_options0: -f Dockerfile --build-arg SDK_SERVICE=sync-python-table + - name: Install dependencies + run: | + python -m pip install --no-cache-dir --upgrade pip + python -m pip install --no-cache-dir -e . + python -m pip install --no-cache-dir -r tests/slo/requirements.txt - language_id1: sync-python-query - language1: Python SDK over Query Service - workload_path1: tests/slo - workload_build_context1: ../.. - workload_build_options1: -f Dockerfile --build-arg SDK_SERVICE=sync-python-query + - name: Initialize YDB SLO + uses: ydb-platform/ydb-slo-action/init@main + with: + github_pull_request_number: ${{ github.event.inputs.github_pull_request_number }} + github_token: ${{ secrets.GITHUB_TOKEN }} + workload_name: ${{ matrix.workload }} + ydb_database_node_count: 5 + + - name: Prepare SLO Database + run: | + python ./tests/slo/src create grpc://localhost:2135 /Root/testdb - - uses: actions/upload-artifact@v3 - if: env.DOCKER_REPO != null + - name: Run SLO Tests env: - DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }} + REF: '${{ github.head_ref || github.ref }}' + WORKLOAD: '${{ matrix.workload }}' + run: | + python ./tests/slo/src run grpc://localhost:2135 /Root/testdb \ + --prom-pgw localhost:9091 \ + --report-period 250 \ + --time ${{inputs.slo_workload_duration_seconds || 600}} \ + --read-rps ${{inputs.slo_workload_read_max_rps || 1000}} \ + --write-rps ${{inputs.slo_workload_write_max_rps || 100}} \ + --read-timeout 1000 \ + --write-timeout 1000 + + - if: always() + name: Cleanup SLO Database + run: | + python ./tests/slo/src cleanup grpc://localhost:2135 /Root/testdb + + - if: always() + name: Store ydb chaos testing logs + run: | + docker logs ydb-chaos > chaos-ydb.log + + - if: always() + uses: actions/upload-artifact@v4 with: - name: slo-logs - path: logs/ + name: ${{ matrix.workload }}-chaos-ydb.log + path: ./chaos-ydb.log + retention-days: 1 diff --git a/tests/slo/Dockerfile b/tests/slo/Dockerfile deleted file mode 100644 index 7a8cc494..00000000 --- a/tests/slo/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM python:3.8-slim -COPY . /src -WORKDIR /src -RUN python -m pip install --no-cache-dir --upgrade pip && \ - python -m pip install --no-cache-dir -e . && \ - python -m pip install --no-cache-dir -r tests/slo/requirements.txt -WORKDIR tests/slo -ARG SDK_SERVICE -ENV SDK_SERVICE=$SDK_SERVICE - -ENTRYPOINT ["python", "src"] diff --git a/tests/slo/src/jobs.py b/tests/slo/src/jobs.py index 4fe0cd37..c9bd7316 100644 --- a/tests/slo/src/jobs.py +++ b/tests/slo/src/jobs.py @@ -8,7 +8,7 @@ import threading -from metrics import Metrics, JOB_WRITE_LABEL, JOB_READ_LABEL +from metrics import Metrics, OP_TYPE_WRITE, OP_TYPE_READ from generator import RowGenerator @@ -106,7 +106,7 @@ def check_result(result): query=query, params=params, metrics=metrics, - labels=(JOB_READ_LABEL,), + labels=(OP_TYPE_READ,), request_settings=request_settings, retry_settings=retry_setting, check_result_cb=check_result, @@ -163,7 +163,7 @@ def check_result(result): query=query, params=params, metrics=metrics, - labels=(JOB_READ_LABEL,), + labels=(OP_TYPE_READ,), request_settings=request_settings, retry_settings=retry_setting, check_result_cb=check_result, @@ -220,7 +220,7 @@ def run_writes(driver, query, row_generator, metrics, limiter, runtime, timeout) query=query, params=params, metrics=metrics, - labels=(JOB_WRITE_LABEL,), + labels=(OP_TYPE_WRITE,), request_settings=request_settings, retry_settings=retry_setting, ) @@ -285,7 +285,7 @@ def check_result(result): query=query, params=params, metrics=metrics, - labels=(JOB_WRITE_LABEL,), + labels=(OP_TYPE_WRITE,), request_settings=request_settings, retry_settings=retry_setting, check_result_cb=check_result, diff --git a/tests/slo/src/metrics.py b/tests/slo/src/metrics.py index b9d33a5c..2433c730 100644 --- a/tests/slo/src/metrics.py +++ b/tests/slo/src/metrics.py @@ -7,13 +7,13 @@ environ["PROMETHEUS_DISABLE_CREATED_SERIES"] = "True" -from prometheus_client import CollectorRegistry, Gauge, Histogram, push_to_gateway # noqa: E402 -from summary import Summary # noqa: E402 +from prometheus_client import CollectorRegistry, Counter, Gauge, Histogram, push_to_gateway # noqa: E402 -JOB_READ_LABEL, JOB_WRITE_LABEL = "read", "write" -JOB_STATUS_OK, JOB_STATUS_ERR = "ok", "err" +OP_TYPE_READ, OP_TYPE_WRITE = "read", "write" +OP_STATUS_SUCCESS, OP_STATUS_FAILURE = "success", "err" -SDK_SERVICE_NAME = environ.get("SDK_SERVICE", "sync-python-table") +REF = environ.get("REF", "main") +WORKLOAD = environ.get("WORKLOAD", "sync-query") class Metrics: @@ -21,41 +21,83 @@ def __init__(self, push_gateway): self._push_gtw = push_gateway self._registry = CollectorRegistry() self._metrics = dict( - oks=Gauge( - "oks", - "amount of OK requests", - labelnames=("jobName",), + errors_total=Counter( + "sdk_errors_total", + "Total number of errors encountered, categorized by error type.", + labelnames=("operation_type", "error_type"), registry=self._registry, ), - not_oks=Gauge( - "not_oks", - "amount of not OK requests", - labelnames=("jobName",), + operations_total=Counter( + "sdk_operations_total", + "Total number of operations, categorized by type attempted by the SDK.", + labelnames=("operation_type",), registry=self._registry, ), - inflight=Gauge( - "inflight", - "amount of requests in flight", - labelnames=("jobName",), + operations_success_total=Counter( + "sdk_operations_success_total", + "Total number of successful operations, categorized by type.", + labelnames=("operation_type",), registry=self._registry, ), - latency=Summary( - "latency", - "summary of latencies in ms", - labelnames=("jobName", "status"), + operations_failure_total=Counter( + "sdk_operations_failure_total", + "Total number of failed operations, categorized by type.", + labelnames=("operation_type",), registry=self._registry, - objectives=( - (0.5, 0.01), - (0.99, 0.001), - (1.0, 0.0), + ), + operation_latency_seconds=Histogram( + "sdk_operation_latency_seconds", + "Latency of operations performed by the SDK in seconds, categorized by type and status.", + labelnames=( + "operation_type", + "operation_status", + ), + registry=self._registry, + buckets=( + 0.001, # 1 ms + 0.002, # 2 ms + 0.003, # 3 ms + 0.004, # 4 ms + 0.005, # 5 ms + 0.0075, # 7.5 ms + 0.010, # 10 ms + 0.020, # 20 ms + 0.050, # 50 ms + 0.100, # 100 ms + 0.200, # 200 ms + 0.500, # 500 ms + 1.000, # 1 s ), ), - attempts=Histogram( - "attempts", - "histogram of amount of requests", - labelnames=("jobName", "status"), + retry_attempts=Gauge( + "sdk_retry_attempts", + "Current retry attempts, categorized by operation type.", + labelnames=("operation_type",), + registry=self._registry, + ), + # retry_attempts_total=Counter( + # "sdk_retry_attempts_total", + # "Total number of retry attempts, categorized by operation type.", + # labelnames=("operation_type",), + # registry=self._registry, + # ), + # retries_success_total=Counter( + # "sdk_retries_success_total", + # "Total number of successful retries, categorized by operation type.", + # labelnames=("operation_type",), + # registry=self._registry, + # ), + # retries_failure_total=Counter( + # "sdk_retries_failure_total", + # "Total number of failed retries, categorized by operation type.", + # labelnames=("operation_type",), + # registry=self._registry, + # ), + pending_operations=Gauge( + "sdk_pending_operations", + "Current number of pending operations, categorized by type.", + labelnames=("operation_type",), registry=self._registry, - buckets=tuple(range(1, 11)), ), ) self.reset() @@ -81,44 +123,47 @@ def start(self, labels): if not isinstance(labels, Iterable): labels = (labels,) - self.inflight.labels(*labels).inc() + self.pending_operations.labels(*labels).inc() return time.time() def stop(self, labels, start_time, attempts=1, error=None): - runtime_ms = 1000 * (time.time() - start_time) + duration = time.time() - start_time if not isinstance(labels, Iterable): labels = (labels,) - self.inflight.labels(*labels).dec() + self.retry_attempts.labels(*labels).set(attempts) + self.operations_total.labels(*labels).inc() + self.pending_operations.labels(*labels).dec() + # self.retry_attempts_total.labels(*labels).inc(attempts) if error: - self.not_oks.labels(*labels).inc() - self.latency.labels(*labels, JOB_STATUS_ERR).observe(runtime_ms) + self.errors_total.labels(*labels, type(error).__name__).inc() + # self.retries_failure_total.labels(*labels).inc(attempts) + self.operations_failure_total.labels(*labels).inc() + self.operation_latency_seconds.labels(*labels, OP_STATUS_FAILURE).observe(duration) return - self.oks.labels(*labels).inc() - self.latency.labels(*labels, JOB_STATUS_OK).observe(runtime_ms) - self.attempts.labels(*labels, JOB_STATUS_OK).observe(attempts) + # self.retries_success_total.labels(*labels).inc(attempts) + self.operations_success_total.labels(*labels).inc() + self.operation_latency_seconds.labels(*labels, OP_STATUS_SUCCESS).observe(duration) def push(self): push_to_gateway( self._push_gtw, - job=f"workload-{SDK_SERVICE_NAME}", + job=f"workload-{WORKLOAD}", registry=self._registry, grouping_key={ - "sdk": SDK_SERVICE_NAME, - "sdkVersion": version("ydb"), + "ref": REF, + "sdk": "ydb-python-sdk", + "sdk_version": version("ydb"), + "workload": WORKLOAD, + "workload_version": "0.0.0", }, ) def reset(self): - for label in (JOB_READ_LABEL, JOB_WRITE_LABEL): - self.oks.labels(label).set(0) - self.not_oks.labels(label).set(0) - self.inflight.labels(label).set(0) - - self.latency.clear() - self.attempts.clear() + for m in self._metrics.values(): + m.clear() self.push() diff --git a/tests/slo/src/runner.py b/tests/slo/src/runner.py index b9380436..a636309e 100644 --- a/tests/slo/src/runner.py +++ b/tests/slo/src/runner.py @@ -14,7 +14,7 @@ run_write_jobs_query, run_metric_job, ) -from metrics import Metrics, SDK_SERVICE_NAME +from metrics import Metrics, WORKLOAD logger = logging.getLogger(__name__) @@ -91,20 +91,20 @@ def run_slo(args, driver, tb_name): logger.info("Max ID: %s", max_id) metrics = Metrics(args.prom_pgw) - if SDK_SERVICE_NAME == "sync-python-table": + if WORKLOAD == "sync-table": futures = ( *run_read_jobs(args, driver, tb_name, max_id, metrics), *run_write_jobs(args, driver, tb_name, max_id, metrics), run_metric_job(args, metrics), ) - elif SDK_SERVICE_NAME == "sync-python-query": + elif WORKLOAD == "sync-query": futures = ( *run_read_jobs_query(args, driver, tb_name, max_id, metrics), *run_write_jobs_query(args, driver, tb_name, max_id, metrics), run_metric_job(args, metrics), ) else: - raise ValueError(f"Unsupported service: {SDK_SERVICE_NAME}") + raise ValueError(f"Unsupported service: {WORKLOAD}") for future in futures: future.join() @@ -121,7 +121,6 @@ def run_from_args(args): driver_config = ydb.DriverConfig( args.endpoint, database=args.db, - credentials=ydb.credentials_from_env_variables(), grpc_keep_alive_timeout=5000, ) From aef5f66ff61bd411a28890ba68629e11ec077907 Mon Sep 17 00:00:00 2001 From: Ivan Katkov <44121163+Pseudolukian@users.noreply.github.com> Date: Fri, 29 Nov 2024 08:54:26 +0100 Subject: [PATCH 323/429] Add root_certificates option for ydb.DriverConfig (#525) * Add root_certificates option for ydb.DriverConfig in example --------- Co-authored-by: Oleg Ovcharuk --- examples/static-credentials/example.py | 27 +++++++++++++++++++++++++- ydb/auth_helpers.py | 5 +++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/examples/static-credentials/example.py b/examples/static-credentials/example.py index 71409f5c..7a31e07f 100644 --- a/examples/static-credentials/example.py +++ b/examples/static-credentials/example.py @@ -2,17 +2,42 @@ def test_driver_works(driver: ydb.Driver): + """Tests the functionality of the YDB driver. + + Waits for the driver to become ready and executes a simple SQL query to verify that the driver works as expected. + + Args: + driver (ydb.Driver): The YDB driver instance to test. + + Raises: + AssertionError: If the SQL query does not return the expected result. + """ driver.wait(5) pool = ydb.QuerySessionPool(driver) result = pool.execute_with_retries("SELECT 1 as cnt") assert result[0].rows[0].cnt == 1 -def auth_with_static_credentials(endpoint: str, database: str, user: str, password: str): +def auth_with_static_credentials(endpoint: str, database: str, user: str, password: str, ca_path: str): + """Authenticate using static credentials. + + Args: + endpoint (str): Accepts a string in the format `grpcs://:2136` or `grpcs://:2136`. + database (str): Accepts a string, the database name in the format `/Root/`. + user (str): Username. + password (str): User password. + ca_path (str): Path to CA cert + + Notes: + The argument `root_certificates` of the function `ydb.DriverConfig` takes the content of the cluster's root certificate + for connecting to cluster nodes via TLS. + Note that the VM from which you are connecting must be in the cluster's domain for which the CA certificate is issued. + """ driver_config = ydb.DriverConfig( endpoint=endpoint, database=database, credentials=ydb.StaticCredentials.from_user_password(user, password), + root_certificates=ydb.load_ydb_root_certificate(ca_path), ) with ydb.Driver(driver_config=driver_config) as driver: diff --git a/ydb/auth_helpers.py b/ydb/auth_helpers.py index 6399c3cf..abf7331a 100644 --- a/ydb/auth_helpers.py +++ b/ydb/auth_helpers.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- import os +from typing import Optional def read_bytes(f): @@ -7,8 +8,8 @@ def read_bytes(f): return fr.read() -def load_ydb_root_certificate(): - path = os.getenv("YDB_SSL_ROOT_CERTIFICATES_FILE", None) +def load_ydb_root_certificate(path: Optional[str] = None): + path = path if path is not None else os.getenv("YDB_SSL_ROOT_CERTIFICATES_FILE", None) if path is not None and os.path.exists(path): return read_bytes(path) return None From bc79f1825d976037db27f4861b6735b37e1f5f48 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 2 Dec 2024 13:16:56 +0300 Subject: [PATCH 324/429] Update generated protos --- ydb-api-protos | 2 +- .../v3/draft/protos/ydb_maintenance_pb2.py | 134 +- ydb/_grpc/v3/protos/ydb_export_pb2.py | 39 +- ydb/_grpc/v3/protos/ydb_formats_pb2.py | 70 +- ydb/_grpc/v3/protos/ydb_import_pb2.py | 51 +- ydb/_grpc/v3/protos/ydb_query_pb2.py | 78 +- ydb/_grpc/v3/protos/ydb_scheme_pb2.py | 49 +- ydb/_grpc/v3/protos/ydb_table_pb2.py | 1043 +++++--- ydb/_grpc/v3/protos/ydb_topic_pb2.py | 2089 ++++++++++++++--- ydb/_grpc/v3/protos/ydb_value_pb2.py | 86 +- .../v4/draft/protos/ydb_maintenance_pb2.py | 114 +- .../v4/draft/protos/ydb_maintenance_pb2.pyi | 13 +- ydb/_grpc/v4/protos/ydb_export_pb2.py | 32 +- ydb/_grpc/v4/protos/ydb_export_pb2.pyi | 6 +- ydb/_grpc/v4/protos/ydb_formats_pb2.py | 8 +- ydb/_grpc/v4/protos/ydb_formats_pb2.pyi | 17 +- ydb/_grpc/v4/protos/ydb_import_pb2.py | 44 +- ydb/_grpc/v4/protos/ydb_import_pb2.pyi | 6 +- ydb/_grpc/v4/protos/ydb_query_pb2.py | 58 +- ydb/_grpc/v4/protos/ydb_query_pb2.pyi | 14 +- ydb/_grpc/v4/protos/ydb_scheme_pb2.py | 34 +- ydb/_grpc/v4/protos/ydb_scheme_pb2.pyi | 3 + ydb/_grpc/v4/protos/ydb_table_pb2.py | 569 ++--- ydb/_grpc/v4/protos/ydb_table_pb2.pyi | 137 +- ydb/_grpc/v4/protos/ydb_topic_pb2.py | 419 ++-- ydb/_grpc/v4/protos/ydb_topic_pb2.pyi | 312 ++- ydb/_grpc/v4/protos/ydb_value_pb2.py | 32 +- ydb/_grpc/v4/protos/ydb_value_pb2.pyi | 12 +- 28 files changed, 4066 insertions(+), 1405 deletions(-) diff --git a/ydb-api-protos b/ydb-api-protos index 8e2eef00..1440f00e 160000 --- a/ydb-api-protos +++ b/ydb-api-protos @@ -1 +1 @@ -Subproject commit 8e2eef00b7334b4a77b8c9772dbefa862a8812fa +Subproject commit 1440f00ea8c997bfe378c9e8e8a29c8916b8b4ba diff --git a/ydb/_grpc/v3/draft/protos/ydb_maintenance_pb2.py b/ydb/_grpc/v3/draft/protos/ydb_maintenance_pb2.py index ab0859d9..c7e4d603 100644 --- a/ydb/_grpc/v3/draft/protos/ydb_maintenance_pb2.py +++ b/ydb/_grpc/v3/draft/protos/ydb_maintenance_pb2.py @@ -27,7 +27,7 @@ syntax='proto3', serialized_options=b'\n#tech.ydb.proto.draft.maintenance.v1ZDgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_Maintenance\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\"draft/protos/ydb_maintenance.proto\x12\x0fYdb.Maintenance\x1a#protos/annotations/validation.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1aprotos/ydb_discovery.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf0\x02\n\x04Node\x12\x0f\n\x07node_id\x18\x01 \x01(\r\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\r\x12-\n\x08location\x18\x04 \x01(\x0b\x32\x1b.Ydb.Discovery.NodeLocation\x12)\n\x05state\x18\x05 \x01(\x0e\x32\x1a.Ydb.Maintenance.ItemState\x12\x34\n\x07storage\x18\x06 \x01(\x0b\x32!.Ydb.Maintenance.Node.StorageNodeH\x00\x12\x34\n\x07\x64ynamic\x18\x07 \x01(\x0b\x32!.Ydb.Maintenance.Node.DynamicNodeH\x00\x12.\n\nstart_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\t \x01(\t\x1a\r\n\x0bStorageNode\x1a\x1d\n\x0b\x44ynamicNode\x12\x0e\n\x06tenant\x18\x01 \x01(\tB\x06\n\x04type\"T\n\x17ListClusterNodesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\">\n\x16ListClusterNodesResult\x12$\n\x05nodes\x18\x01 \x03(\x0b\x32\x15.Ydb.Maintenance.Node\"H\n\x18ListClusterNodesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa0\x01\n\x16MaintenanceTaskOptions\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1c\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12<\n\x11\x61vailability_mode\x18\x03 \x01(\x0e\x32!.Ydb.Maintenance.AvailabilityMode\x12\x0f\n\x07\x64ry_run\x18\x04 \x01(\x08\"B\n\x0b\x41\x63tionScope\x12\x11\n\x07node_id\x18\x01 \x01(\rH\x00\x12\x17\n\x04host\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xff\x01H\x00\x42\x07\n\x05scope\"f\n\nLockAction\x12+\n\x05scope\x18\x01 \x01(\x0b\x32\x1c.Ydb.Maintenance.ActionScope\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"F\n\x06\x41\x63tion\x12\x32\n\x0block_action\x18\x01 \x01(\x0b\x32\x1b.Ydb.Maintenance.LockActionH\x00\x42\x08\n\x06\x61\x63tion\"?\n\x0b\x41\x63tionGroup\x12\x30\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x17.Ydb.Maintenance.ActionB\x06\x9a\xe6*\x02(\x01\"\xd5\x01\n\x1c\x43reateMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12=\n\x0ctask_options\x18\x02 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12;\n\raction_groups\x18\x03 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionGroupB\x06\x9a\xe6*\x02(\x01\"u\n\x1dRefreshMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"]\n\tActionUid\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x08group_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1a\n\taction_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\xdc\x05\n\x0b\x41\x63tionState\x12\'\n\x06\x61\x63tion\x18\x01 \x01(\x0b\x32\x17.Ydb.Maintenance.Action\x12.\n\naction_uid\x18\x02 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12\x39\n\x06status\x18\x03 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionStatus\x12\x39\n\x06reason\x18\x04 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionReason\x12,\n\x08\x64\x65\x61\x64line\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x0c\x41\x63tionStatus\x12\x1d\n\x19\x41\x43TION_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41\x43TION_STATUS_PENDING\x10\x01\x12\x1b\n\x17\x41\x43TION_STATUS_PERFORMED\x10\x02\"\xe8\x02\n\x0c\x41\x63tionReason\x12\x1d\n\x19\x41\x43TION_REASON_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41\x43TION_REASON_OK\x10\x01\x12-\n)ACTION_REASON_TOO_MANY_UNAVAILABLE_VDISKS\x10\x02\x12:\n6ACTION_REASON_TOO_MANY_UNAVAILABLE_STATE_STORAGE_RINGS\x10\x03\x12.\n*ACTION_REASON_DISABLED_NODES_LIMIT_REACHED\x10\x04\x12\x35\n1ACTION_REASON_TENANT_DISABLED_NODES_LIMIT_REACHED\x10\x05\x12\x1f\n\x1b\x41\x43TION_REASON_WRONG_REQUEST\x10\x06\x12\x30\n,ACTION_REASON_SYS_TABLETS_NODE_LIMIT_REACHED\x10\x07\"H\n\x11\x41\x63tionGroupStates\x12\x33\n\raction_states\x18\x01 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionState\"\xb0\x01\n\x15MaintenanceTaskResult\x12\x10\n\x08task_uid\x18\x01 \x01(\t\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\x12\x34\n\x0bretry_after\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x42\x0e\n\x0c_retry_after\"G\n\x17MaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"q\n\x19GetMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\x9a\x01\n\x18GetMaintenanceTaskResult\x12=\n\x0ctask_options\x18\x01 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\"J\n\x1aGetMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"t\n\x1bListMaintenanceTasksRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x11\n\x04user\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_user\"0\n\x1aListMaintenanceTasksResult\x12\x12\n\ntasks_uids\x18\x01 \x03(\t\"L\n\x1cListMaintenanceTasksResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"r\n\x1a\x44ropMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"M\n\x1dManageMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x8b\x01\n\x15\x43ompleteActionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x37\n\x0b\x61\x63tion_uids\x18\x02 \x03(\x0b\x32\x1a.Ydb.Maintenance.ActionUidB\x06\x9a\xe6*\x02(\x01\"\xbe\x01\n\x12ManageActionResult\x12\x43\n\x0f\x61\x63tion_statuses\x18\x01 \x03(\x0b\x32*.Ydb.Maintenance.ManageActionResult.Status\x1a\x63\n\x06Status\x12.\n\naction_uid\x18\x01 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\"D\n\x14ManageActionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation*k\n\tItemState\x12\x1a\n\x16ITEM_STATE_UNSPECIFIED\x10\x00\x12\x11\n\rITEM_STATE_UP\x10\x01\x12\x1a\n\x16ITEM_STATE_MAINTENANCE\x10\x02\x12\x13\n\x0fITEM_STATE_DOWN\x10\x03*\x8c\x01\n\x10\x41vailabilityMode\x12!\n\x1d\x41VAILABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41VAILABILITY_MODE_STRONG\x10\x01\x12\x1a\n\x16\x41VAILABILITY_MODE_WEAK\x10\x02\x12\x1b\n\x17\x41VAILABILITY_MODE_FORCE\x10\x03\x42n\n#tech.ydb.proto.draft.maintenance.v1ZDgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_Maintenance\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\"draft/protos/ydb_maintenance.proto\x12\x0fYdb.Maintenance\x1a#protos/annotations/validation.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1aprotos/ydb_discovery.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf0\x02\n\x04Node\x12\x0f\n\x07node_id\x18\x01 \x01(\r\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\r\x12-\n\x08location\x18\x04 \x01(\x0b\x32\x1b.Ydb.Discovery.NodeLocation\x12)\n\x05state\x18\x05 \x01(\x0e\x32\x1a.Ydb.Maintenance.ItemState\x12\x34\n\x07storage\x18\x06 \x01(\x0b\x32!.Ydb.Maintenance.Node.StorageNodeH\x00\x12\x34\n\x07\x64ynamic\x18\x07 \x01(\x0b\x32!.Ydb.Maintenance.Node.DynamicNodeH\x00\x12.\n\nstart_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\t \x01(\t\x1a\r\n\x0bStorageNode\x1a\x1d\n\x0b\x44ynamicNode\x12\x0e\n\x06tenant\x18\x01 \x01(\tB\x06\n\x04type\"T\n\x17ListClusterNodesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\">\n\x16ListClusterNodesResult\x12$\n\x05nodes\x18\x01 \x03(\x0b\x32\x15.Ydb.Maintenance.Node\"H\n\x18ListClusterNodesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xc3\x01\n\x16MaintenanceTaskOptions\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1c\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12<\n\x11\x61vailability_mode\x18\x03 \x01(\x0e\x32!.Ydb.Maintenance.AvailabilityMode\x12\x0f\n\x07\x64ry_run\x18\x04 \x01(\x08\x12!\n\x08priority\x18\x05 \x01(\x05\x42\x0f\xb2\xe6*\x0b[-100; 100]\"B\n\x0b\x41\x63tionScope\x12\x11\n\x07node_id\x18\x01 \x01(\rH\x00\x12\x17\n\x04host\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xff\x01H\x00\x42\x07\n\x05scope\"f\n\nLockAction\x12+\n\x05scope\x18\x01 \x01(\x0b\x32\x1c.Ydb.Maintenance.ActionScope\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"F\n\x06\x41\x63tion\x12\x32\n\x0block_action\x18\x01 \x01(\x0b\x32\x1b.Ydb.Maintenance.LockActionH\x00\x42\x08\n\x06\x61\x63tion\"?\n\x0b\x41\x63tionGroup\x12\x30\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x17.Ydb.Maintenance.ActionB\x06\x9a\xe6*\x02(\x01\"\xd5\x01\n\x1c\x43reateMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12=\n\x0ctask_options\x18\x02 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12;\n\raction_groups\x18\x03 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionGroupB\x06\x9a\xe6*\x02(\x01\"u\n\x1dRefreshMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"]\n\tActionUid\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x08group_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1a\n\taction_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\x8f\x06\n\x0b\x41\x63tionState\x12\'\n\x06\x61\x63tion\x18\x01 \x01(\x0b\x32\x17.Ydb.Maintenance.Action\x12.\n\naction_uid\x18\x02 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12\x39\n\x06status\x18\x03 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionStatus\x12\x39\n\x06reason\x18\x04 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionReason\x12\x16\n\x0ereason_details\x18\x06 \x01(\t\x12,\n\x08\x64\x65\x61\x64line\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x0c\x41\x63tionStatus\x12\x1d\n\x19\x41\x43TION_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41\x43TION_STATUS_PENDING\x10\x01\x12\x1b\n\x17\x41\x43TION_STATUS_PERFORMED\x10\x02\"\x83\x03\n\x0c\x41\x63tionReason\x12\x1d\n\x19\x41\x43TION_REASON_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41\x43TION_REASON_OK\x10\x01\x12-\n)ACTION_REASON_TOO_MANY_UNAVAILABLE_VDISKS\x10\x02\x12:\n6ACTION_REASON_TOO_MANY_UNAVAILABLE_STATE_STORAGE_RINGS\x10\x03\x12.\n*ACTION_REASON_DISABLED_NODES_LIMIT_REACHED\x10\x04\x12\x35\n1ACTION_REASON_TENANT_DISABLED_NODES_LIMIT_REACHED\x10\x05\x12\x1f\n\x1b\x41\x43TION_REASON_WRONG_REQUEST\x10\x06\x12\x30\n,ACTION_REASON_SYS_TABLETS_NODE_LIMIT_REACHED\x10\x07\x12\x19\n\x15\x41\x43TION_REASON_GENERIC\x10\x08\"H\n\x11\x41\x63tionGroupStates\x12\x33\n\raction_states\x18\x01 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionState\"\xb0\x01\n\x15MaintenanceTaskResult\x12\x10\n\x08task_uid\x18\x01 \x01(\t\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\x12\x34\n\x0bretry_after\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x42\x0e\n\x0c_retry_after\"G\n\x17MaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"q\n\x19GetMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\x9a\x01\n\x18GetMaintenanceTaskResult\x12=\n\x0ctask_options\x18\x01 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\"J\n\x1aGetMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"t\n\x1bListMaintenanceTasksRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x11\n\x04user\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_user\"0\n\x1aListMaintenanceTasksResult\x12\x12\n\ntasks_uids\x18\x01 \x03(\t\"L\n\x1cListMaintenanceTasksResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"r\n\x1a\x44ropMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"M\n\x1dManageMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x8b\x01\n\x15\x43ompleteActionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x37\n\x0b\x61\x63tion_uids\x18\x02 \x03(\x0b\x32\x1a.Ydb.Maintenance.ActionUidB\x06\x9a\xe6*\x02(\x01\"\xbe\x01\n\x12ManageActionResult\x12\x43\n\x0f\x61\x63tion_statuses\x18\x01 \x03(\x0b\x32*.Ydb.Maintenance.ManageActionResult.Status\x1a\x63\n\x06Status\x12.\n\naction_uid\x18\x01 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\"D\n\x14ManageActionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation*k\n\tItemState\x12\x1a\n\x16ITEM_STATE_UNSPECIFIED\x10\x00\x12\x11\n\rITEM_STATE_UP\x10\x01\x12\x1a\n\x16ITEM_STATE_MAINTENANCE\x10\x02\x12\x13\n\x0fITEM_STATE_DOWN\x10\x03*\x8c\x01\n\x10\x41vailabilityMode\x12!\n\x1d\x41VAILABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41VAILABILITY_MODE_STRONG\x10\x01\x12\x1a\n\x16\x41VAILABILITY_MODE_WEAK\x10\x02\x12\x1b\n\x17\x41VAILABILITY_MODE_FORCE\x10\x03\x42n\n#tech.ydb.proto.draft.maintenance.v1ZDgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_Maintenance\xf8\x01\x01\x62\x06proto3' , dependencies=[protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__status__codes__pb2.DESCRIPTOR,protos_dot_ydb__discovery__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) @@ -61,8 +61,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3996, - serialized_end=4103, + serialized_start=4082, + serialized_end=4189, ) _sym_db.RegisterEnumDescriptor(_ITEMSTATE) @@ -97,8 +97,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=4106, - serialized_end=4246, + serialized_start=4192, + serialized_end=4332, ) _sym_db.RegisterEnumDescriptor(_AVAILABILITYMODE) @@ -138,8 +138,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2010, - serialized_end=2111, + serialized_start=2069, + serialized_end=2170, ) _sym_db.RegisterEnumDescriptor(_ACTIONSTATE_ACTIONSTATUS) @@ -190,11 +190,16 @@ serialized_options=None, type=None, create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ACTION_REASON_GENERIC', index=8, number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=2114, - serialized_end=2474, + serialized_start=2173, + serialized_end=2560, ) _sym_db.RegisterEnumDescriptor(_ACTIONSTATE_ACTIONREASON) @@ -479,6 +484,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='priority', full_name='Ydb.Maintenance.MaintenanceTaskOptions.priority', index=4, + number=5, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\013[-100; 100]', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -492,7 +504,7 @@ oneofs=[ ], serialized_start=840, - serialized_end=1000, + serialized_end=1035, ) @@ -535,8 +547,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1002, - serialized_end=1068, + serialized_start=1037, + serialized_end=1103, ) @@ -574,8 +586,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1070, - serialized_end=1172, + serialized_start=1105, + serialized_end=1207, ) @@ -611,8 +623,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1174, - serialized_end=1244, + serialized_start=1209, + serialized_end=1279, ) @@ -643,8 +655,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1246, - serialized_end=1309, + serialized_start=1281, + serialized_end=1344, ) @@ -689,8 +701,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1312, - serialized_end=1525, + serialized_start=1347, + serialized_end=1560, ) @@ -728,8 +740,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1527, - serialized_end=1644, + serialized_start=1562, + serialized_end=1679, ) @@ -774,8 +786,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1646, - serialized_end=1739, + serialized_start=1681, + serialized_end=1774, ) @@ -816,7 +828,14 @@ is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='deadline', full_name='Ydb.Maintenance.ActionState.deadline', index=4, + name='reason_details', full_name='Ydb.Maintenance.ActionState.reason_details', index=4, + number=6, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='deadline', full_name='Ydb.Maintenance.ActionState.deadline', index=5, number=5, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -836,8 +855,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1742, - serialized_end=2474, + serialized_start=1777, + serialized_end=2560, ) @@ -868,8 +887,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2476, - serialized_end=2548, + serialized_start=2562, + serialized_end=2634, ) @@ -919,8 +938,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=2551, - serialized_end=2727, + serialized_start=2637, + serialized_end=2813, ) @@ -951,8 +970,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2729, - serialized_end=2800, + serialized_start=2815, + serialized_end=2886, ) @@ -990,8 +1009,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2802, - serialized_end=2915, + serialized_start=2888, + serialized_end=3001, ) @@ -1029,8 +1048,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2918, - serialized_end=3072, + serialized_start=3004, + serialized_end=3158, ) @@ -1061,8 +1080,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3074, - serialized_end=3148, + serialized_start=3160, + serialized_end=3234, ) @@ -1105,8 +1124,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=3150, - serialized_end=3266, + serialized_start=3236, + serialized_end=3352, ) @@ -1137,8 +1156,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3268, - serialized_end=3316, + serialized_start=3354, + serialized_end=3402, ) @@ -1169,8 +1188,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3318, - serialized_end=3394, + serialized_start=3404, + serialized_end=3480, ) @@ -1208,8 +1227,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3396, - serialized_end=3510, + serialized_start=3482, + serialized_end=3596, ) @@ -1240,8 +1259,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3512, - serialized_end=3589, + serialized_start=3598, + serialized_end=3675, ) @@ -1279,8 +1298,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3592, - serialized_end=3731, + serialized_start=3678, + serialized_end=3817, ) @@ -1318,8 +1337,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3825, - serialized_end=3924, + serialized_start=3911, + serialized_end=4010, ) _MANAGEACTIONRESULT = _descriptor.Descriptor( @@ -1349,8 +1368,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3734, - serialized_end=3924, + serialized_start=3820, + serialized_end=4010, ) @@ -1381,8 +1400,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3926, - serialized_end=3994, + serialized_start=4012, + serialized_end=4080, ) _NODE_STORAGENODE.containing_type = _NODE @@ -1699,6 +1718,7 @@ DESCRIPTOR._options = None _MAINTENANCETASKOPTIONS.fields_by_name['task_uid']._options = None _MAINTENANCETASKOPTIONS.fields_by_name['description']._options = None +_MAINTENANCETASKOPTIONS.fields_by_name['priority']._options = None _ACTIONSCOPE.fields_by_name['host']._options = None _ACTIONGROUP.fields_by_name['actions']._options = None _CREATEMAINTENANCETASKREQUEST.fields_by_name['action_groups']._options = None diff --git a/ydb/_grpc/v3/protos/ydb_export_pb2.py b/ydb/_grpc/v3/protos/ydb_export_pb2.py index 4cd8e33c..c4f6f107 100644 --- a/ydb/_grpc/v3/protos/ydb_export_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_export_pb2.py @@ -23,7 +23,7 @@ syntax='proto3', serialized_options=b'\n\025tech.ydb.proto.exportZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x17protos/ydb_export.proto\x12\nYdb.Export\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x0e\x45xportProgress\"\x9e\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x11\n\rPROGRESS_DONE\x10\x03\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x04\x12\x16\n\x12PROGRESS_CANCELLED\x10\x05\"\xa0\x01\n\x12\x45xportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x98\x02\n\x12\x45xportToYtSettings\x12\x12\n\x04host\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x13\n\x05token\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x04 \x03(\x0b\x32#.Ydb.Export.ExportToYtSettings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x06 \x01(\r\x12\x13\n\x0buse_type_v3\x18\x07 \x01(\x08\x1a\x41\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\"\x12\n\x10\x45xportToYtResult\"\xb5\x01\n\x12\x45xportToYtMetadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToYtRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToYtResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xbd\x05\n\x12\x45xportToS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x35\n\x06scheme\x18\x02 \x01(\x0e\x32%.Ydb.Export.ExportToS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x06 \x03(\x0b\x32#.Ydb.Export.ExportToS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x42\n\rstorage_class\x18\t \x01(\x0e\x32+.Ydb.Export.ExportToS3Settings.StorageClass\x12\x13\n\x0b\x63ompression\x18\n \x01(\t\x12\x0e\n\x06region\x18\x0b \x01(\t\x1a\x43\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12 \n\x12\x64\x65stination_prefix\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\xba\x01\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x16\n\x12REDUCED_REDUNDANCY\x10\x02\x12\x0f\n\x0bSTANDARD_IA\x10\x03\x12\x0e\n\nONEZONE_IA\x10\x04\x12\x17\n\x13INTELLIGENT_TIERING\x10\x05\x12\x0b\n\x07GLACIER\x10\x06\x12\x10\n\x0c\x44\x45\x45P_ARCHIVE\x10\x07\x12\x0c\n\x08OUTPOSTS\x10\x08\"\x12\n\x10\x45xportToS3Result\"\xb5\x01\n\x12\x45xportToS3Metadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3SettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBU\n\x15tech.ydb.proto.exportZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x17protos/ydb_export.proto\x12\nYdb.Export\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x0e\x45xportProgress\"\x9e\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x11\n\rPROGRESS_DONE\x10\x03\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x04\x12\x16\n\x12PROGRESS_CANCELLED\x10\x05\"\xa0\x01\n\x12\x45xportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x98\x02\n\x12\x45xportToYtSettings\x12\x12\n\x04host\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x13\n\x05token\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x04 \x03(\x0b\x32#.Ydb.Export.ExportToYtSettings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x06 \x01(\r\x12\x13\n\x0buse_type_v3\x18\x07 \x01(\x08\x1a\x41\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\"\x12\n\x10\x45xportToYtResult\"\xb5\x01\n\x12\x45xportToYtMetadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToYtRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToYtResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xe1\x05\n\x12\x45xportToS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x35\n\x06scheme\x18\x02 \x01(\x0e\x32%.Ydb.Export.ExportToS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x06 \x03(\x0b\x32#.Ydb.Export.ExportToS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x42\n\rstorage_class\x18\t \x01(\x0e\x32+.Ydb.Export.ExportToS3Settings.StorageClass\x12\x13\n\x0b\x63ompression\x18\n \x01(\t\x12\x0e\n\x06region\x18\x0b \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\x0c \x01(\x08\x1a\x43\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12 \n\x12\x64\x65stination_prefix\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\xba\x01\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x16\n\x12REDUCED_REDUNDANCY\x10\x02\x12\x0f\n\x0bSTANDARD_IA\x10\x03\x12\x0e\n\nONEZONE_IA\x10\x04\x12\x17\n\x13INTELLIGENT_TIERING\x10\x05\x12\x0b\n\x07GLACIER\x10\x06\x12\x10\n\x0c\x44\x45\x45P_ARCHIVE\x10\x07\x12\x0c\n\x08OUTPOSTS\x10\x08\"\x12\n\x10\x45xportToS3Result\"\xb5\x01\n\x12\x45xportToS3Metadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3SettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBU\n\x15tech.ydb.proto.exportZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export\xf8\x01\x01\x62\x06proto3' , dependencies=[protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) @@ -99,8 +99,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1639, - serialized_end=1685, + serialized_start=1675, + serialized_end=1721, ) _sym_db.RegisterEnumDescriptor(_EXPORTTOS3SETTINGS_SCHEME) @@ -159,8 +159,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1688, - serialized_end=1874, + serialized_start=1724, + serialized_end=1910, ) _sym_db.RegisterEnumDescriptor(_EXPORTTOS3SETTINGS_STORAGECLASS) @@ -532,8 +532,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1570, - serialized_end=1637, + serialized_start=1606, + serialized_end=1673, ) _EXPORTTOS3SETTINGS = _descriptor.Descriptor( @@ -621,6 +621,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='disable_virtual_addressing', full_name='Ydb.Export.ExportToS3Settings.disable_virtual_addressing', index=11, + number=12, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -636,7 +643,7 @@ oneofs=[ ], serialized_start=1173, - serialized_end=1874, + serialized_end=1910, ) @@ -660,8 +667,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1876, - serialized_end=1894, + serialized_start=1912, + serialized_end=1930, ) @@ -706,8 +713,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1897, - serialized_end=2078, + serialized_start=1933, + serialized_end=2114, ) @@ -745,8 +752,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2081, - serialized_end=2215, + serialized_start=2117, + serialized_end=2251, ) @@ -777,8 +784,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2217, - serialized_end=2283, + serialized_start=2253, + serialized_end=2319, ) _EXPORTPROGRESS_PROGRESS.containing_type = _EXPORTPROGRESS diff --git a/ydb/_grpc/v3/protos/ydb_formats_pb2.py b/ydb/_grpc/v3/protos/ydb_formats_pb2.py index eff59c3c..e5cc82cb 100644 --- a/ydb/_grpc/v3/protos/ydb_formats_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_formats_pb2.py @@ -20,7 +20,7 @@ syntax='proto3', serialized_options=b'\n\026tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x18protos/ydb_formats.proto\x12\x0bYdb.Formats\"$\n\x12\x41rrowBatchSettings\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\"W\n\x0b\x43svSettings\x12\x11\n\tskip_rows\x18\x01 \x01(\r\x12\x11\n\tdelimiter\x18\x02 \x01(\x0c\x12\x12\n\nnull_value\x18\x03 \x01(\x0c\x12\x0e\n\x06header\x18\x04 \x01(\x08\x42W\n\x16tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x18protos/ydb_formats.proto\x12\x0bYdb.Formats\"$\n\x12\x41rrowBatchSettings\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\"\xda\x01\n\x0b\x43svSettings\x12\x11\n\tskip_rows\x18\x01 \x01(\r\x12\x11\n\tdelimiter\x18\x02 \x01(\x0c\x12\x12\n\nnull_value\x18\x03 \x01(\x0c\x12\x0e\n\x06header\x18\x04 \x01(\x08\x12\x31\n\x07quoting\x18\x05 \x01(\x0b\x32 .Ydb.Formats.CsvSettings.Quoting\x1aN\n\x07Quoting\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12\x12\n\nquote_char\x18\x02 \x01(\x0c\x12\x1d\n\x15\x64ouble_quote_disabled\x18\x03 \x01(\x08\x42W\n\x16tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\xf8\x01\x01\x62\x06proto3' ) @@ -58,6 +58,51 @@ ) +_CSVSETTINGS_QUOTING = _descriptor.Descriptor( + name='Quoting', + full_name='Ydb.Formats.CsvSettings.Quoting', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='disabled', full_name='Ydb.Formats.CsvSettings.Quoting.disabled', index=0, + number=1, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='quote_char', full_name='Ydb.Formats.CsvSettings.Quoting.quote_char', index=1, + number=2, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='double_quote_disabled', full_name='Ydb.Formats.CsvSettings.Quoting.double_quote_disabled', index=2, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=220, + serialized_end=298, +) + _CSVSETTINGS = _descriptor.Descriptor( name='CsvSettings', full_name='Ydb.Formats.CsvSettings', @@ -94,10 +139,17 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='quoting', full_name='Ydb.Formats.CsvSettings.quoting', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], - nested_types=[], + nested_types=[_CSVSETTINGS_QUOTING, ], enum_types=[ ], serialized_options=None, @@ -106,10 +158,12 @@ extension_ranges=[], oneofs=[ ], - serialized_start=79, - serialized_end=166, + serialized_start=80, + serialized_end=298, ) +_CSVSETTINGS_QUOTING.containing_type = _CSVSETTINGS +_CSVSETTINGS.fields_by_name['quoting'].message_type = _CSVSETTINGS_QUOTING DESCRIPTOR.message_types_by_name['ArrowBatchSettings'] = _ARROWBATCHSETTINGS DESCRIPTOR.message_types_by_name['CsvSettings'] = _CSVSETTINGS _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -122,11 +176,19 @@ _sym_db.RegisterMessage(ArrowBatchSettings) CsvSettings = _reflection.GeneratedProtocolMessageType('CsvSettings', (_message.Message,), { + + 'Quoting' : _reflection.GeneratedProtocolMessageType('Quoting', (_message.Message,), { + 'DESCRIPTOR' : _CSVSETTINGS_QUOTING, + '__module__' : 'protos.ydb_formats_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Formats.CsvSettings.Quoting) + }) + , 'DESCRIPTOR' : _CSVSETTINGS, '__module__' : 'protos.ydb_formats_pb2' # @@protoc_insertion_point(class_scope:Ydb.Formats.CsvSettings) }) _sym_db.RegisterMessage(CsvSettings) +_sym_db.RegisterMessage(CsvSettings.Quoting) DESCRIPTOR._options = None diff --git a/ydb/_grpc/v3/protos/ydb_import_pb2.py b/ydb/_grpc/v3/protos/ydb_import_pb2.py index 621d6042..b9f1b90f 100644 --- a/ydb/_grpc/v3/protos/ydb_import_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_import_pb2.py @@ -23,7 +23,7 @@ syntax='proto3', serialized_options=b'\n\026tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x17protos/ydb_import.proto\x12\nYdb.Import\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcd\x01\n\x0eImportProgress\"\xba\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x1a\n\x16PROGRESS_BUILD_INDEXES\x10\x03\x12\x11\n\rPROGRESS_DONE\x10\x04\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x05\x12\x16\n\x12PROGRESS_CANCELLED\x10\x06\"\xa0\x01\n\x12ImportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xad\x03\n\x14ImportFromS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x37\n\x06scheme\x18\x02 \x01(\x0e\x32\'.Ydb.Import.ImportFromS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12<\n\x05items\x18\x06 \x03(\x0b\x32%.Ydb.Import.ImportFromS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x0e\n\x06region\x18\t \x01(\t\x1a\x43\n\x04Item\x12\x1b\n\rsource_prefix\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\x14\n\x12ImportFromS3Result\"\xb9\x01\n\x14ImportFromS3Metadata\x12\x32\n\x08settings\x18\x01 \x01(\x0b\x32 .Ydb.Import.ImportFromS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Import.ImportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Import.ImportItemProgress\"\x8a\x01\n\x13ImportFromS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x38\n\x08settings\x18\x02 \x01(\x0b\x32 .Ydb.Import.ImportFromS3SettingsB\x04\x90\xe6*\x01\"D\n\x14ImportFromS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\" \n\rYdbDumpFormat\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\"\x12\n\x10ImportDataResult\"\xae\x01\n\x11ImportDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x17\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x42\t\xa2\xe6*\x05\x18\x80\x80\x80\x04\x12-\n\x08ydb_dump\x18\x04 \x01(\x0b\x32\x19.Ydb.Import.YdbDumpFormatH\x00\x42\x08\n\x06\x66ormat\"B\n\x12ImportDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBV\n\x16tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x17protos/ydb_import.proto\x12\nYdb.Import\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcd\x01\n\x0eImportProgress\"\xba\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x1a\n\x16PROGRESS_BUILD_INDEXES\x10\x03\x12\x11\n\rPROGRESS_DONE\x10\x04\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x05\x12\x16\n\x12PROGRESS_CANCELLED\x10\x06\"\xa0\x01\n\x12ImportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd1\x03\n\x14ImportFromS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x37\n\x06scheme\x18\x02 \x01(\x0e\x32\'.Ydb.Import.ImportFromS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12<\n\x05items\x18\x06 \x03(\x0b\x32%.Ydb.Import.ImportFromS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x0e\n\x06region\x18\t \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\n \x01(\x08\x1a\x43\n\x04Item\x12\x1b\n\rsource_prefix\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\x14\n\x12ImportFromS3Result\"\xb9\x01\n\x14ImportFromS3Metadata\x12\x32\n\x08settings\x18\x01 \x01(\x0b\x32 .Ydb.Import.ImportFromS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Import.ImportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Import.ImportItemProgress\"\x8a\x01\n\x13ImportFromS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x38\n\x08settings\x18\x02 \x01(\x0b\x32 .Ydb.Import.ImportFromS3SettingsB\x04\x90\xe6*\x01\"D\n\x14ImportFromS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\" \n\rYdbDumpFormat\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\"\x12\n\x10ImportDataResult\"\xae\x01\n\x11ImportDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x17\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x42\t\xa2\xe6*\x05\x18\x80\x80\x80\x04\x12-\n\x08ydb_dump\x18\x04 \x01(\x0b\x32\x19.Ydb.Import.YdbDumpFormatH\x00\x42\x08\n\x06\x66ormat\"B\n\x12ImportDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBV\n\x16tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\xf8\x01\x01\x62\x06proto3' , dependencies=[protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) @@ -104,8 +104,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=892, - serialized_end=938, + serialized_start=928, + serialized_end=974, ) _sym_db.RegisterEnumDescriptor(_IMPORTFROMS3SETTINGS_SCHEME) @@ -223,8 +223,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=823, - serialized_end=890, + serialized_start=859, + serialized_end=926, ) _IMPORTFROMS3SETTINGS = _descriptor.Descriptor( @@ -298,6 +298,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='disable_virtual_addressing', full_name='Ydb.Import.ImportFromS3Settings.disable_virtual_addressing', index=9, + number=10, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -312,7 +319,7 @@ oneofs=[ ], serialized_start=509, - serialized_end=938, + serialized_end=974, ) @@ -336,8 +343,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=940, - serialized_end=960, + serialized_start=976, + serialized_end=996, ) @@ -382,8 +389,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=963, - serialized_end=1148, + serialized_start=999, + serialized_end=1184, ) @@ -421,8 +428,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1151, - serialized_end=1289, + serialized_start=1187, + serialized_end=1325, ) @@ -453,8 +460,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1291, - serialized_end=1359, + serialized_start=1327, + serialized_end=1395, ) @@ -485,8 +492,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1361, - serialized_end=1393, + serialized_start=1397, + serialized_end=1429, ) @@ -510,8 +517,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1395, - serialized_end=1413, + serialized_start=1431, + serialized_end=1449, ) @@ -568,8 +575,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1416, - serialized_end=1590, + serialized_start=1452, + serialized_end=1626, ) @@ -600,8 +607,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1592, - serialized_end=1658, + serialized_start=1628, + serialized_end=1694, ) _IMPORTPROGRESS_PROGRESS.containing_type = _IMPORTPROGRESS diff --git a/ydb/_grpc/v3/protos/ydb_query_pb2.py b/ydb/_grpc/v3/protos/ydb_query_pb2.py index 05e72e2d..6edc6dca 100644 --- a/ydb/_grpc/v3/protos/ydb_query_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_query_pb2.py @@ -28,7 +28,7 @@ syntax='proto3', serialized_options=b'\n\024tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\x9a\x03\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\x93\x02\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12+\n\x07tx_meta\x18\x06 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"\x8d\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\xe1\x03\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x12\x34\n\x19response_part_limit_bytes\x18\t \x01(\x03\x42\x11\xb2\xe6*\r[0; 33554432]\x12\x0f\n\x07pool_id\x18\n \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\x93\x02\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12+\n\x07tx_meta\x18\x06 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"\x9e\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07pool_id\x18\x07 \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3' , dependencies=[google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__issue__message__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,protos_dot_ydb__query__stats__pb2.DESCRIPTOR,protos_dot_ydb__status__codes__pb2.DESCRIPTOR,protos_dot_ydb__value__pb2.DESCRIPTOR,]) @@ -57,8 +57,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3926, - serialized_end=3992, + serialized_start=4014, + serialized_end=4080, ) _sym_db.RegisterEnumDescriptor(_SYNTAX) @@ -98,8 +98,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3995, - serialized_end=4129, + serialized_start=4083, + serialized_end=4217, ) _sym_db.RegisterEnumDescriptor(_EXECMODE) @@ -139,8 +139,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=4131, - serialized_end=4258, + serialized_start=4219, + serialized_end=4346, ) _sym_db.RegisterEnumDescriptor(_STATSMODE) @@ -185,8 +185,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=4261, - serialized_end=4431, + serialized_start=4349, + serialized_end=4519, ) _sym_db.RegisterEnumDescriptor(_EXECSTATUS) @@ -995,8 +995,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2406, - serialized_end=2472, + serialized_start=2477, + serialized_end=2543, ) _EXECUTEQUERYREQUEST = _descriptor.Descriptor( @@ -1056,6 +1056,20 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='response_part_limit_bytes', full_name='Ydb.Query.ExecuteQueryRequest.response_part_limit_bytes', index=7, + number=9, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\r[0; 33554432]', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='pool_id', full_name='Ydb.Query.ExecuteQueryRequest.pool_id', index=8, + number=10, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1074,7 +1088,7 @@ fields=[]), ], serialized_start=2071, - serialized_end=2481, + serialized_end=2552, ) @@ -1105,8 +1119,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2483, - serialized_end=2528, + serialized_start=2554, + serialized_end=2599, ) @@ -1172,8 +1186,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2531, - serialized_end=2806, + serialized_start=2602, + serialized_end=2877, ) @@ -1211,8 +1225,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2406, - serialized_end=2472, + serialized_start=2477, + serialized_end=2543, ) _EXECUTESCRIPTREQUEST = _descriptor.Descriptor( @@ -1265,6 +1279,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='pool_id', full_name='Ydb.Query.ExecuteScriptRequest.pool_id', index=6, + number=7, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1277,8 +1298,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2809, - serialized_end=3206, + serialized_start=2880, + serialized_end=3294, ) @@ -1344,8 +1365,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3209, - serialized_end=3496, + serialized_start=3297, + serialized_end=3584, ) @@ -1397,8 +1418,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3499, - serialized_end=3643, + serialized_start=3587, + serialized_end=3731, ) @@ -1457,8 +1478,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3646, - serialized_end=3865, + serialized_start=3734, + serialized_end=3953, ) @@ -1489,8 +1510,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3867, - serialized_end=3924, + serialized_start=3955, + serialized_end=4012, ) _CREATESESSIONRESPONSE.fields_by_name['status'].enum_type = protos_dot_ydb__status__codes__pb2._STATUSIDS_STATUSCODE @@ -1825,6 +1846,7 @@ _ROLLBACKTRANSACTIONREQUEST.fields_by_name['tx_id']._options = None _EXECUTEQUERYREQUEST_PARAMETERSENTRY._options = None _EXECUTEQUERYREQUEST.fields_by_name['session_id']._options = None +_EXECUTEQUERYREQUEST.fields_by_name['response_part_limit_bytes']._options = None _EXECUTEQUERYRESPONSEPART.fields_by_name['result_set_index']._options = None _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._options = None _EXECUTESCRIPTMETADATA.fields_by_name['execution_id']._options = None diff --git a/ydb/_grpc/v3/protos/ydb_scheme_pb2.py b/ydb/_grpc/v3/protos/ydb_scheme_pb2.py index 48fd2f0e..a77b5014 100644 --- a/ydb/_grpc/v3/protos/ydb_scheme_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_scheme_pb2.py @@ -22,7 +22,7 @@ syntax='proto3', serialized_options=b'\n\025tech.ydb.proto.schemeB\025SchemeOperationProtosZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Scheme\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x17protos/ydb_scheme.proto\x12\nYdb.Scheme\x1a\x17protos/ydb_common.proto\x1a\x1aprotos/ydb_operation.proto\"_\n\x14MakeDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"E\n\x15MakeDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"a\n\x16RemoveDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"G\n\x17RemoveDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x14ListDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"E\n\x15ListDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"8\n\x0bPermissions\x12\x0f\n\x07subject\x18\x01 \x01(\t\x12\x18\n\x10permission_names\x18\x02 \x03(\t\"\xda\x03\n\x05\x45ntry\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05owner\x18\x02 \x01(\t\x12$\n\x04type\x18\x05 \x01(\x0e\x32\x16.Ydb.Scheme.Entry.Type\x12\x36\n\x15\x65\x66\x66\x65\x63tive_permissions\x18\x06 \x03(\x0b\x32\x17.Ydb.Scheme.Permissions\x12,\n\x0bpermissions\x18\x07 \x03(\x0b\x32\x17.Ydb.Scheme.Permissions\x12\x12\n\nsize_bytes\x18\x08 \x01(\x04\x12)\n\ncreated_at\x18\t \x01(\x0b\x32\x15.Ydb.VirtualTimestamp\"\xe8\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tDIRECTORY\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x14\n\x10PERS_QUEUE_GROUP\x10\x03\x12\x0c\n\x08\x44\x41TABASE\x10\x04\x12\x0f\n\x0bRTMR_VOLUME\x10\x05\x12\x16\n\x12\x42LOCK_STORE_VOLUME\x10\x06\x12\x15\n\x11\x43OORDINATION_NODE\x10\x07\x12\x10\n\x0c\x43OLUMN_STORE\x10\x0c\x12\x10\n\x0c\x43OLUMN_TABLE\x10\r\x12\x0c\n\x08SEQUENCE\x10\x0f\x12\x0f\n\x0bREPLICATION\x10\x10\x12\t\n\x05TOPIC\x10\x11\"[\n\x13ListDirectoryResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12#\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x11.Ydb.Scheme.Entry\"^\n\x13\x44\x65scribePathRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"D\n\x14\x44\x65scribePathResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"5\n\x12\x44\x65scribePathResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\"\xb2\x01\n\x11PermissionsAction\x12(\n\x05grant\x18\x01 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12)\n\x06revoke\x18\x02 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12&\n\x03set\x18\x03 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12\x16\n\x0c\x63hange_owner\x18\x04 \x01(\tH\x00\x42\x08\n\x06\x61\x63tion\"\xde\x01\n\x18ModifyPermissionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12.\n\x07\x61\x63tions\x18\x03 \x03(\x0b\x32\x1d.Ydb.Scheme.PermissionsAction\x12\x19\n\x11\x63lear_permissions\x18\x04 \x01(\x08\x12\x1f\n\x15interrupt_inheritance\x18\x05 \x01(\x08H\x00\x42\r\n\x0binheritance\"I\n\x19ModifyPermissionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBl\n\x15tech.ydb.proto.schemeB\x15SchemeOperationProtosZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Scheme\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x17protos/ydb_scheme.proto\x12\nYdb.Scheme\x1a\x17protos/ydb_common.proto\x1a\x1aprotos/ydb_operation.proto\"_\n\x14MakeDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"E\n\x15MakeDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"a\n\x16RemoveDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"G\n\x17RemoveDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x14ListDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"E\n\x15ListDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"8\n\x0bPermissions\x12\x0f\n\x07subject\x18\x01 \x01(\t\x12\x18\n\x10permission_names\x18\x02 \x03(\t\"\x92\x04\n\x05\x45ntry\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05owner\x18\x02 \x01(\t\x12$\n\x04type\x18\x05 \x01(\x0e\x32\x16.Ydb.Scheme.Entry.Type\x12\x36\n\x15\x65\x66\x66\x65\x63tive_permissions\x18\x06 \x03(\x0b\x32\x17.Ydb.Scheme.Permissions\x12,\n\x0bpermissions\x18\x07 \x03(\x0b\x32\x17.Ydb.Scheme.Permissions\x12\x12\n\nsize_bytes\x18\x08 \x01(\x04\x12)\n\ncreated_at\x18\t \x01(\x0b\x32\x15.Ydb.VirtualTimestamp\"\xa0\x02\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tDIRECTORY\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x14\n\x10PERS_QUEUE_GROUP\x10\x03\x12\x0c\n\x08\x44\x41TABASE\x10\x04\x12\x0f\n\x0bRTMR_VOLUME\x10\x05\x12\x16\n\x12\x42LOCK_STORE_VOLUME\x10\x06\x12\x15\n\x11\x43OORDINATION_NODE\x10\x07\x12\x10\n\x0c\x43OLUMN_STORE\x10\x0c\x12\x10\n\x0c\x43OLUMN_TABLE\x10\r\x12\x0c\n\x08SEQUENCE\x10\x0f\x12\x0f\n\x0bREPLICATION\x10\x10\x12\t\n\x05TOPIC\x10\x11\x12\x12\n\x0e\x45XTERNAL_TABLE\x10\x12\x12\x18\n\x14\x45XTERNAL_DATA_SOURCE\x10\x13\x12\x08\n\x04VIEW\x10\x14\"[\n\x13ListDirectoryResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12#\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x11.Ydb.Scheme.Entry\"^\n\x13\x44\x65scribePathRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"D\n\x14\x44\x65scribePathResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"5\n\x12\x44\x65scribePathResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\"\xb2\x01\n\x11PermissionsAction\x12(\n\x05grant\x18\x01 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12)\n\x06revoke\x18\x02 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12&\n\x03set\x18\x03 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12\x16\n\x0c\x63hange_owner\x18\x04 \x01(\tH\x00\x42\x08\n\x06\x61\x63tion\"\xde\x01\n\x18ModifyPermissionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12.\n\x07\x61\x63tions\x18\x03 \x03(\x0b\x32\x1d.Ydb.Scheme.PermissionsAction\x12\x19\n\x11\x63lear_permissions\x18\x04 \x01(\x08\x12\x1f\n\x15interrupt_inheritance\x18\x05 \x01(\x08H\x00\x42\r\n\x0binheritance\"I\n\x19ModifyPermissionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBl\n\x15tech.ydb.proto.schemeB\x15SchemeOperationProtosZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Scheme\xf8\x01\x01\x62\x06proto3' , dependencies=[protos_dot_ydb__common__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,]) @@ -100,11 +100,26 @@ serialized_options=None, type=None, create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='EXTERNAL_TABLE', index=13, number=18, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='EXTERNAL_DATA_SOURCE', index=14, number=19, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='VIEW', index=15, number=20, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=901, - serialized_end=1133, + serialized_end=1189, ) _sym_db.RegisterEnumDescriptor(_ENTRY_TYPE) @@ -432,7 +447,7 @@ oneofs=[ ], serialized_start=659, - serialized_end=1133, + serialized_end=1189, ) @@ -470,8 +485,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1135, - serialized_end=1226, + serialized_start=1191, + serialized_end=1282, ) @@ -509,8 +524,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1228, - serialized_end=1322, + serialized_start=1284, + serialized_end=1378, ) @@ -541,8 +556,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1324, - serialized_end=1392, + serialized_start=1380, + serialized_end=1448, ) @@ -573,8 +588,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1394, - serialized_end=1447, + serialized_start=1450, + serialized_end=1503, ) @@ -631,8 +646,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1450, - serialized_end=1628, + serialized_start=1506, + serialized_end=1684, ) @@ -696,8 +711,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1631, - serialized_end=1853, + serialized_start=1687, + serialized_end=1909, ) @@ -728,8 +743,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1855, - serialized_end=1928, + serialized_start=1911, + serialized_end=1984, ) _MAKEDIRECTORYREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS diff --git a/ydb/_grpc/v3/protos/ydb_table_pb2.py b/ydb/_grpc/v3/protos/ydb_table_pb2.py index 42716aa6..9e49364e 100644 --- a/ydb/_grpc/v3/protos/ydb_table_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_table_pb2.py @@ -3,6 +3,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: protos/ydb_table.proto """Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -20,6 +21,7 @@ from ydb._grpc.v3.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 from ydb._grpc.v3.protos import ydb_scheme_pb2 as protos_dot_ydb__scheme__pb2 from ydb._grpc.v3.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 +from ydb._grpc.v3.protos import ydb_topic_pb2 as protos_dot_ydb__topic__pb2 from ydb._grpc.v3.protos import ydb_formats_pb2 as protos_dot_ydb__formats__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 @@ -32,10 +34,44 @@ syntax='proto3', serialized_options=b'\n\024tech.ydb.proto.tableZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Table\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x16protos/ydb_table.proto\x12\tYdb.Table\x1a#protos/annotations/validation.proto\x1a\x17protos/ydb_common.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x16protos/ydb_value.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x18protos/ydb_formats.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"Q\n\x14\x43reateSessionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"E\n\x15\x43reateSessionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\")\n\x13\x43reateSessionResult\x12\x12\n\nsession_id\x18\x01 \x01(\t\"e\n\x14\x44\x65leteSessionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x39\n\x10operation_params\x18\x02 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"E\n\x15\x44\x65leteSessionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\r\n\x0bGlobalIndex\"\x12\n\x10GlobalAsyncIndex\"\xba\x01\n\nTableIndex\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rindex_columns\x18\x02 \x03(\t\x12.\n\x0cglobal_index\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.GlobalIndexH\x00\x12\x39\n\x12global_async_index\x18\x04 \x01(\x0b\x32\x1b.Ydb.Table.GlobalAsyncIndexH\x00\x12\x14\n\x0c\x64\x61ta_columns\x18\x05 \x03(\tB\x06\n\x04type\"\xdb\x02\n\x15TableIndexDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rindex_columns\x18\x02 \x03(\t\x12.\n\x0cglobal_index\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.GlobalIndexH\x00\x12\x39\n\x12global_async_index\x18\x05 \x01(\x0b\x32\x1b.Ydb.Table.GlobalAsyncIndexH\x00\x12\x37\n\x06status\x18\x04 \x01(\x0e\x32\'.Ydb.Table.TableIndexDescription.Status\x12\x14\n\x0c\x64\x61ta_columns\x18\x06 \x03(\t\x12\x12\n\nsize_bytes\x18\x07 \x01(\x04\"G\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cSTATUS_READY\x10\x01\x12\x13\n\x0fSTATUS_BUILDING\x10\x02\x42\x06\n\x04type\"\xdd\x01\n\x0fIndexBuildState\"\xc9\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATE_PREPARING\x10\x01\x12\x1a\n\x16STATE_TRANSFERING_DATA\x10\x02\x12\x12\n\x0eSTATE_APPLYING\x10\x03\x12\x0e\n\nSTATE_DONE\x10\x04\x12\x16\n\x12STATE_CANCELLATION\x10\x05\x12\x13\n\x0fSTATE_CANCELLED\x10\x06\x12\x13\n\x0fSTATE_REJECTION\x10\x07\x12\x12\n\x0eSTATE_REJECTED\x10\x08\"K\n\x15IndexBuildDescription\x12\x0c\n\x04path\x18\x01 \x01(\t\x12$\n\x05index\x18\x02 \x01(\x0b\x32\x15.Ydb.Table.TableIndex\"\x8e\x01\n\x12IndexBuildMetadata\x12\x35\n\x0b\x64\x65scription\x18\x01 \x01(\x0b\x32 .Ydb.Table.IndexBuildDescription\x12/\n\x05state\x18\x02 \x01(\x0e\x32 .Ydb.Table.IndexBuildState.State\x12\x10\n\x08progress\x18\x03 \x01(\x02\"\x9a\x01\n\x0e\x43hangefeedMode\"\x87\x01\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0eMODE_KEYS_ONLY\x10\x01\x12\x10\n\x0cMODE_UPDATES\x10\x02\x12\x12\n\x0eMODE_NEW_IMAGE\x10\x03\x12\x12\n\x0eMODE_OLD_IMAGE\x10\x04\x12\x1b\n\x17MODE_NEW_AND_OLD_IMAGES\x10\x05\"g\n\x10\x43hangefeedFormat\"S\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x46ORMAT_JSON\x10\x01\x12 \n\x1c\x46ORMAT_DYNAMODB_STREAMS_JSON\x10\x02\"\xea\x02\n\nChangefeed\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x04mode\x18\x02 \x01(\x0e\x32\x1e.Ydb.Table.ChangefeedMode.Mode\x12\x32\n\x06\x66ormat\x18\x03 \x01(\x0e\x32\".Ydb.Table.ChangefeedFormat.Format\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12virtual_timestamps\x18\x05 \x01(\x08\x12\x14\n\x0cinitial_scan\x18\x06 \x01(\x08\x12R\n\nattributes\x18\x07 \x03(\x0b\x32%.Ydb.Table.Changefeed.AttributesEntryB\x17\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x07\n\x05\x08\x01\x10\x80 \x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb2\x03\n\x15\x43hangefeedDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x04mode\x18\x02 \x01(\x0e\x32\x1e.Ydb.Table.ChangefeedMode.Mode\x12\x32\n\x06\x66ormat\x18\x03 \x01(\x0e\x32\".Ydb.Table.ChangefeedFormat.Format\x12\x35\n\x05state\x18\x04 \x01(\x0e\x32&.Ydb.Table.ChangefeedDescription.State\x12\x1a\n\x12virtual_timestamps\x18\x05 \x01(\x08\x12\x44\n\nattributes\x18\x06 \x03(\x0b\x32\x30.Ydb.Table.ChangefeedDescription.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"]\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n\rSTATE_ENABLED\x10\x01\x12\x12\n\x0eSTATE_DISABLED\x10\x02\x12\x16\n\x12STATE_INITIAL_SCAN\x10\x03\"\x1c\n\x0bStoragePool\x12\r\n\x05media\x18\x01 \x01(\t\"\xaa\x02\n\rStoragePolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12&\n\x06syslog\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12#\n\x03log\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12$\n\x04\x64\x61ta\x18\x04 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x05 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12/\n\x0ekeep_in_memory\x18\x06 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x36\n\x0f\x63olumn_families\x18\x07 \x03(\x0b\x32\x1d.Ydb.Table.ColumnFamilyPolicy\"\xb1\x02\n\x12\x43olumnFamilyPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12/\n\x0ekeep_in_memory\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12>\n\x0b\x63ompression\x18\x05 \x01(\x0e\x32).Ydb.Table.ColumnFamilyPolicy.Compression\"L\n\x0b\x43ompression\x12\x1b\n\x17\x43OMPRESSION_UNSPECIFIED\x10\x00\x12\x10\n\x0cUNCOMPRESSED\x10\x01\x12\x0e\n\nCOMPRESSED\x10\x02\"\'\n\x10\x43ompactionPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\";\n\x12\x45xplicitPartitions\x12%\n\x0csplit_points\x18\x01 \x03(\x0b\x32\x0f.Ydb.TypedValue\";\n\x0ePartitionStats\x12\x15\n\rrows_estimate\x18\x01 \x01(\x04\x12\x12\n\nstore_size\x18\x02 \x01(\x04\"\xe9\x01\n\nTableStats\x12\x32\n\x0fpartition_stats\x18\x01 \x03(\x0b\x32\x19.Ydb.Table.PartitionStats\x12\x15\n\rrows_estimate\x18\x02 \x01(\x04\x12\x12\n\nstore_size\x18\x03 \x01(\x04\x12\x12\n\npartitions\x18\x04 \x01(\x04\x12\x31\n\rcreation_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11modification_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xdc\x02\n\x12PartitioningPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12O\n\x11\x61uto_partitioning\x18\x02 \x01(\x0e\x32\x34.Ydb.Table.PartitioningPolicy.AutoPartitioningPolicy\x12\x1c\n\x12uniform_partitions\x18\x03 \x01(\x04H\x00\x12<\n\x13\x65xplicit_partitions\x18\x04 \x01(\x0b\x32\x1d.Ydb.Table.ExplicitPartitionsH\x00\"v\n\x16\x41utoPartitioningPolicy\x12(\n$AUTO_PARTITIONING_POLICY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0e\n\nAUTO_SPLIT\x10\x02\x12\x14\n\x10\x41UTO_SPLIT_MERGE\x10\x03\x42\x0c\n\npartitions\"&\n\x0f\x45xecutionPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\"\xb1\x01\n\x11ReplicationPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12\x16\n\x0ereplicas_count\x18\x02 \x01(\r\x12=\n\x1c\x63reate_per_availability_zone\x18\x03 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x30\n\x0f\x61llow_promotion\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"$\n\rCachingPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\"\xeb\x02\n\x0cTableProfile\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12\x30\n\x0estorage_policy\x18\x02 \x01(\x0b\x32\x18.Ydb.Table.StoragePolicy\x12\x36\n\x11\x63ompaction_policy\x18\x03 \x01(\x0b\x32\x1b.Ydb.Table.CompactionPolicy\x12:\n\x13partitioning_policy\x18\x04 \x01(\x0b\x32\x1d.Ydb.Table.PartitioningPolicy\x12\x34\n\x10\x65xecution_policy\x18\x05 \x01(\x0b\x32\x1a.Ydb.Table.ExecutionPolicy\x12\x38\n\x12replication_policy\x18\x06 \x01(\x0b\x32\x1c.Ydb.Table.ReplicationPolicy\x12\x30\n\x0e\x63\x61\x63hing_policy\x18\x07 \x01(\x0b\x32\x18.Ydb.Table.CachingPolicy\"C\n\nColumnMeta\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\x12\x0e\n\x06\x66\x61mily\x18\x03 \x01(\t\"O\n\x1a\x44\x61teTypeColumnModeSettings\x12\x13\n\x0b\x63olumn_name\x18\x01 \x01(\t\x12\x1c\n\x14\x65xpire_after_seconds\x18\x02 \x01(\r\"\x8e\x02\n\x1fValueSinceUnixEpochModeSettings\x12\x13\n\x0b\x63olumn_name\x18\x01 \x01(\t\x12\x44\n\x0b\x63olumn_unit\x18\x02 \x01(\x0e\x32/.Ydb.Table.ValueSinceUnixEpochModeSettings.Unit\x12\x1c\n\x14\x65xpire_after_seconds\x18\x03 \x01(\r\"r\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\x10\n\x0cUNIT_SECONDS\x10\x01\x12\x15\n\x11UNIT_MILLISECONDS\x10\x02\x12\x15\n\x11UNIT_MICROSECONDS\x10\x03\x12\x14\n\x10UNIT_NANOSECONDS\x10\x04\"\xc4\x01\n\x0bTtlSettings\x12\x41\n\x10\x64\x61te_type_column\x18\x01 \x01(\x0b\x32%.Ydb.Table.DateTypeColumnModeSettingsH\x00\x12L\n\x16value_since_unix_epoch\x18\x02 \x01(\x0b\x32*.Ydb.Table.ValueSinceUnixEpochModeSettingsH\x00\x12\x1c\n\x14run_interval_seconds\x18\x03 \x01(\rB\x06\n\x04mode\"\xda\x01\n\x0fStorageSettings\x12\x32\n\x12tablet_commit_log0\x18\x01 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x32\n\x12tablet_commit_log1\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x04 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x35\n\x14store_external_blobs\x18\x05 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"\x84\x02\n\x0c\x43olumnFamily\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x38\n\x0b\x63ompression\x18\x03 \x01(\x0e\x32#.Ydb.Table.ColumnFamily.Compression\x12/\n\x0ekeep_in_memory\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"U\n\x0b\x43ompression\x12\x1b\n\x17\x43OMPRESSION_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43OMPRESSION_NONE\x10\x01\x12\x13\n\x0f\x43OMPRESSION_LZ4\x10\x02\"\xf7\x01\n\x14PartitioningSettings\x12\x14\n\x0cpartition_by\x18\x01 \x03(\t\x12\x35\n\x14partitioning_by_size\x18\x02 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x19\n\x11partition_size_mb\x18\x03 \x01(\x04\x12\x35\n\x14partitioning_by_load\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x1c\n\x14min_partitions_count\x18\x06 \x01(\x04\x12\x1c\n\x14max_partitions_count\x18\x07 \x01(\x04J\x04\x08\x05\x10\x06\"C\n\x16\x41zReadReplicasSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x13read_replicas_count\x18\x02 \x01(\x04\"_\n\x17\x43lusterReplicasSettings\x12\x44\n\x19\x61z_read_replicas_settings\x18\x02 \x03(\x0b\x32!.Ydb.Table.AzReadReplicasSettings\"t\n\x14ReadReplicasSettings\x12$\n\x1aper_az_read_replicas_count\x18\x01 \x01(\x04H\x00\x12$\n\x1a\x61ny_az_read_replicas_count\x18\x02 \x01(\x04H\x00\x42\n\n\x08settingsJ\x04\x08\x03\x10\x04\"\xed\x06\n\x12\x43reateTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12&\n\x07\x63olumns\x18\x03 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x13\n\x0bprimary_key\x18\x04 \x03(\t\x12(\n\x07profile\x18\x05 \x01(\x0b\x32\x17.Ydb.Table.TableProfile\x12\x39\n\x10operation_params\x18\x06 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\x07indexes\x18\x07 \x03(\x0b\x32\x15.Ydb.Table.TableIndex\x12,\n\x0cttl_settings\x18\x08 \x01(\x0b\x32\x16.Ydb.Table.TtlSettings\x12\x34\n\x10storage_settings\x18\t \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x30\n\x0f\x63olumn_families\x18\n \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12Z\n\nattributes\x18\x0b \x03(\x0b\x32-.Ydb.Table.CreateTableRequest.AttributesEntryB\x17\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x07\n\x05\x08\x01\x10\x80 \x12\x19\n\x11\x63ompaction_policy\x18\x0c \x01(\t\x12\x1c\n\x12uniform_partitions\x18\r \x01(\x04H\x00\x12:\n\x11partition_at_keys\x18\x0e \x01(\x0b\x32\x1d.Ydb.Table.ExplicitPartitionsH\x00\x12>\n\x15partitioning_settings\x18\x0f \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x31\n\x10key_bloom_filter\x18\x10 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12?\n\x16read_replicas_settings\x18\x11 \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12\x0f\n\x07tiering\x18\x12 \x01(\t\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\npartitions\"C\n\x13\x43reateTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"u\n\x10\x44ropTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParamsJ\x04\x08\x03\x10\x04\"A\n\x11\x44ropTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"]\n\x0fRenameIndexItem\x12\x13\n\x0bsource_name\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_name\x18\x02 \x01(\t\x12\x1b\n\x13replace_destination\x18\x03 \x01(\x08\"\x95\t\n\x11\x41lterTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12*\n\x0b\x61\x64\x64_columns\x18\x03 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x14\n\x0c\x64rop_columns\x18\x04 \x03(\t\x12\x39\n\x10operation_params\x18\x05 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12,\n\ralter_columns\x18\x06 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x32\n\x10set_ttl_settings\x18\x07 \x01(\x0b\x32\x16.Ydb.Table.TtlSettingsH\x00\x12\x33\n\x11\x64rop_ttl_settings\x18\x08 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12*\n\x0b\x61\x64\x64_indexes\x18\t \x03(\x0b\x32\x15.Ydb.Table.TableIndex\x12\x14\n\x0c\x64rop_indexes\x18\n \x03(\t\x12:\n\x16\x61lter_storage_settings\x18\x0b \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x34\n\x13\x61\x64\x64_column_families\x18\x0c \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12\x36\n\x15\x61lter_column_families\x18\r \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12`\n\x10\x61lter_attributes\x18\x0e \x03(\x0b\x32\x31.Ydb.Table.AlterTableRequest.AlterAttributesEntryB\x13\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x03\x18\x80 \x12\x1d\n\x15set_compaction_policy\x18\x0f \x01(\t\x12\x44\n\x1b\x61lter_partitioning_settings\x18\x10 \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x35\n\x14set_key_bloom_filter\x18\x11 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x43\n\x1aset_read_replicas_settings\x18\x12 \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12.\n\x0f\x61\x64\x64_changefeeds\x18\x13 \x03(\x0b\x32\x15.Ydb.Table.Changefeed\x12\x18\n\x10\x64rop_changefeeds\x18\x14 \x03(\t\x12\x32\n\x0erename_indexes\x18\x15 \x03(\x0b\x32\x1a.Ydb.Table.RenameIndexItem\x12\x15\n\x0bset_tiering\x18\x16 \x01(\tH\x01\x12.\n\x0c\x64rop_tiering\x18\x17 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x01\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\nttl_actionB\x10\n\x0etiering_action\"B\n\x12\x41lterTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x90\x01\n\x10\x43opyTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x13\n\x0bsource_path\x18\x02 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x03 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"A\n\x11\x43opyTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"T\n\rCopyTableItem\x12\x13\n\x0bsource_path\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x02 \x01(\t\x12\x14\n\x0comit_indexes\x18\x03 \x01(\x08\"\x8c\x01\n\x11\x43opyTablesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12(\n\x06tables\x18\x03 \x03(\x0b\x32\x18.Ydb.Table.CopyTableItem\"B\n\x12\x43opyTablesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"]\n\x0fRenameTableItem\x12\x13\n\x0bsource_path\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x02 \x01(\t\x12\x1b\n\x13replace_destination\x18\x03 \x01(\x08\"\x90\x01\n\x13RenameTablesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12*\n\x06tables\x18\x03 \x03(\x0b\x32\x1a.Ydb.Table.RenameTableItem\"D\n\x14RenameTablesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xd3\x01\n\x14\x44\x65scribeTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12 \n\x18include_shard_key_bounds\x18\x05 \x01(\x08\x12\x1b\n\x13include_table_stats\x18\x06 \x01(\x08\x12\x1f\n\x17include_partition_stats\x18\x07 \x01(\x08\"E\n\x15\x44\x65scribeTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x8c\x06\n\x13\x44\x65scribeTableResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12&\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x13\n\x0bprimary_key\x18\x03 \x03(\t\x12)\n\x10shard_key_bounds\x18\x04 \x03(\x0b\x32\x0f.Ydb.TypedValue\x12\x31\n\x07indexes\x18\x05 \x03(\x0b\x32 .Ydb.Table.TableIndexDescription\x12*\n\x0btable_stats\x18\x06 \x01(\x0b\x32\x15.Ydb.Table.TableStats\x12,\n\x0cttl_settings\x18\x07 \x01(\x0b\x32\x16.Ydb.Table.TtlSettings\x12\x34\n\x10storage_settings\x18\x08 \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x30\n\x0f\x63olumn_families\x18\t \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Table.DescribeTableResult.AttributesEntry\x12>\n\x15partitioning_settings\x18\x0c \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x31\n\x10key_bloom_filter\x18\r \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12?\n\x16read_replicas_settings\x18\x0e \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12\x35\n\x0b\x63hangefeeds\x18\x0f \x03(\x0b\x32 .Ydb.Table.ChangefeedDescription\x12\x0f\n\x07tiering\x18\x10 \x01(\t\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x0b\x10\x0c\"2\n\x05Query\x12\x12\n\x08yql_text\x18\x01 \x01(\tH\x00\x12\x0c\n\x02id\x18\x02 \x01(\tH\x00\x42\x07\n\x05query\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Table.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Table.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Table.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Table.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"{\n\x12TransactionControl\x12\x0f\n\x05tx_id\x18\x01 \x01(\tH\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Table.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\")\n\x10QueryCachePolicy\x12\x15\n\rkeep_in_cache\x18\x01 \x01(\x08\"\xb1\x01\n\x14QueryStatsCollection\"\x98\x01\n\x04Mode\x12 \n\x1cSTATS_COLLECTION_UNSPECIFIED\x10\x00\x12\x19\n\x15STATS_COLLECTION_NONE\x10\x01\x12\x1a\n\x16STATS_COLLECTION_BASIC\x10\x02\x12\x19\n\x15STATS_COLLECTION_FULL\x10\x03\x12\x1c\n\x18STATS_COLLECTION_PROFILE\x10\x04\"\xbe\x03\n\x17\x45xecuteDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x31\n\ntx_control\x18\x02 \x01(\x0b\x32\x1d.Ydb.Table.TransactionControl\x12\x1f\n\x05query\x18\x03 \x01(\x0b\x32\x10.Ydb.Table.Query\x12\x46\n\nparameters\x18\x04 \x03(\x0b\x32\x32.Ydb.Table.ExecuteDataQueryRequest.ParametersEntry\x12\x37\n\x12query_cache_policy\x18\x05 \x01(\x0b\x32\x1b.Ydb.Table.QueryCachePolicy\x12\x39\n\x10operation_params\x18\x06 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12;\n\rcollect_stats\x18\x07 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"H\n\x18\x45xecuteDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"|\n\x19\x45xecuteSchemeQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"J\n\x1a\x45xecuteSchemeQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x1d\n\x0fTransactionMeta\x12\n\n\x02id\x18\x01 \x01(\t\"\x9f\x01\n\tQueryMeta\x12\n\n\x02id\x18\x01 \x01(\t\x12\x43\n\x10parameters_types\x18\x02 \x03(\x0b\x32).Ydb.Table.QueryMeta.ParametersTypesEntry\x1a\x41\n\x14ParametersTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x18\n\x05value\x18\x02 \x01(\x0b\x32\t.Ydb.Type:\x02\x38\x01\"\xc1\x01\n\x12\x45xecuteQueryResult\x12#\n\x0bresult_sets\x18\x01 \x03(\x0b\x32\x0e.Ydb.ResultSet\x12+\n\x07tx_meta\x18\x02 \x01(\x0b\x32\x1a.Ydb.Table.TransactionMeta\x12(\n\nquery_meta\x18\x03 \x01(\x0b\x32\x14.Ydb.Table.QueryMeta\x12/\n\x0bquery_stats\x18\x04 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"z\n\x17\x45xplainDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"H\n\x18\x45xplainDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\";\n\x12\x45xplainQueryResult\x12\x11\n\tquery_ast\x18\x01 \x01(\t\x12\x12\n\nquery_plan\x18\x02 \x01(\t\"z\n\x17PrepareDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"H\n\x18PrepareDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xb7\x01\n\x12PrepareQueryResult\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12L\n\x10parameters_types\x18\x02 \x03(\x0b\x32\x32.Ydb.Table.PrepareQueryResult.ParametersTypesEntry\x1a\x41\n\x14ParametersTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x18\n\x05value\x18\x02 \x01(\x0b\x32\t.Ydb.Type:\x02\x38\x01\"a\n\x10KeepAliveRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x39\n\x10operation_params\x18\x02 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"A\n\x11KeepAliveResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xb7\x01\n\x0fKeepAliveResult\x12@\n\x0esession_status\x18\x01 \x01(\x0e\x32(.Ydb.Table.KeepAliveResult.SessionStatus\"b\n\rSessionStatus\x12\x1e\n\x1aSESSION_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14SESSION_STATUS_READY\x10\x01\x12\x17\n\x13SESSION_STATUS_BUSY\x10\x02\"\x9d\x01\n\x17\x42\x65ginTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Table.TransactionSettings\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"H\n\x18\x42\x65ginTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"E\n\x16\x42\x65ginTransactionResult\x12+\n\x07tx_meta\x18\x01 \x01(\x0b\x32\x1a.Ydb.Table.TransactionMeta\"\xb5\x01\n\x18\x43ommitTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\r\n\x05tx_id\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12;\n\rcollect_stats\x18\x04 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\"I\n\x19\x43ommitTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"J\n\x17\x43ommitTransactionResult\x12/\n\x0bquery_stats\x18\x01 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"z\n\x1aRollbackTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\r\n\x05tx_id\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"K\n\x1bRollbackTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x98\x01\n\x18StoragePolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x06labels\x18\x02 \x03(\x0b\x32/.Ydb.Table.StoragePolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9e\x01\n\x1b\x43ompactionPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x42\n\x06labels\x18\x02 \x03(\x0b\x32\x32.Ydb.Table.CompactionPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa2\x01\n\x1dPartitioningPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x44\n\x06labels\x18\x02 \x03(\x0b\x32\x34.Ydb.Table.PartitioningPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9c\x01\n\x1a\x45xecutionPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x41\n\x06labels\x18\x02 \x03(\x0b\x32\x31.Ydb.Table.ExecutionPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa0\x01\n\x1cReplicationPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x43\n\x06labels\x18\x02 \x03(\x0b\x32\x33.Ydb.Table.ReplicationPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x98\x01\n\x18\x43\x61\x63hingPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x06labels\x18\x02 \x03(\x0b\x32/.Ydb.Table.CachingPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbe\x04\n\x17TableProfileDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x06labels\x18\x02 \x03(\x0b\x32..Ydb.Table.TableProfileDescription.LabelsEntry\x12\x1e\n\x16\x64\x65\x66\x61ult_storage_policy\x18\x03 \x01(\t\x12 \n\x18\x61llowed_storage_policies\x18\x04 \x03(\t\x12!\n\x19\x64\x65\x66\x61ult_compaction_policy\x18\x05 \x01(\t\x12#\n\x1b\x61llowed_compaction_policies\x18\x06 \x03(\t\x12#\n\x1b\x64\x65\x66\x61ult_partitioning_policy\x18\x07 \x01(\t\x12%\n\x1d\x61llowed_partitioning_policies\x18\x08 \x03(\t\x12 \n\x18\x64\x65\x66\x61ult_execution_policy\x18\t \x01(\t\x12\"\n\x1a\x61llowed_execution_policies\x18\n \x03(\t\x12\"\n\x1a\x64\x65\x66\x61ult_replication_policy\x18\x0b \x01(\t\x12$\n\x1c\x61llowed_replication_policies\x18\x0c \x03(\t\x12\x1e\n\x16\x64\x65\x66\x61ult_caching_policy\x18\r \x01(\t\x12 \n\x18\x61llowed_caching_policies\x18\x0e \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"X\n\x1b\x44\x65scribeTableOptionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"L\n\x1c\x44\x65scribeTableOptionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x99\x04\n\x1a\x44\x65scribeTableOptionsResult\x12\x41\n\x15table_profile_presets\x18\x01 \x03(\x0b\x32\".Ydb.Table.TableProfileDescription\x12\x43\n\x16storage_policy_presets\x18\x02 \x03(\x0b\x32#.Ydb.Table.StoragePolicyDescription\x12I\n\x19\x63ompaction_policy_presets\x18\x03 \x03(\x0b\x32&.Ydb.Table.CompactionPolicyDescription\x12M\n\x1bpartitioning_policy_presets\x18\x04 \x03(\x0b\x32(.Ydb.Table.PartitioningPolicyDescription\x12G\n\x18\x65xecution_policy_presets\x18\x05 \x03(\x0b\x32%.Ydb.Table.ExecutionPolicyDescription\x12K\n\x1areplication_policy_presets\x18\x06 \x03(\x0b\x32\'.Ydb.Table.ReplicationPolicyDescription\x12\x43\n\x16\x63\x61\x63hing_policy_presets\x18\x07 \x03(\x0b\x32#.Ydb.Table.CachingPolicyDescription\"\xc0\x01\n\x08KeyRange\x12\"\n\x07greater\x18\x01 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x00\x12+\n\x10greater_or_equal\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x00\x12\x1f\n\x04less\x18\x03 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x01\x12(\n\rless_or_equal\x18\x04 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x01\x42\x0c\n\nfrom_boundB\n\n\x08to_bound\"\xf5\x01\n\x10ReadTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12&\n\tkey_range\x18\x03 \x01(\x0b\x32\x13.Ydb.Table.KeyRange\x12\x0f\n\x07\x63olumns\x18\x04 \x03(\t\x12\x0f\n\x07ordered\x18\x05 \x01(\x08\x12\x11\n\trow_limit\x18\x06 \x01(\x04\x12-\n\x0cuse_snapshot\x18\x07 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x19\n\x11\x62\x61tch_limit_bytes\x18\x08 \x01(\x04\x12\x18\n\x10\x62\x61tch_limit_rows\x18\t \x01(\x04\"\xbc\x01\n\x11ReadTableResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\'\n\x08snapshot\x18\x04 \x01(\x0b\x32\x15.Ydb.VirtualTimestamp\x12*\n\x06result\x18\x03 \x01(\x0b\x32\x1a.Ydb.Table.ReadTableResult\"5\n\x0fReadTableResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\"c\n\x0fReadRowsRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x1d\n\x04keys\x18\x03 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x0f\n\x07\x63olumns\x18\x04 \x03(\t\"\x8a\x01\n\x10ReadRowsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\nresult_set\x18\x03 \x01(\x0b\x32\x0e.Ydb.ResultSet\"\x8d\x02\n\x11\x42ulkUpsertRequest\x12\r\n\x05table\x18\x01 \x01(\t\x12\x1d\n\x04rows\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12?\n\x14\x61rrow_batch_settings\x18\x07 \x01(\x0b\x32\x1f.Ydb.Formats.ArrowBatchSettingsH\x00\x12\x30\n\x0c\x63sv_settings\x18\x08 \x01(\x0b\x32\x18.Ydb.Formats.CsvSettingsH\x00\x12\r\n\x04\x64\x61ta\x18\xe8\x07 \x01(\x0c\x42\r\n\x0b\x64\x61ta_format\"B\n\x12\x42ulkUpsertResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x42ulkUpsertResult\"\x91\x03\n\x17\x45xecuteScanQueryRequest\x12\x1f\n\x05query\x18\x03 \x01(\x0b\x32\x10.Ydb.Table.Query\x12\x46\n\nparameters\x18\x04 \x03(\x0b\x32\x32.Ydb.Table.ExecuteScanQueryRequest.ParametersEntry\x12\x35\n\x04mode\x18\x06 \x01(\x0e\x32\'.Ydb.Table.ExecuteScanQueryRequest.Mode\x12;\n\rcollect_stats\x18\x08 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"=\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMODE_EXPLAIN\x10\x01\x12\r\n\tMODE_EXEC\x10\x03J\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06J\x04\x08\x07\x10\x08\"\xaf\x01\n\x1f\x45xecuteScanQueryPartialResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x38\n\x06result\x18\x03 \x01(\x0b\x32(.Ydb.Table.ExecuteScanQueryPartialResult\"\x8c\x01\n\x1d\x45xecuteScanQueryPartialResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12/\n\x0bquery_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStatsJ\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06\x42S\n\x14tech.ydb.proto.tableZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Table\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x16protos/ydb_table.proto\x12\tYdb.Table\x1a#protos/annotations/validation.proto\x1a\x17protos/ydb_common.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x16protos/ydb_value.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_topic.proto\x1a\x18protos/ydb_formats.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"Q\n\x14\x43reateSessionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"E\n\x15\x43reateSessionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\")\n\x13\x43reateSessionResult\x12\x12\n\nsession_id\x18\x01 \x01(\t\"e\n\x14\x44\x65leteSessionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x39\n\x10operation_params\x18\x02 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"E\n\x15\x44\x65leteSessionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\r\n\x0bGlobalIndex\"\x12\n\x10GlobalAsyncIndex\"\x13\n\x11GlobalUniqueIndex\"\xf7\x01\n\nTableIndex\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rindex_columns\x18\x02 \x03(\t\x12.\n\x0cglobal_index\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.GlobalIndexH\x00\x12\x39\n\x12global_async_index\x18\x04 \x01(\x0b\x32\x1b.Ydb.Table.GlobalAsyncIndexH\x00\x12;\n\x13global_unique_index\x18\x06 \x01(\x0b\x32\x1c.Ydb.Table.GlobalUniqueIndexH\x00\x12\x14\n\x0c\x64\x61ta_columns\x18\x05 \x03(\tB\x06\n\x04type\"\x98\x03\n\x15TableIndexDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rindex_columns\x18\x02 \x03(\t\x12.\n\x0cglobal_index\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.GlobalIndexH\x00\x12\x39\n\x12global_async_index\x18\x05 \x01(\x0b\x32\x1b.Ydb.Table.GlobalAsyncIndexH\x00\x12;\n\x13global_unique_index\x18\x08 \x01(\x0b\x32\x1c.Ydb.Table.GlobalUniqueIndexH\x00\x12\x37\n\x06status\x18\x04 \x01(\x0e\x32\'.Ydb.Table.TableIndexDescription.Status\x12\x14\n\x0c\x64\x61ta_columns\x18\x06 \x03(\t\x12\x12\n\nsize_bytes\x18\x07 \x01(\x04\"G\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cSTATUS_READY\x10\x01\x12\x13\n\x0fSTATUS_BUILDING\x10\x02\x42\x06\n\x04type\"\xdd\x01\n\x0fIndexBuildState\"\xc9\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATE_PREPARING\x10\x01\x12\x1a\n\x16STATE_TRANSFERING_DATA\x10\x02\x12\x12\n\x0eSTATE_APPLYING\x10\x03\x12\x0e\n\nSTATE_DONE\x10\x04\x12\x16\n\x12STATE_CANCELLATION\x10\x05\x12\x13\n\x0fSTATE_CANCELLED\x10\x06\x12\x13\n\x0fSTATE_REJECTION\x10\x07\x12\x12\n\x0eSTATE_REJECTED\x10\x08\"K\n\x15IndexBuildDescription\x12\x0c\n\x04path\x18\x01 \x01(\t\x12$\n\x05index\x18\x02 \x01(\x0b\x32\x15.Ydb.Table.TableIndex\"\x8e\x01\n\x12IndexBuildMetadata\x12\x35\n\x0b\x64\x65scription\x18\x01 \x01(\x0b\x32 .Ydb.Table.IndexBuildDescription\x12/\n\x05state\x18\x02 \x01(\x0e\x32 .Ydb.Table.IndexBuildState.State\x12\x10\n\x08progress\x18\x03 \x01(\x02\"\x9a\x01\n\x0e\x43hangefeedMode\"\x87\x01\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0eMODE_KEYS_ONLY\x10\x01\x12\x10\n\x0cMODE_UPDATES\x10\x02\x12\x12\n\x0eMODE_NEW_IMAGE\x10\x03\x12\x12\n\x0eMODE_OLD_IMAGE\x10\x04\x12\x1b\n\x17MODE_NEW_AND_OLD_IMAGES\x10\x05\"\x81\x01\n\x10\x43hangefeedFormat\"m\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x46ORMAT_JSON\x10\x01\x12 \n\x1c\x46ORMAT_DYNAMODB_STREAMS_JSON\x10\x02\x12\x18\n\x14\x46ORMAT_DEBEZIUM_JSON\x10\x03\"\x8e\x04\n\nChangefeed\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x04mode\x18\x02 \x01(\x0e\x32\x1e.Ydb.Table.ChangefeedMode.Mode\x12\x32\n\x06\x66ormat\x18\x03 \x01(\x0e\x32\".Ydb.Table.ChangefeedFormat.Format\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12virtual_timestamps\x18\x05 \x01(\x08\x12\x14\n\x0cinitial_scan\x18\x06 \x01(\x08\x12R\n\nattributes\x18\x07 \x03(\x0b\x32%.Ydb.Table.Changefeed.AttributesEntryB\x17\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x07\n\x05\x08\x01\x10\x80 \x12\x1b\n\naws_region\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12?\n\x1cresolved_timestamps_interval\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x44\n\x1btopic_partitioning_settings\x18\n \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x87\x04\n\x15\x43hangefeedDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x04mode\x18\x02 \x01(\x0e\x32\x1e.Ydb.Table.ChangefeedMode.Mode\x12\x32\n\x06\x66ormat\x18\x03 \x01(\x0e\x32\".Ydb.Table.ChangefeedFormat.Format\x12\x35\n\x05state\x18\x04 \x01(\x0e\x32&.Ydb.Table.ChangefeedDescription.State\x12\x1a\n\x12virtual_timestamps\x18\x05 \x01(\x08\x12\x44\n\nattributes\x18\x06 \x03(\x0b\x32\x30.Ydb.Table.ChangefeedDescription.AttributesEntry\x12\x12\n\naws_region\x18\x07 \x01(\t\x12?\n\x1cresolved_timestamps_interval\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"]\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n\rSTATE_ENABLED\x10\x01\x12\x12\n\x0eSTATE_DISABLED\x10\x02\x12\x16\n\x12STATE_INITIAL_SCAN\x10\x03\"\x1c\n\x0bStoragePool\x12\r\n\x05media\x18\x01 \x01(\t\"\xaa\x02\n\rStoragePolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12&\n\x06syslog\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12#\n\x03log\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12$\n\x04\x64\x61ta\x18\x04 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x05 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12/\n\x0ekeep_in_memory\x18\x06 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x36\n\x0f\x63olumn_families\x18\x07 \x03(\x0b\x32\x1d.Ydb.Table.ColumnFamilyPolicy\"\xb1\x02\n\x12\x43olumnFamilyPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12/\n\x0ekeep_in_memory\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12>\n\x0b\x63ompression\x18\x05 \x01(\x0e\x32).Ydb.Table.ColumnFamilyPolicy.Compression\"L\n\x0b\x43ompression\x12\x1b\n\x17\x43OMPRESSION_UNSPECIFIED\x10\x00\x12\x10\n\x0cUNCOMPRESSED\x10\x01\x12\x0e\n\nCOMPRESSED\x10\x02\"\'\n\x10\x43ompactionPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\";\n\x12\x45xplicitPartitions\x12%\n\x0csplit_points\x18\x01 \x03(\x0b\x32\x0f.Ydb.TypedValue\"S\n\x0ePartitionStats\x12\x15\n\rrows_estimate\x18\x01 \x01(\x04\x12\x12\n\nstore_size\x18\x02 \x01(\x04\x12\x16\n\x0eleader_node_id\x18\x03 \x01(\r\"\xe9\x01\n\nTableStats\x12\x32\n\x0fpartition_stats\x18\x01 \x03(\x0b\x32\x19.Ydb.Table.PartitionStats\x12\x15\n\rrows_estimate\x18\x02 \x01(\x04\x12\x12\n\nstore_size\x18\x03 \x01(\x04\x12\x12\n\npartitions\x18\x04 \x01(\x04\x12\x31\n\rcreation_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11modification_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xdc\x02\n\x12PartitioningPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12O\n\x11\x61uto_partitioning\x18\x02 \x01(\x0e\x32\x34.Ydb.Table.PartitioningPolicy.AutoPartitioningPolicy\x12\x1c\n\x12uniform_partitions\x18\x03 \x01(\x04H\x00\x12<\n\x13\x65xplicit_partitions\x18\x04 \x01(\x0b\x32\x1d.Ydb.Table.ExplicitPartitionsH\x00\"v\n\x16\x41utoPartitioningPolicy\x12(\n$AUTO_PARTITIONING_POLICY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0e\n\nAUTO_SPLIT\x10\x02\x12\x14\n\x10\x41UTO_SPLIT_MERGE\x10\x03\x42\x0c\n\npartitions\"&\n\x0f\x45xecutionPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\"\xb1\x01\n\x11ReplicationPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12\x16\n\x0ereplicas_count\x18\x02 \x01(\r\x12=\n\x1c\x63reate_per_availability_zone\x18\x03 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x30\n\x0f\x61llow_promotion\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"$\n\rCachingPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\"\xeb\x02\n\x0cTableProfile\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12\x30\n\x0estorage_policy\x18\x02 \x01(\x0b\x32\x18.Ydb.Table.StoragePolicy\x12\x36\n\x11\x63ompaction_policy\x18\x03 \x01(\x0b\x32\x1b.Ydb.Table.CompactionPolicy\x12:\n\x13partitioning_policy\x18\x04 \x01(\x0b\x32\x1d.Ydb.Table.PartitioningPolicy\x12\x34\n\x10\x65xecution_policy\x18\x05 \x01(\x0b\x32\x1a.Ydb.Table.ExecutionPolicy\x12\x38\n\x12replication_policy\x18\x06 \x01(\x0b\x32\x1c.Ydb.Table.ReplicationPolicy\x12\x30\n\x0e\x63\x61\x63hing_policy\x18\x07 \x01(\x0b\x32\x18.Ydb.Table.CachingPolicy\"\xaa\x03\n\x13SequenceDescription\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tmin_value\x18\x02 \x01(\x12H\x01\x88\x01\x01\x12\x16\n\tmax_value\x18\x03 \x01(\x12H\x02\x88\x01\x01\x12\x18\n\x0bstart_value\x18\x04 \x01(\x12H\x03\x88\x01\x01\x12\x12\n\x05\x63\x61\x63he\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x16\n\tincrement\x18\x06 \x01(\x12H\x05\x88\x01\x01\x12\x12\n\x05\x63ycle\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12;\n\x07set_val\x18\x08 \x01(\x0b\x32%.Ydb.Table.SequenceDescription.SetValH\x07\x88\x01\x01\x1aV\n\x06SetVal\x12\x17\n\nnext_value\x18\x01 \x01(\x12H\x00\x88\x01\x01\x12\x16\n\tnext_used\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\r\n\x0b_next_valueB\x0c\n\n_next_usedB\x07\n\x05_nameB\x0c\n\n_min_valueB\x0c\n\n_max_valueB\x0e\n\x0c_start_valueB\x08\n\x06_cacheB\x0c\n\n_incrementB\x08\n\x06_cycleB\n\n\x08_set_val\"\xda\x01\n\nColumnMeta\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\x12\x0e\n\x06\x66\x61mily\x18\x03 \x01(\t\x12\x15\n\x08not_null\x18\x04 \x01(\x08H\x01\x88\x01\x01\x12\'\n\x0c\x66rom_literal\x18\x05 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x00\x12\x37\n\rfrom_sequence\x18\x06 \x01(\x0b\x32\x1e.Ydb.Table.SequenceDescriptionH\x00\x42\x0f\n\rdefault_valueB\x0b\n\t_not_null\"O\n\x1a\x44\x61teTypeColumnModeSettings\x12\x13\n\x0b\x63olumn_name\x18\x01 \x01(\t\x12\x1c\n\x14\x65xpire_after_seconds\x18\x02 \x01(\r\"\x8e\x02\n\x1fValueSinceUnixEpochModeSettings\x12\x13\n\x0b\x63olumn_name\x18\x01 \x01(\t\x12\x44\n\x0b\x63olumn_unit\x18\x02 \x01(\x0e\x32/.Ydb.Table.ValueSinceUnixEpochModeSettings.Unit\x12\x1c\n\x14\x65xpire_after_seconds\x18\x03 \x01(\r\"r\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\x10\n\x0cUNIT_SECONDS\x10\x01\x12\x15\n\x11UNIT_MILLISECONDS\x10\x02\x12\x15\n\x11UNIT_MICROSECONDS\x10\x03\x12\x14\n\x10UNIT_NANOSECONDS\x10\x04\"\xc4\x01\n\x0bTtlSettings\x12\x41\n\x10\x64\x61te_type_column\x18\x01 \x01(\x0b\x32%.Ydb.Table.DateTypeColumnModeSettingsH\x00\x12L\n\x16value_since_unix_epoch\x18\x02 \x01(\x0b\x32*.Ydb.Table.ValueSinceUnixEpochModeSettingsH\x00\x12\x1c\n\x14run_interval_seconds\x18\x03 \x01(\rB\x06\n\x04mode\"\xda\x01\n\x0fStorageSettings\x12\x32\n\x12tablet_commit_log0\x18\x01 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x32\n\x12tablet_commit_log1\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x04 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x35\n\x14store_external_blobs\x18\x05 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"\x84\x02\n\x0c\x43olumnFamily\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x38\n\x0b\x63ompression\x18\x03 \x01(\x0e\x32#.Ydb.Table.ColumnFamily.Compression\x12/\n\x0ekeep_in_memory\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"U\n\x0b\x43ompression\x12\x1b\n\x17\x43OMPRESSION_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43OMPRESSION_NONE\x10\x01\x12\x13\n\x0f\x43OMPRESSION_LZ4\x10\x02\"\xf7\x01\n\x14PartitioningSettings\x12\x14\n\x0cpartition_by\x18\x01 \x03(\t\x12\x35\n\x14partitioning_by_size\x18\x02 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x19\n\x11partition_size_mb\x18\x03 \x01(\x04\x12\x35\n\x14partitioning_by_load\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x1c\n\x14min_partitions_count\x18\x06 \x01(\x04\x12\x1c\n\x14max_partitions_count\x18\x07 \x01(\x04J\x04\x08\x05\x10\x06\"C\n\x16\x41zReadReplicasSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x13read_replicas_count\x18\x02 \x01(\x04\"_\n\x17\x43lusterReplicasSettings\x12\x44\n\x19\x61z_read_replicas_settings\x18\x02 \x03(\x0b\x32!.Ydb.Table.AzReadReplicasSettings\"t\n\x14ReadReplicasSettings\x12$\n\x1aper_az_read_replicas_count\x18\x01 \x01(\x04H\x00\x12$\n\x1a\x61ny_az_read_replicas_count\x18\x02 \x01(\x04H\x00\x42\n\n\x08settingsJ\x04\x08\x03\x10\x04\"\xaa\x07\n\x12\x43reateTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12&\n\x07\x63olumns\x18\x03 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x13\n\x0bprimary_key\x18\x04 \x03(\t\x12(\n\x07profile\x18\x05 \x01(\x0b\x32\x17.Ydb.Table.TableProfile\x12\x39\n\x10operation_params\x18\x06 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\x07indexes\x18\x07 \x03(\x0b\x32\x15.Ydb.Table.TableIndex\x12,\n\x0cttl_settings\x18\x08 \x01(\x0b\x32\x16.Ydb.Table.TtlSettings\x12\x34\n\x10storage_settings\x18\t \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x30\n\x0f\x63olumn_families\x18\n \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12Z\n\nattributes\x18\x0b \x03(\x0b\x32-.Ydb.Table.CreateTableRequest.AttributesEntryB\x17\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x07\n\x05\x08\x01\x10\x80 \x12\x19\n\x11\x63ompaction_policy\x18\x0c \x01(\t\x12\x1c\n\x12uniform_partitions\x18\r \x01(\x04H\x00\x12:\n\x11partition_at_keys\x18\x0e \x01(\x0b\x32\x1d.Ydb.Table.ExplicitPartitionsH\x00\x12>\n\x15partitioning_settings\x18\x0f \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x31\n\x10key_bloom_filter\x18\x10 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12?\n\x16read_replicas_settings\x18\x11 \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12\x0f\n\x07tiering\x18\x12 \x01(\t\x12\x11\n\ttemporary\x18\x13 \x01(\x08\x12(\n\nstore_type\x18\x14 \x01(\x0e\x32\x14.Ydb.Table.StoreType\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\npartitions\"C\n\x13\x43reateTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"u\n\x10\x44ropTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParamsJ\x04\x08\x03\x10\x04\"A\n\x11\x44ropTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"]\n\x0fRenameIndexItem\x12\x13\n\x0bsource_name\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_name\x18\x02 \x01(\t\x12\x1b\n\x13replace_destination\x18\x03 \x01(\x08\"\x95\t\n\x11\x41lterTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12*\n\x0b\x61\x64\x64_columns\x18\x03 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x14\n\x0c\x64rop_columns\x18\x04 \x03(\t\x12\x39\n\x10operation_params\x18\x05 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12,\n\ralter_columns\x18\x06 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x32\n\x10set_ttl_settings\x18\x07 \x01(\x0b\x32\x16.Ydb.Table.TtlSettingsH\x00\x12\x33\n\x11\x64rop_ttl_settings\x18\x08 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12*\n\x0b\x61\x64\x64_indexes\x18\t \x03(\x0b\x32\x15.Ydb.Table.TableIndex\x12\x14\n\x0c\x64rop_indexes\x18\n \x03(\t\x12:\n\x16\x61lter_storage_settings\x18\x0b \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x34\n\x13\x61\x64\x64_column_families\x18\x0c \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12\x36\n\x15\x61lter_column_families\x18\r \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12`\n\x10\x61lter_attributes\x18\x0e \x03(\x0b\x32\x31.Ydb.Table.AlterTableRequest.AlterAttributesEntryB\x13\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x03\x18\x80 \x12\x1d\n\x15set_compaction_policy\x18\x0f \x01(\t\x12\x44\n\x1b\x61lter_partitioning_settings\x18\x10 \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x35\n\x14set_key_bloom_filter\x18\x11 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x43\n\x1aset_read_replicas_settings\x18\x12 \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12.\n\x0f\x61\x64\x64_changefeeds\x18\x13 \x03(\x0b\x32\x15.Ydb.Table.Changefeed\x12\x18\n\x10\x64rop_changefeeds\x18\x14 \x03(\t\x12\x32\n\x0erename_indexes\x18\x15 \x03(\x0b\x32\x1a.Ydb.Table.RenameIndexItem\x12\x15\n\x0bset_tiering\x18\x16 \x01(\tH\x01\x12.\n\x0c\x64rop_tiering\x18\x17 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x01\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\nttl_actionB\x10\n\x0etiering_action\"B\n\x12\x41lterTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x90\x01\n\x10\x43opyTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x13\n\x0bsource_path\x18\x02 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x03 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"A\n\x11\x43opyTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"T\n\rCopyTableItem\x12\x13\n\x0bsource_path\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x02 \x01(\t\x12\x14\n\x0comit_indexes\x18\x03 \x01(\x08\"\x8c\x01\n\x11\x43opyTablesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12(\n\x06tables\x18\x03 \x03(\x0b\x32\x18.Ydb.Table.CopyTableItem\"B\n\x12\x43opyTablesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"]\n\x0fRenameTableItem\x12\x13\n\x0bsource_path\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x02 \x01(\t\x12\x1b\n\x13replace_destination\x18\x03 \x01(\x08\"\x90\x01\n\x13RenameTablesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12*\n\x06tables\x18\x03 \x03(\x0b\x32\x1a.Ydb.Table.RenameTableItem\"D\n\x14RenameTablesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xf5\x01\n\x14\x44\x65scribeTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12 \n\x18include_shard_key_bounds\x18\x05 \x01(\x08\x12\x1b\n\x13include_table_stats\x18\x06 \x01(\x08\x12\x1f\n\x17include_partition_stats\x18\x07 \x01(\x08\x12 \n\x18include_shard_nodes_info\x18\t \x01(\x08\"E\n\x15\x44\x65scribeTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xc9\x06\n\x13\x44\x65scribeTableResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12&\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x13\n\x0bprimary_key\x18\x03 \x03(\t\x12)\n\x10shard_key_bounds\x18\x04 \x03(\x0b\x32\x0f.Ydb.TypedValue\x12\x31\n\x07indexes\x18\x05 \x03(\x0b\x32 .Ydb.Table.TableIndexDescription\x12*\n\x0btable_stats\x18\x06 \x01(\x0b\x32\x15.Ydb.Table.TableStats\x12,\n\x0cttl_settings\x18\x07 \x01(\x0b\x32\x16.Ydb.Table.TtlSettings\x12\x34\n\x10storage_settings\x18\x08 \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x30\n\x0f\x63olumn_families\x18\t \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Table.DescribeTableResult.AttributesEntry\x12>\n\x15partitioning_settings\x18\x0c \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x31\n\x10key_bloom_filter\x18\r \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12?\n\x16read_replicas_settings\x18\x0e \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12\x35\n\x0b\x63hangefeeds\x18\x0f \x03(\x0b\x32 .Ydb.Table.ChangefeedDescription\x12\x0f\n\x07tiering\x18\x10 \x01(\t\x12\x11\n\ttemporary\x18\x11 \x01(\x08\x12(\n\nstore_type\x18\x12 \x01(\x0e\x32\x14.Ydb.Table.StoreType\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x0b\x10\x0c\"2\n\x05Query\x12\x12\n\x08yql_text\x18\x01 \x01(\tH\x00\x12\x0c\n\x02id\x18\x02 \x01(\tH\x00\x42\x07\n\x05query\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Table.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Table.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Table.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Table.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"{\n\x12TransactionControl\x12\x0f\n\x05tx_id\x18\x01 \x01(\tH\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Table.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\")\n\x10QueryCachePolicy\x12\x15\n\rkeep_in_cache\x18\x01 \x01(\x08\"\xb1\x01\n\x14QueryStatsCollection\"\x98\x01\n\x04Mode\x12 \n\x1cSTATS_COLLECTION_UNSPECIFIED\x10\x00\x12\x19\n\x15STATS_COLLECTION_NONE\x10\x01\x12\x1a\n\x16STATS_COLLECTION_BASIC\x10\x02\x12\x19\n\x15STATS_COLLECTION_FULL\x10\x03\x12\x1c\n\x18STATS_COLLECTION_PROFILE\x10\x04\"\xbe\x03\n\x17\x45xecuteDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x31\n\ntx_control\x18\x02 \x01(\x0b\x32\x1d.Ydb.Table.TransactionControl\x12\x1f\n\x05query\x18\x03 \x01(\x0b\x32\x10.Ydb.Table.Query\x12\x46\n\nparameters\x18\x04 \x03(\x0b\x32\x32.Ydb.Table.ExecuteDataQueryRequest.ParametersEntry\x12\x37\n\x12query_cache_policy\x18\x05 \x01(\x0b\x32\x1b.Ydb.Table.QueryCachePolicy\x12\x39\n\x10operation_params\x18\x06 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12;\n\rcollect_stats\x18\x07 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"H\n\x18\x45xecuteDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"|\n\x19\x45xecuteSchemeQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"J\n\x1a\x45xecuteSchemeQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x1d\n\x0fTransactionMeta\x12\n\n\x02id\x18\x01 \x01(\t\"\x9f\x01\n\tQueryMeta\x12\n\n\x02id\x18\x01 \x01(\t\x12\x43\n\x10parameters_types\x18\x02 \x03(\x0b\x32).Ydb.Table.QueryMeta.ParametersTypesEntry\x1a\x41\n\x14ParametersTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x18\n\x05value\x18\x02 \x01(\x0b\x32\t.Ydb.Type:\x02\x38\x01\"\xc1\x01\n\x12\x45xecuteQueryResult\x12#\n\x0bresult_sets\x18\x01 \x03(\x0b\x32\x0e.Ydb.ResultSet\x12+\n\x07tx_meta\x18\x02 \x01(\x0b\x32\x1a.Ydb.Table.TransactionMeta\x12(\n\nquery_meta\x18\x03 \x01(\x0b\x32\x14.Ydb.Table.QueryMeta\x12/\n\x0bquery_stats\x18\x04 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x9c\x01\n\x17\x45xplainDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12 \n\x18\x63ollect_full_diagnostics\x18\x04 \x01(\x08\"H\n\x18\x45xplainDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"[\n\x12\x45xplainQueryResult\x12\x11\n\tquery_ast\x18\x01 \x01(\t\x12\x12\n\nquery_plan\x18\x02 \x01(\t\x12\x1e\n\x16query_full_diagnostics\x18\x03 \x01(\t\"z\n\x17PrepareDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"H\n\x18PrepareDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xb7\x01\n\x12PrepareQueryResult\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12L\n\x10parameters_types\x18\x02 \x03(\x0b\x32\x32.Ydb.Table.PrepareQueryResult.ParametersTypesEntry\x1a\x41\n\x14ParametersTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x18\n\x05value\x18\x02 \x01(\x0b\x32\t.Ydb.Type:\x02\x38\x01\"a\n\x10KeepAliveRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x39\n\x10operation_params\x18\x02 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"A\n\x11KeepAliveResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xb7\x01\n\x0fKeepAliveResult\x12@\n\x0esession_status\x18\x01 \x01(\x0e\x32(.Ydb.Table.KeepAliveResult.SessionStatus\"b\n\rSessionStatus\x12\x1e\n\x1aSESSION_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14SESSION_STATUS_READY\x10\x01\x12\x17\n\x13SESSION_STATUS_BUSY\x10\x02\"\x9d\x01\n\x17\x42\x65ginTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Table.TransactionSettings\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"H\n\x18\x42\x65ginTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"E\n\x16\x42\x65ginTransactionResult\x12+\n\x07tx_meta\x18\x01 \x01(\x0b\x32\x1a.Ydb.Table.TransactionMeta\"\xb5\x01\n\x18\x43ommitTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\r\n\x05tx_id\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12;\n\rcollect_stats\x18\x04 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\"I\n\x19\x43ommitTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"J\n\x17\x43ommitTransactionResult\x12/\n\x0bquery_stats\x18\x01 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"z\n\x1aRollbackTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\r\n\x05tx_id\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"K\n\x1bRollbackTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x98\x01\n\x18StoragePolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x06labels\x18\x02 \x03(\x0b\x32/.Ydb.Table.StoragePolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9e\x01\n\x1b\x43ompactionPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x42\n\x06labels\x18\x02 \x03(\x0b\x32\x32.Ydb.Table.CompactionPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa2\x01\n\x1dPartitioningPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x44\n\x06labels\x18\x02 \x03(\x0b\x32\x34.Ydb.Table.PartitioningPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9c\x01\n\x1a\x45xecutionPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x41\n\x06labels\x18\x02 \x03(\x0b\x32\x31.Ydb.Table.ExecutionPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa0\x01\n\x1cReplicationPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x43\n\x06labels\x18\x02 \x03(\x0b\x32\x33.Ydb.Table.ReplicationPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x98\x01\n\x18\x43\x61\x63hingPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x06labels\x18\x02 \x03(\x0b\x32/.Ydb.Table.CachingPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbe\x04\n\x17TableProfileDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x06labels\x18\x02 \x03(\x0b\x32..Ydb.Table.TableProfileDescription.LabelsEntry\x12\x1e\n\x16\x64\x65\x66\x61ult_storage_policy\x18\x03 \x01(\t\x12 \n\x18\x61llowed_storage_policies\x18\x04 \x03(\t\x12!\n\x19\x64\x65\x66\x61ult_compaction_policy\x18\x05 \x01(\t\x12#\n\x1b\x61llowed_compaction_policies\x18\x06 \x03(\t\x12#\n\x1b\x64\x65\x66\x61ult_partitioning_policy\x18\x07 \x01(\t\x12%\n\x1d\x61llowed_partitioning_policies\x18\x08 \x03(\t\x12 \n\x18\x64\x65\x66\x61ult_execution_policy\x18\t \x01(\t\x12\"\n\x1a\x61llowed_execution_policies\x18\n \x03(\t\x12\"\n\x1a\x64\x65\x66\x61ult_replication_policy\x18\x0b \x01(\t\x12$\n\x1c\x61llowed_replication_policies\x18\x0c \x03(\t\x12\x1e\n\x16\x64\x65\x66\x61ult_caching_policy\x18\r \x01(\t\x12 \n\x18\x61llowed_caching_policies\x18\x0e \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"X\n\x1b\x44\x65scribeTableOptionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"L\n\x1c\x44\x65scribeTableOptionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x99\x04\n\x1a\x44\x65scribeTableOptionsResult\x12\x41\n\x15table_profile_presets\x18\x01 \x03(\x0b\x32\".Ydb.Table.TableProfileDescription\x12\x43\n\x16storage_policy_presets\x18\x02 \x03(\x0b\x32#.Ydb.Table.StoragePolicyDescription\x12I\n\x19\x63ompaction_policy_presets\x18\x03 \x03(\x0b\x32&.Ydb.Table.CompactionPolicyDescription\x12M\n\x1bpartitioning_policy_presets\x18\x04 \x03(\x0b\x32(.Ydb.Table.PartitioningPolicyDescription\x12G\n\x18\x65xecution_policy_presets\x18\x05 \x03(\x0b\x32%.Ydb.Table.ExecutionPolicyDescription\x12K\n\x1areplication_policy_presets\x18\x06 \x03(\x0b\x32\'.Ydb.Table.ReplicationPolicyDescription\x12\x43\n\x16\x63\x61\x63hing_policy_presets\x18\x07 \x03(\x0b\x32#.Ydb.Table.CachingPolicyDescription\"\xc0\x01\n\x08KeyRange\x12\"\n\x07greater\x18\x01 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x00\x12+\n\x10greater_or_equal\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x00\x12\x1f\n\x04less\x18\x03 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x01\x12(\n\rless_or_equal\x18\x04 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x01\x42\x0c\n\nfrom_boundB\n\n\x08to_bound\"\xb8\x02\n\x10ReadTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12&\n\tkey_range\x18\x03 \x01(\x0b\x32\x13.Ydb.Table.KeyRange\x12\x0f\n\x07\x63olumns\x18\x04 \x03(\t\x12\x0f\n\x07ordered\x18\x05 \x01(\x08\x12\x11\n\trow_limit\x18\x06 \x01(\x04\x12-\n\x0cuse_snapshot\x18\x07 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x19\n\x11\x62\x61tch_limit_bytes\x18\x08 \x01(\x04\x12\x18\n\x10\x62\x61tch_limit_rows\x18\t \x01(\x04\x12\x41\n return_not_null_data_as_optional\x18\n \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"\xbc\x01\n\x11ReadTableResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\'\n\x08snapshot\x18\x04 \x01(\x0b\x32\x15.Ydb.VirtualTimestamp\x12*\n\x06result\x18\x03 \x01(\x0b\x32\x1a.Ydb.Table.ReadTableResult\"5\n\x0fReadTableResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\"c\n\x0fReadRowsRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x1d\n\x04keys\x18\x03 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x0f\n\x07\x63olumns\x18\x04 \x03(\t\"\x8a\x01\n\x10ReadRowsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\nresult_set\x18\x03 \x01(\x0b\x32\x0e.Ydb.ResultSet\"\x8d\x02\n\x11\x42ulkUpsertRequest\x12\r\n\x05table\x18\x01 \x01(\t\x12\x1d\n\x04rows\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12?\n\x14\x61rrow_batch_settings\x18\x07 \x01(\x0b\x32\x1f.Ydb.Formats.ArrowBatchSettingsH\x00\x12\x30\n\x0c\x63sv_settings\x18\x08 \x01(\x0b\x32\x18.Ydb.Formats.CsvSettingsH\x00\x12\r\n\x04\x64\x61ta\x18\xe8\x07 \x01(\x0c\x42\r\n\x0b\x64\x61ta_format\"B\n\x12\x42ulkUpsertResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x42ulkUpsertResult\"\xb3\x03\n\x17\x45xecuteScanQueryRequest\x12\x1f\n\x05query\x18\x03 \x01(\x0b\x32\x10.Ydb.Table.Query\x12\x46\n\nparameters\x18\x04 \x03(\x0b\x32\x32.Ydb.Table.ExecuteScanQueryRequest.ParametersEntry\x12\x35\n\x04mode\x18\x06 \x01(\x0e\x32\'.Ydb.Table.ExecuteScanQueryRequest.Mode\x12;\n\rcollect_stats\x18\x08 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\x12 \n\x18\x63ollect_full_diagnostics\x18\t \x01(\x08\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"=\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMODE_EXPLAIN\x10\x01\x12\r\n\tMODE_EXEC\x10\x03J\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06J\x04\x08\x07\x10\x08\"\xaf\x01\n\x1f\x45xecuteScanQueryPartialResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x38\n\x06result\x18\x03 \x01(\x0b\x32(.Ydb.Table.ExecuteScanQueryPartialResult\"\xac\x01\n\x1d\x45xecuteScanQueryPartialResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12/\n\x0bquery_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12\x1e\n\x16query_full_diagnostics\x18\x07 \x01(\tJ\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06*R\n\tStoreType\x12\x1a\n\x16STORE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTORE_TYPE_ROW\x10\x01\x12\x15\n\x11STORE_TYPE_COLUMN\x10\x02\x42S\n\x14tech.ydb.proto.tableZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Table\xf8\x01\x01\x62\x06proto3' , - dependencies=[protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__common__pb2.DESCRIPTOR,protos_dot_ydb__issue__message__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,protos_dot_ydb__query__stats__pb2.DESCRIPTOR,protos_dot_ydb__value__pb2.DESCRIPTOR,protos_dot_ydb__scheme__pb2.DESCRIPTOR,protos_dot_ydb__status__codes__pb2.DESCRIPTOR,protos_dot_ydb__formats__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) + dependencies=[protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__common__pb2.DESCRIPTOR,protos_dot_ydb__issue__message__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,protos_dot_ydb__query__stats__pb2.DESCRIPTOR,protos_dot_ydb__value__pb2.DESCRIPTOR,protos_dot_ydb__scheme__pb2.DESCRIPTOR,protos_dot_ydb__status__codes__pb2.DESCRIPTOR,protos_dot_ydb__topic__pb2.DESCRIPTOR,protos_dot_ydb__formats__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) +_STORETYPE = _descriptor.EnumDescriptor( + name='StoreType', + full_name='Ydb.Table.StoreType', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='STORE_TYPE_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='STORE_TYPE_ROW', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='STORE_TYPE_COLUMN', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=20290, + serialized_end=20372, +) +_sym_db.RegisterEnumDescriptor(_STORETYPE) + +StoreType = enum_type_wrapper.EnumTypeWrapper(_STORETYPE) +STORE_TYPE_UNSPECIFIED = 0 +STORE_TYPE_ROW = 1 +STORE_TYPE_COLUMN = 2 _TABLEINDEXDESCRIPTION_STATUS = _descriptor.EnumDescriptor( @@ -63,8 +99,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1253, - serialized_end=1324, + serialized_start=1420, + serialized_end=1491, ) _sym_db.RegisterEnumDescriptor(_TABLEINDEXDESCRIPTION_STATUS) @@ -123,8 +159,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1355, - serialized_end=1556, + serialized_start=1522, + serialized_end=1723, ) _sym_db.RegisterEnumDescriptor(_INDEXBUILDSTATE_STATE) @@ -168,8 +204,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1800, - serialized_end=1935, + serialized_start=1967, + serialized_end=2102, ) _sym_db.RegisterEnumDescriptor(_CHANGEFEEDMODE_MODE) @@ -195,11 +231,16 @@ serialized_options=None, type=None, create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='FORMAT_DEBEZIUM_JSON', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=1957, - serialized_end=2040, + serialized_start=2125, + serialized_end=2234, ) _sym_db.RegisterEnumDescriptor(_CHANGEFEEDFORMAT_FORMAT) @@ -233,8 +274,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2749, - serialized_end=2842, + serialized_start=3192, + serialized_end=3285, ) _sym_db.RegisterEnumDescriptor(_CHANGEFEEDDESCRIPTION_STATE) @@ -263,8 +304,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3405, - serialized_end=3481, + serialized_start=3848, + serialized_end=3924, ) _sym_db.RegisterEnumDescriptor(_COLUMNFAMILYPOLICY_COMPRESSION) @@ -298,8 +339,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=4099, - serialized_end=4217, + serialized_start=4566, + serialized_end=4684, ) _sym_db.RegisterEnumDescriptor(_PARTITIONINGPOLICY_AUTOPARTITIONINGPOLICY) @@ -338,8 +379,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=5164, - serialized_end=5278, + serialized_start=6212, + serialized_end=6326, ) _sym_db.RegisterEnumDescriptor(_VALUESINCEUNIXEPOCHMODESETTINGS_UNIT) @@ -368,8 +409,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=5876, - serialized_end=5961, + serialized_start=6924, + serialized_end=7009, ) _sym_db.RegisterEnumDescriptor(_COLUMNFAMILY_COMPRESSION) @@ -408,8 +449,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=11523, - serialized_end=11675, + serialized_start=12727, + serialized_end=12879, ) _sym_db.RegisterEnumDescriptor(_QUERYSTATSCOLLECTION_MODE) @@ -438,8 +479,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=13686, - serialized_end=13784, + serialized_start=14957, + serialized_end=15055, ) _sym_db.RegisterEnumDescriptor(_KEEPALIVERESULT_SESSIONSTATUS) @@ -468,8 +509,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=18478, - serialized_end=18539, + serialized_start=19850, + serialized_end=19911, ) _sym_db.RegisterEnumDescriptor(_EXECUTESCANQUERYREQUEST_MODE) @@ -501,8 +542,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=389, - serialized_end=470, + serialized_start=413, + serialized_end=494, ) @@ -533,8 +574,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=472, - serialized_end=541, + serialized_start=496, + serialized_end=565, ) @@ -565,8 +606,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=543, - serialized_end=584, + serialized_start=567, + serialized_end=608, ) @@ -604,8 +645,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=586, - serialized_end=687, + serialized_start=610, + serialized_end=711, ) @@ -636,8 +677,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=689, - serialized_end=758, + serialized_start=713, + serialized_end=782, ) @@ -661,8 +702,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=760, - serialized_end=773, + serialized_start=784, + serialized_end=797, ) @@ -686,8 +727,33 @@ extension_ranges=[], oneofs=[ ], - serialized_start=775, - serialized_end=793, + serialized_start=799, + serialized_end=817, +) + + +_GLOBALUNIQUEINDEX = _descriptor.Descriptor( + name='GlobalUniqueIndex', + full_name='Ydb.Table.GlobalUniqueIndex', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=819, + serialized_end=838, ) @@ -728,7 +794,14 @@ is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='data_columns', full_name='Ydb.Table.TableIndex.data_columns', index=4, + name='global_unique_index', full_name='Ydb.Table.TableIndex.global_unique_index', index=4, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='data_columns', full_name='Ydb.Table.TableIndex.data_columns', index=5, number=5, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, @@ -751,8 +824,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=796, - serialized_end=982, + serialized_start=841, + serialized_end=1088, ) @@ -793,21 +866,28 @@ is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='status', full_name='Ydb.Table.TableIndexDescription.status', index=4, + name='global_unique_index', full_name='Ydb.Table.TableIndexDescription.global_unique_index', index=4, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='status', full_name='Ydb.Table.TableIndexDescription.status', index=5, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='data_columns', full_name='Ydb.Table.TableIndexDescription.data_columns', index=5, + name='data_columns', full_name='Ydb.Table.TableIndexDescription.data_columns', index=6, number=6, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='size_bytes', full_name='Ydb.Table.TableIndexDescription.size_bytes', index=6, + name='size_bytes', full_name='Ydb.Table.TableIndexDescription.size_bytes', index=7, number=7, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, @@ -831,8 +911,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=985, - serialized_end=1332, + serialized_start=1091, + serialized_end=1499, ) @@ -857,8 +937,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1335, - serialized_end=1556, + serialized_start=1502, + serialized_end=1723, ) @@ -896,8 +976,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1558, - serialized_end=1633, + serialized_start=1725, + serialized_end=1800, ) @@ -942,8 +1022,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1636, - serialized_end=1778, + serialized_start=1803, + serialized_end=1945, ) @@ -968,8 +1048,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1781, - serialized_end=1935, + serialized_start=1948, + serialized_end=2102, ) @@ -994,8 +1074,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1937, - serialized_end=2040, + serialized_start=2105, + serialized_end=2234, ) @@ -1033,8 +1113,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2356, - serialized_end=2405, + serialized_start=2714, + serialized_end=2763, ) _CHANGEFEED = _descriptor.Descriptor( @@ -1094,6 +1174,27 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\252\346*\010\n\006\n\004\010\001\020d\242\346*\007\n\005\010\001\020\200 ', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='aws_region', full_name='Ydb.Table.Changefeed.aws_region', index=7, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='resolved_timestamps_interval', full_name='Ydb.Table.Changefeed.resolved_timestamps_interval', index=8, + number=9, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='topic_partitioning_settings', full_name='Ydb.Table.Changefeed.topic_partitioning_settings', index=9, + number=10, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1106,8 +1207,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2043, - serialized_end=2405, + serialized_start=2237, + serialized_end=2763, ) @@ -1145,8 +1246,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2356, - serialized_end=2405, + serialized_start=2714, + serialized_end=2763, ) _CHANGEFEEDDESCRIPTION = _descriptor.Descriptor( @@ -1199,6 +1300,20 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='aws_region', full_name='Ydb.Table.ChangefeedDescription.aws_region', index=6, + number=7, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='resolved_timestamps_interval', full_name='Ydb.Table.ChangefeedDescription.resolved_timestamps_interval', index=7, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1212,8 +1327,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2408, - serialized_end=2842, + serialized_start=2766, + serialized_end=3285, ) @@ -1244,8 +1359,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2844, - serialized_end=2872, + serialized_start=3287, + serialized_end=3315, ) @@ -1318,8 +1433,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2875, - serialized_end=3173, + serialized_start=3318, + serialized_end=3616, ) @@ -1379,8 +1494,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3176, - serialized_end=3481, + serialized_start=3619, + serialized_end=3924, ) @@ -1411,8 +1526,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3483, - serialized_end=3522, + serialized_start=3926, + serialized_end=3965, ) @@ -1443,8 +1558,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3524, - serialized_end=3583, + serialized_start=3967, + serialized_end=4026, ) @@ -1470,6 +1585,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='leader_node_id', full_name='Ydb.Table.PartitionStats.leader_node_id', index=2, + number=3, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1482,8 +1604,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3585, - serialized_end=3644, + serialized_start=4028, + serialized_end=4111, ) @@ -1549,8 +1671,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3647, - serialized_end=3880, + serialized_start=4114, + serialized_end=4347, ) @@ -1608,8 +1730,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=3883, - serialized_end=4231, + serialized_start=4350, + serialized_end=4698, ) @@ -1640,8 +1762,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4233, - serialized_end=4271, + serialized_start=4700, + serialized_end=4738, ) @@ -1693,8 +1815,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4274, - serialized_end=4451, + serialized_start=4741, + serialized_end=4918, ) @@ -1725,8 +1847,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4453, - serialized_end=4489, + serialized_start=4920, + serialized_end=4956, ) @@ -1799,8 +1921,177 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4492, - serialized_end=4855, + serialized_start=4959, + serialized_end=5322, +) + + +_SEQUENCEDESCRIPTION_SETVAL = _descriptor.Descriptor( + name='SetVal', + full_name='Ydb.Table.SequenceDescription.SetVal', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='next_value', full_name='Ydb.Table.SequenceDescription.SetVal.next_value', index=0, + number=1, type=18, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='next_used', full_name='Ydb.Table.SequenceDescription.SetVal.next_used', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_next_value', full_name='Ydb.Table.SequenceDescription.SetVal._next_value', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_next_used', full_name='Ydb.Table.SequenceDescription.SetVal._next_used', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=5566, + serialized_end=5652, +) + +_SEQUENCEDESCRIPTION = _descriptor.Descriptor( + name='SequenceDescription', + full_name='Ydb.Table.SequenceDescription', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='Ydb.Table.SequenceDescription.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='min_value', full_name='Ydb.Table.SequenceDescription.min_value', index=1, + number=2, type=18, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='max_value', full_name='Ydb.Table.SequenceDescription.max_value', index=2, + number=3, type=18, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='start_value', full_name='Ydb.Table.SequenceDescription.start_value', index=3, + number=4, type=18, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='cache', full_name='Ydb.Table.SequenceDescription.cache', index=4, + number=5, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='increment', full_name='Ydb.Table.SequenceDescription.increment', index=5, + number=6, type=18, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='cycle', full_name='Ydb.Table.SequenceDescription.cycle', index=6, + number=7, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='set_val', full_name='Ydb.Table.SequenceDescription.set_val', index=7, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_SEQUENCEDESCRIPTION_SETVAL, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_name', full_name='Ydb.Table.SequenceDescription._name', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_min_value', full_name='Ydb.Table.SequenceDescription._min_value', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_max_value', full_name='Ydb.Table.SequenceDescription._max_value', + index=2, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_start_value', full_name='Ydb.Table.SequenceDescription._start_value', + index=3, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_cache', full_name='Ydb.Table.SequenceDescription._cache', + index=4, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_increment', full_name='Ydb.Table.SequenceDescription._increment', + index=5, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_cycle', full_name='Ydb.Table.SequenceDescription._cycle', + index=6, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_set_val', full_name='Ydb.Table.SequenceDescription._set_val', + index=7, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=5325, + serialized_end=5751, ) @@ -1833,6 +2124,27 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='not_null', full_name='Ydb.Table.ColumnMeta.not_null', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='from_literal', full_name='Ydb.Table.ColumnMeta.from_literal', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='from_sequence', full_name='Ydb.Table.ColumnMeta.from_sequence', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1844,9 +2156,19 @@ syntax='proto3', extension_ranges=[], oneofs=[ + _descriptor.OneofDescriptor( + name='default_value', full_name='Ydb.Table.ColumnMeta.default_value', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_not_null', full_name='Ydb.Table.ColumnMeta._not_null', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=4857, - serialized_end=4924, + serialized_start=5754, + serialized_end=5972, ) @@ -1884,8 +2206,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4926, - serialized_end=5005, + serialized_start=5974, + serialized_end=6053, ) @@ -1931,8 +2253,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5008, - serialized_end=5278, + serialized_start=6056, + serialized_end=6326, ) @@ -1982,8 +2304,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=5281, - serialized_end=5477, + serialized_start=6329, + serialized_end=6525, ) @@ -2035,8 +2357,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5480, - serialized_end=5698, + serialized_start=6528, + serialized_end=6746, ) @@ -2089,8 +2411,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5701, - serialized_end=5961, + serialized_start=6749, + serialized_end=7009, ) @@ -2156,8 +2478,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5964, - serialized_end=6211, + serialized_start=7012, + serialized_end=7259, ) @@ -2195,8 +2517,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6213, - serialized_end=6280, + serialized_start=7261, + serialized_end=7328, ) @@ -2227,8 +2549,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6282, - serialized_end=6377, + serialized_start=7330, + serialized_end=7425, ) @@ -2271,8 +2593,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=6379, - serialized_end=6495, + serialized_start=7427, + serialized_end=7543, ) @@ -2310,8 +2632,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2356, - serialized_end=2405, + serialized_start=2714, + serialized_end=2763, ) _CREATETABLEREQUEST = _descriptor.Descriptor( @@ -2448,6 +2770,20 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='temporary', full_name='Ydb.Table.CreateTableRequest.temporary', index=18, + number=19, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='store_type', full_name='Ydb.Table.CreateTableRequest.store_type', index=19, + number=20, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -2465,8 +2801,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=6498, - serialized_end=7375, + serialized_start=7546, + serialized_end=8484, ) @@ -2497,8 +2833,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7377, - serialized_end=7444, + serialized_start=8486, + serialized_end=8553, ) @@ -2543,8 +2879,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7446, - serialized_end=7563, + serialized_start=8555, + serialized_end=8672, ) @@ -2575,8 +2911,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7565, - serialized_end=7630, + serialized_start=8674, + serialized_end=8739, ) @@ -2621,8 +2957,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7632, - serialized_end=7725, + serialized_start=8741, + serialized_end=8834, ) @@ -2660,8 +2996,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8815, - serialized_end=8869, + serialized_start=9924, + serialized_end=9978, ) _ALTERTABLEREQUEST = _descriptor.Descriptor( @@ -2855,8 +3191,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=7728, - serialized_end=8901, + serialized_start=8837, + serialized_end=10010, ) @@ -2887,8 +3223,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8903, - serialized_end=8969, + serialized_start=10012, + serialized_end=10078, ) @@ -2940,8 +3276,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8972, - serialized_end=9116, + serialized_start=10081, + serialized_end=10225, ) @@ -2972,8 +3308,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9118, - serialized_end=9183, + serialized_start=10227, + serialized_end=10292, ) @@ -3018,8 +3354,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9185, - serialized_end=9269, + serialized_start=10294, + serialized_end=10378, ) @@ -3064,8 +3400,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9272, - serialized_end=9412, + serialized_start=10381, + serialized_end=10521, ) @@ -3096,8 +3432,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9414, - serialized_end=9480, + serialized_start=10523, + serialized_end=10589, ) @@ -3142,8 +3478,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9482, - serialized_end=9575, + serialized_start=10591, + serialized_end=10684, ) @@ -3188,8 +3524,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9578, - serialized_end=9722, + serialized_start=10687, + serialized_end=10831, ) @@ -3220,8 +3556,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9724, - serialized_end=9792, + serialized_start=10833, + serialized_end=10901, ) @@ -3275,6 +3611,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='include_shard_nodes_info', full_name='Ydb.Table.DescribeTableRequest.include_shard_nodes_info', index=6, + number=9, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -3287,8 +3630,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9795, - serialized_end=10006, + serialized_start=10904, + serialized_end=11149, ) @@ -3319,8 +3662,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10008, - serialized_end=10077, + serialized_start=11151, + serialized_end=11220, ) @@ -3358,8 +3701,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2356, - serialized_end=2405, + serialized_start=2714, + serialized_end=2763, ) _DESCRIBETABLERESULT = _descriptor.Descriptor( @@ -3475,6 +3818,20 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='temporary', full_name='Ydb.Table.DescribeTableResult.temporary', index=15, + number=17, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='store_type', full_name='Ydb.Table.DescribeTableResult.store_type', index=16, + number=18, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -3487,8 +3844,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10080, - serialized_end=10860, + serialized_start=11223, + serialized_end=12064, ) @@ -3531,8 +3888,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10862, - serialized_end=10912, + serialized_start=12066, + serialized_end=12116, ) @@ -3556,8 +3913,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10914, - serialized_end=10940, + serialized_start=12118, + serialized_end=12144, ) @@ -3588,8 +3945,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10942, - serialized_end=10996, + serialized_start=12146, + serialized_end=12200, ) @@ -3613,8 +3970,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10998, - serialized_end=11017, + serialized_start=12202, + serialized_end=12221, ) @@ -3638,8 +3995,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11019, - serialized_end=11041, + serialized_start=12223, + serialized_end=12245, ) @@ -3696,8 +4053,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11044, - serialized_end=11327, + serialized_start=12248, + serialized_end=12531, ) @@ -3747,8 +4104,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11329, - serialized_end=11452, + serialized_start=12533, + serialized_end=12656, ) @@ -3779,8 +4136,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11454, - serialized_end=11495, + serialized_start=12658, + serialized_end=12699, ) @@ -3805,8 +4162,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11498, - serialized_end=11675, + serialized_start=12702, + serialized_end=12879, ) @@ -3844,8 +4201,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12058, - serialized_end=12124, + serialized_start=13262, + serialized_end=13328, ) _EXECUTEDATAQUERYREQUEST = _descriptor.Descriptor( @@ -3917,8 +4274,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11678, - serialized_end=12124, + serialized_start=12882, + serialized_end=13328, ) @@ -3949,8 +4306,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12126, - serialized_end=12198, + serialized_start=13330, + serialized_end=13402, ) @@ -3995,8 +4352,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12200, - serialized_end=12324, + serialized_start=13404, + serialized_end=13528, ) @@ -4027,8 +4384,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12326, - serialized_end=12400, + serialized_start=13530, + serialized_end=13604, ) @@ -4059,8 +4416,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12402, - serialized_end=12431, + serialized_start=13606, + serialized_end=13635, ) @@ -4098,8 +4455,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12528, - serialized_end=12593, + serialized_start=13732, + serialized_end=13797, ) _QUERYMETA = _descriptor.Descriptor( @@ -4136,8 +4493,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12434, - serialized_end=12593, + serialized_start=13638, + serialized_end=13797, ) @@ -4189,8 +4546,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12596, - serialized_end=12789, + serialized_start=13800, + serialized_end=13993, ) @@ -4223,6 +4580,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='collect_full_diagnostics', full_name='Ydb.Table.ExplainDataQueryRequest.collect_full_diagnostics', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -4235,8 +4599,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12791, - serialized_end=12913, + serialized_start=13996, + serialized_end=14152, ) @@ -4267,8 +4631,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12915, - serialized_end=12987, + serialized_start=14154, + serialized_end=14226, ) @@ -4294,6 +4658,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='query_full_diagnostics', full_name='Ydb.Table.ExplainQueryResult.query_full_diagnostics', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -4306,8 +4677,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12989, - serialized_end=13048, + serialized_start=14228, + serialized_end=14319, ) @@ -4352,8 +4723,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13050, - serialized_end=13172, + serialized_start=14321, + serialized_end=14443, ) @@ -4384,8 +4755,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13174, - serialized_end=13246, + serialized_start=14445, + serialized_end=14517, ) @@ -4423,8 +4794,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12528, - serialized_end=12593, + serialized_start=13732, + serialized_end=13797, ) _PREPAREQUERYRESULT = _descriptor.Descriptor( @@ -4461,8 +4832,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13249, - serialized_end=13432, + serialized_start=14520, + serialized_end=14703, ) @@ -4500,8 +4871,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13434, - serialized_end=13531, + serialized_start=14705, + serialized_end=14802, ) @@ -4532,8 +4903,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13533, - serialized_end=13598, + serialized_start=14804, + serialized_end=14869, ) @@ -4565,8 +4936,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13601, - serialized_end=13784, + serialized_start=14872, + serialized_end=15055, ) @@ -4611,8 +4982,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13787, - serialized_end=13944, + serialized_start=15058, + serialized_end=15215, ) @@ -4643,8 +5014,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13946, - serialized_end=14018, + serialized_start=15217, + serialized_end=15289, ) @@ -4675,8 +5046,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14020, - serialized_end=14089, + serialized_start=15291, + serialized_end=15360, ) @@ -4728,8 +5099,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14092, - serialized_end=14273, + serialized_start=15363, + serialized_end=15544, ) @@ -4760,8 +5131,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14275, - serialized_end=14348, + serialized_start=15546, + serialized_end=15619, ) @@ -4792,8 +5163,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14350, - serialized_end=14424, + serialized_start=15621, + serialized_end=15695, ) @@ -4838,8 +5209,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14426, - serialized_end=14548, + serialized_start=15697, + serialized_end=15819, ) @@ -4870,8 +5241,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14550, - serialized_end=14625, + serialized_start=15821, + serialized_end=15896, ) @@ -4909,8 +5280,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14735, - serialized_end=14780, + serialized_start=16006, + serialized_end=16051, ) _STORAGEPOLICYDESCRIPTION = _descriptor.Descriptor( @@ -4947,8 +5318,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14628, - serialized_end=14780, + serialized_start=15899, + serialized_end=16051, ) @@ -4986,8 +5357,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14735, - serialized_end=14780, + serialized_start=16006, + serialized_end=16051, ) _COMPACTIONPOLICYDESCRIPTION = _descriptor.Descriptor( @@ -5024,8 +5395,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14783, - serialized_end=14941, + serialized_start=16054, + serialized_end=16212, ) @@ -5063,8 +5434,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14735, - serialized_end=14780, + serialized_start=16006, + serialized_end=16051, ) _PARTITIONINGPOLICYDESCRIPTION = _descriptor.Descriptor( @@ -5101,8 +5472,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14944, - serialized_end=15106, + serialized_start=16215, + serialized_end=16377, ) @@ -5140,8 +5511,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14735, - serialized_end=14780, + serialized_start=16006, + serialized_end=16051, ) _EXECUTIONPOLICYDESCRIPTION = _descriptor.Descriptor( @@ -5178,8 +5549,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15109, - serialized_end=15265, + serialized_start=16380, + serialized_end=16536, ) @@ -5217,8 +5588,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14735, - serialized_end=14780, + serialized_start=16006, + serialized_end=16051, ) _REPLICATIONPOLICYDESCRIPTION = _descriptor.Descriptor( @@ -5255,8 +5626,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15268, - serialized_end=15428, + serialized_start=16539, + serialized_end=16699, ) @@ -5294,8 +5665,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14735, - serialized_end=14780, + serialized_start=16006, + serialized_end=16051, ) _CACHINGPOLICYDESCRIPTION = _descriptor.Descriptor( @@ -5332,8 +5703,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15431, - serialized_end=15583, + serialized_start=16702, + serialized_end=16854, ) @@ -5371,8 +5742,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14735, - serialized_end=14780, + serialized_start=16006, + serialized_end=16051, ) _TABLEPROFILEDESCRIPTION = _descriptor.Descriptor( @@ -5493,8 +5864,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15586, - serialized_end=16160, + serialized_start=16857, + serialized_end=17431, ) @@ -5525,8 +5896,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16162, - serialized_end=16250, + serialized_start=17433, + serialized_end=17521, ) @@ -5557,8 +5928,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16252, - serialized_end=16328, + serialized_start=17523, + serialized_end=17599, ) @@ -5631,8 +6002,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16331, - serialized_end=16868, + serialized_start=17602, + serialized_end=18139, ) @@ -5694,8 +6065,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16871, - serialized_end=17063, + serialized_start=18142, + serialized_end=18334, ) @@ -5770,6 +6141,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='return_not_null_data_as_optional', full_name='Ydb.Table.ReadTableRequest.return_not_null_data_as_optional', index=9, + number=10, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -5782,8 +6160,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17066, - serialized_end=17311, + serialized_start=18337, + serialized_end=18649, ) @@ -5835,8 +6213,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17314, - serialized_end=17502, + serialized_start=18652, + serialized_end=18840, ) @@ -5867,8 +6245,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17504, - serialized_end=17557, + serialized_start=18842, + serialized_end=18895, ) @@ -5920,8 +6298,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17559, - serialized_end=17658, + serialized_start=18897, + serialized_end=18996, ) @@ -5966,8 +6344,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17661, - serialized_end=17799, + serialized_start=18999, + serialized_end=19137, ) @@ -6038,8 +6416,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=17802, - serialized_end=18071, + serialized_start=19140, + serialized_end=19409, ) @@ -6070,8 +6448,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18073, - serialized_end=18139, + serialized_start=19411, + serialized_end=19477, ) @@ -6095,8 +6473,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18141, - serialized_end=18159, + serialized_start=19479, + serialized_end=19497, ) @@ -6134,8 +6512,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12058, - serialized_end=12124, + serialized_start=13262, + serialized_end=13328, ) _EXECUTESCANQUERYREQUEST = _descriptor.Descriptor( @@ -6174,6 +6552,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='collect_full_diagnostics', full_name='Ydb.Table.ExecuteScanQueryRequest.collect_full_diagnostics', index=4, + number=9, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -6187,8 +6572,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18162, - serialized_end=18563, + serialized_start=19500, + serialized_end=19935, ) @@ -6233,8 +6618,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18566, - serialized_end=18741, + serialized_start=19938, + serialized_end=20113, ) @@ -6260,6 +6645,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='query_full_diagnostics', full_name='Ydb.Table.ExecuteScanQueryPartialResult.query_full_diagnostics', index=2, + number=7, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -6272,8 +6664,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18744, - serialized_end=18884, + serialized_start=20116, + serialized_end=20288, ) _CREATESESSIONREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS @@ -6282,14 +6674,19 @@ _DELETESESSIONRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION _TABLEINDEX.fields_by_name['global_index'].message_type = _GLOBALINDEX _TABLEINDEX.fields_by_name['global_async_index'].message_type = _GLOBALASYNCINDEX +_TABLEINDEX.fields_by_name['global_unique_index'].message_type = _GLOBALUNIQUEINDEX _TABLEINDEX.oneofs_by_name['type'].fields.append( _TABLEINDEX.fields_by_name['global_index']) _TABLEINDEX.fields_by_name['global_index'].containing_oneof = _TABLEINDEX.oneofs_by_name['type'] _TABLEINDEX.oneofs_by_name['type'].fields.append( _TABLEINDEX.fields_by_name['global_async_index']) _TABLEINDEX.fields_by_name['global_async_index'].containing_oneof = _TABLEINDEX.oneofs_by_name['type'] +_TABLEINDEX.oneofs_by_name['type'].fields.append( + _TABLEINDEX.fields_by_name['global_unique_index']) +_TABLEINDEX.fields_by_name['global_unique_index'].containing_oneof = _TABLEINDEX.oneofs_by_name['type'] _TABLEINDEXDESCRIPTION.fields_by_name['global_index'].message_type = _GLOBALINDEX _TABLEINDEXDESCRIPTION.fields_by_name['global_async_index'].message_type = _GLOBALASYNCINDEX +_TABLEINDEXDESCRIPTION.fields_by_name['global_unique_index'].message_type = _GLOBALUNIQUEINDEX _TABLEINDEXDESCRIPTION.fields_by_name['status'].enum_type = _TABLEINDEXDESCRIPTION_STATUS _TABLEINDEXDESCRIPTION_STATUS.containing_type = _TABLEINDEXDESCRIPTION _TABLEINDEXDESCRIPTION.oneofs_by_name['type'].fields.append( @@ -6298,6 +6695,9 @@ _TABLEINDEXDESCRIPTION.oneofs_by_name['type'].fields.append( _TABLEINDEXDESCRIPTION.fields_by_name['global_async_index']) _TABLEINDEXDESCRIPTION.fields_by_name['global_async_index'].containing_oneof = _TABLEINDEXDESCRIPTION.oneofs_by_name['type'] +_TABLEINDEXDESCRIPTION.oneofs_by_name['type'].fields.append( + _TABLEINDEXDESCRIPTION.fields_by_name['global_unique_index']) +_TABLEINDEXDESCRIPTION.fields_by_name['global_unique_index'].containing_oneof = _TABLEINDEXDESCRIPTION.oneofs_by_name['type'] _INDEXBUILDSTATE_STATE.containing_type = _INDEXBUILDSTATE _INDEXBUILDDESCRIPTION.fields_by_name['index'].message_type = _TABLEINDEX _INDEXBUILDMETADATA.fields_by_name['description'].message_type = _INDEXBUILDDESCRIPTION @@ -6309,11 +6709,14 @@ _CHANGEFEED.fields_by_name['format'].enum_type = _CHANGEFEEDFORMAT_FORMAT _CHANGEFEED.fields_by_name['retention_period'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _CHANGEFEED.fields_by_name['attributes'].message_type = _CHANGEFEED_ATTRIBUTESENTRY +_CHANGEFEED.fields_by_name['resolved_timestamps_interval'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +_CHANGEFEED.fields_by_name['topic_partitioning_settings'].message_type = protos_dot_ydb__topic__pb2._PARTITIONINGSETTINGS _CHANGEFEEDDESCRIPTION_ATTRIBUTESENTRY.containing_type = _CHANGEFEEDDESCRIPTION _CHANGEFEEDDESCRIPTION.fields_by_name['mode'].enum_type = _CHANGEFEEDMODE_MODE _CHANGEFEEDDESCRIPTION.fields_by_name['format'].enum_type = _CHANGEFEEDFORMAT_FORMAT _CHANGEFEEDDESCRIPTION.fields_by_name['state'].enum_type = _CHANGEFEEDDESCRIPTION_STATE _CHANGEFEEDDESCRIPTION.fields_by_name['attributes'].message_type = _CHANGEFEEDDESCRIPTION_ATTRIBUTESENTRY +_CHANGEFEEDDESCRIPTION.fields_by_name['resolved_timestamps_interval'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _CHANGEFEEDDESCRIPTION_STATE.containing_type = _CHANGEFEEDDESCRIPTION _STORAGEPOLICY.fields_by_name['syslog'].message_type = _STORAGEPOOL _STORAGEPOLICY.fields_by_name['log'].message_type = _STORAGEPOOL @@ -6347,7 +6750,50 @@ _TABLEPROFILE.fields_by_name['execution_policy'].message_type = _EXECUTIONPOLICY _TABLEPROFILE.fields_by_name['replication_policy'].message_type = _REPLICATIONPOLICY _TABLEPROFILE.fields_by_name['caching_policy'].message_type = _CACHINGPOLICY +_SEQUENCEDESCRIPTION_SETVAL.containing_type = _SEQUENCEDESCRIPTION +_SEQUENCEDESCRIPTION_SETVAL.oneofs_by_name['_next_value'].fields.append( + _SEQUENCEDESCRIPTION_SETVAL.fields_by_name['next_value']) +_SEQUENCEDESCRIPTION_SETVAL.fields_by_name['next_value'].containing_oneof = _SEQUENCEDESCRIPTION_SETVAL.oneofs_by_name['_next_value'] +_SEQUENCEDESCRIPTION_SETVAL.oneofs_by_name['_next_used'].fields.append( + _SEQUENCEDESCRIPTION_SETVAL.fields_by_name['next_used']) +_SEQUENCEDESCRIPTION_SETVAL.fields_by_name['next_used'].containing_oneof = _SEQUENCEDESCRIPTION_SETVAL.oneofs_by_name['_next_used'] +_SEQUENCEDESCRIPTION.fields_by_name['set_val'].message_type = _SEQUENCEDESCRIPTION_SETVAL +_SEQUENCEDESCRIPTION.oneofs_by_name['_name'].fields.append( + _SEQUENCEDESCRIPTION.fields_by_name['name']) +_SEQUENCEDESCRIPTION.fields_by_name['name'].containing_oneof = _SEQUENCEDESCRIPTION.oneofs_by_name['_name'] +_SEQUENCEDESCRIPTION.oneofs_by_name['_min_value'].fields.append( + _SEQUENCEDESCRIPTION.fields_by_name['min_value']) +_SEQUENCEDESCRIPTION.fields_by_name['min_value'].containing_oneof = _SEQUENCEDESCRIPTION.oneofs_by_name['_min_value'] +_SEQUENCEDESCRIPTION.oneofs_by_name['_max_value'].fields.append( + _SEQUENCEDESCRIPTION.fields_by_name['max_value']) +_SEQUENCEDESCRIPTION.fields_by_name['max_value'].containing_oneof = _SEQUENCEDESCRIPTION.oneofs_by_name['_max_value'] +_SEQUENCEDESCRIPTION.oneofs_by_name['_start_value'].fields.append( + _SEQUENCEDESCRIPTION.fields_by_name['start_value']) +_SEQUENCEDESCRIPTION.fields_by_name['start_value'].containing_oneof = _SEQUENCEDESCRIPTION.oneofs_by_name['_start_value'] +_SEQUENCEDESCRIPTION.oneofs_by_name['_cache'].fields.append( + _SEQUENCEDESCRIPTION.fields_by_name['cache']) +_SEQUENCEDESCRIPTION.fields_by_name['cache'].containing_oneof = _SEQUENCEDESCRIPTION.oneofs_by_name['_cache'] +_SEQUENCEDESCRIPTION.oneofs_by_name['_increment'].fields.append( + _SEQUENCEDESCRIPTION.fields_by_name['increment']) +_SEQUENCEDESCRIPTION.fields_by_name['increment'].containing_oneof = _SEQUENCEDESCRIPTION.oneofs_by_name['_increment'] +_SEQUENCEDESCRIPTION.oneofs_by_name['_cycle'].fields.append( + _SEQUENCEDESCRIPTION.fields_by_name['cycle']) +_SEQUENCEDESCRIPTION.fields_by_name['cycle'].containing_oneof = _SEQUENCEDESCRIPTION.oneofs_by_name['_cycle'] +_SEQUENCEDESCRIPTION.oneofs_by_name['_set_val'].fields.append( + _SEQUENCEDESCRIPTION.fields_by_name['set_val']) +_SEQUENCEDESCRIPTION.fields_by_name['set_val'].containing_oneof = _SEQUENCEDESCRIPTION.oneofs_by_name['_set_val'] _COLUMNMETA.fields_by_name['type'].message_type = protos_dot_ydb__value__pb2._TYPE +_COLUMNMETA.fields_by_name['from_literal'].message_type = protos_dot_ydb__value__pb2._TYPEDVALUE +_COLUMNMETA.fields_by_name['from_sequence'].message_type = _SEQUENCEDESCRIPTION +_COLUMNMETA.oneofs_by_name['default_value'].fields.append( + _COLUMNMETA.fields_by_name['from_literal']) +_COLUMNMETA.fields_by_name['from_literal'].containing_oneof = _COLUMNMETA.oneofs_by_name['default_value'] +_COLUMNMETA.oneofs_by_name['default_value'].fields.append( + _COLUMNMETA.fields_by_name['from_sequence']) +_COLUMNMETA.fields_by_name['from_sequence'].containing_oneof = _COLUMNMETA.oneofs_by_name['default_value'] +_COLUMNMETA.oneofs_by_name['_not_null'].fields.append( + _COLUMNMETA.fields_by_name['not_null']) +_COLUMNMETA.fields_by_name['not_null'].containing_oneof = _COLUMNMETA.oneofs_by_name['_not_null'] _VALUESINCEUNIXEPOCHMODESETTINGS.fields_by_name['column_unit'].enum_type = _VALUESINCEUNIXEPOCHMODESETTINGS_UNIT _VALUESINCEUNIXEPOCHMODESETTINGS_UNIT.containing_type = _VALUESINCEUNIXEPOCHMODESETTINGS _TTLSETTINGS.fields_by_name['date_type_column'].message_type = _DATETYPECOLUMNMODESETTINGS @@ -6388,6 +6834,7 @@ _CREATETABLEREQUEST.fields_by_name['partitioning_settings'].message_type = _PARTITIONINGSETTINGS _CREATETABLEREQUEST.fields_by_name['key_bloom_filter'].enum_type = protos_dot_ydb__common__pb2._FEATUREFLAG_STATUS _CREATETABLEREQUEST.fields_by_name['read_replicas_settings'].message_type = _READREPLICASSETTINGS +_CREATETABLEREQUEST.fields_by_name['store_type'].enum_type = _STORETYPE _CREATETABLEREQUEST.oneofs_by_name['partitions'].fields.append( _CREATETABLEREQUEST.fields_by_name['uniform_partitions']) _CREATETABLEREQUEST.fields_by_name['uniform_partitions'].containing_oneof = _CREATETABLEREQUEST.oneofs_by_name['partitions'] @@ -6451,6 +6898,7 @@ _DESCRIBETABLERESULT.fields_by_name['key_bloom_filter'].enum_type = protos_dot_ydb__common__pb2._FEATUREFLAG_STATUS _DESCRIBETABLERESULT.fields_by_name['read_replicas_settings'].message_type = _READREPLICASSETTINGS _DESCRIBETABLERESULT.fields_by_name['changefeeds'].message_type = _CHANGEFEEDDESCRIPTION +_DESCRIBETABLERESULT.fields_by_name['store_type'].enum_type = _STORETYPE _QUERY.oneofs_by_name['query'].fields.append( _QUERY.fields_by_name['yql_text']) _QUERY.fields_by_name['yql_text'].containing_oneof = _QUERY.oneofs_by_name['query'] @@ -6561,6 +7009,7 @@ _KEYRANGE.fields_by_name['less_or_equal'].containing_oneof = _KEYRANGE.oneofs_by_name['to_bound'] _READTABLEREQUEST.fields_by_name['key_range'].message_type = _KEYRANGE _READTABLEREQUEST.fields_by_name['use_snapshot'].enum_type = protos_dot_ydb__common__pb2._FEATUREFLAG_STATUS +_READTABLEREQUEST.fields_by_name['return_not_null_data_as_optional'].enum_type = protos_dot_ydb__common__pb2._FEATUREFLAG_STATUS _READTABLERESPONSE.fields_by_name['status'].enum_type = protos_dot_ydb__status__codes__pb2._STATUSIDS_STATUSCODE _READTABLERESPONSE.fields_by_name['issues'].message_type = protos_dot_ydb__issue__message__pb2._ISSUEMESSAGE _READTABLERESPONSE.fields_by_name['snapshot'].message_type = protos_dot_ydb__common__pb2._VIRTUALTIMESTAMP @@ -6600,6 +7049,7 @@ DESCRIPTOR.message_types_by_name['DeleteSessionResponse'] = _DELETESESSIONRESPONSE DESCRIPTOR.message_types_by_name['GlobalIndex'] = _GLOBALINDEX DESCRIPTOR.message_types_by_name['GlobalAsyncIndex'] = _GLOBALASYNCINDEX +DESCRIPTOR.message_types_by_name['GlobalUniqueIndex'] = _GLOBALUNIQUEINDEX DESCRIPTOR.message_types_by_name['TableIndex'] = _TABLEINDEX DESCRIPTOR.message_types_by_name['TableIndexDescription'] = _TABLEINDEXDESCRIPTION DESCRIPTOR.message_types_by_name['IndexBuildState'] = _INDEXBUILDSTATE @@ -6621,6 +7071,7 @@ DESCRIPTOR.message_types_by_name['ReplicationPolicy'] = _REPLICATIONPOLICY DESCRIPTOR.message_types_by_name['CachingPolicy'] = _CACHINGPOLICY DESCRIPTOR.message_types_by_name['TableProfile'] = _TABLEPROFILE +DESCRIPTOR.message_types_by_name['SequenceDescription'] = _SEQUENCEDESCRIPTION DESCRIPTOR.message_types_by_name['ColumnMeta'] = _COLUMNMETA DESCRIPTOR.message_types_by_name['DateTypeColumnModeSettings'] = _DATETYPECOLUMNMODESETTINGS DESCRIPTOR.message_types_by_name['ValueSinceUnixEpochModeSettings'] = _VALUESINCEUNIXEPOCHMODESETTINGS @@ -6704,6 +7155,7 @@ DESCRIPTOR.message_types_by_name['ExecuteScanQueryRequest'] = _EXECUTESCANQUERYREQUEST DESCRIPTOR.message_types_by_name['ExecuteScanQueryPartialResponse'] = _EXECUTESCANQUERYPARTIALRESPONSE DESCRIPTOR.message_types_by_name['ExecuteScanQueryPartialResult'] = _EXECUTESCANQUERYPARTIALRESULT +DESCRIPTOR.enum_types_by_name['StoreType'] = _STORETYPE _sym_db.RegisterFileDescriptor(DESCRIPTOR) CreateSessionRequest = _reflection.GeneratedProtocolMessageType('CreateSessionRequest', (_message.Message,), { @@ -6755,6 +7207,13 @@ }) _sym_db.RegisterMessage(GlobalAsyncIndex) +GlobalUniqueIndex = _reflection.GeneratedProtocolMessageType('GlobalUniqueIndex', (_message.Message,), { + 'DESCRIPTOR' : _GLOBALUNIQUEINDEX, + '__module__' : 'protos.ydb_table_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Table.GlobalUniqueIndex) + }) +_sym_db.RegisterMessage(GlobalUniqueIndex) + TableIndex = _reflection.GeneratedProtocolMessageType('TableIndex', (_message.Message,), { 'DESCRIPTOR' : _TABLEINDEX, '__module__' : 'protos.ydb_table_pb2' @@ -6918,6 +7377,21 @@ }) _sym_db.RegisterMessage(TableProfile) +SequenceDescription = _reflection.GeneratedProtocolMessageType('SequenceDescription', (_message.Message,), { + + 'SetVal' : _reflection.GeneratedProtocolMessageType('SetVal', (_message.Message,), { + 'DESCRIPTOR' : _SEQUENCEDESCRIPTION_SETVAL, + '__module__' : 'protos.ydb_table_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Table.SequenceDescription.SetVal) + }) + , + 'DESCRIPTOR' : _SEQUENCEDESCRIPTION, + '__module__' : 'protos.ydb_table_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Table.SequenceDescription) + }) +_sym_db.RegisterMessage(SequenceDescription) +_sym_db.RegisterMessage(SequenceDescription.SetVal) + ColumnMeta = _reflection.GeneratedProtocolMessageType('ColumnMeta', (_message.Message,), { 'DESCRIPTOR' : _COLUMNMETA, '__module__' : 'protos.ydb_table_pb2' @@ -7615,6 +8089,7 @@ DESCRIPTOR._options = None _CHANGEFEED_ATTRIBUTESENTRY._options = None _CHANGEFEED.fields_by_name['attributes']._options = None +_CHANGEFEED.fields_by_name['aws_region']._options = None _CHANGEFEEDDESCRIPTION_ATTRIBUTESENTRY._options = None _CREATETABLEREQUEST_ATTRIBUTESENTRY._options = None _CREATETABLEREQUEST.fields_by_name['attributes']._options = None diff --git a/ydb/_grpc/v3/protos/ydb_topic_pb2.py b/ydb/_grpc/v3/protos/ydb_topic_pb2.py index 139e46c8..4481c384 100644 --- a/ydb/_grpc/v3/protos/ydb_topic_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_topic_pb2.py @@ -17,6 +17,7 @@ from ydb._grpc.v3.protos import ydb_scheme_pb2 as protos_dot_ydb__scheme__pb2 from ydb._grpc.v3.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 from ydb._grpc.v3.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 +from ydb._grpc.v3.protos.annotations import sensitive_pb2 as protos_dot_annotations_dot_sensitive__pb2 from ydb._grpc.v3.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 @@ -28,9 +29,9 @@ syntax='proto3', serialized_options=b'\n\024tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"#\n\x12UpdateTokenRequest\x12\r\n\x05token\x18\x01 \x01(\t\"\x15\n\x13UpdateTokenResponse\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x87\x12\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xa3\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x13\n\x0bproducer_id\x18\x02 \x01(\t\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12\x1a\n\x10message_group_id\x18\x04 \x01(\tH\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\x96\x03\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x12/\n\x02tx\x18\x03 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentityH\x00\x88\x01\x01\x1a\xf4\x01\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12\x1a\n\x10message_group_id\x18\x05 \x01(\tH\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioningB\x05\n\x03_tx\x1a\x81\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\x8e\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x42\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xca\x1d\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xea\x04\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xc4\x05\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x42\x10\n\x0eserver_message\x1a\xa4\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\xff\x05\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xd1\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12\x18\n\x10message_group_id\x18\x07 \x01(\t\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xc4\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x13\n\x0bproducer_id\x18\x02 \x01(\t\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xb6\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1ag\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x1a<\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\"2\n\x13TransactionIdentity\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07session\x18\x02 \x01(\t\"\xc4\x03\n!UpdateOffsetsInTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12*\n\x02tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentity\x12I\n\x06topics\x18\x03 \x03(\x0b\x32\x39.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x1a\xda\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12^\n\npartitions\x18\x02 \x03(\x0b\x32J.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"R\n\"UpdateOffsetsInTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\"\n UpdateOffsetsInTransactionResult\"\x96\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xb3\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf3\x01\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"h\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbb\x01\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_partition_count_limit\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"v\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa2\x08\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xa4\x01\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\x8b\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xde\x06\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\x80\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x1a\xb3\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\x9c\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x19\n\x11partition_node_id\x18\x08 \x01(\x05\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\")\n\x12UpdateTokenRequest\x12\x13\n\x05token\x18\x01 \x01(\tB\x04\xb8\xe6*\x01\"\x15\n\x13UpdateTokenResponse\"C\n\x17PartitionWithGeneration\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x9e\x14\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xfe\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12#\n\x10message_group_id\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x07 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\xe8\x03\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x12/\n\x02tx\x18\x03 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentityH\x00\x88\x01\x01\x1a\xc6\x02\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12#\n\x10message_group_id\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x08 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioningB\x05\n\x03_tx\x1a\xeb\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\xf8\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x12Y\n\rwritten_in_tx\x18\x04 \x01(\x0b\x32@.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenInTxH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x1a\r\n\x0bWrittenInTxB\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x9c#\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xb1\x05\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x45\n\x0f\x64irect_read_ack\x18\x08 \x01(\x0b\x32*.Ydb.Topic.StreamReadMessage.DirectReadAckH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xf0\x06\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x12W\n\x18update_partition_session\x18\n \x01(\x0b\x32\x33.Ydb.Topic.StreamReadMessage.UpdatePartitionSessionH\x00\x12Q\n\x15\x65nd_partition_session\x18\x0b \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.EndPartitionSessionH\x00\x42\x10\n\x0eserver_message\x1a\xdc\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64irect_read\x18\x04 \x01(\x08\x12!\n\x19\x61uto_partitioning_support\x18\x05 \x01(\x08\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\x91\x06\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xda\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12!\n\x10message_group_id\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xcd\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xf0\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x38\n\x12partition_location\x18\x04 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1a\x84\x01\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x04 \x01(\x03\x1aN\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x1ap\n\x16UpdatePartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x38\n\x12partition_location\x18\x02 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x45\n\rDirectReadAck\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x1ap\n\x13\x45ndPartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1e\n\x16\x61\x64jacent_partition_ids\x18\x02 \x03(\x03\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\"\xf7\x0c\n\x17StreamDirectReadMessage\x1a\xa8\x02\n\nFromClient\x12\x46\n\x0cinit_request\x18\x01 \x01(\x0b\x32..Ydb.Topic.StreamDirectReadMessage.InitRequestH\x00\x12\x80\x01\n+start_direct_read_partition_session_request\x18\x02 \x01(\x0b\x32I.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xca\x04\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12H\n\rinit_response\x18\x06 \x01(\x0b\x32/.Ydb.Topic.StreamDirectReadMessage.InitResponseH\x00\x12\x82\x01\n,start_direct_read_partition_session_response\x18\x07 \x01(\x0b\x32J.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionResponseH\x00\x12o\n\"stop_direct_read_partition_session\x18\x03 \x01(\x0b\x32\x41.Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSessionH\x00\x12U\n\x14\x64irect_read_response\x18\x04 \x01(\x0b\x32\x35.Ydb.Topic.StreamDirectReadMessage.DirectReadResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xb6\x01\n\x0bInitRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12^\n\x14topics_read_settings\x18\x02 \x03(\x0b\x32@.Ydb.Topic.StreamDirectReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x1a!\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x1a\x0e\n\x0cInitResponse\x1aw\n&StartDirectReadPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x02 \x01(\x03\x12\x12\n\ngeneration\x18\x03 \x01(\x03\x1a[\n\'StartDirectReadPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\x1a\xa6\x01\n\x1eStopDirectReadPartitionSession\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1c\n\x14partition_session_id\x18\x03 \x01(\x03\x12\x12\n\ngeneration\x18\x04 \x01(\x03\x1a\x9b\x01\n\x12\x44irectReadResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x12O\n\x0epartition_data\x18\x03 \x01(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\"2\n\x13TransactionIdentity\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07session\x18\x02 \x01(\t\"\xc4\x03\n!UpdateOffsetsInTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12*\n\x02tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentity\x12I\n\x06topics\x18\x03 \x03(\x0b\x32\x39.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x1a\xda\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12^\n\npartitions\x18\x02 \x03(\x0b\x32J.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"R\n\"UpdateOffsetsInTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\"\n UpdateOffsetsInTransactionResult\"\x96\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xb3\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf3\x01\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"\xdc\x01\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12)\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0\x12G\n\x1a\x61uto_partitioning_settings\x18\x04 \x01(\x0b\x32#.Ydb.Topic.AutoPartitioningSettings\"\x9f\x01\n\x18\x41utoPartitioningSettings\x12\x35\n\x08strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategy\x12L\n\x15partition_write_speed\x18\x02 \x01(\x0b\x32-.Ydb.Topic.AutoPartitioningWriteSpeedStrategy\"\xb3\x01\n\"AutoPartitioningWriteSpeedStrategy\x12\x37\n\x14stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n\x16up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12*\n\x18\x64own_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\"\x8b\x03\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x32\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12W\n alter_auto_partitioning_settings\x18\x04 \x01(\x0b\x32(.Ydb.Topic.AlterAutoPartitioningSettingsH\x03\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_max_active_partitionsB\x1c\n\x1a_set_partition_count_limitB#\n!_alter_auto_partitioning_settings\"\xea\x01\n\x1d\x41lterAutoPartitioningSettings\x12>\n\x0cset_strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategyH\x00\x88\x01\x01\x12Z\n\x19set_partition_write_speed\x18\x02 \x01(\x0b\x32\x32.Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategyH\x01\x88\x01\x01\x42\x0f\n\r_set_strategyB\x1c\n\x1a_set_partition_write_speed\"\xb0\x02\n\'AlterAutoPartitioningWriteSpeedStrategy\x12@\n\x18set_stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x12\x31\n\x1aset_up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x33\n\x1cset_down_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x42\x1b\n\x19_set_stabilization_windowB\x1d\n\x1b_set_up_utilization_percentB\x1f\n\x1d_set_down_utilization_percent\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"8\n\x11PartitionLocation\x12\x0f\n\x07node_id\x18\x01 \x01(\x05\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"\x90\x01\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\x12\x18\n\x10include_location\x18\x04 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x11PartitionKeyRange\x12\x17\n\nfrom_bound\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x15\n\x08to_bound\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_from_boundB\x0b\n\t_to_bound\"\xfa\t\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12\x33\n+partition_total_read_speed_bytes_per_second\x18\x0e \x01(\x03\x12\x36\n.partition_consumer_read_speed_bytes_per_second\x18\x0f \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x8f\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12\x38\n\x12partition_location\x18\x06 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x12/\n\tkey_range\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionKeyRange\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\xaa\x01\n\x18\x44\x65scribePartitionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"I\n\x19\x44\x65scribePartitionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Z\n\x17\x44\x65scribePartitionResult\x12?\n\tpartition\x18\x01 \x01(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\"\xa5\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x98\x07\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\xba\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x12\x38\n\x12partition_location\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\xb3\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\xa0\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x1d\n\x11partition_node_id\x18\x08 \x01(\x05\x42\x02\x18\x01\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*\xf1\x01\n\x18\x41utoPartitioningStrategy\x12*\n&AUTO_PARTITIONING_STRATEGY_UNSPECIFIED\x10\x00\x12\'\n#AUTO_PARTITIONING_STRATEGY_DISABLED\x10\x01\x12\'\n#AUTO_PARTITIONING_STRATEGY_SCALE_UP\x10\x02\x12\x30\n,AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN\x10\x03\x12%\n!AUTO_PARTITIONING_STRATEGY_PAUSED\x10\x04*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3' , - dependencies=[protos_dot_ydb__operation__pb2.DESCRIPTOR,protos_dot_ydb__scheme__pb2.DESCRIPTOR,protos_dot_ydb__status__codes__pb2.DESCRIPTOR,protos_dot_ydb__issue__message__pb2.DESCRIPTOR,protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) + dependencies=[protos_dot_ydb__operation__pb2.DESCRIPTOR,protos_dot_ydb__scheme__pb2.DESCRIPTOR,protos_dot_ydb__status__codes__pb2.DESCRIPTOR,protos_dot_ydb__issue__message__pb2.DESCRIPTOR,protos_dot_annotations_dot_sensitive__pb2.DESCRIPTOR,protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) _CODEC = _descriptor.EnumDescriptor( name='Codec', @@ -72,12 +73,53 @@ ], containing_type=None, serialized_options=None, - serialized_start=13214, - serialized_end=13345, + serialized_start=18023, + serialized_end=18154, ) _sym_db.RegisterEnumDescriptor(_CODEC) Codec = enum_type_wrapper.EnumTypeWrapper(_CODEC) +_AUTOPARTITIONINGSTRATEGY = _descriptor.EnumDescriptor( + name='AutoPartitioningStrategy', + full_name='Ydb.Topic.AutoPartitioningStrategy', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='AUTO_PARTITIONING_STRATEGY_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='AUTO_PARTITIONING_STRATEGY_DISABLED', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='AUTO_PARTITIONING_STRATEGY_SCALE_UP', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='AUTO_PARTITIONING_STRATEGY_PAUSED', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=18157, + serialized_end=18398, +) +_sym_db.RegisterEnumDescriptor(_AUTOPARTITIONINGSTRATEGY) + +AutoPartitioningStrategy = enum_type_wrapper.EnumTypeWrapper(_AUTOPARTITIONINGSTRATEGY) _METERINGMODE = _descriptor.EnumDescriptor( name='MeteringMode', full_name='Ydb.Topic.MeteringMode', @@ -103,8 +145,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=13347, - serialized_end=13462, + serialized_start=18400, + serialized_end=18515, ) _sym_db.RegisterEnumDescriptor(_METERINGMODE) @@ -115,6 +157,11 @@ CODEC_LZOP = 3 CODEC_ZSTD = 4 CODEC_CUSTOM = 10000 +AUTO_PARTITIONING_STRATEGY_UNSPECIFIED = 0 +AUTO_PARTITIONING_STRATEGY_DISABLED = 1 +AUTO_PARTITIONING_STRATEGY_SCALE_UP = 2 +AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN = 3 +AUTO_PARTITIONING_STRATEGY_PAUSED = 4 METERING_MODE_UNSPECIFIED = 0 METERING_MODE_RESERVED_CAPACITY = 1 METERING_MODE_REQUEST_UNITS = 2 @@ -140,8 +187,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2384, - serialized_end=2444, + serialized_start=2759, + serialized_end=2819, ) _sym_db.RegisterEnumDescriptor(_STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON) @@ -173,8 +220,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=255, - serialized_end=310, + serialized_start=291, + serialized_end=346, ) @@ -212,8 +259,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=312, - serialized_end=354, + serialized_start=348, + serialized_end=390, ) @@ -231,7 +278,7 @@ has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=b'\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -244,8 +291,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=356, - serialized_end=391, + serialized_start=392, + serialized_end=433, ) @@ -269,8 +316,47 @@ extension_ranges=[], oneofs=[ ], - serialized_start=393, - serialized_end=414, + serialized_start=435, + serialized_end=456, +) + + +_PARTITIONWITHGENERATION = _descriptor.Descriptor( + name='PartitionWithGeneration', + full_name='Ydb.Topic.PartitionWithGeneration', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='partition_id', full_name='Ydb.Topic.PartitionWithGeneration.partition_id', index=0, + number=1, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='generation', full_name='Ydb.Topic.PartitionWithGeneration.generation', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=458, + serialized_end=525, ) @@ -308,8 +394,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=416, - serialized_end=458, + serialized_start=527, + serialized_end=569, ) @@ -359,8 +445,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=484, - serialized_end=713, + serialized_start=595, + serialized_end=824, ) _STREAMWRITEMESSAGE_FROMSERVER = _descriptor.Descriptor( @@ -423,8 +509,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=716, - serialized_end=1035, + serialized_start=827, + serialized_end=1146, ) _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY = _descriptor.Descriptor( @@ -461,8 +547,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1258, - serialized_end=1313, + serialized_start=1460, + serialized_end=1515, ) _STREAMWRITEMESSAGE_INITREQUEST = _descriptor.Descriptor( @@ -486,7 +572,7 @@ has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=b'\242\346*\003\030\200\020', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='write_session_meta', full_name='Ydb.Topic.StreamWriteMessage.InitRequest.write_session_meta', index=2, number=3, type=11, cpp_type=10, label=3, @@ -500,7 +586,7 @@ has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=b'\242\346*\003\030\200\020', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='partition_id', full_name='Ydb.Topic.StreamWriteMessage.InitRequest.partition_id', index=4, number=5, type=3, cpp_type=2, label=1, @@ -509,7 +595,14 @@ is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='get_last_seq_no', full_name='Ydb.Topic.StreamWriteMessage.InitRequest.get_last_seq_no', index=5, + name='partition_with_generation', full_name='Ydb.Topic.StreamWriteMessage.InitRequest.partition_with_generation', index=5, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='get_last_seq_no', full_name='Ydb.Topic.StreamWriteMessage.InitRequest.get_last_seq_no', index=6, number=6, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, @@ -532,8 +625,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1038, - serialized_end=1329, + serialized_start=1149, + serialized_end=1531, ) _STREAMWRITEMESSAGE_INITRESPONSE = _descriptor.Descriptor( @@ -584,8 +677,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1332, - serialized_end=1463, + serialized_start=1534, + serialized_end=1665, ) _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA = _descriptor.Descriptor( @@ -630,7 +723,7 @@ has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=b'\242\346*\003\030\200\020', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='partition_id', full_name='Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData.partition_id', index=5, number=6, type=3, cpp_type=2, label=1, @@ -639,7 +732,14 @@ is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='metadata_items', full_name='Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData.metadata_items', index=6, + name='partition_with_generation', full_name='Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData.partition_with_generation', index=6, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='metadata_items', full_name='Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData.metadata_items', index=7, number=7, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, @@ -662,8 +762,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1621, - serialized_end=1865, + serialized_start=1823, + serialized_end=2149, ) _STREAMWRITEMESSAGE_WRITEREQUEST = _descriptor.Descriptor( @@ -712,8 +812,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1466, - serialized_end=1872, + serialized_start=1668, + serialized_end=2156, ) _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN = _descriptor.Descriptor( @@ -743,8 +843,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2260, - serialized_end=2285, + serialized_start=2635, + serialized_end=2660, ) _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED = _descriptor.Descriptor( @@ -775,8 +875,32 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2288, - serialized_end=2444, + serialized_start=2663, + serialized_end=2819, +) + +_STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTENINTX = _descriptor.Descriptor( + name='WrittenInTx', + full_name='Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenInTx', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2821, + serialized_end=2834, ) _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK = _descriptor.Descriptor( @@ -808,10 +932,17 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='written_in_tx', full_name='Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.written_in_tx', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], - nested_types=[_STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN, _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED, ], + nested_types=[_STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN, _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED, _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTENINTX, ], enum_types=[ ], serialized_options=None, @@ -825,8 +956,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=2070, - serialized_end=2468, + serialized_start=2354, + serialized_end=2858, ) _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS = _descriptor.Descriptor( @@ -884,8 +1015,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2471, - serialized_end=2772, + serialized_start=2861, + serialized_end=3162, ) _STREAMWRITEMESSAGE_WRITERESPONSE = _descriptor.Descriptor( @@ -929,8 +1060,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1875, - serialized_end=2772, + serialized_start=2159, + serialized_end=3162, ) _STREAMWRITEMESSAGE = _descriptor.Descriptor( @@ -953,8 +1084,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=461, - serialized_end=2772, + serialized_start=572, + serialized_end=3162, ) @@ -999,8 +1130,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2796, - serialized_end=2880, + serialized_start=3186, + serialized_end=3270, ) _STREAMREADMESSAGE_FROMCLIENT = _descriptor.Descriptor( @@ -1047,14 +1178,21 @@ is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='start_partition_session_response', full_name='Ydb.Topic.StreamReadMessage.FromClient.start_partition_session_response', index=5, + name='direct_read_ack', full_name='Ydb.Topic.StreamReadMessage.FromClient.direct_read_ack', index=5, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='start_partition_session_response', full_name='Ydb.Topic.StreamReadMessage.FromClient.start_partition_session_response', index=6, number=6, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='stop_partition_session_response', full_name='Ydb.Topic.StreamReadMessage.FromClient.stop_partition_session_response', index=6, + name='stop_partition_session_response', full_name='Ydb.Topic.StreamReadMessage.FromClient.stop_partition_session_response', index=7, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -1077,8 +1215,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=2883, - serialized_end=3501, + serialized_start=3273, + serialized_end=3962, ) _STREAMREADMESSAGE_FROMSERVER = _descriptor.Descriptor( @@ -1152,6 +1290,20 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='update_partition_session', full_name='Ydb.Topic.StreamReadMessage.FromServer.update_partition_session', index=9, + number=10, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='end_partition_session', full_name='Ydb.Topic.StreamReadMessage.FromServer.end_partition_session', index=10, + number=11, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1169,8 +1321,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=3504, - serialized_end=4212, + serialized_start=3965, + serialized_end=4845, ) _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS = _descriptor.Descriptor( @@ -1221,8 +1373,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4360, - serialized_end=4507, + serialized_start=5049, + serialized_end=5196, ) _STREAMREADMESSAGE_INITREQUEST = _descriptor.Descriptor( @@ -1254,6 +1406,20 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='direct_read', full_name='Ydb.Topic.StreamReadMessage.InitRequest.direct_read', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auto_partitioning_support', full_name='Ydb.Topic.StreamReadMessage.InitRequest.auto_partitioning_support', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1266,8 +1432,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4215, - serialized_end=4507, + serialized_start=4848, + serialized_end=5196, ) _STREAMREADMESSAGE_INITRESPONSE = _descriptor.Descriptor( @@ -1297,8 +1463,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4509, - serialized_end=4543, + serialized_start=5198, + serialized_end=5232, ) _STREAMREADMESSAGE_READREQUEST = _descriptor.Descriptor( @@ -1328,8 +1494,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4545, - serialized_end=4578, + serialized_start=5234, + serialized_end=5267, ) _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA = _descriptor.Descriptor( @@ -1381,7 +1547,7 @@ has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=b'\242\346*\003\030\200\020', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='metadata_items', full_name='Ydb.Topic.StreamReadMessage.ReadResponse.MessageData.metadata_items', index=6, number=8, type=11, cpp_type=10, label=3, @@ -1401,8 +1567,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4699, - serialized_end=4908, + serialized_start=5388, + serialized_end=5606, ) _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY = _descriptor.Descriptor( @@ -1439,8 +1605,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1258, - serialized_end=1313, + serialized_start=1460, + serialized_end=1515, ) _STREAMREADMESSAGE_READRESPONSE_BATCH = _descriptor.Descriptor( @@ -1464,7 +1630,7 @@ has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=b'\242\346*\003\030\200\020', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='write_session_meta', full_name='Ydb.Topic.StreamReadMessage.ReadResponse.Batch.write_session_meta', index=2, number=3, type=11, cpp_type=10, label=3, @@ -1498,8 +1664,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4911, - serialized_end=5235, + serialized_start=5609, + serialized_end=5942, ) _STREAMREADMESSAGE_READRESPONSE_PARTITIONDATA = _descriptor.Descriptor( @@ -1536,8 +1702,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5237, - serialized_end=5348, + serialized_start=5944, + serialized_end=6055, ) _STREAMREADMESSAGE_READRESPONSE = _descriptor.Descriptor( @@ -1574,8 +1740,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4581, - serialized_end=5348, + serialized_start=5270, + serialized_end=6055, ) _STREAMREADMESSAGE_COMMITOFFSETREQUEST_PARTITIONCOMMITOFFSET = _descriptor.Descriptor( @@ -1612,8 +1778,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5470, - serialized_end=5565, + serialized_start=6177, + serialized_end=6272, ) _STREAMREADMESSAGE_COMMITOFFSETREQUEST = _descriptor.Descriptor( @@ -1643,8 +1809,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5351, - serialized_end=5565, + serialized_start=6058, + serialized_end=6272, ) _STREAMREADMESSAGE_COMMITOFFSETRESPONSE_PARTITIONCOMMITTEDOFFSET = _descriptor.Descriptor( @@ -1681,8 +1847,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5706, - serialized_end=5788, + serialized_start=6413, + serialized_end=6495, ) _STREAMREADMESSAGE_COMMITOFFSETRESPONSE = _descriptor.Descriptor( @@ -1712,8 +1878,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5568, - serialized_end=5788, + serialized_start=6275, + serialized_end=6495, ) _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST = _descriptor.Descriptor( @@ -1743,8 +1909,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5790, - serialized_end=5851, + serialized_start=6497, + serialized_end=6558, ) _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE = _descriptor.Descriptor( @@ -1795,8 +1961,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5854, - serialized_end=6057, + serialized_start=6561, + serialized_end=6764, ) _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST = _descriptor.Descriptor( @@ -1828,6 +1994,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_location', full_name='Ydb.Topic.StreamReadMessage.StartPartitionSessionRequest.partition_location', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1840,8 +2013,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6060, - serialized_end=6242, + serialized_start=6767, + serialized_end=7007, ) _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE = _descriptor.Descriptor( @@ -1895,8 +2068,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=6245, - serialized_end=6394, + serialized_start=7010, + serialized_end=7159, ) _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST = _descriptor.Descriptor( @@ -1928,6 +2101,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='last_direct_read_id', full_name='Ydb.Topic.StreamReadMessage.StopPartitionSessionRequest.last_direct_read_id', index=3, + number=4, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1940,8 +2120,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6396, - serialized_end=6499, + serialized_start=7162, + serialized_end=7294, ) _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE = _descriptor.Descriptor( @@ -1959,6 +2139,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='graceful', full_name='Ydb.Topic.StreamReadMessage.StopPartitionSessionResponse.graceful', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1971,22 +2158,36 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6501, - serialized_end=6561, + serialized_start=7296, + serialized_end=7374, ) -_STREAMREADMESSAGE = _descriptor.Descriptor( - name='StreamReadMessage', - full_name='Ydb.Topic.StreamReadMessage', +_STREAMREADMESSAGE_UPDATEPARTITIONSESSION = _descriptor.Descriptor( + name='UpdatePartitionSession', + full_name='Ydb.Topic.StreamReadMessage.UpdatePartitionSession', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ + _descriptor.FieldDescriptor( + name='partition_session_id', full_name='Ydb.Topic.StreamReadMessage.UpdatePartitionSession.partition_session_id', index=0, + number=1, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_location', full_name='Ydb.Topic.StreamReadMessage.UpdatePartitionSession.partition_location', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], - nested_types=[_STREAMREADMESSAGE_PARTITIONSESSION, _STREAMREADMESSAGE_FROMCLIENT, _STREAMREADMESSAGE_FROMSERVER, _STREAMREADMESSAGE_INITREQUEST, _STREAMREADMESSAGE_INITRESPONSE, _STREAMREADMESSAGE_READREQUEST, _STREAMREADMESSAGE_READRESPONSE, _STREAMREADMESSAGE_COMMITOFFSETREQUEST, _STREAMREADMESSAGE_COMMITOFFSETRESPONSE, _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST, _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE, _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST, _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE, _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST, _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE, ], + nested_types=[], enum_types=[ ], serialized_options=None, @@ -1995,30 +2196,29 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2775, - serialized_end=6561, + serialized_start=7376, + serialized_end=7488, ) - -_TRANSACTIONIDENTITY = _descriptor.Descriptor( - name='TransactionIdentity', - full_name='Ydb.Topic.TransactionIdentity', +_STREAMREADMESSAGE_DIRECTREADACK = _descriptor.Descriptor( + name='DirectReadAck', + full_name='Ydb.Topic.StreamReadMessage.DirectReadAck', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='id', full_name='Ydb.Topic.TransactionIdentity.id', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), + name='partition_session_id', full_name='Ydb.Topic.StreamReadMessage.DirectReadAck.partition_session_id', index=0, + number=1, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='session', full_name='Ydb.Topic.TransactionIdentity.session', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), + name='direct_read_id', full_name='Ydb.Topic.StreamReadMessage.DirectReadAck.direct_read_id', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), @@ -2034,29 +2234,35 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6563, - serialized_end=6613, + serialized_start=7490, + serialized_end=7559, ) - -_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS = _descriptor.Descriptor( - name='PartitionOffsets', - full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets', +_STREAMREADMESSAGE_ENDPARTITIONSESSION = _descriptor.Descriptor( + name='EndPartitionSession', + full_name='Ydb.Topic.StreamReadMessage.EndPartitionSession', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='partition_id', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets.partition_id', index=0, + name='partition_session_id', full_name='Ydb.Topic.StreamReadMessage.EndPartitionSession.partition_session_id', index=0, number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='partition_offsets', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets.partition_offsets', index=1, - number=2, type=11, cpp_type=10, label=3, + name='adjacent_partition_ids', full_name='Ydb.Topic.StreamReadMessage.EndPartitionSession.adjacent_partition_ids', index=1, + number=2, type=3, cpp_type=2, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='child_partition_ids', full_name='Ydb.Topic.StreamReadMessage.EndPartitionSession.child_partition_ids', index=2, + number=3, type=3, cpp_type=2, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -2073,36 +2279,22 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6976, - serialized_end=7068, + serialized_start=7561, + serialized_end=7673, ) -_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS = _descriptor.Descriptor( - name='TopicOffsets', - full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets', +_STREAMREADMESSAGE = _descriptor.Descriptor( + name='StreamReadMessage', + full_name='Ydb.Topic.StreamReadMessage', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ - _descriptor.FieldDescriptor( - name='path', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.path', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='partitions', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.partitions', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], - nested_types=[_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS, ], + nested_types=[_STREAMREADMESSAGE_PARTITIONSESSION, _STREAMREADMESSAGE_FROMCLIENT, _STREAMREADMESSAGE_FROMSERVER, _STREAMREADMESSAGE_INITREQUEST, _STREAMREADMESSAGE_INITRESPONSE, _STREAMREADMESSAGE_READREQUEST, _STREAMREADMESSAGE_READRESPONSE, _STREAMREADMESSAGE_COMMITOFFSETREQUEST, _STREAMREADMESSAGE_COMMITOFFSETRESPONSE, _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST, _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE, _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST, _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE, _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST, _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE, _STREAMREADMESSAGE_UPDATEPARTITIONSESSION, _STREAMREADMESSAGE_DIRECTREADACK, _STREAMREADMESSAGE_ENDPARTITIONSESSION, ], enum_types=[ ], serialized_options=None, @@ -2111,50 +2303,44 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6850, - serialized_end=7068, + serialized_start=3165, + serialized_end=7673, ) -_UPDATEOFFSETSINTRANSACTIONREQUEST = _descriptor.Descriptor( - name='UpdateOffsetsInTransactionRequest', - full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest', + +_STREAMDIRECTREADMESSAGE_FROMCLIENT = _descriptor.Descriptor( + name='FromClient', + full_name='Ydb.Topic.StreamDirectReadMessage.FromClient', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='operation_params', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.operation_params', index=0, + name='init_request', full_name='Ydb.Topic.StreamDirectReadMessage.FromClient.init_request', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='tx', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.tx', index=1, + name='start_direct_read_partition_session_request', full_name='Ydb.Topic.StreamDirectReadMessage.FromClient.start_direct_read_partition_session_request', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='topics', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.topics', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='consumer', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.consumer', index=3, - number=4, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), + name='update_token_request', full_name='Ydb.Topic.StreamDirectReadMessage.FromClient.update_token_request', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], - nested_types=[_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS, ], + nested_types=[], enum_types=[ ], serialized_options=None, @@ -2162,41 +2348,596 @@ syntax='proto3', extension_ranges=[], oneofs=[ + _descriptor.OneofDescriptor( + name='client_message', full_name='Ydb.Topic.StreamDirectReadMessage.FromClient.client_message', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=6616, - serialized_end=7068, + serialized_start=7704, + serialized_end=8000, ) - -_UPDATEOFFSETSINTRANSACTIONRESPONSE = _descriptor.Descriptor( - name='UpdateOffsetsInTransactionResponse', - full_name='Ydb.Topic.UpdateOffsetsInTransactionResponse', +_STREAMDIRECTREADMESSAGE_FROMSERVER = _descriptor.Descriptor( + name='FromServer', + full_name='Ydb.Topic.StreamDirectReadMessage.FromServer', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='operation', full_name='Ydb.Topic.UpdateOffsetsInTransactionResponse.operation', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, + name='status', full_name='Ydb.Topic.StreamDirectReadMessage.FromServer.status', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, + _descriptor.FieldDescriptor( + name='issues', full_name='Ydb.Topic.StreamDirectReadMessage.FromServer.issues', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='init_response', full_name='Ydb.Topic.StreamDirectReadMessage.FromServer.init_response', index=2, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='start_direct_read_partition_session_response', full_name='Ydb.Topic.StreamDirectReadMessage.FromServer.start_direct_read_partition_session_response', index=3, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='stop_direct_read_partition_session', full_name='Ydb.Topic.StreamDirectReadMessage.FromServer.stop_direct_read_partition_session', index=4, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='direct_read_response', full_name='Ydb.Topic.StreamDirectReadMessage.FromServer.direct_read_response', index=5, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='update_token_response', full_name='Ydb.Topic.StreamDirectReadMessage.FromServer.update_token_response', index=6, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='server_message', full_name='Ydb.Topic.StreamDirectReadMessage.FromServer.server_message', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=8003, + serialized_end=8589, +) + +_STREAMDIRECTREADMESSAGE_INITREQUEST_TOPICREADSETTINGS = _descriptor.Descriptor( + name='TopicReadSettings', + full_name='Ydb.Topic.StreamDirectReadMessage.InitRequest.TopicReadSettings', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.Topic.StreamDirectReadMessage.InitRequest.TopicReadSettings.path', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5049, + serialized_end=5082, +) + +_STREAMDIRECTREADMESSAGE_INITREQUEST = _descriptor.Descriptor( + name='InitRequest', + full_name='Ydb.Topic.StreamDirectReadMessage.InitRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='session_id', full_name='Ydb.Topic.StreamDirectReadMessage.InitRequest.session_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='topics_read_settings', full_name='Ydb.Topic.StreamDirectReadMessage.InitRequest.topics_read_settings', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='consumer', full_name='Ydb.Topic.StreamDirectReadMessage.InitRequest.consumer', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_STREAMDIRECTREADMESSAGE_INITREQUEST_TOPICREADSETTINGS, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=8592, + serialized_end=8774, +) + +_STREAMDIRECTREADMESSAGE_INITRESPONSE = _descriptor.Descriptor( + name='InitResponse', + full_name='Ydb.Topic.StreamDirectReadMessage.InitResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1534, + serialized_end=1548, +) + +_STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONREQUEST = _descriptor.Descriptor( + name='StartDirectReadPartitionSessionRequest', + full_name='Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='partition_session_id', full_name='Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionRequest.partition_session_id', index=0, + number=1, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='last_direct_read_id', full_name='Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionRequest.last_direct_read_id', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='generation', full_name='Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionRequest.generation', index=2, + number=3, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=8792, + serialized_end=8911, +) + +_STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONRESPONSE = _descriptor.Descriptor( + name='StartDirectReadPartitionSessionResponse', + full_name='Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='partition_session_id', full_name='Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionResponse.partition_session_id', index=0, + number=1, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='generation', full_name='Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionResponse.generation', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=8913, + serialized_end=9004, +) + +_STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION = _descriptor.Descriptor( + name='StopDirectReadPartitionSession', + full_name='Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSession', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='status', full_name='Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSession.status', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='issues', full_name='Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSession.issues', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_session_id', full_name='Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSession.partition_session_id', index=2, + number=3, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='generation', full_name='Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSession.generation', index=3, + number=4, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=9007, + serialized_end=9173, +) + +_STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE = _descriptor.Descriptor( + name='DirectReadResponse', + full_name='Ydb.Topic.StreamDirectReadMessage.DirectReadResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='partition_session_id', full_name='Ydb.Topic.StreamDirectReadMessage.DirectReadResponse.partition_session_id', index=0, + number=1, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='direct_read_id', full_name='Ydb.Topic.StreamDirectReadMessage.DirectReadResponse.direct_read_id', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_data', full_name='Ydb.Topic.StreamDirectReadMessage.DirectReadResponse.partition_data', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=9176, + serialized_end=9331, +) + +_STREAMDIRECTREADMESSAGE = _descriptor.Descriptor( + name='StreamDirectReadMessage', + full_name='Ydb.Topic.StreamDirectReadMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[_STREAMDIRECTREADMESSAGE_FROMCLIENT, _STREAMDIRECTREADMESSAGE_FROMSERVER, _STREAMDIRECTREADMESSAGE_INITREQUEST, _STREAMDIRECTREADMESSAGE_INITRESPONSE, _STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONREQUEST, _STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONRESPONSE, _STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION, _STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=7676, + serialized_end=9331, +) + + +_TRANSACTIONIDENTITY = _descriptor.Descriptor( + name='TransactionIdentity', + full_name='Ydb.Topic.TransactionIdentity', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='Ydb.Topic.TransactionIdentity.id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='session', full_name='Ydb.Topic.TransactionIdentity.session', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=9333, + serialized_end=9383, +) + + +_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS = _descriptor.Descriptor( + name='PartitionOffsets', + full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='partition_id', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets.partition_id', index=0, + number=1, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_offsets', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets.partition_offsets', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=9746, + serialized_end=9838, +) + +_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS = _descriptor.Descriptor( + name='TopicOffsets', + full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.path', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partitions', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.partitions', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=9620, + serialized_end=9838, +) + +_UPDATEOFFSETSINTRANSACTIONREQUEST = _descriptor.Descriptor( + name='UpdateOffsetsInTransactionRequest', + full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='tx', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.tx', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='topics', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.topics', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='consumer', full_name='Ydb.Topic.UpdateOffsetsInTransactionRequest.consumer', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=9386, + serialized_end=9838, +) + + +_UPDATEOFFSETSINTRANSACTIONRESPONSE = _descriptor.Descriptor( + name='UpdateOffsetsInTransactionResponse', + full_name='Ydb.Topic.UpdateOffsetsInTransactionResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.Topic.UpdateOffsetsInTransactionResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=7070, - serialized_end=7152, + serialized_start=9840, + serialized_end=9922, ) @@ -2220,8 +2961,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7154, - serialized_end=7188, + serialized_start=9924, + serialized_end=9958, ) @@ -2280,8 +3021,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7191, - serialized_end=7341, + serialized_start=9961, + serialized_end=10111, ) @@ -2312,8 +3053,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7343, - serialized_end=7411, + serialized_start=10113, + serialized_end=10181, ) @@ -2337,8 +3078,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7413, - serialized_end=7433, + serialized_start=10183, + serialized_end=10203, ) @@ -2383,8 +3124,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7435, - serialized_end=7511, + serialized_start=10205, + serialized_end=10281, ) @@ -2422,8 +3163,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7776, - serialized_end=7825, + serialized_start=10546, + serialized_end=10595, ) _CONSUMER_CONSUMERSTATS = _descriptor.Descriptor( @@ -2474,8 +3215,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7828, - serialized_end=8071, + serialized_start=10598, + serialized_end=10841, ) _CONSUMER = _descriptor.Descriptor( @@ -2540,8 +3281,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7514, - serialized_end=8077, + serialized_start=10284, + serialized_end=10847, ) @@ -2579,8 +3320,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8321, - serialized_end=8375, + serialized_start=11091, + serialized_end=11145, ) _ALTERCONSUMER = _descriptor.Descriptor( @@ -2643,8 +3384,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=8080, - serialized_end=8399, + serialized_start=10850, + serialized_end=11169, ) @@ -2664,11 +3405,110 @@ is_extension=False, extension_scope=None, serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='partition_count_limit', full_name='Ydb.Topic.PartitioningSettings.partition_count_limit', index=1, + name='max_active_partitions', full_name='Ydb.Topic.PartitioningSettings.max_active_partitions', index=1, + number=3, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_count_limit', full_name='Ydb.Topic.PartitioningSettings.partition_count_limit', index=2, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, + serialized_options=b'\030\001\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auto_partitioning_settings', full_name='Ydb.Topic.PartitioningSettings.auto_partitioning_settings', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=11172, + serialized_end=11392, +) + + +_AUTOPARTITIONINGSETTINGS = _descriptor.Descriptor( + name='AutoPartitioningSettings', + full_name='Ydb.Topic.AutoPartitioningSettings', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='strategy', full_name='Ydb.Topic.AutoPartitioningSettings.strategy', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_write_speed', full_name='Ydb.Topic.AutoPartitioningSettings.partition_write_speed', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=11395, + serialized_end=11554, +) + + +_AUTOPARTITIONINGWRITESPEEDSTRATEGY = _descriptor.Descriptor( + name='AutoPartitioningWriteSpeedStrategy', + full_name='Ydb.Topic.AutoPartitioningWriteSpeedStrategy', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='stabilization_window', full_name='Ydb.Topic.AutoPartitioningWriteSpeedStrategy.stabilization_window', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='up_utilization_percent', full_name='Ydb.Topic.AutoPartitioningWriteSpeedStrategy.up_utilization_percent', index=1, + number=2, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='down_utilization_percent', full_name='Ydb.Topic.AutoPartitioningWriteSpeedStrategy.down_utilization_percent', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ @@ -2682,8 +3522,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8401, - serialized_end=8505, + serialized_start=11557, + serialized_end=11736, ) @@ -2703,12 +3543,26 @@ is_extension=False, extension_scope=None, serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='set_partition_count_limit', full_name='Ydb.Topic.AlterPartitioningSettings.set_partition_count_limit', index=1, - number=2, type=3, cpp_type=2, label=1, + name='set_max_active_partitions', full_name='Ydb.Topic.AlterPartitioningSettings.set_max_active_partitions', index=1, + number=3, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='set_partition_count_limit', full_name='Ydb.Topic.AlterPartitioningSettings.set_partition_count_limit', index=2, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\030\001\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='alter_auto_partitioning_settings', full_name='Ydb.Topic.AlterPartitioningSettings.alter_auto_partitioning_settings', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -2725,14 +3579,134 @@ index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), + _descriptor.OneofDescriptor( + name='_set_max_active_partitions', full_name='Ydb.Topic.AlterPartitioningSettings._set_max_active_partitions', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), _descriptor.OneofDescriptor( name='_set_partition_count_limit', full_name='Ydb.Topic.AlterPartitioningSettings._set_partition_count_limit', + index=2, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_alter_auto_partitioning_settings', full_name='Ydb.Topic.AlterPartitioningSettings._alter_auto_partitioning_settings', + index=3, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=11739, + serialized_end=12134, +) + + +_ALTERAUTOPARTITIONINGSETTINGS = _descriptor.Descriptor( + name='AlterAutoPartitioningSettings', + full_name='Ydb.Topic.AlterAutoPartitioningSettings', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='set_strategy', full_name='Ydb.Topic.AlterAutoPartitioningSettings.set_strategy', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='set_partition_write_speed', full_name='Ydb.Topic.AlterAutoPartitioningSettings.set_partition_write_speed', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_set_strategy', full_name='Ydb.Topic.AlterAutoPartitioningSettings._set_strategy', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_set_partition_write_speed', full_name='Ydb.Topic.AlterAutoPartitioningSettings._set_partition_write_speed', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=12137, + serialized_end=12371, +) + + +_ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY = _descriptor.Descriptor( + name='AlterAutoPartitioningWriteSpeedStrategy', + full_name='Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategy', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='set_stabilization_window', full_name='Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategy.set_stabilization_window', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='set_up_utilization_percent', full_name='Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategy.set_up_utilization_percent', index=1, + number=2, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='set_down_utilization_percent', full_name='Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategy.set_down_utilization_percent', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_set_stabilization_window', full_name='Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategy._set_stabilization_window', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_set_up_utilization_percent', full_name='Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategy._set_up_utilization_percent', index=1, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), + _descriptor.OneofDescriptor( + name='_set_down_utilization_percent', full_name='Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategy._set_down_utilization_percent', + index=2, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=8508, - serialized_end=8695, + serialized_start=12374, + serialized_end=12678, ) @@ -2770,8 +3744,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7776, - serialized_end=7825, + serialized_start=10546, + serialized_end=10595, ) _CREATETOPICREQUEST = _descriptor.Descriptor( @@ -2871,8 +3845,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8698, - serialized_end=9328, + serialized_start=12681, + serialized_end=13311, ) @@ -2903,8 +3877,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9330, - serialized_end=9397, + serialized_start=13313, + serialized_end=13380, ) @@ -2928,8 +3902,47 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9399, - serialized_end=9418, + serialized_start=13382, + serialized_end=13401, +) + + +_PARTITIONLOCATION = _descriptor.Descriptor( + name='PartitionLocation', + full_name='Ydb.Topic.PartitionLocation', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='node_id', full_name='Ydb.Topic.PartitionLocation.node_id', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='generation', full_name='Ydb.Topic.PartitionLocation.generation', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=13403, + serialized_end=13459, ) @@ -2962,6 +3975,45 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='include_location', full_name='Ydb.Topic.DescribeTopicRequest.include_location', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=13462, + serialized_end=13606, +) + + +_DESCRIBETOPICRESPONSE = _descriptor.Descriptor( + name='DescribeTopicResponse', + full_name='Ydb.Topic.DescribeTopicResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.Topic.DescribeTopicResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -2974,23 +4026,30 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9420, - serialized_end=9538, + serialized_start=13608, + serialized_end=13677, ) -_DESCRIBETOPICRESPONSE = _descriptor.Descriptor( - name='DescribeTopicResponse', - full_name='Ydb.Topic.DescribeTopicResponse', +_PARTITIONKEYRANGE = _descriptor.Descriptor( + name='PartitionKeyRange', + full_name='Ydb.Topic.PartitionKeyRange', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='operation', full_name='Ydb.Topic.DescribeTopicResponse.operation', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, + name='from_bound', full_name='Ydb.Topic.PartitionKeyRange.from_bound', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='to_bound', full_name='Ydb.Topic.PartitionKeyRange.to_bound', index=1, + number=2, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), @@ -3005,9 +4064,19 @@ syntax='proto3', extension_ranges=[], oneofs=[ + _descriptor.OneofDescriptor( + name='_from_bound', full_name='Ydb.Topic.PartitionKeyRange._from_bound', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_to_bound', full_name='Ydb.Topic.PartitionKeyRange._to_bound', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=9540, - serialized_end=9609, + serialized_start=13679, + serialized_end=13774, ) @@ -3045,8 +4114,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7776, - serialized_end=7825, + serialized_start=10546, + serialized_end=10595, ) _DESCRIBETOPICRESULT_PARTITIONINFO = _descriptor.Descriptor( @@ -3092,6 +4161,20 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_location', full_name='Ydb.Topic.DescribeTopicResult.PartitionInfo.partition_location', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='key_range', full_name='Ydb.Topic.DescribeTopicResult.PartitionInfo.key_range', index=6, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -3104,8 +4187,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10292, - serialized_end=10456, + serialized_start=14566, + serialized_end=14837, ) _DESCRIBETOPICRESULT_TOPICSTATS = _descriptor.Descriptor( @@ -3156,8 +4239,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10459, - serialized_end=10664, + serialized_start=14840, + serialized_end=15045, ) _DESCRIBETOPICRESULT = _descriptor.Descriptor( @@ -3218,35 +4301,49 @@ is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='partition_write_burst_bytes', full_name='Ydb.Topic.DescribeTopicResult.partition_write_burst_bytes', index=7, + name='partition_total_read_speed_bytes_per_second', full_name='Ydb.Topic.DescribeTopicResult.partition_total_read_speed_bytes_per_second', index=7, + number=14, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_consumer_read_speed_bytes_per_second', full_name='Ydb.Topic.DescribeTopicResult.partition_consumer_read_speed_bytes_per_second', index=8, + number=15, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_write_burst_bytes', full_name='Ydb.Topic.DescribeTopicResult.partition_write_burst_bytes', index=9, number=9, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='attributes', full_name='Ydb.Topic.DescribeTopicResult.attributes', index=8, + name='attributes', full_name='Ydb.Topic.DescribeTopicResult.attributes', index=10, number=10, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='consumers', full_name='Ydb.Topic.DescribeTopicResult.consumers', index=9, + name='consumers', full_name='Ydb.Topic.DescribeTopicResult.consumers', index=11, number=11, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='metering_mode', full_name='Ydb.Topic.DescribeTopicResult.metering_mode', index=10, + name='metering_mode', full_name='Ydb.Topic.DescribeTopicResult.metering_mode', index=12, number=12, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='topic_stats', full_name='Ydb.Topic.DescribeTopicResult.topic_stats', index=11, + name='topic_stats', full_name='Ydb.Topic.DescribeTopicResult.topic_stats', index=13, number=13, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -3264,8 +4361,132 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9612, - serialized_end=10670, + serialized_start=13777, + serialized_end=15051, +) + + +_DESCRIBEPARTITIONREQUEST = _descriptor.Descriptor( + name='DescribePartitionRequest', + full_name='Ydb.Topic.DescribePartitionRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='Ydb.Topic.DescribePartitionRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.Topic.DescribePartitionRequest.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_id', full_name='Ydb.Topic.DescribePartitionRequest.partition_id', index=2, + number=3, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='include_stats', full_name='Ydb.Topic.DescribePartitionRequest.include_stats', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='include_location', full_name='Ydb.Topic.DescribePartitionRequest.include_location', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=15054, + serialized_end=15224, +) + + +_DESCRIBEPARTITIONRESPONSE = _descriptor.Descriptor( + name='DescribePartitionResponse', + full_name='Ydb.Topic.DescribePartitionResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.Topic.DescribePartitionResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=15226, + serialized_end=15299, +) + + +_DESCRIBEPARTITIONRESULT = _descriptor.Descriptor( + name='DescribePartitionResult', + full_name='Ydb.Topic.DescribePartitionResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='partition', full_name='Ydb.Topic.DescribePartitionResult.partition', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=15301, + serialized_end=15391, ) @@ -3305,6 +4526,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='include_location', full_name='Ydb.Topic.DescribeConsumerRequest.include_location', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -3317,8 +4545,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10673, - serialized_end=10812, + serialized_start=15394, + serialized_end=15559, ) @@ -3349,8 +4577,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10814, - serialized_end=10886, + serialized_start=15561, + serialized_end=15633, ) @@ -3404,6 +4632,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partition_location', full_name='Ydb.Topic.DescribeConsumerResult.PartitionInfo.partition_location', index=6, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -3416,8 +4651,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11057, - serialized_end=11313, + serialized_start=15804, + serialized_end=16118, ) _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS = _descriptor.Descriptor( @@ -3510,8 +4745,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11316, - serialized_end=11751, + serialized_start=16121, + serialized_end=16556, ) _DESCRIBECONSUMERRESULT = _descriptor.Descriptor( @@ -3555,8 +4790,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10889, - serialized_end=11751, + serialized_start=15636, + serialized_end=16556, ) @@ -3609,7 +4844,7 @@ has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -3622,8 +4857,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11754, - serialized_end=12038, + serialized_start=16559, + serialized_end=16847, ) @@ -3661,8 +4896,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8321, - serialized_end=8375, + serialized_start=11091, + serialized_end=11145, ) _ALTERTOPICREQUEST = _descriptor.Descriptor( @@ -3791,8 +5026,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12041, - serialized_end=12944, + serialized_start=16850, + serialized_end=17753, ) @@ -3823,8 +5058,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12946, - serialized_end=13012, + serialized_start=17755, + serialized_end=17821, ) @@ -3848,8 +5083,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13014, - serialized_end=13032, + serialized_start=17823, + serialized_end=17841, ) @@ -3887,8 +5122,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13034, - serialized_end=13125, + serialized_start=17843, + serialized_end=17934, ) @@ -3919,8 +5154,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13127, - serialized_end=13192, + serialized_start=17936, + serialized_end=18001, ) @@ -3944,8 +5179,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13194, - serialized_end=13211, + serialized_start=18003, + serialized_end=18020, ) _STREAMWRITEMESSAGE_FROMCLIENT.fields_by_name['init_request'].message_type = _STREAMWRITEMESSAGE_INITREQUEST @@ -3978,6 +5213,7 @@ _STREAMWRITEMESSAGE_FROMSERVER.fields_by_name['update_token_response'].containing_oneof = _STREAMWRITEMESSAGE_FROMSERVER.oneofs_by_name['server_message'] _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY.containing_type = _STREAMWRITEMESSAGE_INITREQUEST _STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['write_session_meta'].message_type = _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY +_STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['partition_with_generation'].message_type = _PARTITIONWITHGENERATION _STREAMWRITEMESSAGE_INITREQUEST.containing_type = _STREAMWRITEMESSAGE _STREAMWRITEMESSAGE_INITREQUEST.oneofs_by_name['partitioning'].fields.append( _STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['message_group_id']) @@ -3985,9 +5221,13 @@ _STREAMWRITEMESSAGE_INITREQUEST.oneofs_by_name['partitioning'].fields.append( _STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['partition_id']) _STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['partition_id'].containing_oneof = _STREAMWRITEMESSAGE_INITREQUEST.oneofs_by_name['partitioning'] +_STREAMWRITEMESSAGE_INITREQUEST.oneofs_by_name['partitioning'].fields.append( + _STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['partition_with_generation']) +_STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['partition_with_generation'].containing_oneof = _STREAMWRITEMESSAGE_INITREQUEST.oneofs_by_name['partitioning'] _STREAMWRITEMESSAGE_INITRESPONSE.fields_by_name['supported_codecs'].message_type = _SUPPORTEDCODECS _STREAMWRITEMESSAGE_INITRESPONSE.containing_type = _STREAMWRITEMESSAGE _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['created_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['partition_with_generation'].message_type = _PARTITIONWITHGENERATION _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['metadata_items'].message_type = _METADATAITEM _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.containing_type = _STREAMWRITEMESSAGE_WRITEREQUEST _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.oneofs_by_name['partitioning'].fields.append( @@ -3996,6 +5236,9 @@ _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.oneofs_by_name['partitioning'].fields.append( _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['partition_id']) _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['partition_id'].containing_oneof = _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.oneofs_by_name['partitioning'] +_STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.oneofs_by_name['partitioning'].fields.append( + _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['partition_with_generation']) +_STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['partition_with_generation'].containing_oneof = _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.oneofs_by_name['partitioning'] _STREAMWRITEMESSAGE_WRITEREQUEST.fields_by_name['messages'].message_type = _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA _STREAMWRITEMESSAGE_WRITEREQUEST.fields_by_name['tx'].message_type = _TRANSACTIONIDENTITY _STREAMWRITEMESSAGE_WRITEREQUEST.containing_type = _STREAMWRITEMESSAGE @@ -4006,8 +5249,10 @@ _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED.fields_by_name['reason'].enum_type = _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED.containing_type = _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON.containing_type = _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED +_STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTENINTX.containing_type = _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK.fields_by_name['written'].message_type = _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK.fields_by_name['skipped'].message_type = _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED +_STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK.fields_by_name['written_in_tx'].message_type = _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTENINTX _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK.containing_type = _STREAMWRITEMESSAGE_WRITERESPONSE _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK.oneofs_by_name['message_write_status'].fields.append( _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK.fields_by_name['written']) @@ -4015,6 +5260,9 @@ _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK.oneofs_by_name['message_write_status'].fields.append( _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK.fields_by_name['skipped']) _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK.fields_by_name['skipped'].containing_oneof = _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK.oneofs_by_name['message_write_status'] +_STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK.oneofs_by_name['message_write_status'].fields.append( + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK.fields_by_name['written_in_tx']) +_STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK.fields_by_name['written_in_tx'].containing_oneof = _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK.oneofs_by_name['message_write_status'] _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS.fields_by_name['persisting_time'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS.fields_by_name['min_queue_wait_time'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS.fields_by_name['max_queue_wait_time'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION @@ -4030,6 +5278,7 @@ _STREAMREADMESSAGE_FROMCLIENT.fields_by_name['commit_offset_request'].message_type = _STREAMREADMESSAGE_COMMITOFFSETREQUEST _STREAMREADMESSAGE_FROMCLIENT.fields_by_name['partition_session_status_request'].message_type = _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST _STREAMREADMESSAGE_FROMCLIENT.fields_by_name['update_token_request'].message_type = _UPDATETOKENREQUEST +_STREAMREADMESSAGE_FROMCLIENT.fields_by_name['direct_read_ack'].message_type = _STREAMREADMESSAGE_DIRECTREADACK _STREAMREADMESSAGE_FROMCLIENT.fields_by_name['start_partition_session_response'].message_type = _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE _STREAMREADMESSAGE_FROMCLIENT.fields_by_name['stop_partition_session_response'].message_type = _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE _STREAMREADMESSAGE_FROMCLIENT.containing_type = _STREAMREADMESSAGE @@ -4048,6 +5297,9 @@ _STREAMREADMESSAGE_FROMCLIENT.oneofs_by_name['client_message'].fields.append( _STREAMREADMESSAGE_FROMCLIENT.fields_by_name['update_token_request']) _STREAMREADMESSAGE_FROMCLIENT.fields_by_name['update_token_request'].containing_oneof = _STREAMREADMESSAGE_FROMCLIENT.oneofs_by_name['client_message'] +_STREAMREADMESSAGE_FROMCLIENT.oneofs_by_name['client_message'].fields.append( + _STREAMREADMESSAGE_FROMCLIENT.fields_by_name['direct_read_ack']) +_STREAMREADMESSAGE_FROMCLIENT.fields_by_name['direct_read_ack'].containing_oneof = _STREAMREADMESSAGE_FROMCLIENT.oneofs_by_name['client_message'] _STREAMREADMESSAGE_FROMCLIENT.oneofs_by_name['client_message'].fields.append( _STREAMREADMESSAGE_FROMCLIENT.fields_by_name['start_partition_session_response']) _STREAMREADMESSAGE_FROMCLIENT.fields_by_name['start_partition_session_response'].containing_oneof = _STREAMREADMESSAGE_FROMCLIENT.oneofs_by_name['client_message'] @@ -4063,6 +5315,8 @@ _STREAMREADMESSAGE_FROMSERVER.fields_by_name['update_token_response'].message_type = _UPDATETOKENRESPONSE _STREAMREADMESSAGE_FROMSERVER.fields_by_name['start_partition_session_request'].message_type = _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST _STREAMREADMESSAGE_FROMSERVER.fields_by_name['stop_partition_session_request'].message_type = _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST +_STREAMREADMESSAGE_FROMSERVER.fields_by_name['update_partition_session'].message_type = _STREAMREADMESSAGE_UPDATEPARTITIONSESSION +_STREAMREADMESSAGE_FROMSERVER.fields_by_name['end_partition_session'].message_type = _STREAMREADMESSAGE_ENDPARTITIONSESSION _STREAMREADMESSAGE_FROMSERVER.containing_type = _STREAMREADMESSAGE _STREAMREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'].fields.append( _STREAMREADMESSAGE_FROMSERVER.fields_by_name['init_response']) @@ -4085,6 +5339,12 @@ _STREAMREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'].fields.append( _STREAMREADMESSAGE_FROMSERVER.fields_by_name['stop_partition_session_request']) _STREAMREADMESSAGE_FROMSERVER.fields_by_name['stop_partition_session_request'].containing_oneof = _STREAMREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'] +_STREAMREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'].fields.append( + _STREAMREADMESSAGE_FROMSERVER.fields_by_name['update_partition_session']) +_STREAMREADMESSAGE_FROMSERVER.fields_by_name['update_partition_session'].containing_oneof = _STREAMREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'] +_STREAMREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'].fields.append( + _STREAMREADMESSAGE_FROMSERVER.fields_by_name['end_partition_session']) +_STREAMREADMESSAGE_FROMSERVER.fields_by_name['end_partition_session'].containing_oneof = _STREAMREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'] _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS.fields_by_name['max_lag'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS.fields_by_name['read_from'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS.containing_type = _STREAMREADMESSAGE_INITREQUEST @@ -4117,6 +5377,7 @@ _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE.containing_type = _STREAMREADMESSAGE _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST.fields_by_name['partition_session'].message_type = _STREAMREADMESSAGE_PARTITIONSESSION _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST.fields_by_name['partition_offsets'].message_type = _OFFSETSRANGE +_STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST.fields_by_name['partition_location'].message_type = _PARTITIONLOCATION _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST.containing_type = _STREAMREADMESSAGE _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE.containing_type = _STREAMREADMESSAGE _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE.oneofs_by_name['_read_offset'].fields.append( @@ -4127,6 +5388,57 @@ _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE.fields_by_name['commit_offset'].containing_oneof = _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE.oneofs_by_name['_commit_offset'] _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST.containing_type = _STREAMREADMESSAGE _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE.containing_type = _STREAMREADMESSAGE +_STREAMREADMESSAGE_UPDATEPARTITIONSESSION.fields_by_name['partition_location'].message_type = _PARTITIONLOCATION +_STREAMREADMESSAGE_UPDATEPARTITIONSESSION.containing_type = _STREAMREADMESSAGE +_STREAMREADMESSAGE_DIRECTREADACK.containing_type = _STREAMREADMESSAGE +_STREAMREADMESSAGE_ENDPARTITIONSESSION.containing_type = _STREAMREADMESSAGE +_STREAMDIRECTREADMESSAGE_FROMCLIENT.fields_by_name['init_request'].message_type = _STREAMDIRECTREADMESSAGE_INITREQUEST +_STREAMDIRECTREADMESSAGE_FROMCLIENT.fields_by_name['start_direct_read_partition_session_request'].message_type = _STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONREQUEST +_STREAMDIRECTREADMESSAGE_FROMCLIENT.fields_by_name['update_token_request'].message_type = _UPDATETOKENREQUEST +_STREAMDIRECTREADMESSAGE_FROMCLIENT.containing_type = _STREAMDIRECTREADMESSAGE +_STREAMDIRECTREADMESSAGE_FROMCLIENT.oneofs_by_name['client_message'].fields.append( + _STREAMDIRECTREADMESSAGE_FROMCLIENT.fields_by_name['init_request']) +_STREAMDIRECTREADMESSAGE_FROMCLIENT.fields_by_name['init_request'].containing_oneof = _STREAMDIRECTREADMESSAGE_FROMCLIENT.oneofs_by_name['client_message'] +_STREAMDIRECTREADMESSAGE_FROMCLIENT.oneofs_by_name['client_message'].fields.append( + _STREAMDIRECTREADMESSAGE_FROMCLIENT.fields_by_name['start_direct_read_partition_session_request']) +_STREAMDIRECTREADMESSAGE_FROMCLIENT.fields_by_name['start_direct_read_partition_session_request'].containing_oneof = _STREAMDIRECTREADMESSAGE_FROMCLIENT.oneofs_by_name['client_message'] +_STREAMDIRECTREADMESSAGE_FROMCLIENT.oneofs_by_name['client_message'].fields.append( + _STREAMDIRECTREADMESSAGE_FROMCLIENT.fields_by_name['update_token_request']) +_STREAMDIRECTREADMESSAGE_FROMCLIENT.fields_by_name['update_token_request'].containing_oneof = _STREAMDIRECTREADMESSAGE_FROMCLIENT.oneofs_by_name['client_message'] +_STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['status'].enum_type = protos_dot_ydb__status__codes__pb2._STATUSIDS_STATUSCODE +_STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['issues'].message_type = protos_dot_ydb__issue__message__pb2._ISSUEMESSAGE +_STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['init_response'].message_type = _STREAMDIRECTREADMESSAGE_INITRESPONSE +_STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['start_direct_read_partition_session_response'].message_type = _STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONRESPONSE +_STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['stop_direct_read_partition_session'].message_type = _STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION +_STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['direct_read_response'].message_type = _STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE +_STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['update_token_response'].message_type = _UPDATETOKENRESPONSE +_STREAMDIRECTREADMESSAGE_FROMSERVER.containing_type = _STREAMDIRECTREADMESSAGE +_STREAMDIRECTREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'].fields.append( + _STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['init_response']) +_STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['init_response'].containing_oneof = _STREAMDIRECTREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'] +_STREAMDIRECTREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'].fields.append( + _STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['start_direct_read_partition_session_response']) +_STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['start_direct_read_partition_session_response'].containing_oneof = _STREAMDIRECTREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'] +_STREAMDIRECTREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'].fields.append( + _STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['stop_direct_read_partition_session']) +_STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['stop_direct_read_partition_session'].containing_oneof = _STREAMDIRECTREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'] +_STREAMDIRECTREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'].fields.append( + _STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['direct_read_response']) +_STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['direct_read_response'].containing_oneof = _STREAMDIRECTREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'] +_STREAMDIRECTREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'].fields.append( + _STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['update_token_response']) +_STREAMDIRECTREADMESSAGE_FROMSERVER.fields_by_name['update_token_response'].containing_oneof = _STREAMDIRECTREADMESSAGE_FROMSERVER.oneofs_by_name['server_message'] +_STREAMDIRECTREADMESSAGE_INITREQUEST_TOPICREADSETTINGS.containing_type = _STREAMDIRECTREADMESSAGE_INITREQUEST +_STREAMDIRECTREADMESSAGE_INITREQUEST.fields_by_name['topics_read_settings'].message_type = _STREAMDIRECTREADMESSAGE_INITREQUEST_TOPICREADSETTINGS +_STREAMDIRECTREADMESSAGE_INITREQUEST.containing_type = _STREAMDIRECTREADMESSAGE +_STREAMDIRECTREADMESSAGE_INITRESPONSE.containing_type = _STREAMDIRECTREADMESSAGE +_STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONREQUEST.containing_type = _STREAMDIRECTREADMESSAGE +_STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONRESPONSE.containing_type = _STREAMDIRECTREADMESSAGE +_STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION.fields_by_name['status'].enum_type = protos_dot_ydb__status__codes__pb2._STATUSIDS_STATUSCODE +_STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION.fields_by_name['issues'].message_type = protos_dot_ydb__issue__message__pb2._ISSUEMESSAGE +_STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION.containing_type = _STREAMDIRECTREADMESSAGE +_STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE.fields_by_name['partition_data'].message_type = _STREAMREADMESSAGE_READRESPONSE_PARTITIONDATA +_STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE.containing_type = _STREAMDIRECTREADMESSAGE _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS.fields_by_name['partition_offsets'].message_type = _OFFSETSRANGE _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS.containing_type = _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS.fields_by_name['partitions'].message_type = _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS @@ -4154,12 +5466,41 @@ _ALTERCONSUMER.oneofs_by_name['_set_important'].fields.append( _ALTERCONSUMER.fields_by_name['set_important']) _ALTERCONSUMER.fields_by_name['set_important'].containing_oneof = _ALTERCONSUMER.oneofs_by_name['_set_important'] +_PARTITIONINGSETTINGS.fields_by_name['auto_partitioning_settings'].message_type = _AUTOPARTITIONINGSETTINGS +_AUTOPARTITIONINGSETTINGS.fields_by_name['strategy'].enum_type = _AUTOPARTITIONINGSTRATEGY +_AUTOPARTITIONINGSETTINGS.fields_by_name['partition_write_speed'].message_type = _AUTOPARTITIONINGWRITESPEEDSTRATEGY +_AUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['stabilization_window'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +_ALTERPARTITIONINGSETTINGS.fields_by_name['alter_auto_partitioning_settings'].message_type = _ALTERAUTOPARTITIONINGSETTINGS _ALTERPARTITIONINGSETTINGS.oneofs_by_name['_set_min_active_partitions'].fields.append( _ALTERPARTITIONINGSETTINGS.fields_by_name['set_min_active_partitions']) _ALTERPARTITIONINGSETTINGS.fields_by_name['set_min_active_partitions'].containing_oneof = _ALTERPARTITIONINGSETTINGS.oneofs_by_name['_set_min_active_partitions'] +_ALTERPARTITIONINGSETTINGS.oneofs_by_name['_set_max_active_partitions'].fields.append( + _ALTERPARTITIONINGSETTINGS.fields_by_name['set_max_active_partitions']) +_ALTERPARTITIONINGSETTINGS.fields_by_name['set_max_active_partitions'].containing_oneof = _ALTERPARTITIONINGSETTINGS.oneofs_by_name['_set_max_active_partitions'] _ALTERPARTITIONINGSETTINGS.oneofs_by_name['_set_partition_count_limit'].fields.append( _ALTERPARTITIONINGSETTINGS.fields_by_name['set_partition_count_limit']) _ALTERPARTITIONINGSETTINGS.fields_by_name['set_partition_count_limit'].containing_oneof = _ALTERPARTITIONINGSETTINGS.oneofs_by_name['_set_partition_count_limit'] +_ALTERPARTITIONINGSETTINGS.oneofs_by_name['_alter_auto_partitioning_settings'].fields.append( + _ALTERPARTITIONINGSETTINGS.fields_by_name['alter_auto_partitioning_settings']) +_ALTERPARTITIONINGSETTINGS.fields_by_name['alter_auto_partitioning_settings'].containing_oneof = _ALTERPARTITIONINGSETTINGS.oneofs_by_name['_alter_auto_partitioning_settings'] +_ALTERAUTOPARTITIONINGSETTINGS.fields_by_name['set_strategy'].enum_type = _AUTOPARTITIONINGSTRATEGY +_ALTERAUTOPARTITIONINGSETTINGS.fields_by_name['set_partition_write_speed'].message_type = _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY +_ALTERAUTOPARTITIONINGSETTINGS.oneofs_by_name['_set_strategy'].fields.append( + _ALTERAUTOPARTITIONINGSETTINGS.fields_by_name['set_strategy']) +_ALTERAUTOPARTITIONINGSETTINGS.fields_by_name['set_strategy'].containing_oneof = _ALTERAUTOPARTITIONINGSETTINGS.oneofs_by_name['_set_strategy'] +_ALTERAUTOPARTITIONINGSETTINGS.oneofs_by_name['_set_partition_write_speed'].fields.append( + _ALTERAUTOPARTITIONINGSETTINGS.fields_by_name['set_partition_write_speed']) +_ALTERAUTOPARTITIONINGSETTINGS.fields_by_name['set_partition_write_speed'].containing_oneof = _ALTERAUTOPARTITIONINGSETTINGS.oneofs_by_name['_set_partition_write_speed'] +_ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_stabilization_window'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +_ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.oneofs_by_name['_set_stabilization_window'].fields.append( + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_stabilization_window']) +_ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_stabilization_window'].containing_oneof = _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.oneofs_by_name['_set_stabilization_window'] +_ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.oneofs_by_name['_set_up_utilization_percent'].fields.append( + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_up_utilization_percent']) +_ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_up_utilization_percent'].containing_oneof = _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.oneofs_by_name['_set_up_utilization_percent'] +_ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.oneofs_by_name['_set_down_utilization_percent'].fields.append( + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_down_utilization_percent']) +_ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_down_utilization_percent'].containing_oneof = _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.oneofs_by_name['_set_down_utilization_percent'] _CREATETOPICREQUEST_ATTRIBUTESENTRY.containing_type = _CREATETOPICREQUEST _CREATETOPICREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS _CREATETOPICREQUEST.fields_by_name['partitioning_settings'].message_type = _PARTITIONINGSETTINGS @@ -4171,8 +5512,16 @@ _CREATETOPICRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION _DESCRIBETOPICREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS _DESCRIBETOPICRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_PARTITIONKEYRANGE.oneofs_by_name['_from_bound'].fields.append( + _PARTITIONKEYRANGE.fields_by_name['from_bound']) +_PARTITIONKEYRANGE.fields_by_name['from_bound'].containing_oneof = _PARTITIONKEYRANGE.oneofs_by_name['_from_bound'] +_PARTITIONKEYRANGE.oneofs_by_name['_to_bound'].fields.append( + _PARTITIONKEYRANGE.fields_by_name['to_bound']) +_PARTITIONKEYRANGE.fields_by_name['to_bound'].containing_oneof = _PARTITIONKEYRANGE.oneofs_by_name['_to_bound'] _DESCRIBETOPICRESULT_ATTRIBUTESENTRY.containing_type = _DESCRIBETOPICRESULT _DESCRIBETOPICRESULT_PARTITIONINFO.fields_by_name['partition_stats'].message_type = _PARTITIONSTATS +_DESCRIBETOPICRESULT_PARTITIONINFO.fields_by_name['partition_location'].message_type = _PARTITIONLOCATION +_DESCRIBETOPICRESULT_PARTITIONINFO.fields_by_name['key_range'].message_type = _PARTITIONKEYRANGE _DESCRIBETOPICRESULT_PARTITIONINFO.containing_type = _DESCRIBETOPICRESULT _DESCRIBETOPICRESULT_TOPICSTATS.fields_by_name['min_last_write_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DESCRIBETOPICRESULT_TOPICSTATS.fields_by_name['max_write_time_lag'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION @@ -4187,10 +5536,14 @@ _DESCRIBETOPICRESULT.fields_by_name['consumers'].message_type = _CONSUMER _DESCRIBETOPICRESULT.fields_by_name['metering_mode'].enum_type = _METERINGMODE _DESCRIBETOPICRESULT.fields_by_name['topic_stats'].message_type = _DESCRIBETOPICRESULT_TOPICSTATS +_DESCRIBEPARTITIONREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_DESCRIBEPARTITIONRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_DESCRIBEPARTITIONRESULT.fields_by_name['partition'].message_type = _DESCRIBETOPICRESULT_PARTITIONINFO _DESCRIBECONSUMERREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS _DESCRIBECONSUMERRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION _DESCRIBECONSUMERRESULT_PARTITIONINFO.fields_by_name['partition_stats'].message_type = _PARTITIONSTATS _DESCRIBECONSUMERRESULT_PARTITIONINFO.fields_by_name['partition_consumer_stats'].message_type = _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS +_DESCRIBECONSUMERRESULT_PARTITIONINFO.fields_by_name['partition_location'].message_type = _PARTITIONLOCATION _DESCRIBECONSUMERRESULT_PARTITIONINFO.containing_type = _DESCRIBECONSUMERRESULT _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS.fields_by_name['partition_read_session_create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS.fields_by_name['last_read_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP @@ -4230,9 +5583,11 @@ DESCRIPTOR.message_types_by_name['OffsetsRange'] = _OFFSETSRANGE DESCRIPTOR.message_types_by_name['UpdateTokenRequest'] = _UPDATETOKENREQUEST DESCRIPTOR.message_types_by_name['UpdateTokenResponse'] = _UPDATETOKENRESPONSE +DESCRIPTOR.message_types_by_name['PartitionWithGeneration'] = _PARTITIONWITHGENERATION DESCRIPTOR.message_types_by_name['MetadataItem'] = _METADATAITEM DESCRIPTOR.message_types_by_name['StreamWriteMessage'] = _STREAMWRITEMESSAGE DESCRIPTOR.message_types_by_name['StreamReadMessage'] = _STREAMREADMESSAGE +DESCRIPTOR.message_types_by_name['StreamDirectReadMessage'] = _STREAMDIRECTREADMESSAGE DESCRIPTOR.message_types_by_name['TransactionIdentity'] = _TRANSACTIONIDENTITY DESCRIPTOR.message_types_by_name['UpdateOffsetsInTransactionRequest'] = _UPDATEOFFSETSINTRANSACTIONREQUEST DESCRIPTOR.message_types_by_name['UpdateOffsetsInTransactionResponse'] = _UPDATEOFFSETSINTRANSACTIONRESPONSE @@ -4244,13 +5599,22 @@ DESCRIPTOR.message_types_by_name['Consumer'] = _CONSUMER DESCRIPTOR.message_types_by_name['AlterConsumer'] = _ALTERCONSUMER DESCRIPTOR.message_types_by_name['PartitioningSettings'] = _PARTITIONINGSETTINGS +DESCRIPTOR.message_types_by_name['AutoPartitioningSettings'] = _AUTOPARTITIONINGSETTINGS +DESCRIPTOR.message_types_by_name['AutoPartitioningWriteSpeedStrategy'] = _AUTOPARTITIONINGWRITESPEEDSTRATEGY DESCRIPTOR.message_types_by_name['AlterPartitioningSettings'] = _ALTERPARTITIONINGSETTINGS +DESCRIPTOR.message_types_by_name['AlterAutoPartitioningSettings'] = _ALTERAUTOPARTITIONINGSETTINGS +DESCRIPTOR.message_types_by_name['AlterAutoPartitioningWriteSpeedStrategy'] = _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY DESCRIPTOR.message_types_by_name['CreateTopicRequest'] = _CREATETOPICREQUEST DESCRIPTOR.message_types_by_name['CreateTopicResponse'] = _CREATETOPICRESPONSE DESCRIPTOR.message_types_by_name['CreateTopicResult'] = _CREATETOPICRESULT +DESCRIPTOR.message_types_by_name['PartitionLocation'] = _PARTITIONLOCATION DESCRIPTOR.message_types_by_name['DescribeTopicRequest'] = _DESCRIBETOPICREQUEST DESCRIPTOR.message_types_by_name['DescribeTopicResponse'] = _DESCRIBETOPICRESPONSE +DESCRIPTOR.message_types_by_name['PartitionKeyRange'] = _PARTITIONKEYRANGE DESCRIPTOR.message_types_by_name['DescribeTopicResult'] = _DESCRIBETOPICRESULT +DESCRIPTOR.message_types_by_name['DescribePartitionRequest'] = _DESCRIBEPARTITIONREQUEST +DESCRIPTOR.message_types_by_name['DescribePartitionResponse'] = _DESCRIBEPARTITIONRESPONSE +DESCRIPTOR.message_types_by_name['DescribePartitionResult'] = _DESCRIBEPARTITIONRESULT DESCRIPTOR.message_types_by_name['DescribeConsumerRequest'] = _DESCRIBECONSUMERREQUEST DESCRIPTOR.message_types_by_name['DescribeConsumerResponse'] = _DESCRIBECONSUMERRESPONSE DESCRIPTOR.message_types_by_name['DescribeConsumerResult'] = _DESCRIBECONSUMERRESULT @@ -4262,6 +5626,7 @@ DESCRIPTOR.message_types_by_name['DropTopicResponse'] = _DROPTOPICRESPONSE DESCRIPTOR.message_types_by_name['DropTopicResult'] = _DROPTOPICRESULT DESCRIPTOR.enum_types_by_name['Codec'] = _CODEC +DESCRIPTOR.enum_types_by_name['AutoPartitioningStrategy'] = _AUTOPARTITIONINGSTRATEGY DESCRIPTOR.enum_types_by_name['MeteringMode'] = _METERINGMODE _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -4293,6 +5658,13 @@ }) _sym_db.RegisterMessage(UpdateTokenResponse) +PartitionWithGeneration = _reflection.GeneratedProtocolMessageType('PartitionWithGeneration', (_message.Message,), { + 'DESCRIPTOR' : _PARTITIONWITHGENERATION, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.PartitionWithGeneration) + }) +_sym_db.RegisterMessage(PartitionWithGeneration) + MetadataItem = _reflection.GeneratedProtocolMessageType('MetadataItem', (_message.Message,), { 'DESCRIPTOR' : _METADATAITEM, '__module__' : 'protos.ydb_topic_pb2' @@ -4368,6 +5740,13 @@ # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped) }) , + + 'WrittenInTx' : _reflection.GeneratedProtocolMessageType('WrittenInTx', (_message.Message,), { + 'DESCRIPTOR' : _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTENINTX, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenInTx) + }) + , 'DESCRIPTOR' : _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK, '__module__' : 'protos.ydb_topic_pb2' # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck) @@ -4401,6 +5780,7 @@ _sym_db.RegisterMessage(StreamWriteMessage.WriteResponse.WriteAck) _sym_db.RegisterMessage(StreamWriteMessage.WriteResponse.WriteAck.Written) _sym_db.RegisterMessage(StreamWriteMessage.WriteResponse.WriteAck.Skipped) +_sym_db.RegisterMessage(StreamWriteMessage.WriteResponse.WriteAck.WrittenInTx) _sym_db.RegisterMessage(StreamWriteMessage.WriteResponse.WriteStatistics) StreamReadMessage = _reflection.GeneratedProtocolMessageType('StreamReadMessage', (_message.Message,), { @@ -4558,6 +5938,27 @@ # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamReadMessage.StopPartitionSessionResponse) }) , + + 'UpdatePartitionSession' : _reflection.GeneratedProtocolMessageType('UpdatePartitionSession', (_message.Message,), { + 'DESCRIPTOR' : _STREAMREADMESSAGE_UPDATEPARTITIONSESSION, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamReadMessage.UpdatePartitionSession) + }) + , + + 'DirectReadAck' : _reflection.GeneratedProtocolMessageType('DirectReadAck', (_message.Message,), { + 'DESCRIPTOR' : _STREAMREADMESSAGE_DIRECTREADACK, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamReadMessage.DirectReadAck) + }) + , + + 'EndPartitionSession' : _reflection.GeneratedProtocolMessageType('EndPartitionSession', (_message.Message,), { + 'DESCRIPTOR' : _STREAMREADMESSAGE_ENDPARTITIONSESSION, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamReadMessage.EndPartitionSession) + }) + , 'DESCRIPTOR' : _STREAMREADMESSAGE, '__module__' : 'protos.ydb_topic_pb2' # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamReadMessage) @@ -4585,6 +5986,88 @@ _sym_db.RegisterMessage(StreamReadMessage.StartPartitionSessionResponse) _sym_db.RegisterMessage(StreamReadMessage.StopPartitionSessionRequest) _sym_db.RegisterMessage(StreamReadMessage.StopPartitionSessionResponse) +_sym_db.RegisterMessage(StreamReadMessage.UpdatePartitionSession) +_sym_db.RegisterMessage(StreamReadMessage.DirectReadAck) +_sym_db.RegisterMessage(StreamReadMessage.EndPartitionSession) + +StreamDirectReadMessage = _reflection.GeneratedProtocolMessageType('StreamDirectReadMessage', (_message.Message,), { + + 'FromClient' : _reflection.GeneratedProtocolMessageType('FromClient', (_message.Message,), { + 'DESCRIPTOR' : _STREAMDIRECTREADMESSAGE_FROMCLIENT, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamDirectReadMessage.FromClient) + }) + , + + 'FromServer' : _reflection.GeneratedProtocolMessageType('FromServer', (_message.Message,), { + 'DESCRIPTOR' : _STREAMDIRECTREADMESSAGE_FROMSERVER, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamDirectReadMessage.FromServer) + }) + , + + 'InitRequest' : _reflection.GeneratedProtocolMessageType('InitRequest', (_message.Message,), { + + 'TopicReadSettings' : _reflection.GeneratedProtocolMessageType('TopicReadSettings', (_message.Message,), { + 'DESCRIPTOR' : _STREAMDIRECTREADMESSAGE_INITREQUEST_TOPICREADSETTINGS, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamDirectReadMessage.InitRequest.TopicReadSettings) + }) + , + 'DESCRIPTOR' : _STREAMDIRECTREADMESSAGE_INITREQUEST, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamDirectReadMessage.InitRequest) + }) + , + + 'InitResponse' : _reflection.GeneratedProtocolMessageType('InitResponse', (_message.Message,), { + 'DESCRIPTOR' : _STREAMDIRECTREADMESSAGE_INITRESPONSE, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamDirectReadMessage.InitResponse) + }) + , + + 'StartDirectReadPartitionSessionRequest' : _reflection.GeneratedProtocolMessageType('StartDirectReadPartitionSessionRequest', (_message.Message,), { + 'DESCRIPTOR' : _STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONREQUEST, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionRequest) + }) + , + + 'StartDirectReadPartitionSessionResponse' : _reflection.GeneratedProtocolMessageType('StartDirectReadPartitionSessionResponse', (_message.Message,), { + 'DESCRIPTOR' : _STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONRESPONSE, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionResponse) + }) + , + + 'StopDirectReadPartitionSession' : _reflection.GeneratedProtocolMessageType('StopDirectReadPartitionSession', (_message.Message,), { + 'DESCRIPTOR' : _STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSession) + }) + , + + 'DirectReadResponse' : _reflection.GeneratedProtocolMessageType('DirectReadResponse', (_message.Message,), { + 'DESCRIPTOR' : _STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamDirectReadMessage.DirectReadResponse) + }) + , + 'DESCRIPTOR' : _STREAMDIRECTREADMESSAGE, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.StreamDirectReadMessage) + }) +_sym_db.RegisterMessage(StreamDirectReadMessage) +_sym_db.RegisterMessage(StreamDirectReadMessage.FromClient) +_sym_db.RegisterMessage(StreamDirectReadMessage.FromServer) +_sym_db.RegisterMessage(StreamDirectReadMessage.InitRequest) +_sym_db.RegisterMessage(StreamDirectReadMessage.InitRequest.TopicReadSettings) +_sym_db.RegisterMessage(StreamDirectReadMessage.InitResponse) +_sym_db.RegisterMessage(StreamDirectReadMessage.StartDirectReadPartitionSessionRequest) +_sym_db.RegisterMessage(StreamDirectReadMessage.StartDirectReadPartitionSessionResponse) +_sym_db.RegisterMessage(StreamDirectReadMessage.StopDirectReadPartitionSession) +_sym_db.RegisterMessage(StreamDirectReadMessage.DirectReadResponse) TransactionIdentity = _reflection.GeneratedProtocolMessageType('TransactionIdentity', (_message.Message,), { 'DESCRIPTOR' : _TRANSACTIONIDENTITY, @@ -4703,6 +6186,20 @@ }) _sym_db.RegisterMessage(PartitioningSettings) +AutoPartitioningSettings = _reflection.GeneratedProtocolMessageType('AutoPartitioningSettings', (_message.Message,), { + 'DESCRIPTOR' : _AUTOPARTITIONINGSETTINGS, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.AutoPartitioningSettings) + }) +_sym_db.RegisterMessage(AutoPartitioningSettings) + +AutoPartitioningWriteSpeedStrategy = _reflection.GeneratedProtocolMessageType('AutoPartitioningWriteSpeedStrategy', (_message.Message,), { + 'DESCRIPTOR' : _AUTOPARTITIONINGWRITESPEEDSTRATEGY, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.AutoPartitioningWriteSpeedStrategy) + }) +_sym_db.RegisterMessage(AutoPartitioningWriteSpeedStrategy) + AlterPartitioningSettings = _reflection.GeneratedProtocolMessageType('AlterPartitioningSettings', (_message.Message,), { 'DESCRIPTOR' : _ALTERPARTITIONINGSETTINGS, '__module__' : 'protos.ydb_topic_pb2' @@ -4710,6 +6207,20 @@ }) _sym_db.RegisterMessage(AlterPartitioningSettings) +AlterAutoPartitioningSettings = _reflection.GeneratedProtocolMessageType('AlterAutoPartitioningSettings', (_message.Message,), { + 'DESCRIPTOR' : _ALTERAUTOPARTITIONINGSETTINGS, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.AlterAutoPartitioningSettings) + }) +_sym_db.RegisterMessage(AlterAutoPartitioningSettings) + +AlterAutoPartitioningWriteSpeedStrategy = _reflection.GeneratedProtocolMessageType('AlterAutoPartitioningWriteSpeedStrategy', (_message.Message,), { + 'DESCRIPTOR' : _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategy) + }) +_sym_db.RegisterMessage(AlterAutoPartitioningWriteSpeedStrategy) + CreateTopicRequest = _reflection.GeneratedProtocolMessageType('CreateTopicRequest', (_message.Message,), { 'AttributesEntry' : _reflection.GeneratedProtocolMessageType('AttributesEntry', (_message.Message,), { @@ -4739,6 +6250,13 @@ }) _sym_db.RegisterMessage(CreateTopicResult) +PartitionLocation = _reflection.GeneratedProtocolMessageType('PartitionLocation', (_message.Message,), { + 'DESCRIPTOR' : _PARTITIONLOCATION, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.PartitionLocation) + }) +_sym_db.RegisterMessage(PartitionLocation) + DescribeTopicRequest = _reflection.GeneratedProtocolMessageType('DescribeTopicRequest', (_message.Message,), { 'DESCRIPTOR' : _DESCRIBETOPICREQUEST, '__module__' : 'protos.ydb_topic_pb2' @@ -4753,6 +6271,13 @@ }) _sym_db.RegisterMessage(DescribeTopicResponse) +PartitionKeyRange = _reflection.GeneratedProtocolMessageType('PartitionKeyRange', (_message.Message,), { + 'DESCRIPTOR' : _PARTITIONKEYRANGE, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.PartitionKeyRange) + }) +_sym_db.RegisterMessage(PartitionKeyRange) + DescribeTopicResult = _reflection.GeneratedProtocolMessageType('DescribeTopicResult', (_message.Message,), { 'AttributesEntry' : _reflection.GeneratedProtocolMessageType('AttributesEntry', (_message.Message,), { @@ -4784,6 +6309,27 @@ _sym_db.RegisterMessage(DescribeTopicResult.PartitionInfo) _sym_db.RegisterMessage(DescribeTopicResult.TopicStats) +DescribePartitionRequest = _reflection.GeneratedProtocolMessageType('DescribePartitionRequest', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEPARTITIONREQUEST, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.DescribePartitionRequest) + }) +_sym_db.RegisterMessage(DescribePartitionRequest) + +DescribePartitionResponse = _reflection.GeneratedProtocolMessageType('DescribePartitionResponse', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEPARTITIONRESPONSE, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.DescribePartitionResponse) + }) +_sym_db.RegisterMessage(DescribePartitionResponse) + +DescribePartitionResult = _reflection.GeneratedProtocolMessageType('DescribePartitionResult', (_message.Message,), { + 'DESCRIPTOR' : _DESCRIBEPARTITIONRESULT, + '__module__' : 'protos.ydb_topic_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Topic.DescribePartitionResult) + }) +_sym_db.RegisterMessage(DescribePartitionResult) + DescribeConsumerRequest = _reflection.GeneratedProtocolMessageType('DescribeConsumerRequest', (_message.Message,), { 'DESCRIPTOR' : _DESCRIBECONSUMERREQUEST, '__module__' : 'protos.ydb_topic_pb2' @@ -4881,21 +6427,34 @@ DESCRIPTOR._options = None _SUPPORTEDCODECS.fields_by_name['codecs']._options = None +_UPDATETOKENREQUEST.fields_by_name['token']._options = None _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._options = None +_STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['producer_id']._options = None +_STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['message_group_id']._options = None +_STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['message_group_id']._options = None _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['metadata_items']._options = None +_STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA.fields_by_name['message_group_id']._options = None _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._options = None +_STREAMREADMESSAGE_READRESPONSE_BATCH.fields_by_name['producer_id']._options = None _CONSUMER_ATTRIBUTESENTRY._options = None _ALTERCONSUMER_ALTERATTRIBUTESENTRY._options = None _PARTITIONINGSETTINGS.fields_by_name['min_active_partitions']._options = None +_PARTITIONINGSETTINGS.fields_by_name['max_active_partitions']._options = None _PARTITIONINGSETTINGS.fields_by_name['partition_count_limit']._options = None +_AUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['up_utilization_percent']._options = None +_AUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['down_utilization_percent']._options = None _ALTERPARTITIONINGSETTINGS.fields_by_name['set_min_active_partitions']._options = None +_ALTERPARTITIONINGSETTINGS.fields_by_name['set_max_active_partitions']._options = None _ALTERPARTITIONINGSETTINGS.fields_by_name['set_partition_count_limit']._options = None +_ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_up_utilization_percent']._options = None +_ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_down_utilization_percent']._options = None _CREATETOPICREQUEST_ATTRIBUTESENTRY._options = None _CREATETOPICREQUEST.fields_by_name['retention_storage_mb']._options = None _CREATETOPICREQUEST.fields_by_name['partition_write_speed_bytes_per_second']._options = None _CREATETOPICREQUEST.fields_by_name['partition_write_burst_bytes']._options = None _CREATETOPICREQUEST.fields_by_name['consumers']._options = None _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._options = None +_PARTITIONSTATS.fields_by_name['partition_node_id']._options = None _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._options = None _ALTERTOPICREQUEST.fields_by_name['set_retention_storage_mb']._options = None _ALTERTOPICREQUEST.fields_by_name['set_partition_write_speed_bytes_per_second']._options = None diff --git a/ydb/_grpc/v3/protos/ydb_value_pb2.py b/ydb/_grpc/v3/protos/ydb_value_pb2.py index 1c0ee38e..8d0cdda1 100644 --- a/ydb/_grpc/v3/protos/ydb_value_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_value_pb2.py @@ -21,7 +21,7 @@ syntax='proto3', serialized_options=b'\n\016tech.ydb.protoB\013ValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x16protos/ydb_value.proto\x12\x03Ydb\x1a\x1cgoogle/protobuf/struct.proto\"/\n\x0b\x44\x65\x63imalType\x12\x11\n\tprecision\x18\x01 \x01(\r\x12\r\n\x05scale\x18\x02 \x01(\r\"\'\n\x0cOptionalType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"#\n\x08ListType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"e\n\x0bVariantType\x12%\n\x0btuple_items\x18\x01 \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12\'\n\x0cstruct_items\x18\x02 \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x42\x06\n\x04type\"(\n\tTupleType\x12\x1b\n\x08\x65lements\x18\x01 \x03(\x0b\x32\t.Ydb.Type\"5\n\x0cStructMember\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"0\n\nStructType\x12\"\n\x07members\x18\x01 \x03(\x0b\x32\x11.Ydb.StructMember\">\n\x08\x44ictType\x12\x16\n\x03key\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x1a\n\x07payload\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"2\n\nTaggedType\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"5\n\x06PgType\x12\x0b\n\x03oid\x18\x01 \x01(\r\x12\x0e\n\x06typlen\x18\x02 \x01(\x05\x12\x0e\n\x06typmod\x18\x03 \x01(\x05\"\xe2\x07\n\x04Type\x12,\n\x07type_id\x18\x01 \x01(\x0e\x32\x19.Ydb.Type.PrimitiveTypeIdH\x00\x12(\n\x0c\x64\x65\x63imal_type\x18\x02 \x01(\x0b\x32\x10.Ydb.DecimalTypeH\x00\x12*\n\roptional_type\x18\x65 \x01(\x0b\x32\x11.Ydb.OptionalTypeH\x00\x12\"\n\tlist_type\x18\x66 \x01(\x0b\x32\r.Ydb.ListTypeH\x00\x12$\n\ntuple_type\x18g \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12&\n\x0bstruct_type\x18h \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x12\"\n\tdict_type\x18i \x01(\x0b\x32\r.Ydb.DictTypeH\x00\x12(\n\x0cvariant_type\x18j \x01(\x0b\x32\x10.Ydb.VariantTypeH\x00\x12&\n\x0btagged_type\x18k \x01(\x0b\x32\x0f.Ydb.TaggedTypeH\x00\x12\x30\n\tvoid_type\x18\xc9\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x30\n\tnull_type\x18\xca\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_list_type\x18\xcb\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_dict_type\x18\xcc\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x1f\n\x07pg_type\x18\xcd\x01 \x01(\x0b\x32\x0b.Ydb.PgTypeH\x00\"\xf0\x02\n\x0fPrimitiveTypeId\x12!\n\x1dPRIMITIVE_TYPE_ID_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x06\x12\x08\n\x04INT8\x10\x07\x12\t\n\x05UINT8\x10\x05\x12\t\n\x05INT16\x10\x08\x12\n\n\x06UINT16\x10\t\x12\t\n\x05INT32\x10\x01\x12\n\n\x06UINT32\x10\x02\x12\t\n\x05INT64\x10\x03\x12\n\n\x06UINT64\x10\x04\x12\t\n\x05\x46LOAT\x10!\x12\n\n\x06\x44OUBLE\x10 \x12\x08\n\x04\x44\x41TE\x10\x30\x12\x0c\n\x08\x44\x41TETIME\x10\x31\x12\r\n\tTIMESTAMP\x10\x32\x12\x0c\n\x08INTERVAL\x10\x33\x12\x0b\n\x07TZ_DATE\x10\x34\x12\x0f\n\x0bTZ_DATETIME\x10\x35\x12\x10\n\x0cTZ_TIMESTAMP\x10\x36\x12\x0b\n\x06STRING\x10\x81 \x12\t\n\x04UTF8\x10\x80$\x12\t\n\x04YSON\x10\x81$\x12\t\n\x04JSON\x10\x82$\x12\t\n\x04UUID\x10\x83$\x12\x12\n\rJSON_DOCUMENT\x10\x84$\x12\r\n\x08\x44YNUMBER\x10\x82&B\x06\n\x04type\"A\n\tValuePair\x12\x17\n\x03key\x18\x01 \x01(\x0b\x32\n.Ydb.Value\x12\x1b\n\x07payload\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"\xb1\x03\n\x05Value\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint32_value\x18\x02 \x01(\x0fH\x00\x12\x16\n\x0cuint32_value\x18\x03 \x01(\x07H\x00\x12\x15\n\x0bint64_value\x18\x04 \x01(\x10H\x00\x12\x16\n\x0cuint64_value\x18\x05 \x01(\x06H\x00\x12\x15\n\x0b\x66loat_value\x18\x06 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x07 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x08 \x01(\x0cH\x00\x12\x14\n\ntext_value\x18\t \x01(\tH\x00\x12\x35\n\x0fnull_flag_value\x18\n \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\"\n\x0cnested_value\x18\x0b \x01(\x0b\x32\n.Ydb.ValueH\x00\x12\x11\n\x07low_128\x18\x0f \x01(\x06H\x00\x12\x19\n\x05items\x18\x0c \x03(\x0b\x32\n.Ydb.Value\x12\x1d\n\x05pairs\x18\r \x03(\x0b\x32\x0e.Ydb.ValuePair\x12\x15\n\rvariant_index\x18\x0e \x01(\r\x12\x10\n\x08high_128\x18\x10 \x01(\x06\x42\x07\n\x05value\"@\n\nTypedValue\x12\x17\n\x04type\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"/\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"V\n\tResultSet\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x18\n\x04rows\x18\x02 \x03(\x0b\x32\n.Ydb.Value\x12\x11\n\ttruncated\x18\x03 \x01(\x08\x42T\n\x0etech.ydb.protoB\x0bValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x16protos/ydb_value.proto\x12\x03Ydb\x1a\x1cgoogle/protobuf/struct.proto\"/\n\x0b\x44\x65\x63imalType\x12\x11\n\tprecision\x18\x01 \x01(\r\x12\r\n\x05scale\x18\x02 \x01(\r\"\'\n\x0cOptionalType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"#\n\x08ListType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"e\n\x0bVariantType\x12%\n\x0btuple_items\x18\x01 \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12\'\n\x0cstruct_items\x18\x02 \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x42\x06\n\x04type\"(\n\tTupleType\x12\x1b\n\x08\x65lements\x18\x01 \x03(\x0b\x32\t.Ydb.Type\"5\n\x0cStructMember\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"0\n\nStructType\x12\"\n\x07members\x18\x01 \x03(\x0b\x32\x11.Ydb.StructMember\">\n\x08\x44ictType\x12\x16\n\x03key\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x1a\n\x07payload\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"2\n\nTaggedType\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"_\n\x06PgType\x12\x11\n\ttype_name\x18\n \x01(\t\x12\x15\n\rtype_modifier\x18\x0b \x01(\t\x12\x0b\n\x03oid\x18\x01 \x01(\r\x12\x0e\n\x06typlen\x18\x02 \x01(\x05\x12\x0e\n\x06typmod\x18\x03 \x01(\x05\"\x9f\x08\n\x04Type\x12,\n\x07type_id\x18\x01 \x01(\x0e\x32\x19.Ydb.Type.PrimitiveTypeIdH\x00\x12(\n\x0c\x64\x65\x63imal_type\x18\x02 \x01(\x0b\x32\x10.Ydb.DecimalTypeH\x00\x12*\n\roptional_type\x18\x65 \x01(\x0b\x32\x11.Ydb.OptionalTypeH\x00\x12\"\n\tlist_type\x18\x66 \x01(\x0b\x32\r.Ydb.ListTypeH\x00\x12$\n\ntuple_type\x18g \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12&\n\x0bstruct_type\x18h \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x12\"\n\tdict_type\x18i \x01(\x0b\x32\r.Ydb.DictTypeH\x00\x12(\n\x0cvariant_type\x18j \x01(\x0b\x32\x10.Ydb.VariantTypeH\x00\x12&\n\x0btagged_type\x18k \x01(\x0b\x32\x0f.Ydb.TaggedTypeH\x00\x12\x30\n\tvoid_type\x18\xc9\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x30\n\tnull_type\x18\xca\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_list_type\x18\xcb\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_dict_type\x18\xcc\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x1f\n\x07pg_type\x18\xcd\x01 \x01(\x0b\x32\x0b.Ydb.PgTypeH\x00\"\xad\x03\n\x0fPrimitiveTypeId\x12!\n\x1dPRIMITIVE_TYPE_ID_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x06\x12\x08\n\x04INT8\x10\x07\x12\t\n\x05UINT8\x10\x05\x12\t\n\x05INT16\x10\x08\x12\n\n\x06UINT16\x10\t\x12\t\n\x05INT32\x10\x01\x12\n\n\x06UINT32\x10\x02\x12\t\n\x05INT64\x10\x03\x12\n\n\x06UINT64\x10\x04\x12\t\n\x05\x46LOAT\x10!\x12\n\n\x06\x44OUBLE\x10 \x12\x08\n\x04\x44\x41TE\x10\x30\x12\x0c\n\x08\x44\x41TETIME\x10\x31\x12\r\n\tTIMESTAMP\x10\x32\x12\x0c\n\x08INTERVAL\x10\x33\x12\x0b\n\x07TZ_DATE\x10\x34\x12\x0f\n\x0bTZ_DATETIME\x10\x35\x12\x10\n\x0cTZ_TIMESTAMP\x10\x36\x12\n\n\x06\x44\x41TE32\x10@\x12\x0e\n\nDATETIME64\x10\x41\x12\x0f\n\x0bTIMESTAMP64\x10\x42\x12\x0e\n\nINTERVAL64\x10\x43\x12\x0b\n\x06STRING\x10\x81 \x12\t\n\x04UTF8\x10\x80$\x12\t\n\x04YSON\x10\x81$\x12\t\n\x04JSON\x10\x82$\x12\t\n\x04UUID\x10\x83$\x12\x12\n\rJSON_DOCUMENT\x10\x84$\x12\r\n\x08\x44YNUMBER\x10\x82&B\x06\n\x04type\"A\n\tValuePair\x12\x17\n\x03key\x18\x01 \x01(\x0b\x32\n.Ydb.Value\x12\x1b\n\x07payload\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"\xb1\x03\n\x05Value\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint32_value\x18\x02 \x01(\x0fH\x00\x12\x16\n\x0cuint32_value\x18\x03 \x01(\x07H\x00\x12\x15\n\x0bint64_value\x18\x04 \x01(\x10H\x00\x12\x16\n\x0cuint64_value\x18\x05 \x01(\x06H\x00\x12\x15\n\x0b\x66loat_value\x18\x06 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x07 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x08 \x01(\x0cH\x00\x12\x14\n\ntext_value\x18\t \x01(\tH\x00\x12\x35\n\x0fnull_flag_value\x18\n \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\"\n\x0cnested_value\x18\x0b \x01(\x0b\x32\n.Ydb.ValueH\x00\x12\x11\n\x07low_128\x18\x0f \x01(\x06H\x00\x12\x19\n\x05items\x18\x0c \x03(\x0b\x32\n.Ydb.Value\x12\x1d\n\x05pairs\x18\r \x03(\x0b\x32\x0e.Ydb.ValuePair\x12\x15\n\rvariant_index\x18\x0e \x01(\r\x12\x10\n\x08high_128\x18\x10 \x01(\x06\x42\x07\n\x05value\"@\n\nTypedValue\x12\x17\n\x04type\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"/\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"V\n\tResultSet\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x18\n\x04rows\x18\x02 \x03(\x0b\x32\n.Ydb.Value\x12\x11\n\ttruncated\x18\x03 \x01(\x08\x42T\n\x0etech.ydb.protoB\x0bValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3' , dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) @@ -130,45 +130,65 @@ type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='STRING', index=19, number=4097, + name='DATE32', index=19, number=64, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='UTF8', index=20, number=4608, + name='DATETIME64', index=20, number=65, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='YSON', index=21, number=4609, + name='TIMESTAMP64', index=21, number=66, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='JSON', index=22, number=4610, + name='INTERVAL64', index=22, number=67, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='UUID', index=23, number=4611, + name='STRING', index=23, number=4097, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='JSON_DOCUMENT', index=24, number=4612, + name='UTF8', index=24, number=4608, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='DYNUMBER', index=25, number=4866, + name='YSON', index=25, number=4609, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='JSON', index=26, number=4610, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='UUID', index=27, number=4611, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='JSON_DOCUMENT', index=28, number=4612, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='DYNUMBER', index=29, number=4866, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=1228, - serialized_end=1596, + serialized_start=1270, + serialized_end=1699, ) _sym_db.RegisterEnumDescriptor(_TYPE_PRIMITIVETYPEID) @@ -510,21 +530,35 @@ create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='oid', full_name='Ydb.PgType.oid', index=0, + name='type_name', full_name='Ydb.PgType.type_name', index=0, + number=10, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='type_modifier', full_name='Ydb.PgType.type_modifier', index=1, + number=11, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='oid', full_name='Ydb.PgType.oid', index=2, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='typlen', full_name='Ydb.PgType.typlen', index=1, + name='typlen', full_name='Ydb.PgType.typlen', index=3, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='typmod', full_name='Ydb.PgType.typmod', index=2, + name='typmod', full_name='Ydb.PgType.typmod', index=4, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, @@ -543,7 +577,7 @@ oneofs=[ ], serialized_start=554, - serialized_end=607, + serialized_end=649, ) @@ -671,8 +705,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=610, - serialized_end=1604, + serialized_start=652, + serialized_end=1707, ) @@ -710,8 +744,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1606, - serialized_end=1671, + serialized_start=1709, + serialized_end=1774, ) @@ -852,8 +886,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1674, - serialized_end=2107, + serialized_start=1777, + serialized_end=2210, ) @@ -891,8 +925,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2109, - serialized_end=2173, + serialized_start=2212, + serialized_end=2276, ) @@ -930,8 +964,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2175, - serialized_end=2222, + serialized_start=2278, + serialized_end=2325, ) @@ -976,8 +1010,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2224, - serialized_end=2310, + serialized_start=2327, + serialized_end=2413, ) _OPTIONALTYPE.fields_by_name['item'].message_type = _TYPE diff --git a/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.py b/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.py index 8648ef8c..1938ed57 100644 --- a/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.py +++ b/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.py @@ -20,7 +20,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"draft/protos/ydb_maintenance.proto\x12\x0fYdb.Maintenance\x1a#protos/annotations/validation.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1aprotos/ydb_discovery.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf0\x02\n\x04Node\x12\x0f\n\x07node_id\x18\x01 \x01(\r\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\r\x12-\n\x08location\x18\x04 \x01(\x0b\x32\x1b.Ydb.Discovery.NodeLocation\x12)\n\x05state\x18\x05 \x01(\x0e\x32\x1a.Ydb.Maintenance.ItemState\x12\x34\n\x07storage\x18\x06 \x01(\x0b\x32!.Ydb.Maintenance.Node.StorageNodeH\x00\x12\x34\n\x07\x64ynamic\x18\x07 \x01(\x0b\x32!.Ydb.Maintenance.Node.DynamicNodeH\x00\x12.\n\nstart_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\t \x01(\t\x1a\r\n\x0bStorageNode\x1a\x1d\n\x0b\x44ynamicNode\x12\x0e\n\x06tenant\x18\x01 \x01(\tB\x06\n\x04type\"T\n\x17ListClusterNodesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\">\n\x16ListClusterNodesResult\x12$\n\x05nodes\x18\x01 \x03(\x0b\x32\x15.Ydb.Maintenance.Node\"H\n\x18ListClusterNodesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa0\x01\n\x16MaintenanceTaskOptions\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1c\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12<\n\x11\x61vailability_mode\x18\x03 \x01(\x0e\x32!.Ydb.Maintenance.AvailabilityMode\x12\x0f\n\x07\x64ry_run\x18\x04 \x01(\x08\"B\n\x0b\x41\x63tionScope\x12\x11\n\x07node_id\x18\x01 \x01(\rH\x00\x12\x17\n\x04host\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xff\x01H\x00\x42\x07\n\x05scope\"f\n\nLockAction\x12+\n\x05scope\x18\x01 \x01(\x0b\x32\x1c.Ydb.Maintenance.ActionScope\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"F\n\x06\x41\x63tion\x12\x32\n\x0block_action\x18\x01 \x01(\x0b\x32\x1b.Ydb.Maintenance.LockActionH\x00\x42\x08\n\x06\x61\x63tion\"?\n\x0b\x41\x63tionGroup\x12\x30\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x17.Ydb.Maintenance.ActionB\x06\x9a\xe6*\x02(\x01\"\xd5\x01\n\x1c\x43reateMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12=\n\x0ctask_options\x18\x02 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12;\n\raction_groups\x18\x03 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionGroupB\x06\x9a\xe6*\x02(\x01\"u\n\x1dRefreshMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"]\n\tActionUid\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x08group_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1a\n\taction_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\xdc\x05\n\x0b\x41\x63tionState\x12\'\n\x06\x61\x63tion\x18\x01 \x01(\x0b\x32\x17.Ydb.Maintenance.Action\x12.\n\naction_uid\x18\x02 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12\x39\n\x06status\x18\x03 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionStatus\x12\x39\n\x06reason\x18\x04 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionReason\x12,\n\x08\x64\x65\x61\x64line\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x0c\x41\x63tionStatus\x12\x1d\n\x19\x41\x43TION_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41\x43TION_STATUS_PENDING\x10\x01\x12\x1b\n\x17\x41\x43TION_STATUS_PERFORMED\x10\x02\"\xe8\x02\n\x0c\x41\x63tionReason\x12\x1d\n\x19\x41\x43TION_REASON_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41\x43TION_REASON_OK\x10\x01\x12-\n)ACTION_REASON_TOO_MANY_UNAVAILABLE_VDISKS\x10\x02\x12:\n6ACTION_REASON_TOO_MANY_UNAVAILABLE_STATE_STORAGE_RINGS\x10\x03\x12.\n*ACTION_REASON_DISABLED_NODES_LIMIT_REACHED\x10\x04\x12\x35\n1ACTION_REASON_TENANT_DISABLED_NODES_LIMIT_REACHED\x10\x05\x12\x1f\n\x1b\x41\x43TION_REASON_WRONG_REQUEST\x10\x06\x12\x30\n,ACTION_REASON_SYS_TABLETS_NODE_LIMIT_REACHED\x10\x07\"H\n\x11\x41\x63tionGroupStates\x12\x33\n\raction_states\x18\x01 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionState\"\xb0\x01\n\x15MaintenanceTaskResult\x12\x10\n\x08task_uid\x18\x01 \x01(\t\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\x12\x34\n\x0bretry_after\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x42\x0e\n\x0c_retry_after\"G\n\x17MaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"q\n\x19GetMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\x9a\x01\n\x18GetMaintenanceTaskResult\x12=\n\x0ctask_options\x18\x01 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\"J\n\x1aGetMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"t\n\x1bListMaintenanceTasksRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x11\n\x04user\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_user\"0\n\x1aListMaintenanceTasksResult\x12\x12\n\ntasks_uids\x18\x01 \x03(\t\"L\n\x1cListMaintenanceTasksResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"r\n\x1a\x44ropMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"M\n\x1dManageMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x8b\x01\n\x15\x43ompleteActionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x37\n\x0b\x61\x63tion_uids\x18\x02 \x03(\x0b\x32\x1a.Ydb.Maintenance.ActionUidB\x06\x9a\xe6*\x02(\x01\"\xbe\x01\n\x12ManageActionResult\x12\x43\n\x0f\x61\x63tion_statuses\x18\x01 \x03(\x0b\x32*.Ydb.Maintenance.ManageActionResult.Status\x1a\x63\n\x06Status\x12.\n\naction_uid\x18\x01 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\"D\n\x14ManageActionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation*k\n\tItemState\x12\x1a\n\x16ITEM_STATE_UNSPECIFIED\x10\x00\x12\x11\n\rITEM_STATE_UP\x10\x01\x12\x1a\n\x16ITEM_STATE_MAINTENANCE\x10\x02\x12\x13\n\x0fITEM_STATE_DOWN\x10\x03*\x8c\x01\n\x10\x41vailabilityMode\x12!\n\x1d\x41VAILABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41VAILABILITY_MODE_STRONG\x10\x01\x12\x1a\n\x16\x41VAILABILITY_MODE_WEAK\x10\x02\x12\x1b\n\x17\x41VAILABILITY_MODE_FORCE\x10\x03\x42n\n#tech.ydb.proto.draft.maintenance.v1ZDgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_Maintenance\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"draft/protos/ydb_maintenance.proto\x12\x0fYdb.Maintenance\x1a#protos/annotations/validation.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1aprotos/ydb_discovery.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf0\x02\n\x04Node\x12\x0f\n\x07node_id\x18\x01 \x01(\r\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\r\x12-\n\x08location\x18\x04 \x01(\x0b\x32\x1b.Ydb.Discovery.NodeLocation\x12)\n\x05state\x18\x05 \x01(\x0e\x32\x1a.Ydb.Maintenance.ItemState\x12\x34\n\x07storage\x18\x06 \x01(\x0b\x32!.Ydb.Maintenance.Node.StorageNodeH\x00\x12\x34\n\x07\x64ynamic\x18\x07 \x01(\x0b\x32!.Ydb.Maintenance.Node.DynamicNodeH\x00\x12.\n\nstart_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\t \x01(\t\x1a\r\n\x0bStorageNode\x1a\x1d\n\x0b\x44ynamicNode\x12\x0e\n\x06tenant\x18\x01 \x01(\tB\x06\n\x04type\"T\n\x17ListClusterNodesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\">\n\x16ListClusterNodesResult\x12$\n\x05nodes\x18\x01 \x03(\x0b\x32\x15.Ydb.Maintenance.Node\"H\n\x18ListClusterNodesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xc3\x01\n\x16MaintenanceTaskOptions\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1c\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12<\n\x11\x61vailability_mode\x18\x03 \x01(\x0e\x32!.Ydb.Maintenance.AvailabilityMode\x12\x0f\n\x07\x64ry_run\x18\x04 \x01(\x08\x12!\n\x08priority\x18\x05 \x01(\x05\x42\x0f\xb2\xe6*\x0b[-100; 100]\"B\n\x0b\x41\x63tionScope\x12\x11\n\x07node_id\x18\x01 \x01(\rH\x00\x12\x17\n\x04host\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xff\x01H\x00\x42\x07\n\x05scope\"f\n\nLockAction\x12+\n\x05scope\x18\x01 \x01(\x0b\x32\x1c.Ydb.Maintenance.ActionScope\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"F\n\x06\x41\x63tion\x12\x32\n\x0block_action\x18\x01 \x01(\x0b\x32\x1b.Ydb.Maintenance.LockActionH\x00\x42\x08\n\x06\x61\x63tion\"?\n\x0b\x41\x63tionGroup\x12\x30\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x17.Ydb.Maintenance.ActionB\x06\x9a\xe6*\x02(\x01\"\xd5\x01\n\x1c\x43reateMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12=\n\x0ctask_options\x18\x02 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12;\n\raction_groups\x18\x03 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionGroupB\x06\x9a\xe6*\x02(\x01\"u\n\x1dRefreshMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"]\n\tActionUid\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x08group_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1a\n\taction_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\x8f\x06\n\x0b\x41\x63tionState\x12\'\n\x06\x61\x63tion\x18\x01 \x01(\x0b\x32\x17.Ydb.Maintenance.Action\x12.\n\naction_uid\x18\x02 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12\x39\n\x06status\x18\x03 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionStatus\x12\x39\n\x06reason\x18\x04 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionReason\x12\x16\n\x0ereason_details\x18\x06 \x01(\t\x12,\n\x08\x64\x65\x61\x64line\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x0c\x41\x63tionStatus\x12\x1d\n\x19\x41\x43TION_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41\x43TION_STATUS_PENDING\x10\x01\x12\x1b\n\x17\x41\x43TION_STATUS_PERFORMED\x10\x02\"\x83\x03\n\x0c\x41\x63tionReason\x12\x1d\n\x19\x41\x43TION_REASON_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41\x43TION_REASON_OK\x10\x01\x12-\n)ACTION_REASON_TOO_MANY_UNAVAILABLE_VDISKS\x10\x02\x12:\n6ACTION_REASON_TOO_MANY_UNAVAILABLE_STATE_STORAGE_RINGS\x10\x03\x12.\n*ACTION_REASON_DISABLED_NODES_LIMIT_REACHED\x10\x04\x12\x35\n1ACTION_REASON_TENANT_DISABLED_NODES_LIMIT_REACHED\x10\x05\x12\x1f\n\x1b\x41\x43TION_REASON_WRONG_REQUEST\x10\x06\x12\x30\n,ACTION_REASON_SYS_TABLETS_NODE_LIMIT_REACHED\x10\x07\x12\x19\n\x15\x41\x43TION_REASON_GENERIC\x10\x08\"H\n\x11\x41\x63tionGroupStates\x12\x33\n\raction_states\x18\x01 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionState\"\xb0\x01\n\x15MaintenanceTaskResult\x12\x10\n\x08task_uid\x18\x01 \x01(\t\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\x12\x34\n\x0bretry_after\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x42\x0e\n\x0c_retry_after\"G\n\x17MaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"q\n\x19GetMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\x9a\x01\n\x18GetMaintenanceTaskResult\x12=\n\x0ctask_options\x18\x01 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\"J\n\x1aGetMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"t\n\x1bListMaintenanceTasksRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x11\n\x04user\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_user\"0\n\x1aListMaintenanceTasksResult\x12\x12\n\ntasks_uids\x18\x01 \x03(\t\"L\n\x1cListMaintenanceTasksResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"r\n\x1a\x44ropMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"M\n\x1dManageMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x8b\x01\n\x15\x43ompleteActionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x37\n\x0b\x61\x63tion_uids\x18\x02 \x03(\x0b\x32\x1a.Ydb.Maintenance.ActionUidB\x06\x9a\xe6*\x02(\x01\"\xbe\x01\n\x12ManageActionResult\x12\x43\n\x0f\x61\x63tion_statuses\x18\x01 \x03(\x0b\x32*.Ydb.Maintenance.ManageActionResult.Status\x1a\x63\n\x06Status\x12.\n\naction_uid\x18\x01 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\"D\n\x14ManageActionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation*k\n\tItemState\x12\x1a\n\x16ITEM_STATE_UNSPECIFIED\x10\x00\x12\x11\n\rITEM_STATE_UP\x10\x01\x12\x1a\n\x16ITEM_STATE_MAINTENANCE\x10\x02\x12\x13\n\x0fITEM_STATE_DOWN\x10\x03*\x8c\x01\n\x10\x41vailabilityMode\x12!\n\x1d\x41VAILABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41VAILABILITY_MODE_STRONG\x10\x01\x12\x1a\n\x16\x41VAILABILITY_MODE_WEAK\x10\x02\x12\x1b\n\x17\x41VAILABILITY_MODE_FORCE\x10\x03\x42n\n#tech.ydb.proto.draft.maintenance.v1ZDgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_Maintenance\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.protos.ydb_maintenance_pb2', globals()) @@ -32,6 +32,8 @@ _MAINTENANCETASKOPTIONS.fields_by_name['task_uid']._serialized_options = b'\242\346*\003\030\200\001' _MAINTENANCETASKOPTIONS.fields_by_name['description']._options = None _MAINTENANCETASKOPTIONS.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200\001' + _MAINTENANCETASKOPTIONS.fields_by_name['priority']._options = None + _MAINTENANCETASKOPTIONS.fields_by_name['priority']._serialized_options = b'\262\346*\013[-100; 100]' _ACTIONSCOPE.fields_by_name['host']._options = None _ACTIONSCOPE.fields_by_name['host']._serialized_options = b'\242\346*\003\030\377\001' _ACTIONGROUP.fields_by_name['actions']._options = None @@ -52,10 +54,10 @@ _DROPMAINTENANCETASKREQUEST.fields_by_name['task_uid']._serialized_options = b'\242\346*\003\030\200\001' _COMPLETEACTIONREQUEST.fields_by_name['action_uids']._options = None _COMPLETEACTIONREQUEST.fields_by_name['action_uids']._serialized_options = b'\232\346*\002(\001' - _ITEMSTATE._serialized_start=3996 - _ITEMSTATE._serialized_end=4103 - _AVAILABILITYMODE._serialized_start=4106 - _AVAILABILITYMODE._serialized_end=4246 + _ITEMSTATE._serialized_start=4082 + _ITEMSTATE._serialized_end=4189 + _AVAILABILITYMODE._serialized_start=4192 + _AVAILABILITYMODE._serialized_end=4332 _NODE._serialized_start=245 _NODE._serialized_end=613 _NODE_STORAGENODE._serialized_start=561 @@ -69,55 +71,55 @@ _LISTCLUSTERNODESRESPONSE._serialized_start=765 _LISTCLUSTERNODESRESPONSE._serialized_end=837 _MAINTENANCETASKOPTIONS._serialized_start=840 - _MAINTENANCETASKOPTIONS._serialized_end=1000 - _ACTIONSCOPE._serialized_start=1002 - _ACTIONSCOPE._serialized_end=1068 - _LOCKACTION._serialized_start=1070 - _LOCKACTION._serialized_end=1172 - _ACTION._serialized_start=1174 - _ACTION._serialized_end=1244 - _ACTIONGROUP._serialized_start=1246 - _ACTIONGROUP._serialized_end=1309 - _CREATEMAINTENANCETASKREQUEST._serialized_start=1312 - _CREATEMAINTENANCETASKREQUEST._serialized_end=1525 - _REFRESHMAINTENANCETASKREQUEST._serialized_start=1527 - _REFRESHMAINTENANCETASKREQUEST._serialized_end=1644 - _ACTIONUID._serialized_start=1646 - _ACTIONUID._serialized_end=1739 - _ACTIONSTATE._serialized_start=1742 - _ACTIONSTATE._serialized_end=2474 - _ACTIONSTATE_ACTIONSTATUS._serialized_start=2010 - _ACTIONSTATE_ACTIONSTATUS._serialized_end=2111 - _ACTIONSTATE_ACTIONREASON._serialized_start=2114 - _ACTIONSTATE_ACTIONREASON._serialized_end=2474 - _ACTIONGROUPSTATES._serialized_start=2476 - _ACTIONGROUPSTATES._serialized_end=2548 - _MAINTENANCETASKRESULT._serialized_start=2551 - _MAINTENANCETASKRESULT._serialized_end=2727 - _MAINTENANCETASKRESPONSE._serialized_start=2729 - _MAINTENANCETASKRESPONSE._serialized_end=2800 - _GETMAINTENANCETASKREQUEST._serialized_start=2802 - _GETMAINTENANCETASKREQUEST._serialized_end=2915 - _GETMAINTENANCETASKRESULT._serialized_start=2918 - _GETMAINTENANCETASKRESULT._serialized_end=3072 - _GETMAINTENANCETASKRESPONSE._serialized_start=3074 - _GETMAINTENANCETASKRESPONSE._serialized_end=3148 - _LISTMAINTENANCETASKSREQUEST._serialized_start=3150 - _LISTMAINTENANCETASKSREQUEST._serialized_end=3266 - _LISTMAINTENANCETASKSRESULT._serialized_start=3268 - _LISTMAINTENANCETASKSRESULT._serialized_end=3316 - _LISTMAINTENANCETASKSRESPONSE._serialized_start=3318 - _LISTMAINTENANCETASKSRESPONSE._serialized_end=3394 - _DROPMAINTENANCETASKREQUEST._serialized_start=3396 - _DROPMAINTENANCETASKREQUEST._serialized_end=3510 - _MANAGEMAINTENANCETASKRESPONSE._serialized_start=3512 - _MANAGEMAINTENANCETASKRESPONSE._serialized_end=3589 - _COMPLETEACTIONREQUEST._serialized_start=3592 - _COMPLETEACTIONREQUEST._serialized_end=3731 - _MANAGEACTIONRESULT._serialized_start=3734 - _MANAGEACTIONRESULT._serialized_end=3924 - _MANAGEACTIONRESULT_STATUS._serialized_start=3825 - _MANAGEACTIONRESULT_STATUS._serialized_end=3924 - _MANAGEACTIONRESPONSE._serialized_start=3926 - _MANAGEACTIONRESPONSE._serialized_end=3994 + _MAINTENANCETASKOPTIONS._serialized_end=1035 + _ACTIONSCOPE._serialized_start=1037 + _ACTIONSCOPE._serialized_end=1103 + _LOCKACTION._serialized_start=1105 + _LOCKACTION._serialized_end=1207 + _ACTION._serialized_start=1209 + _ACTION._serialized_end=1279 + _ACTIONGROUP._serialized_start=1281 + _ACTIONGROUP._serialized_end=1344 + _CREATEMAINTENANCETASKREQUEST._serialized_start=1347 + _CREATEMAINTENANCETASKREQUEST._serialized_end=1560 + _REFRESHMAINTENANCETASKREQUEST._serialized_start=1562 + _REFRESHMAINTENANCETASKREQUEST._serialized_end=1679 + _ACTIONUID._serialized_start=1681 + _ACTIONUID._serialized_end=1774 + _ACTIONSTATE._serialized_start=1777 + _ACTIONSTATE._serialized_end=2560 + _ACTIONSTATE_ACTIONSTATUS._serialized_start=2069 + _ACTIONSTATE_ACTIONSTATUS._serialized_end=2170 + _ACTIONSTATE_ACTIONREASON._serialized_start=2173 + _ACTIONSTATE_ACTIONREASON._serialized_end=2560 + _ACTIONGROUPSTATES._serialized_start=2562 + _ACTIONGROUPSTATES._serialized_end=2634 + _MAINTENANCETASKRESULT._serialized_start=2637 + _MAINTENANCETASKRESULT._serialized_end=2813 + _MAINTENANCETASKRESPONSE._serialized_start=2815 + _MAINTENANCETASKRESPONSE._serialized_end=2886 + _GETMAINTENANCETASKREQUEST._serialized_start=2888 + _GETMAINTENANCETASKREQUEST._serialized_end=3001 + _GETMAINTENANCETASKRESULT._serialized_start=3004 + _GETMAINTENANCETASKRESULT._serialized_end=3158 + _GETMAINTENANCETASKRESPONSE._serialized_start=3160 + _GETMAINTENANCETASKRESPONSE._serialized_end=3234 + _LISTMAINTENANCETASKSREQUEST._serialized_start=3236 + _LISTMAINTENANCETASKSREQUEST._serialized_end=3352 + _LISTMAINTENANCETASKSRESULT._serialized_start=3354 + _LISTMAINTENANCETASKSRESULT._serialized_end=3402 + _LISTMAINTENANCETASKSRESPONSE._serialized_start=3404 + _LISTMAINTENANCETASKSRESPONSE._serialized_end=3480 + _DROPMAINTENANCETASKREQUEST._serialized_start=3482 + _DROPMAINTENANCETASKREQUEST._serialized_end=3596 + _MANAGEMAINTENANCETASKRESPONSE._serialized_start=3598 + _MANAGEMAINTENANCETASKRESPONSE._serialized_end=3675 + _COMPLETEACTIONREQUEST._serialized_start=3678 + _COMPLETEACTIONREQUEST._serialized_end=3817 + _MANAGEACTIONRESULT._serialized_start=3820 + _MANAGEACTIONRESULT._serialized_end=4010 + _MANAGEACTIONRESULT_STATUS._serialized_start=3911 + _MANAGEACTIONRESULT_STATUS._serialized_end=4010 + _MANAGEACTIONRESPONSE._serialized_start=4012 + _MANAGEACTIONRESPONSE._serialized_end=4080 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.pyi b/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.pyi index 45445843..20533943 100644 --- a/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.pyi +++ b/ydb/_grpc/v4/draft/protos/ydb_maintenance_pb2.pyi @@ -47,13 +47,14 @@ class ActionScope(_message.Message): def __init__(self, node_id: _Optional[int] = ..., host: _Optional[str] = ...) -> None: ... class ActionState(_message.Message): - __slots__ = ["action", "action_uid", "deadline", "reason", "status"] + __slots__ = ["action", "action_uid", "deadline", "reason", "reason_details", "status"] class ActionReason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] class ActionStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] ACTION_FIELD_NUMBER: _ClassVar[int] ACTION_REASON_DISABLED_NODES_LIMIT_REACHED: ActionState.ActionReason + ACTION_REASON_GENERIC: ActionState.ActionReason ACTION_REASON_OK: ActionState.ActionReason ACTION_REASON_SYS_TABLETS_NODE_LIMIT_REACHED: ActionState.ActionReason ACTION_REASON_TENANT_DISABLED_NODES_LIMIT_REACHED: ActionState.ActionReason @@ -66,14 +67,16 @@ class ActionState(_message.Message): ACTION_STATUS_UNSPECIFIED: ActionState.ActionStatus ACTION_UID_FIELD_NUMBER: _ClassVar[int] DEADLINE_FIELD_NUMBER: _ClassVar[int] + REASON_DETAILS_FIELD_NUMBER: _ClassVar[int] REASON_FIELD_NUMBER: _ClassVar[int] STATUS_FIELD_NUMBER: _ClassVar[int] action: Action action_uid: ActionUid deadline: _timestamp_pb2.Timestamp reason: ActionState.ActionReason + reason_details: str status: ActionState.ActionStatus - def __init__(self, action: _Optional[_Union[Action, _Mapping]] = ..., action_uid: _Optional[_Union[ActionUid, _Mapping]] = ..., status: _Optional[_Union[ActionState.ActionStatus, str]] = ..., reason: _Optional[_Union[ActionState.ActionReason, str]] = ..., deadline: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, action: _Optional[_Union[Action, _Mapping]] = ..., action_uid: _Optional[_Union[ActionUid, _Mapping]] = ..., status: _Optional[_Union[ActionState.ActionStatus, str]] = ..., reason: _Optional[_Union[ActionState.ActionReason, str]] = ..., reason_details: _Optional[str] = ..., deadline: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class ActionUid(_message.Message): __slots__ = ["action_id", "group_id", "task_uid"] @@ -180,16 +183,18 @@ class LockAction(_message.Message): def __init__(self, scope: _Optional[_Union[ActionScope, _Mapping]] = ..., duration: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...) -> None: ... class MaintenanceTaskOptions(_message.Message): - __slots__ = ["availability_mode", "description", "dry_run", "task_uid"] + __slots__ = ["availability_mode", "description", "dry_run", "priority", "task_uid"] AVAILABILITY_MODE_FIELD_NUMBER: _ClassVar[int] DESCRIPTION_FIELD_NUMBER: _ClassVar[int] DRY_RUN_FIELD_NUMBER: _ClassVar[int] + PRIORITY_FIELD_NUMBER: _ClassVar[int] TASK_UID_FIELD_NUMBER: _ClassVar[int] availability_mode: AvailabilityMode description: str dry_run: bool + priority: int task_uid: str - def __init__(self, task_uid: _Optional[str] = ..., description: _Optional[str] = ..., availability_mode: _Optional[_Union[AvailabilityMode, str]] = ..., dry_run: bool = ...) -> None: ... + def __init__(self, task_uid: _Optional[str] = ..., description: _Optional[str] = ..., availability_mode: _Optional[_Union[AvailabilityMode, str]] = ..., dry_run: bool = ..., priority: _Optional[int] = ...) -> None: ... class MaintenanceTaskResponse(_message.Message): __slots__ = ["operation"] diff --git a/ydb/_grpc/v4/protos/ydb_export_pb2.py b/ydb/_grpc/v4/protos/ydb_export_pb2.py index 98110c14..8e6e9621 100644 --- a/ydb/_grpc/v4/protos/ydb_export_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_export_pb2.py @@ -17,7 +17,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_export.proto\x12\nYdb.Export\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x0e\x45xportProgress\"\x9e\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x11\n\rPROGRESS_DONE\x10\x03\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x04\x12\x16\n\x12PROGRESS_CANCELLED\x10\x05\"\xa0\x01\n\x12\x45xportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x98\x02\n\x12\x45xportToYtSettings\x12\x12\n\x04host\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x13\n\x05token\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x04 \x03(\x0b\x32#.Ydb.Export.ExportToYtSettings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x06 \x01(\r\x12\x13\n\x0buse_type_v3\x18\x07 \x01(\x08\x1a\x41\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\"\x12\n\x10\x45xportToYtResult\"\xb5\x01\n\x12\x45xportToYtMetadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToYtRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToYtResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xbd\x05\n\x12\x45xportToS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x35\n\x06scheme\x18\x02 \x01(\x0e\x32%.Ydb.Export.ExportToS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x06 \x03(\x0b\x32#.Ydb.Export.ExportToS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x42\n\rstorage_class\x18\t \x01(\x0e\x32+.Ydb.Export.ExportToS3Settings.StorageClass\x12\x13\n\x0b\x63ompression\x18\n \x01(\t\x12\x0e\n\x06region\x18\x0b \x01(\t\x1a\x43\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12 \n\x12\x64\x65stination_prefix\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\xba\x01\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x16\n\x12REDUCED_REDUNDANCY\x10\x02\x12\x0f\n\x0bSTANDARD_IA\x10\x03\x12\x0e\n\nONEZONE_IA\x10\x04\x12\x17\n\x13INTELLIGENT_TIERING\x10\x05\x12\x0b\n\x07GLACIER\x10\x06\x12\x10\n\x0c\x44\x45\x45P_ARCHIVE\x10\x07\x12\x0c\n\x08OUTPOSTS\x10\x08\"\x12\n\x10\x45xportToS3Result\"\xb5\x01\n\x12\x45xportToS3Metadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3SettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBU\n\x15tech.ydb.proto.exportZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_export.proto\x12\nYdb.Export\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x0e\x45xportProgress\"\x9e\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x11\n\rPROGRESS_DONE\x10\x03\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x04\x12\x16\n\x12PROGRESS_CANCELLED\x10\x05\"\xa0\x01\n\x12\x45xportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x98\x02\n\x12\x45xportToYtSettings\x12\x12\n\x04host\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x13\n\x05token\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x04 \x03(\x0b\x32#.Ydb.Export.ExportToYtSettings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x06 \x01(\r\x12\x13\n\x0buse_type_v3\x18\x07 \x01(\x08\x1a\x41\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\"\x12\n\x10\x45xportToYtResult\"\xb5\x01\n\x12\x45xportToYtMetadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToYtRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToYtResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xe1\x05\n\x12\x45xportToS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x35\n\x06scheme\x18\x02 \x01(\x0e\x32%.Ydb.Export.ExportToS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x06 \x03(\x0b\x32#.Ydb.Export.ExportToS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x42\n\rstorage_class\x18\t \x01(\x0e\x32+.Ydb.Export.ExportToS3Settings.StorageClass\x12\x13\n\x0b\x63ompression\x18\n \x01(\t\x12\x0e\n\x06region\x18\x0b \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\x0c \x01(\x08\x1a\x43\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12 \n\x12\x64\x65stination_prefix\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\xba\x01\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x16\n\x12REDUCED_REDUNDANCY\x10\x02\x12\x0f\n\x0bSTANDARD_IA\x10\x03\x12\x0e\n\nONEZONE_IA\x10\x04\x12\x17\n\x13INTELLIGENT_TIERING\x10\x05\x12\x0b\n\x07GLACIER\x10\x06\x12\x10\n\x0c\x44\x45\x45P_ARCHIVE\x10\x07\x12\x0c\n\x08OUTPOSTS\x10\x08\"\x12\n\x10\x45xportToS3Result\"\xb5\x01\n\x12\x45xportToS3Metadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3SettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBU\n\x15tech.ydb.proto.exportZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_export_pb2', globals()) @@ -76,19 +76,19 @@ _EXPORTTOYTRESPONSE._serialized_start=1104 _EXPORTTOYTRESPONSE._serialized_end=1170 _EXPORTTOS3SETTINGS._serialized_start=1173 - _EXPORTTOS3SETTINGS._serialized_end=1874 - _EXPORTTOS3SETTINGS_ITEM._serialized_start=1570 - _EXPORTTOS3SETTINGS_ITEM._serialized_end=1637 - _EXPORTTOS3SETTINGS_SCHEME._serialized_start=1639 - _EXPORTTOS3SETTINGS_SCHEME._serialized_end=1685 - _EXPORTTOS3SETTINGS_STORAGECLASS._serialized_start=1688 - _EXPORTTOS3SETTINGS_STORAGECLASS._serialized_end=1874 - _EXPORTTOS3RESULT._serialized_start=1876 - _EXPORTTOS3RESULT._serialized_end=1894 - _EXPORTTOS3METADATA._serialized_start=1897 - _EXPORTTOS3METADATA._serialized_end=2078 - _EXPORTTOS3REQUEST._serialized_start=2081 - _EXPORTTOS3REQUEST._serialized_end=2215 - _EXPORTTOS3RESPONSE._serialized_start=2217 - _EXPORTTOS3RESPONSE._serialized_end=2283 + _EXPORTTOS3SETTINGS._serialized_end=1910 + _EXPORTTOS3SETTINGS_ITEM._serialized_start=1606 + _EXPORTTOS3SETTINGS_ITEM._serialized_end=1673 + _EXPORTTOS3SETTINGS_SCHEME._serialized_start=1675 + _EXPORTTOS3SETTINGS_SCHEME._serialized_end=1721 + _EXPORTTOS3SETTINGS_STORAGECLASS._serialized_start=1724 + _EXPORTTOS3SETTINGS_STORAGECLASS._serialized_end=1910 + _EXPORTTOS3RESULT._serialized_start=1912 + _EXPORTTOS3RESULT._serialized_end=1930 + _EXPORTTOS3METADATA._serialized_start=1933 + _EXPORTTOS3METADATA._serialized_end=2114 + _EXPORTTOS3REQUEST._serialized_start=2117 + _EXPORTTOS3REQUEST._serialized_end=2251 + _EXPORTTOS3RESPONSE._serialized_start=2253 + _EXPORTTOS3RESPONSE._serialized_end=2319 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_export_pb2.pyi b/ydb/_grpc/v4/protos/ydb_export_pb2.pyi index f794e25d..14af9169 100644 --- a/ydb/_grpc/v4/protos/ydb_export_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_export_pb2.pyi @@ -62,7 +62,7 @@ class ExportToS3Result(_message.Message): def __init__(self) -> None: ... class ExportToS3Settings(_message.Message): - __slots__ = ["access_key", "bucket", "compression", "description", "endpoint", "items", "number_of_retries", "region", "scheme", "secret_key", "storage_class"] + __slots__ = ["access_key", "bucket", "compression", "description", "disable_virtual_addressing", "endpoint", "items", "number_of_retries", "region", "scheme", "secret_key", "storage_class"] class Scheme(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] class StorageClass(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): @@ -79,6 +79,7 @@ class ExportToS3Settings(_message.Message): COMPRESSION_FIELD_NUMBER: _ClassVar[int] DEEP_ARCHIVE: ExportToS3Settings.StorageClass DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + DISABLE_VIRTUAL_ADDRESSING_FIELD_NUMBER: _ClassVar[int] ENDPOINT_FIELD_NUMBER: _ClassVar[int] GLACIER: ExportToS3Settings.StorageClass HTTP: ExportToS3Settings.Scheme @@ -101,6 +102,7 @@ class ExportToS3Settings(_message.Message): bucket: str compression: str description: str + disable_virtual_addressing: bool endpoint: str items: _containers.RepeatedCompositeFieldContainer[ExportToS3Settings.Item] number_of_retries: int @@ -108,7 +110,7 @@ class ExportToS3Settings(_message.Message): scheme: ExportToS3Settings.Scheme secret_key: str storage_class: ExportToS3Settings.StorageClass - def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ExportToS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ExportToS3Settings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., storage_class: _Optional[_Union[ExportToS3Settings.StorageClass, str]] = ..., compression: _Optional[str] = ..., region: _Optional[str] = ...) -> None: ... + def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ExportToS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ExportToS3Settings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., storage_class: _Optional[_Union[ExportToS3Settings.StorageClass, str]] = ..., compression: _Optional[str] = ..., region: _Optional[str] = ..., disable_virtual_addressing: bool = ...) -> None: ... class ExportToYtMetadata(_message.Message): __slots__ = ["items_progress", "progress", "settings"] diff --git a/ydb/_grpc/v4/protos/ydb_formats_pb2.py b/ydb/_grpc/v4/protos/ydb_formats_pb2.py index 8450bd0e..3a58d2be 100644 --- a/ydb/_grpc/v4/protos/ydb_formats_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_formats_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18protos/ydb_formats.proto\x12\x0bYdb.Formats\"$\n\x12\x41rrowBatchSettings\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\"W\n\x0b\x43svSettings\x12\x11\n\tskip_rows\x18\x01 \x01(\r\x12\x11\n\tdelimiter\x18\x02 \x01(\x0c\x12\x12\n\nnull_value\x18\x03 \x01(\x0c\x12\x0e\n\x06header\x18\x04 \x01(\x08\x42W\n\x16tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18protos/ydb_formats.proto\x12\x0bYdb.Formats\"$\n\x12\x41rrowBatchSettings\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\"\xda\x01\n\x0b\x43svSettings\x12\x11\n\tskip_rows\x18\x01 \x01(\r\x12\x11\n\tdelimiter\x18\x02 \x01(\x0c\x12\x12\n\nnull_value\x18\x03 \x01(\x0c\x12\x0e\n\x06header\x18\x04 \x01(\x08\x12\x31\n\x07quoting\x18\x05 \x01(\x0b\x32 .Ydb.Formats.CsvSettings.Quoting\x1aN\n\x07Quoting\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12\x12\n\nquote_char\x18\x02 \x01(\x0c\x12\x1d\n\x15\x64ouble_quote_disabled\x18\x03 \x01(\x08\x42W\n\x16tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_formats_pb2', globals()) @@ -24,6 +24,8 @@ DESCRIPTOR._serialized_options = b'\n\026tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\370\001\001' _ARROWBATCHSETTINGS._serialized_start=41 _ARROWBATCHSETTINGS._serialized_end=77 - _CSVSETTINGS._serialized_start=79 - _CSVSETTINGS._serialized_end=166 + _CSVSETTINGS._serialized_start=80 + _CSVSETTINGS._serialized_end=298 + _CSVSETTINGS_QUOTING._serialized_start=220 + _CSVSETTINGS_QUOTING._serialized_end=298 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_formats_pb2.pyi b/ydb/_grpc/v4/protos/ydb_formats_pb2.pyi index bb8fc3dd..38682d14 100644 --- a/ydb/_grpc/v4/protos/ydb_formats_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_formats_pb2.pyi @@ -1,6 +1,6 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Optional as _Optional +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor @@ -11,13 +11,24 @@ class ArrowBatchSettings(_message.Message): def __init__(self, schema: _Optional[bytes] = ...) -> None: ... class CsvSettings(_message.Message): - __slots__ = ["delimiter", "header", "null_value", "skip_rows"] + __slots__ = ["delimiter", "header", "null_value", "quoting", "skip_rows"] + class Quoting(_message.Message): + __slots__ = ["disabled", "double_quote_disabled", "quote_char"] + DISABLED_FIELD_NUMBER: _ClassVar[int] + DOUBLE_QUOTE_DISABLED_FIELD_NUMBER: _ClassVar[int] + QUOTE_CHAR_FIELD_NUMBER: _ClassVar[int] + disabled: bool + double_quote_disabled: bool + quote_char: bytes + def __init__(self, disabled: bool = ..., quote_char: _Optional[bytes] = ..., double_quote_disabled: bool = ...) -> None: ... DELIMITER_FIELD_NUMBER: _ClassVar[int] HEADER_FIELD_NUMBER: _ClassVar[int] NULL_VALUE_FIELD_NUMBER: _ClassVar[int] + QUOTING_FIELD_NUMBER: _ClassVar[int] SKIP_ROWS_FIELD_NUMBER: _ClassVar[int] delimiter: bytes header: bool null_value: bytes + quoting: CsvSettings.Quoting skip_rows: int - def __init__(self, skip_rows: _Optional[int] = ..., delimiter: _Optional[bytes] = ..., null_value: _Optional[bytes] = ..., header: bool = ...) -> None: ... + def __init__(self, skip_rows: _Optional[int] = ..., delimiter: _Optional[bytes] = ..., null_value: _Optional[bytes] = ..., header: bool = ..., quoting: _Optional[_Union[CsvSettings.Quoting, _Mapping]] = ...) -> None: ... diff --git a/ydb/_grpc/v4/protos/ydb_import_pb2.py b/ydb/_grpc/v4/protos/ydb_import_pb2.py index db87a18c..c4da1140 100644 --- a/ydb/_grpc/v4/protos/ydb_import_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_import_pb2.py @@ -17,7 +17,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_import.proto\x12\nYdb.Import\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcd\x01\n\x0eImportProgress\"\xba\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x1a\n\x16PROGRESS_BUILD_INDEXES\x10\x03\x12\x11\n\rPROGRESS_DONE\x10\x04\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x05\x12\x16\n\x12PROGRESS_CANCELLED\x10\x06\"\xa0\x01\n\x12ImportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xad\x03\n\x14ImportFromS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x37\n\x06scheme\x18\x02 \x01(\x0e\x32\'.Ydb.Import.ImportFromS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12<\n\x05items\x18\x06 \x03(\x0b\x32%.Ydb.Import.ImportFromS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x0e\n\x06region\x18\t \x01(\t\x1a\x43\n\x04Item\x12\x1b\n\rsource_prefix\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\x14\n\x12ImportFromS3Result\"\xb9\x01\n\x14ImportFromS3Metadata\x12\x32\n\x08settings\x18\x01 \x01(\x0b\x32 .Ydb.Import.ImportFromS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Import.ImportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Import.ImportItemProgress\"\x8a\x01\n\x13ImportFromS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x38\n\x08settings\x18\x02 \x01(\x0b\x32 .Ydb.Import.ImportFromS3SettingsB\x04\x90\xe6*\x01\"D\n\x14ImportFromS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\" \n\rYdbDumpFormat\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\"\x12\n\x10ImportDataResult\"\xae\x01\n\x11ImportDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x17\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x42\t\xa2\xe6*\x05\x18\x80\x80\x80\x04\x12-\n\x08ydb_dump\x18\x04 \x01(\x0b\x32\x19.Ydb.Import.YdbDumpFormatH\x00\x42\x08\n\x06\x66ormat\"B\n\x12ImportDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBV\n\x16tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_import.proto\x12\nYdb.Import\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcd\x01\n\x0eImportProgress\"\xba\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x1a\n\x16PROGRESS_BUILD_INDEXES\x10\x03\x12\x11\n\rPROGRESS_DONE\x10\x04\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x05\x12\x16\n\x12PROGRESS_CANCELLED\x10\x06\"\xa0\x01\n\x12ImportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd1\x03\n\x14ImportFromS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x37\n\x06scheme\x18\x02 \x01(\x0e\x32\'.Ydb.Import.ImportFromS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12<\n\x05items\x18\x06 \x03(\x0b\x32%.Ydb.Import.ImportFromS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x0e\n\x06region\x18\t \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\n \x01(\x08\x1a\x43\n\x04Item\x12\x1b\n\rsource_prefix\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\x14\n\x12ImportFromS3Result\"\xb9\x01\n\x14ImportFromS3Metadata\x12\x32\n\x08settings\x18\x01 \x01(\x0b\x32 .Ydb.Import.ImportFromS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Import.ImportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Import.ImportItemProgress\"\x8a\x01\n\x13ImportFromS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x38\n\x08settings\x18\x02 \x01(\x0b\x32 .Ydb.Import.ImportFromS3SettingsB\x04\x90\xe6*\x01\"D\n\x14ImportFromS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\" \n\rYdbDumpFormat\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\"\x12\n\x10ImportDataResult\"\xae\x01\n\x11ImportDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x17\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x42\t\xa2\xe6*\x05\x18\x80\x80\x80\x04\x12-\n\x08ydb_dump\x18\x04 \x01(\x0b\x32\x19.Ydb.Import.YdbDumpFormatH\x00\x42\x08\n\x06\x66ormat\"B\n\x12ImportDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBV\n\x16tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_import_pb2', globals()) @@ -52,25 +52,25 @@ _IMPORTITEMPROGRESS._serialized_start=346 _IMPORTITEMPROGRESS._serialized_end=506 _IMPORTFROMS3SETTINGS._serialized_start=509 - _IMPORTFROMS3SETTINGS._serialized_end=938 - _IMPORTFROMS3SETTINGS_ITEM._serialized_start=823 - _IMPORTFROMS3SETTINGS_ITEM._serialized_end=890 - _IMPORTFROMS3SETTINGS_SCHEME._serialized_start=892 - _IMPORTFROMS3SETTINGS_SCHEME._serialized_end=938 - _IMPORTFROMS3RESULT._serialized_start=940 - _IMPORTFROMS3RESULT._serialized_end=960 - _IMPORTFROMS3METADATA._serialized_start=963 - _IMPORTFROMS3METADATA._serialized_end=1148 - _IMPORTFROMS3REQUEST._serialized_start=1151 - _IMPORTFROMS3REQUEST._serialized_end=1289 - _IMPORTFROMS3RESPONSE._serialized_start=1291 - _IMPORTFROMS3RESPONSE._serialized_end=1359 - _YDBDUMPFORMAT._serialized_start=1361 - _YDBDUMPFORMAT._serialized_end=1393 - _IMPORTDATARESULT._serialized_start=1395 - _IMPORTDATARESULT._serialized_end=1413 - _IMPORTDATAREQUEST._serialized_start=1416 - _IMPORTDATAREQUEST._serialized_end=1590 - _IMPORTDATARESPONSE._serialized_start=1592 - _IMPORTDATARESPONSE._serialized_end=1658 + _IMPORTFROMS3SETTINGS._serialized_end=974 + _IMPORTFROMS3SETTINGS_ITEM._serialized_start=859 + _IMPORTFROMS3SETTINGS_ITEM._serialized_end=926 + _IMPORTFROMS3SETTINGS_SCHEME._serialized_start=928 + _IMPORTFROMS3SETTINGS_SCHEME._serialized_end=974 + _IMPORTFROMS3RESULT._serialized_start=976 + _IMPORTFROMS3RESULT._serialized_end=996 + _IMPORTFROMS3METADATA._serialized_start=999 + _IMPORTFROMS3METADATA._serialized_end=1184 + _IMPORTFROMS3REQUEST._serialized_start=1187 + _IMPORTFROMS3REQUEST._serialized_end=1325 + _IMPORTFROMS3RESPONSE._serialized_start=1327 + _IMPORTFROMS3RESPONSE._serialized_end=1395 + _YDBDUMPFORMAT._serialized_start=1397 + _YDBDUMPFORMAT._serialized_end=1429 + _IMPORTDATARESULT._serialized_start=1431 + _IMPORTDATARESULT._serialized_end=1449 + _IMPORTDATAREQUEST._serialized_start=1452 + _IMPORTDATAREQUEST._serialized_end=1626 + _IMPORTDATARESPONSE._serialized_start=1628 + _IMPORTDATARESPONSE._serialized_end=1694 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_import_pb2.pyi b/ydb/_grpc/v4/protos/ydb_import_pb2.pyi index 73551100..d3b394ab 100644 --- a/ydb/_grpc/v4/protos/ydb_import_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_import_pb2.pyi @@ -60,7 +60,7 @@ class ImportFromS3Result(_message.Message): def __init__(self) -> None: ... class ImportFromS3Settings(_message.Message): - __slots__ = ["access_key", "bucket", "description", "endpoint", "items", "number_of_retries", "region", "scheme", "secret_key"] + __slots__ = ["access_key", "bucket", "description", "disable_virtual_addressing", "endpoint", "items", "number_of_retries", "region", "scheme", "secret_key"] class Scheme(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] class Item(_message.Message): @@ -73,6 +73,7 @@ class ImportFromS3Settings(_message.Message): ACCESS_KEY_FIELD_NUMBER: _ClassVar[int] BUCKET_FIELD_NUMBER: _ClassVar[int] DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + DISABLE_VIRTUAL_ADDRESSING_FIELD_NUMBER: _ClassVar[int] ENDPOINT_FIELD_NUMBER: _ClassVar[int] HTTP: ImportFromS3Settings.Scheme HTTPS: ImportFromS3Settings.Scheme @@ -85,13 +86,14 @@ class ImportFromS3Settings(_message.Message): access_key: str bucket: str description: str + disable_virtual_addressing: bool endpoint: str items: _containers.RepeatedCompositeFieldContainer[ImportFromS3Settings.Item] number_of_retries: int region: str scheme: ImportFromS3Settings.Scheme secret_key: str - def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ImportFromS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ImportFromS3Settings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., region: _Optional[str] = ...) -> None: ... + def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ImportFromS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ImportFromS3Settings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., region: _Optional[str] = ..., disable_virtual_addressing: bool = ...) -> None: ... class ImportItemProgress(_message.Message): __slots__ = ["end_time", "parts_completed", "parts_total", "start_time"] diff --git a/ydb/_grpc/v4/protos/ydb_query_pb2.py b/ydb/_grpc/v4/protos/ydb_query_pb2.py index eae90c97..582ca71b 100644 --- a/ydb/_grpc/v4/protos/ydb_query_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_query_pb2.py @@ -21,7 +21,7 @@ from ydb._grpc.v4.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\x9a\x03\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\x93\x02\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12+\n\x07tx_meta\x18\x06 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"\x8d\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\xe1\x03\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x12\x34\n\x19response_part_limit_bytes\x18\t \x01(\x03\x42\x11\xb2\xe6*\r[0; 33554432]\x12\x0f\n\x07pool_id\x18\n \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\x93\x02\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12+\n\x07tx_meta\x18\x06 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"\x9e\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07pool_id\x18\x07 \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_query_pb2', globals()) @@ -55,6 +55,8 @@ _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_options = b'8\001' _EXECUTEQUERYREQUEST.fields_by_name['session_id']._options = None _EXECUTEQUERYREQUEST.fields_by_name['session_id']._serialized_options = b'\242\346*\003\030\200\010' + _EXECUTEQUERYREQUEST.fields_by_name['response_part_limit_bytes']._options = None + _EXECUTEQUERYREQUEST.fields_by_name['response_part_limit_bytes']._serialized_options = b'\262\346*\r[0; 33554432]' _EXECUTEQUERYRESPONSEPART.fields_by_name['result_set_index']._options = None _EXECUTEQUERYRESPONSEPART.fields_by_name['result_set_index']._serialized_options = b'\262\346*\004>= 0' _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._options = None @@ -71,14 +73,14 @@ _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['result_set_index']._serialized_options = b'\262\346*\004>= 0' _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['next_fetch_token']._options = None _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['next_fetch_token']._serialized_options = b'\242\346*\003\030\200\010' - _SYNTAX._serialized_start=3926 - _SYNTAX._serialized_end=3992 - _EXECMODE._serialized_start=3995 - _EXECMODE._serialized_end=4129 - _STATSMODE._serialized_start=4131 - _STATSMODE._serialized_end=4258 - _EXECSTATUS._serialized_start=4261 - _EXECSTATUS._serialized_end=4431 + _SYNTAX._serialized_start=4014 + _SYNTAX._serialized_end=4080 + _EXECMODE._serialized_start=4083 + _EXECMODE._serialized_end=4217 + _STATSMODE._serialized_start=4219 + _STATSMODE._serialized_end=4346 + _EXECSTATUS._serialized_start=4349 + _EXECSTATUS._serialized_end=4519 _CREATESESSIONREQUEST._serialized_start=251 _CREATESESSIONREQUEST._serialized_end=273 _CREATESESSIONRESPONSE._serialized_start=276 @@ -120,23 +122,23 @@ _QUERYCONTENT._serialized_start=2005 _QUERYCONTENT._serialized_end=2068 _EXECUTEQUERYREQUEST._serialized_start=2071 - _EXECUTEQUERYREQUEST._serialized_end=2481 - _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_start=2406 - _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_end=2472 - _RESULTSETMETA._serialized_start=2483 - _RESULTSETMETA._serialized_end=2528 - _EXECUTEQUERYRESPONSEPART._serialized_start=2531 - _EXECUTEQUERYRESPONSEPART._serialized_end=2806 - _EXECUTESCRIPTREQUEST._serialized_start=2809 - _EXECUTESCRIPTREQUEST._serialized_end=3206 - _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_start=2406 - _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_end=2472 - _EXECUTESCRIPTMETADATA._serialized_start=3209 - _EXECUTESCRIPTMETADATA._serialized_end=3496 - _FETCHSCRIPTRESULTSREQUEST._serialized_start=3499 - _FETCHSCRIPTRESULTSREQUEST._serialized_end=3643 - _FETCHSCRIPTRESULTSRESPONSE._serialized_start=3646 - _FETCHSCRIPTRESULTSRESPONSE._serialized_end=3865 - _SCRIPT._serialized_start=3867 - _SCRIPT._serialized_end=3924 + _EXECUTEQUERYREQUEST._serialized_end=2552 + _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_start=2477 + _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_end=2543 + _RESULTSETMETA._serialized_start=2554 + _RESULTSETMETA._serialized_end=2599 + _EXECUTEQUERYRESPONSEPART._serialized_start=2602 + _EXECUTEQUERYRESPONSEPART._serialized_end=2877 + _EXECUTESCRIPTREQUEST._serialized_start=2880 + _EXECUTESCRIPTREQUEST._serialized_end=3294 + _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_start=2477 + _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_end=2543 + _EXECUTESCRIPTMETADATA._serialized_start=3297 + _EXECUTESCRIPTMETADATA._serialized_end=3584 + _FETCHSCRIPTRESULTSREQUEST._serialized_start=3587 + _FETCHSCRIPTRESULTSREQUEST._serialized_end=3731 + _FETCHSCRIPTRESULTSRESPONSE._serialized_start=3734 + _FETCHSCRIPTRESULTSRESPONSE._serialized_end=3953 + _SCRIPT._serialized_start=3955 + _SCRIPT._serialized_end=4012 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_query_pb2.pyi b/ydb/_grpc/v4/protos/ydb_query_pb2.pyi index bd787a1d..621827b2 100644 --- a/ydb/_grpc/v4/protos/ydb_query_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_query_pb2.pyi @@ -103,7 +103,7 @@ class DeleteSessionResponse(_message.Message): def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ...) -> None: ... class ExecuteQueryRequest(_message.Message): - __slots__ = ["concurrent_result_sets", "exec_mode", "parameters", "query_content", "session_id", "stats_mode", "tx_control"] + __slots__ = ["concurrent_result_sets", "exec_mode", "parameters", "pool_id", "query_content", "response_part_limit_bytes", "session_id", "stats_mode", "tx_control"] class ParametersEntry(_message.Message): __slots__ = ["key", "value"] KEY_FIELD_NUMBER: _ClassVar[int] @@ -114,18 +114,22 @@ class ExecuteQueryRequest(_message.Message): CONCURRENT_RESULT_SETS_FIELD_NUMBER: _ClassVar[int] EXEC_MODE_FIELD_NUMBER: _ClassVar[int] PARAMETERS_FIELD_NUMBER: _ClassVar[int] + POOL_ID_FIELD_NUMBER: _ClassVar[int] QUERY_CONTENT_FIELD_NUMBER: _ClassVar[int] + RESPONSE_PART_LIMIT_BYTES_FIELD_NUMBER: _ClassVar[int] SESSION_ID_FIELD_NUMBER: _ClassVar[int] STATS_MODE_FIELD_NUMBER: _ClassVar[int] TX_CONTROL_FIELD_NUMBER: _ClassVar[int] concurrent_result_sets: bool exec_mode: ExecMode parameters: _containers.MessageMap[str, _ydb_value_pb2.TypedValue] + pool_id: str query_content: QueryContent + response_part_limit_bytes: int session_id: str stats_mode: StatsMode tx_control: TransactionControl - def __init__(self, session_id: _Optional[str] = ..., exec_mode: _Optional[_Union[ExecMode, str]] = ..., tx_control: _Optional[_Union[TransactionControl, _Mapping]] = ..., query_content: _Optional[_Union[QueryContent, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., stats_mode: _Optional[_Union[StatsMode, str]] = ..., concurrent_result_sets: bool = ...) -> None: ... + def __init__(self, session_id: _Optional[str] = ..., exec_mode: _Optional[_Union[ExecMode, str]] = ..., tx_control: _Optional[_Union[TransactionControl, _Mapping]] = ..., query_content: _Optional[_Union[QueryContent, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., stats_mode: _Optional[_Union[StatsMode, str]] = ..., concurrent_result_sets: bool = ..., response_part_limit_bytes: _Optional[int] = ..., pool_id: _Optional[str] = ...) -> None: ... class ExecuteQueryResponsePart(_message.Message): __slots__ = ["exec_stats", "issues", "result_set", "result_set_index", "status", "tx_meta"] @@ -160,7 +164,7 @@ class ExecuteScriptMetadata(_message.Message): def __init__(self, execution_id: _Optional[str] = ..., exec_status: _Optional[_Union[ExecStatus, str]] = ..., script_content: _Optional[_Union[QueryContent, _Mapping]] = ..., result_sets_meta: _Optional[_Iterable[_Union[ResultSetMeta, _Mapping]]] = ..., exec_mode: _Optional[_Union[ExecMode, str]] = ..., exec_stats: _Optional[_Union[_ydb_query_stats_pb2.QueryStats, _Mapping]] = ...) -> None: ... class ExecuteScriptRequest(_message.Message): - __slots__ = ["exec_mode", "operation_params", "parameters", "results_ttl", "script_content", "stats_mode"] + __slots__ = ["exec_mode", "operation_params", "parameters", "pool_id", "results_ttl", "script_content", "stats_mode"] class ParametersEntry(_message.Message): __slots__ = ["key", "value"] KEY_FIELD_NUMBER: _ClassVar[int] @@ -171,16 +175,18 @@ class ExecuteScriptRequest(_message.Message): EXEC_MODE_FIELD_NUMBER: _ClassVar[int] OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] PARAMETERS_FIELD_NUMBER: _ClassVar[int] + POOL_ID_FIELD_NUMBER: _ClassVar[int] RESULTS_TTL_FIELD_NUMBER: _ClassVar[int] SCRIPT_CONTENT_FIELD_NUMBER: _ClassVar[int] STATS_MODE_FIELD_NUMBER: _ClassVar[int] exec_mode: ExecMode operation_params: _ydb_operation_pb2.OperationParams parameters: _containers.MessageMap[str, _ydb_value_pb2.TypedValue] + pool_id: str results_ttl: _duration_pb2.Duration script_content: QueryContent stats_mode: StatsMode - def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., exec_mode: _Optional[_Union[ExecMode, str]] = ..., script_content: _Optional[_Union[QueryContent, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., stats_mode: _Optional[_Union[StatsMode, str]] = ..., results_ttl: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...) -> None: ... + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., exec_mode: _Optional[_Union[ExecMode, str]] = ..., script_content: _Optional[_Union[QueryContent, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., stats_mode: _Optional[_Union[StatsMode, str]] = ..., results_ttl: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., pool_id: _Optional[str] = ...) -> None: ... class FetchScriptResultsRequest(_message.Message): __slots__ = ["fetch_token", "operation_id", "result_set_index", "rows_limit"] diff --git a/ydb/_grpc/v4/protos/ydb_scheme_pb2.py b/ydb/_grpc/v4/protos/ydb_scheme_pb2.py index 421a0be4..47ee7fd6 100644 --- a/ydb/_grpc/v4/protos/ydb_scheme_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_scheme_pb2.py @@ -16,7 +16,7 @@ from ydb._grpc.v4.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_scheme.proto\x12\nYdb.Scheme\x1a\x17protos/ydb_common.proto\x1a\x1aprotos/ydb_operation.proto\"_\n\x14MakeDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"E\n\x15MakeDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"a\n\x16RemoveDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"G\n\x17RemoveDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x14ListDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"E\n\x15ListDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"8\n\x0bPermissions\x12\x0f\n\x07subject\x18\x01 \x01(\t\x12\x18\n\x10permission_names\x18\x02 \x03(\t\"\xda\x03\n\x05\x45ntry\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05owner\x18\x02 \x01(\t\x12$\n\x04type\x18\x05 \x01(\x0e\x32\x16.Ydb.Scheme.Entry.Type\x12\x36\n\x15\x65\x66\x66\x65\x63tive_permissions\x18\x06 \x03(\x0b\x32\x17.Ydb.Scheme.Permissions\x12,\n\x0bpermissions\x18\x07 \x03(\x0b\x32\x17.Ydb.Scheme.Permissions\x12\x12\n\nsize_bytes\x18\x08 \x01(\x04\x12)\n\ncreated_at\x18\t \x01(\x0b\x32\x15.Ydb.VirtualTimestamp\"\xe8\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tDIRECTORY\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x14\n\x10PERS_QUEUE_GROUP\x10\x03\x12\x0c\n\x08\x44\x41TABASE\x10\x04\x12\x0f\n\x0bRTMR_VOLUME\x10\x05\x12\x16\n\x12\x42LOCK_STORE_VOLUME\x10\x06\x12\x15\n\x11\x43OORDINATION_NODE\x10\x07\x12\x10\n\x0c\x43OLUMN_STORE\x10\x0c\x12\x10\n\x0c\x43OLUMN_TABLE\x10\r\x12\x0c\n\x08SEQUENCE\x10\x0f\x12\x0f\n\x0bREPLICATION\x10\x10\x12\t\n\x05TOPIC\x10\x11\"[\n\x13ListDirectoryResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12#\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x11.Ydb.Scheme.Entry\"^\n\x13\x44\x65scribePathRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"D\n\x14\x44\x65scribePathResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"5\n\x12\x44\x65scribePathResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\"\xb2\x01\n\x11PermissionsAction\x12(\n\x05grant\x18\x01 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12)\n\x06revoke\x18\x02 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12&\n\x03set\x18\x03 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12\x16\n\x0c\x63hange_owner\x18\x04 \x01(\tH\x00\x42\x08\n\x06\x61\x63tion\"\xde\x01\n\x18ModifyPermissionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12.\n\x07\x61\x63tions\x18\x03 \x03(\x0b\x32\x1d.Ydb.Scheme.PermissionsAction\x12\x19\n\x11\x63lear_permissions\x18\x04 \x01(\x08\x12\x1f\n\x15interrupt_inheritance\x18\x05 \x01(\x08H\x00\x42\r\n\x0binheritance\"I\n\x19ModifyPermissionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBl\n\x15tech.ydb.proto.schemeB\x15SchemeOperationProtosZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Scheme\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_scheme.proto\x12\nYdb.Scheme\x1a\x17protos/ydb_common.proto\x1a\x1aprotos/ydb_operation.proto\"_\n\x14MakeDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"E\n\x15MakeDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"a\n\x16RemoveDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"G\n\x17RemoveDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x14ListDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"E\n\x15ListDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"8\n\x0bPermissions\x12\x0f\n\x07subject\x18\x01 \x01(\t\x12\x18\n\x10permission_names\x18\x02 \x03(\t\"\x92\x04\n\x05\x45ntry\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05owner\x18\x02 \x01(\t\x12$\n\x04type\x18\x05 \x01(\x0e\x32\x16.Ydb.Scheme.Entry.Type\x12\x36\n\x15\x65\x66\x66\x65\x63tive_permissions\x18\x06 \x03(\x0b\x32\x17.Ydb.Scheme.Permissions\x12,\n\x0bpermissions\x18\x07 \x03(\x0b\x32\x17.Ydb.Scheme.Permissions\x12\x12\n\nsize_bytes\x18\x08 \x01(\x04\x12)\n\ncreated_at\x18\t \x01(\x0b\x32\x15.Ydb.VirtualTimestamp\"\xa0\x02\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tDIRECTORY\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x14\n\x10PERS_QUEUE_GROUP\x10\x03\x12\x0c\n\x08\x44\x41TABASE\x10\x04\x12\x0f\n\x0bRTMR_VOLUME\x10\x05\x12\x16\n\x12\x42LOCK_STORE_VOLUME\x10\x06\x12\x15\n\x11\x43OORDINATION_NODE\x10\x07\x12\x10\n\x0c\x43OLUMN_STORE\x10\x0c\x12\x10\n\x0c\x43OLUMN_TABLE\x10\r\x12\x0c\n\x08SEQUENCE\x10\x0f\x12\x0f\n\x0bREPLICATION\x10\x10\x12\t\n\x05TOPIC\x10\x11\x12\x12\n\x0e\x45XTERNAL_TABLE\x10\x12\x12\x18\n\x14\x45XTERNAL_DATA_SOURCE\x10\x13\x12\x08\n\x04VIEW\x10\x14\"[\n\x13ListDirectoryResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12#\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x11.Ydb.Scheme.Entry\"^\n\x13\x44\x65scribePathRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"D\n\x14\x44\x65scribePathResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"5\n\x12\x44\x65scribePathResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\"\xb2\x01\n\x11PermissionsAction\x12(\n\x05grant\x18\x01 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12)\n\x06revoke\x18\x02 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12&\n\x03set\x18\x03 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12\x16\n\x0c\x63hange_owner\x18\x04 \x01(\tH\x00\x42\x08\n\x06\x61\x63tion\"\xde\x01\n\x18ModifyPermissionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12.\n\x07\x61\x63tions\x18\x03 \x03(\x0b\x32\x1d.Ydb.Scheme.PermissionsAction\x12\x19\n\x11\x63lear_permissions\x18\x04 \x01(\x08\x12\x1f\n\x15interrupt_inheritance\x18\x05 \x01(\x08H\x00\x42\r\n\x0binheritance\"I\n\x19ModifyPermissionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBl\n\x15tech.ydb.proto.schemeB\x15SchemeOperationProtosZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Scheme\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_scheme_pb2', globals()) @@ -39,21 +39,21 @@ _PERMISSIONS._serialized_start=600 _PERMISSIONS._serialized_end=656 _ENTRY._serialized_start=659 - _ENTRY._serialized_end=1133 + _ENTRY._serialized_end=1189 _ENTRY_TYPE._serialized_start=901 - _ENTRY_TYPE._serialized_end=1133 - _LISTDIRECTORYRESULT._serialized_start=1135 - _LISTDIRECTORYRESULT._serialized_end=1226 - _DESCRIBEPATHREQUEST._serialized_start=1228 - _DESCRIBEPATHREQUEST._serialized_end=1322 - _DESCRIBEPATHRESPONSE._serialized_start=1324 - _DESCRIBEPATHRESPONSE._serialized_end=1392 - _DESCRIBEPATHRESULT._serialized_start=1394 - _DESCRIBEPATHRESULT._serialized_end=1447 - _PERMISSIONSACTION._serialized_start=1450 - _PERMISSIONSACTION._serialized_end=1628 - _MODIFYPERMISSIONSREQUEST._serialized_start=1631 - _MODIFYPERMISSIONSREQUEST._serialized_end=1853 - _MODIFYPERMISSIONSRESPONSE._serialized_start=1855 - _MODIFYPERMISSIONSRESPONSE._serialized_end=1928 + _ENTRY_TYPE._serialized_end=1189 + _LISTDIRECTORYRESULT._serialized_start=1191 + _LISTDIRECTORYRESULT._serialized_end=1282 + _DESCRIBEPATHREQUEST._serialized_start=1284 + _DESCRIBEPATHREQUEST._serialized_end=1378 + _DESCRIBEPATHRESPONSE._serialized_start=1380 + _DESCRIBEPATHRESPONSE._serialized_end=1448 + _DESCRIBEPATHRESULT._serialized_start=1450 + _DESCRIBEPATHRESULT._serialized_end=1503 + _PERMISSIONSACTION._serialized_start=1506 + _PERMISSIONSACTION._serialized_end=1684 + _MODIFYPERMISSIONSREQUEST._serialized_start=1687 + _MODIFYPERMISSIONSREQUEST._serialized_end=1909 + _MODIFYPERMISSIONSRESPONSE._serialized_start=1911 + _MODIFYPERMISSIONSRESPONSE._serialized_end=1984 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_scheme_pb2.pyi b/ydb/_grpc/v4/protos/ydb_scheme_pb2.pyi index 4af6d24e..178a74e4 100644 --- a/ydb/_grpc/v4/protos/ydb_scheme_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_scheme_pb2.pyi @@ -40,6 +40,8 @@ class Entry(_message.Message): DATABASE: Entry.Type DIRECTORY: Entry.Type EFFECTIVE_PERMISSIONS_FIELD_NUMBER: _ClassVar[int] + EXTERNAL_DATA_SOURCE: Entry.Type + EXTERNAL_TABLE: Entry.Type NAME_FIELD_NUMBER: _ClassVar[int] OWNER_FIELD_NUMBER: _ClassVar[int] PERMISSIONS_FIELD_NUMBER: _ClassVar[int] @@ -52,6 +54,7 @@ class Entry(_message.Message): TOPIC: Entry.Type TYPE_FIELD_NUMBER: _ClassVar[int] TYPE_UNSPECIFIED: Entry.Type + VIEW: Entry.Type created_at: _ydb_common_pb2.VirtualTimestamp effective_permissions: _containers.RepeatedCompositeFieldContainer[Permissions] name: str diff --git a/ydb/_grpc/v4/protos/ydb_table_pb2.py b/ydb/_grpc/v4/protos/ydb_table_pb2.py index 17e22a29..e4bf7e9f 100644 --- a/ydb/_grpc/v4/protos/ydb_table_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_table_pb2.py @@ -20,13 +20,14 @@ from ydb._grpc.v4.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 from ydb._grpc.v4.protos import ydb_scheme_pb2 as protos_dot_ydb__scheme__pb2 from ydb._grpc.v4.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 +from ydb._grpc.v4.protos import ydb_topic_pb2 as protos_dot_ydb__topic__pb2 from ydb._grpc.v4.protos import ydb_formats_pb2 as protos_dot_ydb__formats__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_table.proto\x12\tYdb.Table\x1a#protos/annotations/validation.proto\x1a\x17protos/ydb_common.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x16protos/ydb_value.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x18protos/ydb_formats.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"Q\n\x14\x43reateSessionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"E\n\x15\x43reateSessionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\")\n\x13\x43reateSessionResult\x12\x12\n\nsession_id\x18\x01 \x01(\t\"e\n\x14\x44\x65leteSessionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x39\n\x10operation_params\x18\x02 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"E\n\x15\x44\x65leteSessionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\r\n\x0bGlobalIndex\"\x12\n\x10GlobalAsyncIndex\"\xba\x01\n\nTableIndex\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rindex_columns\x18\x02 \x03(\t\x12.\n\x0cglobal_index\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.GlobalIndexH\x00\x12\x39\n\x12global_async_index\x18\x04 \x01(\x0b\x32\x1b.Ydb.Table.GlobalAsyncIndexH\x00\x12\x14\n\x0c\x64\x61ta_columns\x18\x05 \x03(\tB\x06\n\x04type\"\xdb\x02\n\x15TableIndexDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rindex_columns\x18\x02 \x03(\t\x12.\n\x0cglobal_index\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.GlobalIndexH\x00\x12\x39\n\x12global_async_index\x18\x05 \x01(\x0b\x32\x1b.Ydb.Table.GlobalAsyncIndexH\x00\x12\x37\n\x06status\x18\x04 \x01(\x0e\x32\'.Ydb.Table.TableIndexDescription.Status\x12\x14\n\x0c\x64\x61ta_columns\x18\x06 \x03(\t\x12\x12\n\nsize_bytes\x18\x07 \x01(\x04\"G\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cSTATUS_READY\x10\x01\x12\x13\n\x0fSTATUS_BUILDING\x10\x02\x42\x06\n\x04type\"\xdd\x01\n\x0fIndexBuildState\"\xc9\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATE_PREPARING\x10\x01\x12\x1a\n\x16STATE_TRANSFERING_DATA\x10\x02\x12\x12\n\x0eSTATE_APPLYING\x10\x03\x12\x0e\n\nSTATE_DONE\x10\x04\x12\x16\n\x12STATE_CANCELLATION\x10\x05\x12\x13\n\x0fSTATE_CANCELLED\x10\x06\x12\x13\n\x0fSTATE_REJECTION\x10\x07\x12\x12\n\x0eSTATE_REJECTED\x10\x08\"K\n\x15IndexBuildDescription\x12\x0c\n\x04path\x18\x01 \x01(\t\x12$\n\x05index\x18\x02 \x01(\x0b\x32\x15.Ydb.Table.TableIndex\"\x8e\x01\n\x12IndexBuildMetadata\x12\x35\n\x0b\x64\x65scription\x18\x01 \x01(\x0b\x32 .Ydb.Table.IndexBuildDescription\x12/\n\x05state\x18\x02 \x01(\x0e\x32 .Ydb.Table.IndexBuildState.State\x12\x10\n\x08progress\x18\x03 \x01(\x02\"\x9a\x01\n\x0e\x43hangefeedMode\"\x87\x01\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0eMODE_KEYS_ONLY\x10\x01\x12\x10\n\x0cMODE_UPDATES\x10\x02\x12\x12\n\x0eMODE_NEW_IMAGE\x10\x03\x12\x12\n\x0eMODE_OLD_IMAGE\x10\x04\x12\x1b\n\x17MODE_NEW_AND_OLD_IMAGES\x10\x05\"g\n\x10\x43hangefeedFormat\"S\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x46ORMAT_JSON\x10\x01\x12 \n\x1c\x46ORMAT_DYNAMODB_STREAMS_JSON\x10\x02\"\xea\x02\n\nChangefeed\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x04mode\x18\x02 \x01(\x0e\x32\x1e.Ydb.Table.ChangefeedMode.Mode\x12\x32\n\x06\x66ormat\x18\x03 \x01(\x0e\x32\".Ydb.Table.ChangefeedFormat.Format\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12virtual_timestamps\x18\x05 \x01(\x08\x12\x14\n\x0cinitial_scan\x18\x06 \x01(\x08\x12R\n\nattributes\x18\x07 \x03(\x0b\x32%.Ydb.Table.Changefeed.AttributesEntryB\x17\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x07\n\x05\x08\x01\x10\x80 \x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb2\x03\n\x15\x43hangefeedDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x04mode\x18\x02 \x01(\x0e\x32\x1e.Ydb.Table.ChangefeedMode.Mode\x12\x32\n\x06\x66ormat\x18\x03 \x01(\x0e\x32\".Ydb.Table.ChangefeedFormat.Format\x12\x35\n\x05state\x18\x04 \x01(\x0e\x32&.Ydb.Table.ChangefeedDescription.State\x12\x1a\n\x12virtual_timestamps\x18\x05 \x01(\x08\x12\x44\n\nattributes\x18\x06 \x03(\x0b\x32\x30.Ydb.Table.ChangefeedDescription.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"]\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n\rSTATE_ENABLED\x10\x01\x12\x12\n\x0eSTATE_DISABLED\x10\x02\x12\x16\n\x12STATE_INITIAL_SCAN\x10\x03\"\x1c\n\x0bStoragePool\x12\r\n\x05media\x18\x01 \x01(\t\"\xaa\x02\n\rStoragePolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12&\n\x06syslog\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12#\n\x03log\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12$\n\x04\x64\x61ta\x18\x04 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x05 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12/\n\x0ekeep_in_memory\x18\x06 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x36\n\x0f\x63olumn_families\x18\x07 \x03(\x0b\x32\x1d.Ydb.Table.ColumnFamilyPolicy\"\xb1\x02\n\x12\x43olumnFamilyPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12/\n\x0ekeep_in_memory\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12>\n\x0b\x63ompression\x18\x05 \x01(\x0e\x32).Ydb.Table.ColumnFamilyPolicy.Compression\"L\n\x0b\x43ompression\x12\x1b\n\x17\x43OMPRESSION_UNSPECIFIED\x10\x00\x12\x10\n\x0cUNCOMPRESSED\x10\x01\x12\x0e\n\nCOMPRESSED\x10\x02\"\'\n\x10\x43ompactionPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\";\n\x12\x45xplicitPartitions\x12%\n\x0csplit_points\x18\x01 \x03(\x0b\x32\x0f.Ydb.TypedValue\";\n\x0ePartitionStats\x12\x15\n\rrows_estimate\x18\x01 \x01(\x04\x12\x12\n\nstore_size\x18\x02 \x01(\x04\"\xe9\x01\n\nTableStats\x12\x32\n\x0fpartition_stats\x18\x01 \x03(\x0b\x32\x19.Ydb.Table.PartitionStats\x12\x15\n\rrows_estimate\x18\x02 \x01(\x04\x12\x12\n\nstore_size\x18\x03 \x01(\x04\x12\x12\n\npartitions\x18\x04 \x01(\x04\x12\x31\n\rcreation_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11modification_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xdc\x02\n\x12PartitioningPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12O\n\x11\x61uto_partitioning\x18\x02 \x01(\x0e\x32\x34.Ydb.Table.PartitioningPolicy.AutoPartitioningPolicy\x12\x1c\n\x12uniform_partitions\x18\x03 \x01(\x04H\x00\x12<\n\x13\x65xplicit_partitions\x18\x04 \x01(\x0b\x32\x1d.Ydb.Table.ExplicitPartitionsH\x00\"v\n\x16\x41utoPartitioningPolicy\x12(\n$AUTO_PARTITIONING_POLICY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0e\n\nAUTO_SPLIT\x10\x02\x12\x14\n\x10\x41UTO_SPLIT_MERGE\x10\x03\x42\x0c\n\npartitions\"&\n\x0f\x45xecutionPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\"\xb1\x01\n\x11ReplicationPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12\x16\n\x0ereplicas_count\x18\x02 \x01(\r\x12=\n\x1c\x63reate_per_availability_zone\x18\x03 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x30\n\x0f\x61llow_promotion\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"$\n\rCachingPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\"\xeb\x02\n\x0cTableProfile\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12\x30\n\x0estorage_policy\x18\x02 \x01(\x0b\x32\x18.Ydb.Table.StoragePolicy\x12\x36\n\x11\x63ompaction_policy\x18\x03 \x01(\x0b\x32\x1b.Ydb.Table.CompactionPolicy\x12:\n\x13partitioning_policy\x18\x04 \x01(\x0b\x32\x1d.Ydb.Table.PartitioningPolicy\x12\x34\n\x10\x65xecution_policy\x18\x05 \x01(\x0b\x32\x1a.Ydb.Table.ExecutionPolicy\x12\x38\n\x12replication_policy\x18\x06 \x01(\x0b\x32\x1c.Ydb.Table.ReplicationPolicy\x12\x30\n\x0e\x63\x61\x63hing_policy\x18\x07 \x01(\x0b\x32\x18.Ydb.Table.CachingPolicy\"C\n\nColumnMeta\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\x12\x0e\n\x06\x66\x61mily\x18\x03 \x01(\t\"O\n\x1a\x44\x61teTypeColumnModeSettings\x12\x13\n\x0b\x63olumn_name\x18\x01 \x01(\t\x12\x1c\n\x14\x65xpire_after_seconds\x18\x02 \x01(\r\"\x8e\x02\n\x1fValueSinceUnixEpochModeSettings\x12\x13\n\x0b\x63olumn_name\x18\x01 \x01(\t\x12\x44\n\x0b\x63olumn_unit\x18\x02 \x01(\x0e\x32/.Ydb.Table.ValueSinceUnixEpochModeSettings.Unit\x12\x1c\n\x14\x65xpire_after_seconds\x18\x03 \x01(\r\"r\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\x10\n\x0cUNIT_SECONDS\x10\x01\x12\x15\n\x11UNIT_MILLISECONDS\x10\x02\x12\x15\n\x11UNIT_MICROSECONDS\x10\x03\x12\x14\n\x10UNIT_NANOSECONDS\x10\x04\"\xc4\x01\n\x0bTtlSettings\x12\x41\n\x10\x64\x61te_type_column\x18\x01 \x01(\x0b\x32%.Ydb.Table.DateTypeColumnModeSettingsH\x00\x12L\n\x16value_since_unix_epoch\x18\x02 \x01(\x0b\x32*.Ydb.Table.ValueSinceUnixEpochModeSettingsH\x00\x12\x1c\n\x14run_interval_seconds\x18\x03 \x01(\rB\x06\n\x04mode\"\xda\x01\n\x0fStorageSettings\x12\x32\n\x12tablet_commit_log0\x18\x01 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x32\n\x12tablet_commit_log1\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x04 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x35\n\x14store_external_blobs\x18\x05 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"\x84\x02\n\x0c\x43olumnFamily\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x38\n\x0b\x63ompression\x18\x03 \x01(\x0e\x32#.Ydb.Table.ColumnFamily.Compression\x12/\n\x0ekeep_in_memory\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"U\n\x0b\x43ompression\x12\x1b\n\x17\x43OMPRESSION_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43OMPRESSION_NONE\x10\x01\x12\x13\n\x0f\x43OMPRESSION_LZ4\x10\x02\"\xf7\x01\n\x14PartitioningSettings\x12\x14\n\x0cpartition_by\x18\x01 \x03(\t\x12\x35\n\x14partitioning_by_size\x18\x02 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x19\n\x11partition_size_mb\x18\x03 \x01(\x04\x12\x35\n\x14partitioning_by_load\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x1c\n\x14min_partitions_count\x18\x06 \x01(\x04\x12\x1c\n\x14max_partitions_count\x18\x07 \x01(\x04J\x04\x08\x05\x10\x06\"C\n\x16\x41zReadReplicasSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x13read_replicas_count\x18\x02 \x01(\x04\"_\n\x17\x43lusterReplicasSettings\x12\x44\n\x19\x61z_read_replicas_settings\x18\x02 \x03(\x0b\x32!.Ydb.Table.AzReadReplicasSettings\"t\n\x14ReadReplicasSettings\x12$\n\x1aper_az_read_replicas_count\x18\x01 \x01(\x04H\x00\x12$\n\x1a\x61ny_az_read_replicas_count\x18\x02 \x01(\x04H\x00\x42\n\n\x08settingsJ\x04\x08\x03\x10\x04\"\xed\x06\n\x12\x43reateTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12&\n\x07\x63olumns\x18\x03 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x13\n\x0bprimary_key\x18\x04 \x03(\t\x12(\n\x07profile\x18\x05 \x01(\x0b\x32\x17.Ydb.Table.TableProfile\x12\x39\n\x10operation_params\x18\x06 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\x07indexes\x18\x07 \x03(\x0b\x32\x15.Ydb.Table.TableIndex\x12,\n\x0cttl_settings\x18\x08 \x01(\x0b\x32\x16.Ydb.Table.TtlSettings\x12\x34\n\x10storage_settings\x18\t \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x30\n\x0f\x63olumn_families\x18\n \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12Z\n\nattributes\x18\x0b \x03(\x0b\x32-.Ydb.Table.CreateTableRequest.AttributesEntryB\x17\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x07\n\x05\x08\x01\x10\x80 \x12\x19\n\x11\x63ompaction_policy\x18\x0c \x01(\t\x12\x1c\n\x12uniform_partitions\x18\r \x01(\x04H\x00\x12:\n\x11partition_at_keys\x18\x0e \x01(\x0b\x32\x1d.Ydb.Table.ExplicitPartitionsH\x00\x12>\n\x15partitioning_settings\x18\x0f \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x31\n\x10key_bloom_filter\x18\x10 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12?\n\x16read_replicas_settings\x18\x11 \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12\x0f\n\x07tiering\x18\x12 \x01(\t\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\npartitions\"C\n\x13\x43reateTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"u\n\x10\x44ropTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParamsJ\x04\x08\x03\x10\x04\"A\n\x11\x44ropTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"]\n\x0fRenameIndexItem\x12\x13\n\x0bsource_name\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_name\x18\x02 \x01(\t\x12\x1b\n\x13replace_destination\x18\x03 \x01(\x08\"\x95\t\n\x11\x41lterTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12*\n\x0b\x61\x64\x64_columns\x18\x03 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x14\n\x0c\x64rop_columns\x18\x04 \x03(\t\x12\x39\n\x10operation_params\x18\x05 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12,\n\ralter_columns\x18\x06 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x32\n\x10set_ttl_settings\x18\x07 \x01(\x0b\x32\x16.Ydb.Table.TtlSettingsH\x00\x12\x33\n\x11\x64rop_ttl_settings\x18\x08 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12*\n\x0b\x61\x64\x64_indexes\x18\t \x03(\x0b\x32\x15.Ydb.Table.TableIndex\x12\x14\n\x0c\x64rop_indexes\x18\n \x03(\t\x12:\n\x16\x61lter_storage_settings\x18\x0b \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x34\n\x13\x61\x64\x64_column_families\x18\x0c \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12\x36\n\x15\x61lter_column_families\x18\r \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12`\n\x10\x61lter_attributes\x18\x0e \x03(\x0b\x32\x31.Ydb.Table.AlterTableRequest.AlterAttributesEntryB\x13\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x03\x18\x80 \x12\x1d\n\x15set_compaction_policy\x18\x0f \x01(\t\x12\x44\n\x1b\x61lter_partitioning_settings\x18\x10 \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x35\n\x14set_key_bloom_filter\x18\x11 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x43\n\x1aset_read_replicas_settings\x18\x12 \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12.\n\x0f\x61\x64\x64_changefeeds\x18\x13 \x03(\x0b\x32\x15.Ydb.Table.Changefeed\x12\x18\n\x10\x64rop_changefeeds\x18\x14 \x03(\t\x12\x32\n\x0erename_indexes\x18\x15 \x03(\x0b\x32\x1a.Ydb.Table.RenameIndexItem\x12\x15\n\x0bset_tiering\x18\x16 \x01(\tH\x01\x12.\n\x0c\x64rop_tiering\x18\x17 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x01\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\nttl_actionB\x10\n\x0etiering_action\"B\n\x12\x41lterTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x90\x01\n\x10\x43opyTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x13\n\x0bsource_path\x18\x02 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x03 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"A\n\x11\x43opyTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"T\n\rCopyTableItem\x12\x13\n\x0bsource_path\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x02 \x01(\t\x12\x14\n\x0comit_indexes\x18\x03 \x01(\x08\"\x8c\x01\n\x11\x43opyTablesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12(\n\x06tables\x18\x03 \x03(\x0b\x32\x18.Ydb.Table.CopyTableItem\"B\n\x12\x43opyTablesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"]\n\x0fRenameTableItem\x12\x13\n\x0bsource_path\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x02 \x01(\t\x12\x1b\n\x13replace_destination\x18\x03 \x01(\x08\"\x90\x01\n\x13RenameTablesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12*\n\x06tables\x18\x03 \x03(\x0b\x32\x1a.Ydb.Table.RenameTableItem\"D\n\x14RenameTablesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xd3\x01\n\x14\x44\x65scribeTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12 \n\x18include_shard_key_bounds\x18\x05 \x01(\x08\x12\x1b\n\x13include_table_stats\x18\x06 \x01(\x08\x12\x1f\n\x17include_partition_stats\x18\x07 \x01(\x08\"E\n\x15\x44\x65scribeTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x8c\x06\n\x13\x44\x65scribeTableResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12&\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x13\n\x0bprimary_key\x18\x03 \x03(\t\x12)\n\x10shard_key_bounds\x18\x04 \x03(\x0b\x32\x0f.Ydb.TypedValue\x12\x31\n\x07indexes\x18\x05 \x03(\x0b\x32 .Ydb.Table.TableIndexDescription\x12*\n\x0btable_stats\x18\x06 \x01(\x0b\x32\x15.Ydb.Table.TableStats\x12,\n\x0cttl_settings\x18\x07 \x01(\x0b\x32\x16.Ydb.Table.TtlSettings\x12\x34\n\x10storage_settings\x18\x08 \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x30\n\x0f\x63olumn_families\x18\t \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Table.DescribeTableResult.AttributesEntry\x12>\n\x15partitioning_settings\x18\x0c \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x31\n\x10key_bloom_filter\x18\r \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12?\n\x16read_replicas_settings\x18\x0e \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12\x35\n\x0b\x63hangefeeds\x18\x0f \x03(\x0b\x32 .Ydb.Table.ChangefeedDescription\x12\x0f\n\x07tiering\x18\x10 \x01(\t\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x0b\x10\x0c\"2\n\x05Query\x12\x12\n\x08yql_text\x18\x01 \x01(\tH\x00\x12\x0c\n\x02id\x18\x02 \x01(\tH\x00\x42\x07\n\x05query\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Table.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Table.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Table.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Table.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"{\n\x12TransactionControl\x12\x0f\n\x05tx_id\x18\x01 \x01(\tH\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Table.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\")\n\x10QueryCachePolicy\x12\x15\n\rkeep_in_cache\x18\x01 \x01(\x08\"\xb1\x01\n\x14QueryStatsCollection\"\x98\x01\n\x04Mode\x12 \n\x1cSTATS_COLLECTION_UNSPECIFIED\x10\x00\x12\x19\n\x15STATS_COLLECTION_NONE\x10\x01\x12\x1a\n\x16STATS_COLLECTION_BASIC\x10\x02\x12\x19\n\x15STATS_COLLECTION_FULL\x10\x03\x12\x1c\n\x18STATS_COLLECTION_PROFILE\x10\x04\"\xbe\x03\n\x17\x45xecuteDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x31\n\ntx_control\x18\x02 \x01(\x0b\x32\x1d.Ydb.Table.TransactionControl\x12\x1f\n\x05query\x18\x03 \x01(\x0b\x32\x10.Ydb.Table.Query\x12\x46\n\nparameters\x18\x04 \x03(\x0b\x32\x32.Ydb.Table.ExecuteDataQueryRequest.ParametersEntry\x12\x37\n\x12query_cache_policy\x18\x05 \x01(\x0b\x32\x1b.Ydb.Table.QueryCachePolicy\x12\x39\n\x10operation_params\x18\x06 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12;\n\rcollect_stats\x18\x07 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"H\n\x18\x45xecuteDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"|\n\x19\x45xecuteSchemeQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"J\n\x1a\x45xecuteSchemeQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x1d\n\x0fTransactionMeta\x12\n\n\x02id\x18\x01 \x01(\t\"\x9f\x01\n\tQueryMeta\x12\n\n\x02id\x18\x01 \x01(\t\x12\x43\n\x10parameters_types\x18\x02 \x03(\x0b\x32).Ydb.Table.QueryMeta.ParametersTypesEntry\x1a\x41\n\x14ParametersTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x18\n\x05value\x18\x02 \x01(\x0b\x32\t.Ydb.Type:\x02\x38\x01\"\xc1\x01\n\x12\x45xecuteQueryResult\x12#\n\x0bresult_sets\x18\x01 \x03(\x0b\x32\x0e.Ydb.ResultSet\x12+\n\x07tx_meta\x18\x02 \x01(\x0b\x32\x1a.Ydb.Table.TransactionMeta\x12(\n\nquery_meta\x18\x03 \x01(\x0b\x32\x14.Ydb.Table.QueryMeta\x12/\n\x0bquery_stats\x18\x04 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"z\n\x17\x45xplainDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"H\n\x18\x45xplainDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\";\n\x12\x45xplainQueryResult\x12\x11\n\tquery_ast\x18\x01 \x01(\t\x12\x12\n\nquery_plan\x18\x02 \x01(\t\"z\n\x17PrepareDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"H\n\x18PrepareDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xb7\x01\n\x12PrepareQueryResult\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12L\n\x10parameters_types\x18\x02 \x03(\x0b\x32\x32.Ydb.Table.PrepareQueryResult.ParametersTypesEntry\x1a\x41\n\x14ParametersTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x18\n\x05value\x18\x02 \x01(\x0b\x32\t.Ydb.Type:\x02\x38\x01\"a\n\x10KeepAliveRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x39\n\x10operation_params\x18\x02 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"A\n\x11KeepAliveResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xb7\x01\n\x0fKeepAliveResult\x12@\n\x0esession_status\x18\x01 \x01(\x0e\x32(.Ydb.Table.KeepAliveResult.SessionStatus\"b\n\rSessionStatus\x12\x1e\n\x1aSESSION_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14SESSION_STATUS_READY\x10\x01\x12\x17\n\x13SESSION_STATUS_BUSY\x10\x02\"\x9d\x01\n\x17\x42\x65ginTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Table.TransactionSettings\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"H\n\x18\x42\x65ginTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"E\n\x16\x42\x65ginTransactionResult\x12+\n\x07tx_meta\x18\x01 \x01(\x0b\x32\x1a.Ydb.Table.TransactionMeta\"\xb5\x01\n\x18\x43ommitTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\r\n\x05tx_id\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12;\n\rcollect_stats\x18\x04 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\"I\n\x19\x43ommitTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"J\n\x17\x43ommitTransactionResult\x12/\n\x0bquery_stats\x18\x01 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"z\n\x1aRollbackTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\r\n\x05tx_id\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"K\n\x1bRollbackTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x98\x01\n\x18StoragePolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x06labels\x18\x02 \x03(\x0b\x32/.Ydb.Table.StoragePolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9e\x01\n\x1b\x43ompactionPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x42\n\x06labels\x18\x02 \x03(\x0b\x32\x32.Ydb.Table.CompactionPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa2\x01\n\x1dPartitioningPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x44\n\x06labels\x18\x02 \x03(\x0b\x32\x34.Ydb.Table.PartitioningPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9c\x01\n\x1a\x45xecutionPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x41\n\x06labels\x18\x02 \x03(\x0b\x32\x31.Ydb.Table.ExecutionPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa0\x01\n\x1cReplicationPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x43\n\x06labels\x18\x02 \x03(\x0b\x32\x33.Ydb.Table.ReplicationPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x98\x01\n\x18\x43\x61\x63hingPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x06labels\x18\x02 \x03(\x0b\x32/.Ydb.Table.CachingPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbe\x04\n\x17TableProfileDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x06labels\x18\x02 \x03(\x0b\x32..Ydb.Table.TableProfileDescription.LabelsEntry\x12\x1e\n\x16\x64\x65\x66\x61ult_storage_policy\x18\x03 \x01(\t\x12 \n\x18\x61llowed_storage_policies\x18\x04 \x03(\t\x12!\n\x19\x64\x65\x66\x61ult_compaction_policy\x18\x05 \x01(\t\x12#\n\x1b\x61llowed_compaction_policies\x18\x06 \x03(\t\x12#\n\x1b\x64\x65\x66\x61ult_partitioning_policy\x18\x07 \x01(\t\x12%\n\x1d\x61llowed_partitioning_policies\x18\x08 \x03(\t\x12 \n\x18\x64\x65\x66\x61ult_execution_policy\x18\t \x01(\t\x12\"\n\x1a\x61llowed_execution_policies\x18\n \x03(\t\x12\"\n\x1a\x64\x65\x66\x61ult_replication_policy\x18\x0b \x01(\t\x12$\n\x1c\x61llowed_replication_policies\x18\x0c \x03(\t\x12\x1e\n\x16\x64\x65\x66\x61ult_caching_policy\x18\r \x01(\t\x12 \n\x18\x61llowed_caching_policies\x18\x0e \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"X\n\x1b\x44\x65scribeTableOptionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"L\n\x1c\x44\x65scribeTableOptionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x99\x04\n\x1a\x44\x65scribeTableOptionsResult\x12\x41\n\x15table_profile_presets\x18\x01 \x03(\x0b\x32\".Ydb.Table.TableProfileDescription\x12\x43\n\x16storage_policy_presets\x18\x02 \x03(\x0b\x32#.Ydb.Table.StoragePolicyDescription\x12I\n\x19\x63ompaction_policy_presets\x18\x03 \x03(\x0b\x32&.Ydb.Table.CompactionPolicyDescription\x12M\n\x1bpartitioning_policy_presets\x18\x04 \x03(\x0b\x32(.Ydb.Table.PartitioningPolicyDescription\x12G\n\x18\x65xecution_policy_presets\x18\x05 \x03(\x0b\x32%.Ydb.Table.ExecutionPolicyDescription\x12K\n\x1areplication_policy_presets\x18\x06 \x03(\x0b\x32\'.Ydb.Table.ReplicationPolicyDescription\x12\x43\n\x16\x63\x61\x63hing_policy_presets\x18\x07 \x03(\x0b\x32#.Ydb.Table.CachingPolicyDescription\"\xc0\x01\n\x08KeyRange\x12\"\n\x07greater\x18\x01 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x00\x12+\n\x10greater_or_equal\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x00\x12\x1f\n\x04less\x18\x03 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x01\x12(\n\rless_or_equal\x18\x04 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x01\x42\x0c\n\nfrom_boundB\n\n\x08to_bound\"\xf5\x01\n\x10ReadTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12&\n\tkey_range\x18\x03 \x01(\x0b\x32\x13.Ydb.Table.KeyRange\x12\x0f\n\x07\x63olumns\x18\x04 \x03(\t\x12\x0f\n\x07ordered\x18\x05 \x01(\x08\x12\x11\n\trow_limit\x18\x06 \x01(\x04\x12-\n\x0cuse_snapshot\x18\x07 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x19\n\x11\x62\x61tch_limit_bytes\x18\x08 \x01(\x04\x12\x18\n\x10\x62\x61tch_limit_rows\x18\t \x01(\x04\"\xbc\x01\n\x11ReadTableResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\'\n\x08snapshot\x18\x04 \x01(\x0b\x32\x15.Ydb.VirtualTimestamp\x12*\n\x06result\x18\x03 \x01(\x0b\x32\x1a.Ydb.Table.ReadTableResult\"5\n\x0fReadTableResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\"c\n\x0fReadRowsRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x1d\n\x04keys\x18\x03 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x0f\n\x07\x63olumns\x18\x04 \x03(\t\"\x8a\x01\n\x10ReadRowsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\nresult_set\x18\x03 \x01(\x0b\x32\x0e.Ydb.ResultSet\"\x8d\x02\n\x11\x42ulkUpsertRequest\x12\r\n\x05table\x18\x01 \x01(\t\x12\x1d\n\x04rows\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12?\n\x14\x61rrow_batch_settings\x18\x07 \x01(\x0b\x32\x1f.Ydb.Formats.ArrowBatchSettingsH\x00\x12\x30\n\x0c\x63sv_settings\x18\x08 \x01(\x0b\x32\x18.Ydb.Formats.CsvSettingsH\x00\x12\r\n\x04\x64\x61ta\x18\xe8\x07 \x01(\x0c\x42\r\n\x0b\x64\x61ta_format\"B\n\x12\x42ulkUpsertResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x42ulkUpsertResult\"\x91\x03\n\x17\x45xecuteScanQueryRequest\x12\x1f\n\x05query\x18\x03 \x01(\x0b\x32\x10.Ydb.Table.Query\x12\x46\n\nparameters\x18\x04 \x03(\x0b\x32\x32.Ydb.Table.ExecuteScanQueryRequest.ParametersEntry\x12\x35\n\x04mode\x18\x06 \x01(\x0e\x32\'.Ydb.Table.ExecuteScanQueryRequest.Mode\x12;\n\rcollect_stats\x18\x08 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"=\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMODE_EXPLAIN\x10\x01\x12\r\n\tMODE_EXEC\x10\x03J\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06J\x04\x08\x07\x10\x08\"\xaf\x01\n\x1f\x45xecuteScanQueryPartialResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x38\n\x06result\x18\x03 \x01(\x0b\x32(.Ydb.Table.ExecuteScanQueryPartialResult\"\x8c\x01\n\x1d\x45xecuteScanQueryPartialResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12/\n\x0bquery_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStatsJ\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06\x42S\n\x14tech.ydb.proto.tableZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Table\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_table.proto\x12\tYdb.Table\x1a#protos/annotations/validation.proto\x1a\x17protos/ydb_common.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x16protos/ydb_value.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_topic.proto\x1a\x18protos/ydb_formats.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"Q\n\x14\x43reateSessionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"E\n\x15\x43reateSessionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\")\n\x13\x43reateSessionResult\x12\x12\n\nsession_id\x18\x01 \x01(\t\"e\n\x14\x44\x65leteSessionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x39\n\x10operation_params\x18\x02 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"E\n\x15\x44\x65leteSessionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\r\n\x0bGlobalIndex\"\x12\n\x10GlobalAsyncIndex\"\x13\n\x11GlobalUniqueIndex\"\xf7\x01\n\nTableIndex\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rindex_columns\x18\x02 \x03(\t\x12.\n\x0cglobal_index\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.GlobalIndexH\x00\x12\x39\n\x12global_async_index\x18\x04 \x01(\x0b\x32\x1b.Ydb.Table.GlobalAsyncIndexH\x00\x12;\n\x13global_unique_index\x18\x06 \x01(\x0b\x32\x1c.Ydb.Table.GlobalUniqueIndexH\x00\x12\x14\n\x0c\x64\x61ta_columns\x18\x05 \x03(\tB\x06\n\x04type\"\x98\x03\n\x15TableIndexDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rindex_columns\x18\x02 \x03(\t\x12.\n\x0cglobal_index\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.GlobalIndexH\x00\x12\x39\n\x12global_async_index\x18\x05 \x01(\x0b\x32\x1b.Ydb.Table.GlobalAsyncIndexH\x00\x12;\n\x13global_unique_index\x18\x08 \x01(\x0b\x32\x1c.Ydb.Table.GlobalUniqueIndexH\x00\x12\x37\n\x06status\x18\x04 \x01(\x0e\x32\'.Ydb.Table.TableIndexDescription.Status\x12\x14\n\x0c\x64\x61ta_columns\x18\x06 \x03(\t\x12\x12\n\nsize_bytes\x18\x07 \x01(\x04\"G\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cSTATUS_READY\x10\x01\x12\x13\n\x0fSTATUS_BUILDING\x10\x02\x42\x06\n\x04type\"\xdd\x01\n\x0fIndexBuildState\"\xc9\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATE_PREPARING\x10\x01\x12\x1a\n\x16STATE_TRANSFERING_DATA\x10\x02\x12\x12\n\x0eSTATE_APPLYING\x10\x03\x12\x0e\n\nSTATE_DONE\x10\x04\x12\x16\n\x12STATE_CANCELLATION\x10\x05\x12\x13\n\x0fSTATE_CANCELLED\x10\x06\x12\x13\n\x0fSTATE_REJECTION\x10\x07\x12\x12\n\x0eSTATE_REJECTED\x10\x08\"K\n\x15IndexBuildDescription\x12\x0c\n\x04path\x18\x01 \x01(\t\x12$\n\x05index\x18\x02 \x01(\x0b\x32\x15.Ydb.Table.TableIndex\"\x8e\x01\n\x12IndexBuildMetadata\x12\x35\n\x0b\x64\x65scription\x18\x01 \x01(\x0b\x32 .Ydb.Table.IndexBuildDescription\x12/\n\x05state\x18\x02 \x01(\x0e\x32 .Ydb.Table.IndexBuildState.State\x12\x10\n\x08progress\x18\x03 \x01(\x02\"\x9a\x01\n\x0e\x43hangefeedMode\"\x87\x01\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0eMODE_KEYS_ONLY\x10\x01\x12\x10\n\x0cMODE_UPDATES\x10\x02\x12\x12\n\x0eMODE_NEW_IMAGE\x10\x03\x12\x12\n\x0eMODE_OLD_IMAGE\x10\x04\x12\x1b\n\x17MODE_NEW_AND_OLD_IMAGES\x10\x05\"\x81\x01\n\x10\x43hangefeedFormat\"m\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x46ORMAT_JSON\x10\x01\x12 \n\x1c\x46ORMAT_DYNAMODB_STREAMS_JSON\x10\x02\x12\x18\n\x14\x46ORMAT_DEBEZIUM_JSON\x10\x03\"\x8e\x04\n\nChangefeed\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x04mode\x18\x02 \x01(\x0e\x32\x1e.Ydb.Table.ChangefeedMode.Mode\x12\x32\n\x06\x66ormat\x18\x03 \x01(\x0e\x32\".Ydb.Table.ChangefeedFormat.Format\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12virtual_timestamps\x18\x05 \x01(\x08\x12\x14\n\x0cinitial_scan\x18\x06 \x01(\x08\x12R\n\nattributes\x18\x07 \x03(\x0b\x32%.Ydb.Table.Changefeed.AttributesEntryB\x17\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x07\n\x05\x08\x01\x10\x80 \x12\x1b\n\naws_region\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12?\n\x1cresolved_timestamps_interval\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x44\n\x1btopic_partitioning_settings\x18\n \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x87\x04\n\x15\x43hangefeedDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x04mode\x18\x02 \x01(\x0e\x32\x1e.Ydb.Table.ChangefeedMode.Mode\x12\x32\n\x06\x66ormat\x18\x03 \x01(\x0e\x32\".Ydb.Table.ChangefeedFormat.Format\x12\x35\n\x05state\x18\x04 \x01(\x0e\x32&.Ydb.Table.ChangefeedDescription.State\x12\x1a\n\x12virtual_timestamps\x18\x05 \x01(\x08\x12\x44\n\nattributes\x18\x06 \x03(\x0b\x32\x30.Ydb.Table.ChangefeedDescription.AttributesEntry\x12\x12\n\naws_region\x18\x07 \x01(\t\x12?\n\x1cresolved_timestamps_interval\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"]\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n\rSTATE_ENABLED\x10\x01\x12\x12\n\x0eSTATE_DISABLED\x10\x02\x12\x16\n\x12STATE_INITIAL_SCAN\x10\x03\"\x1c\n\x0bStoragePool\x12\r\n\x05media\x18\x01 \x01(\t\"\xaa\x02\n\rStoragePolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12&\n\x06syslog\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12#\n\x03log\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12$\n\x04\x64\x61ta\x18\x04 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x05 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12/\n\x0ekeep_in_memory\x18\x06 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x36\n\x0f\x63olumn_families\x18\x07 \x03(\x0b\x32\x1d.Ydb.Table.ColumnFamilyPolicy\"\xb1\x02\n\x12\x43olumnFamilyPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12/\n\x0ekeep_in_memory\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12>\n\x0b\x63ompression\x18\x05 \x01(\x0e\x32).Ydb.Table.ColumnFamilyPolicy.Compression\"L\n\x0b\x43ompression\x12\x1b\n\x17\x43OMPRESSION_UNSPECIFIED\x10\x00\x12\x10\n\x0cUNCOMPRESSED\x10\x01\x12\x0e\n\nCOMPRESSED\x10\x02\"\'\n\x10\x43ompactionPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\";\n\x12\x45xplicitPartitions\x12%\n\x0csplit_points\x18\x01 \x03(\x0b\x32\x0f.Ydb.TypedValue\"S\n\x0ePartitionStats\x12\x15\n\rrows_estimate\x18\x01 \x01(\x04\x12\x12\n\nstore_size\x18\x02 \x01(\x04\x12\x16\n\x0eleader_node_id\x18\x03 \x01(\r\"\xe9\x01\n\nTableStats\x12\x32\n\x0fpartition_stats\x18\x01 \x03(\x0b\x32\x19.Ydb.Table.PartitionStats\x12\x15\n\rrows_estimate\x18\x02 \x01(\x04\x12\x12\n\nstore_size\x18\x03 \x01(\x04\x12\x12\n\npartitions\x18\x04 \x01(\x04\x12\x31\n\rcreation_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11modification_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xdc\x02\n\x12PartitioningPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12O\n\x11\x61uto_partitioning\x18\x02 \x01(\x0e\x32\x34.Ydb.Table.PartitioningPolicy.AutoPartitioningPolicy\x12\x1c\n\x12uniform_partitions\x18\x03 \x01(\x04H\x00\x12<\n\x13\x65xplicit_partitions\x18\x04 \x01(\x0b\x32\x1d.Ydb.Table.ExplicitPartitionsH\x00\"v\n\x16\x41utoPartitioningPolicy\x12(\n$AUTO_PARTITIONING_POLICY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0e\n\nAUTO_SPLIT\x10\x02\x12\x14\n\x10\x41UTO_SPLIT_MERGE\x10\x03\x42\x0c\n\npartitions\"&\n\x0f\x45xecutionPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\"\xb1\x01\n\x11ReplicationPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12\x16\n\x0ereplicas_count\x18\x02 \x01(\r\x12=\n\x1c\x63reate_per_availability_zone\x18\x03 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x30\n\x0f\x61llow_promotion\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"$\n\rCachingPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\"\xeb\x02\n\x0cTableProfile\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12\x30\n\x0estorage_policy\x18\x02 \x01(\x0b\x32\x18.Ydb.Table.StoragePolicy\x12\x36\n\x11\x63ompaction_policy\x18\x03 \x01(\x0b\x32\x1b.Ydb.Table.CompactionPolicy\x12:\n\x13partitioning_policy\x18\x04 \x01(\x0b\x32\x1d.Ydb.Table.PartitioningPolicy\x12\x34\n\x10\x65xecution_policy\x18\x05 \x01(\x0b\x32\x1a.Ydb.Table.ExecutionPolicy\x12\x38\n\x12replication_policy\x18\x06 \x01(\x0b\x32\x1c.Ydb.Table.ReplicationPolicy\x12\x30\n\x0e\x63\x61\x63hing_policy\x18\x07 \x01(\x0b\x32\x18.Ydb.Table.CachingPolicy\"\xaa\x03\n\x13SequenceDescription\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tmin_value\x18\x02 \x01(\x12H\x01\x88\x01\x01\x12\x16\n\tmax_value\x18\x03 \x01(\x12H\x02\x88\x01\x01\x12\x18\n\x0bstart_value\x18\x04 \x01(\x12H\x03\x88\x01\x01\x12\x12\n\x05\x63\x61\x63he\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x16\n\tincrement\x18\x06 \x01(\x12H\x05\x88\x01\x01\x12\x12\n\x05\x63ycle\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12;\n\x07set_val\x18\x08 \x01(\x0b\x32%.Ydb.Table.SequenceDescription.SetValH\x07\x88\x01\x01\x1aV\n\x06SetVal\x12\x17\n\nnext_value\x18\x01 \x01(\x12H\x00\x88\x01\x01\x12\x16\n\tnext_used\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\r\n\x0b_next_valueB\x0c\n\n_next_usedB\x07\n\x05_nameB\x0c\n\n_min_valueB\x0c\n\n_max_valueB\x0e\n\x0c_start_valueB\x08\n\x06_cacheB\x0c\n\n_incrementB\x08\n\x06_cycleB\n\n\x08_set_val\"\xda\x01\n\nColumnMeta\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\x12\x0e\n\x06\x66\x61mily\x18\x03 \x01(\t\x12\x15\n\x08not_null\x18\x04 \x01(\x08H\x01\x88\x01\x01\x12\'\n\x0c\x66rom_literal\x18\x05 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x00\x12\x37\n\rfrom_sequence\x18\x06 \x01(\x0b\x32\x1e.Ydb.Table.SequenceDescriptionH\x00\x42\x0f\n\rdefault_valueB\x0b\n\t_not_null\"O\n\x1a\x44\x61teTypeColumnModeSettings\x12\x13\n\x0b\x63olumn_name\x18\x01 \x01(\t\x12\x1c\n\x14\x65xpire_after_seconds\x18\x02 \x01(\r\"\x8e\x02\n\x1fValueSinceUnixEpochModeSettings\x12\x13\n\x0b\x63olumn_name\x18\x01 \x01(\t\x12\x44\n\x0b\x63olumn_unit\x18\x02 \x01(\x0e\x32/.Ydb.Table.ValueSinceUnixEpochModeSettings.Unit\x12\x1c\n\x14\x65xpire_after_seconds\x18\x03 \x01(\r\"r\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\x10\n\x0cUNIT_SECONDS\x10\x01\x12\x15\n\x11UNIT_MILLISECONDS\x10\x02\x12\x15\n\x11UNIT_MICROSECONDS\x10\x03\x12\x14\n\x10UNIT_NANOSECONDS\x10\x04\"\xc4\x01\n\x0bTtlSettings\x12\x41\n\x10\x64\x61te_type_column\x18\x01 \x01(\x0b\x32%.Ydb.Table.DateTypeColumnModeSettingsH\x00\x12L\n\x16value_since_unix_epoch\x18\x02 \x01(\x0b\x32*.Ydb.Table.ValueSinceUnixEpochModeSettingsH\x00\x12\x1c\n\x14run_interval_seconds\x18\x03 \x01(\rB\x06\n\x04mode\"\xda\x01\n\x0fStorageSettings\x12\x32\n\x12tablet_commit_log0\x18\x01 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x32\n\x12tablet_commit_log1\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x04 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x35\n\x14store_external_blobs\x18\x05 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"\x84\x02\n\x0c\x43olumnFamily\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x38\n\x0b\x63ompression\x18\x03 \x01(\x0e\x32#.Ydb.Table.ColumnFamily.Compression\x12/\n\x0ekeep_in_memory\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"U\n\x0b\x43ompression\x12\x1b\n\x17\x43OMPRESSION_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43OMPRESSION_NONE\x10\x01\x12\x13\n\x0f\x43OMPRESSION_LZ4\x10\x02\"\xf7\x01\n\x14PartitioningSettings\x12\x14\n\x0cpartition_by\x18\x01 \x03(\t\x12\x35\n\x14partitioning_by_size\x18\x02 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x19\n\x11partition_size_mb\x18\x03 \x01(\x04\x12\x35\n\x14partitioning_by_load\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x1c\n\x14min_partitions_count\x18\x06 \x01(\x04\x12\x1c\n\x14max_partitions_count\x18\x07 \x01(\x04J\x04\x08\x05\x10\x06\"C\n\x16\x41zReadReplicasSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x13read_replicas_count\x18\x02 \x01(\x04\"_\n\x17\x43lusterReplicasSettings\x12\x44\n\x19\x61z_read_replicas_settings\x18\x02 \x03(\x0b\x32!.Ydb.Table.AzReadReplicasSettings\"t\n\x14ReadReplicasSettings\x12$\n\x1aper_az_read_replicas_count\x18\x01 \x01(\x04H\x00\x12$\n\x1a\x61ny_az_read_replicas_count\x18\x02 \x01(\x04H\x00\x42\n\n\x08settingsJ\x04\x08\x03\x10\x04\"\xaa\x07\n\x12\x43reateTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12&\n\x07\x63olumns\x18\x03 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x13\n\x0bprimary_key\x18\x04 \x03(\t\x12(\n\x07profile\x18\x05 \x01(\x0b\x32\x17.Ydb.Table.TableProfile\x12\x39\n\x10operation_params\x18\x06 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\x07indexes\x18\x07 \x03(\x0b\x32\x15.Ydb.Table.TableIndex\x12,\n\x0cttl_settings\x18\x08 \x01(\x0b\x32\x16.Ydb.Table.TtlSettings\x12\x34\n\x10storage_settings\x18\t \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x30\n\x0f\x63olumn_families\x18\n \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12Z\n\nattributes\x18\x0b \x03(\x0b\x32-.Ydb.Table.CreateTableRequest.AttributesEntryB\x17\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x07\n\x05\x08\x01\x10\x80 \x12\x19\n\x11\x63ompaction_policy\x18\x0c \x01(\t\x12\x1c\n\x12uniform_partitions\x18\r \x01(\x04H\x00\x12:\n\x11partition_at_keys\x18\x0e \x01(\x0b\x32\x1d.Ydb.Table.ExplicitPartitionsH\x00\x12>\n\x15partitioning_settings\x18\x0f \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x31\n\x10key_bloom_filter\x18\x10 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12?\n\x16read_replicas_settings\x18\x11 \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12\x0f\n\x07tiering\x18\x12 \x01(\t\x12\x11\n\ttemporary\x18\x13 \x01(\x08\x12(\n\nstore_type\x18\x14 \x01(\x0e\x32\x14.Ydb.Table.StoreType\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\npartitions\"C\n\x13\x43reateTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"u\n\x10\x44ropTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParamsJ\x04\x08\x03\x10\x04\"A\n\x11\x44ropTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"]\n\x0fRenameIndexItem\x12\x13\n\x0bsource_name\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_name\x18\x02 \x01(\t\x12\x1b\n\x13replace_destination\x18\x03 \x01(\x08\"\x95\t\n\x11\x41lterTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12*\n\x0b\x61\x64\x64_columns\x18\x03 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x14\n\x0c\x64rop_columns\x18\x04 \x03(\t\x12\x39\n\x10operation_params\x18\x05 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12,\n\ralter_columns\x18\x06 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x32\n\x10set_ttl_settings\x18\x07 \x01(\x0b\x32\x16.Ydb.Table.TtlSettingsH\x00\x12\x33\n\x11\x64rop_ttl_settings\x18\x08 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12*\n\x0b\x61\x64\x64_indexes\x18\t \x03(\x0b\x32\x15.Ydb.Table.TableIndex\x12\x14\n\x0c\x64rop_indexes\x18\n \x03(\t\x12:\n\x16\x61lter_storage_settings\x18\x0b \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x34\n\x13\x61\x64\x64_column_families\x18\x0c \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12\x36\n\x15\x61lter_column_families\x18\r \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12`\n\x10\x61lter_attributes\x18\x0e \x03(\x0b\x32\x31.Ydb.Table.AlterTableRequest.AlterAttributesEntryB\x13\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x03\x18\x80 \x12\x1d\n\x15set_compaction_policy\x18\x0f \x01(\t\x12\x44\n\x1b\x61lter_partitioning_settings\x18\x10 \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x35\n\x14set_key_bloom_filter\x18\x11 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x43\n\x1aset_read_replicas_settings\x18\x12 \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12.\n\x0f\x61\x64\x64_changefeeds\x18\x13 \x03(\x0b\x32\x15.Ydb.Table.Changefeed\x12\x18\n\x10\x64rop_changefeeds\x18\x14 \x03(\t\x12\x32\n\x0erename_indexes\x18\x15 \x03(\x0b\x32\x1a.Ydb.Table.RenameIndexItem\x12\x15\n\x0bset_tiering\x18\x16 \x01(\tH\x01\x12.\n\x0c\x64rop_tiering\x18\x17 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x01\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\nttl_actionB\x10\n\x0etiering_action\"B\n\x12\x41lterTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x90\x01\n\x10\x43opyTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x13\n\x0bsource_path\x18\x02 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x03 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"A\n\x11\x43opyTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"T\n\rCopyTableItem\x12\x13\n\x0bsource_path\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x02 \x01(\t\x12\x14\n\x0comit_indexes\x18\x03 \x01(\x08\"\x8c\x01\n\x11\x43opyTablesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12(\n\x06tables\x18\x03 \x03(\x0b\x32\x18.Ydb.Table.CopyTableItem\"B\n\x12\x43opyTablesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"]\n\x0fRenameTableItem\x12\x13\n\x0bsource_path\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x02 \x01(\t\x12\x1b\n\x13replace_destination\x18\x03 \x01(\x08\"\x90\x01\n\x13RenameTablesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12*\n\x06tables\x18\x03 \x03(\x0b\x32\x1a.Ydb.Table.RenameTableItem\"D\n\x14RenameTablesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xf5\x01\n\x14\x44\x65scribeTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12 \n\x18include_shard_key_bounds\x18\x05 \x01(\x08\x12\x1b\n\x13include_table_stats\x18\x06 \x01(\x08\x12\x1f\n\x17include_partition_stats\x18\x07 \x01(\x08\x12 \n\x18include_shard_nodes_info\x18\t \x01(\x08\"E\n\x15\x44\x65scribeTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xc9\x06\n\x13\x44\x65scribeTableResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12&\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x13\n\x0bprimary_key\x18\x03 \x03(\t\x12)\n\x10shard_key_bounds\x18\x04 \x03(\x0b\x32\x0f.Ydb.TypedValue\x12\x31\n\x07indexes\x18\x05 \x03(\x0b\x32 .Ydb.Table.TableIndexDescription\x12*\n\x0btable_stats\x18\x06 \x01(\x0b\x32\x15.Ydb.Table.TableStats\x12,\n\x0cttl_settings\x18\x07 \x01(\x0b\x32\x16.Ydb.Table.TtlSettings\x12\x34\n\x10storage_settings\x18\x08 \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x30\n\x0f\x63olumn_families\x18\t \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Table.DescribeTableResult.AttributesEntry\x12>\n\x15partitioning_settings\x18\x0c \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x31\n\x10key_bloom_filter\x18\r \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12?\n\x16read_replicas_settings\x18\x0e \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12\x35\n\x0b\x63hangefeeds\x18\x0f \x03(\x0b\x32 .Ydb.Table.ChangefeedDescription\x12\x0f\n\x07tiering\x18\x10 \x01(\t\x12\x11\n\ttemporary\x18\x11 \x01(\x08\x12(\n\nstore_type\x18\x12 \x01(\x0e\x32\x14.Ydb.Table.StoreType\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x0b\x10\x0c\"2\n\x05Query\x12\x12\n\x08yql_text\x18\x01 \x01(\tH\x00\x12\x0c\n\x02id\x18\x02 \x01(\tH\x00\x42\x07\n\x05query\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Table.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Table.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Table.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Table.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"{\n\x12TransactionControl\x12\x0f\n\x05tx_id\x18\x01 \x01(\tH\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Table.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\")\n\x10QueryCachePolicy\x12\x15\n\rkeep_in_cache\x18\x01 \x01(\x08\"\xb1\x01\n\x14QueryStatsCollection\"\x98\x01\n\x04Mode\x12 \n\x1cSTATS_COLLECTION_UNSPECIFIED\x10\x00\x12\x19\n\x15STATS_COLLECTION_NONE\x10\x01\x12\x1a\n\x16STATS_COLLECTION_BASIC\x10\x02\x12\x19\n\x15STATS_COLLECTION_FULL\x10\x03\x12\x1c\n\x18STATS_COLLECTION_PROFILE\x10\x04\"\xbe\x03\n\x17\x45xecuteDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x31\n\ntx_control\x18\x02 \x01(\x0b\x32\x1d.Ydb.Table.TransactionControl\x12\x1f\n\x05query\x18\x03 \x01(\x0b\x32\x10.Ydb.Table.Query\x12\x46\n\nparameters\x18\x04 \x03(\x0b\x32\x32.Ydb.Table.ExecuteDataQueryRequest.ParametersEntry\x12\x37\n\x12query_cache_policy\x18\x05 \x01(\x0b\x32\x1b.Ydb.Table.QueryCachePolicy\x12\x39\n\x10operation_params\x18\x06 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12;\n\rcollect_stats\x18\x07 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"H\n\x18\x45xecuteDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"|\n\x19\x45xecuteSchemeQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"J\n\x1a\x45xecuteSchemeQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x1d\n\x0fTransactionMeta\x12\n\n\x02id\x18\x01 \x01(\t\"\x9f\x01\n\tQueryMeta\x12\n\n\x02id\x18\x01 \x01(\t\x12\x43\n\x10parameters_types\x18\x02 \x03(\x0b\x32).Ydb.Table.QueryMeta.ParametersTypesEntry\x1a\x41\n\x14ParametersTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x18\n\x05value\x18\x02 \x01(\x0b\x32\t.Ydb.Type:\x02\x38\x01\"\xc1\x01\n\x12\x45xecuteQueryResult\x12#\n\x0bresult_sets\x18\x01 \x03(\x0b\x32\x0e.Ydb.ResultSet\x12+\n\x07tx_meta\x18\x02 \x01(\x0b\x32\x1a.Ydb.Table.TransactionMeta\x12(\n\nquery_meta\x18\x03 \x01(\x0b\x32\x14.Ydb.Table.QueryMeta\x12/\n\x0bquery_stats\x18\x04 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x9c\x01\n\x17\x45xplainDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12 \n\x18\x63ollect_full_diagnostics\x18\x04 \x01(\x08\"H\n\x18\x45xplainDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"[\n\x12\x45xplainQueryResult\x12\x11\n\tquery_ast\x18\x01 \x01(\t\x12\x12\n\nquery_plan\x18\x02 \x01(\t\x12\x1e\n\x16query_full_diagnostics\x18\x03 \x01(\t\"z\n\x17PrepareDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"H\n\x18PrepareDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xb7\x01\n\x12PrepareQueryResult\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12L\n\x10parameters_types\x18\x02 \x03(\x0b\x32\x32.Ydb.Table.PrepareQueryResult.ParametersTypesEntry\x1a\x41\n\x14ParametersTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x18\n\x05value\x18\x02 \x01(\x0b\x32\t.Ydb.Type:\x02\x38\x01\"a\n\x10KeepAliveRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x39\n\x10operation_params\x18\x02 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"A\n\x11KeepAliveResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xb7\x01\n\x0fKeepAliveResult\x12@\n\x0esession_status\x18\x01 \x01(\x0e\x32(.Ydb.Table.KeepAliveResult.SessionStatus\"b\n\rSessionStatus\x12\x1e\n\x1aSESSION_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14SESSION_STATUS_READY\x10\x01\x12\x17\n\x13SESSION_STATUS_BUSY\x10\x02\"\x9d\x01\n\x17\x42\x65ginTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Table.TransactionSettings\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"H\n\x18\x42\x65ginTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"E\n\x16\x42\x65ginTransactionResult\x12+\n\x07tx_meta\x18\x01 \x01(\x0b\x32\x1a.Ydb.Table.TransactionMeta\"\xb5\x01\n\x18\x43ommitTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\r\n\x05tx_id\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12;\n\rcollect_stats\x18\x04 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\"I\n\x19\x43ommitTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"J\n\x17\x43ommitTransactionResult\x12/\n\x0bquery_stats\x18\x01 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"z\n\x1aRollbackTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\r\n\x05tx_id\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"K\n\x1bRollbackTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x98\x01\n\x18StoragePolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x06labels\x18\x02 \x03(\x0b\x32/.Ydb.Table.StoragePolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9e\x01\n\x1b\x43ompactionPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x42\n\x06labels\x18\x02 \x03(\x0b\x32\x32.Ydb.Table.CompactionPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa2\x01\n\x1dPartitioningPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x44\n\x06labels\x18\x02 \x03(\x0b\x32\x34.Ydb.Table.PartitioningPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9c\x01\n\x1a\x45xecutionPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x41\n\x06labels\x18\x02 \x03(\x0b\x32\x31.Ydb.Table.ExecutionPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa0\x01\n\x1cReplicationPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x43\n\x06labels\x18\x02 \x03(\x0b\x32\x33.Ydb.Table.ReplicationPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x98\x01\n\x18\x43\x61\x63hingPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x06labels\x18\x02 \x03(\x0b\x32/.Ydb.Table.CachingPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbe\x04\n\x17TableProfileDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x06labels\x18\x02 \x03(\x0b\x32..Ydb.Table.TableProfileDescription.LabelsEntry\x12\x1e\n\x16\x64\x65\x66\x61ult_storage_policy\x18\x03 \x01(\t\x12 \n\x18\x61llowed_storage_policies\x18\x04 \x03(\t\x12!\n\x19\x64\x65\x66\x61ult_compaction_policy\x18\x05 \x01(\t\x12#\n\x1b\x61llowed_compaction_policies\x18\x06 \x03(\t\x12#\n\x1b\x64\x65\x66\x61ult_partitioning_policy\x18\x07 \x01(\t\x12%\n\x1d\x61llowed_partitioning_policies\x18\x08 \x03(\t\x12 \n\x18\x64\x65\x66\x61ult_execution_policy\x18\t \x01(\t\x12\"\n\x1a\x61llowed_execution_policies\x18\n \x03(\t\x12\"\n\x1a\x64\x65\x66\x61ult_replication_policy\x18\x0b \x01(\t\x12$\n\x1c\x61llowed_replication_policies\x18\x0c \x03(\t\x12\x1e\n\x16\x64\x65\x66\x61ult_caching_policy\x18\r \x01(\t\x12 \n\x18\x61llowed_caching_policies\x18\x0e \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"X\n\x1b\x44\x65scribeTableOptionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"L\n\x1c\x44\x65scribeTableOptionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x99\x04\n\x1a\x44\x65scribeTableOptionsResult\x12\x41\n\x15table_profile_presets\x18\x01 \x03(\x0b\x32\".Ydb.Table.TableProfileDescription\x12\x43\n\x16storage_policy_presets\x18\x02 \x03(\x0b\x32#.Ydb.Table.StoragePolicyDescription\x12I\n\x19\x63ompaction_policy_presets\x18\x03 \x03(\x0b\x32&.Ydb.Table.CompactionPolicyDescription\x12M\n\x1bpartitioning_policy_presets\x18\x04 \x03(\x0b\x32(.Ydb.Table.PartitioningPolicyDescription\x12G\n\x18\x65xecution_policy_presets\x18\x05 \x03(\x0b\x32%.Ydb.Table.ExecutionPolicyDescription\x12K\n\x1areplication_policy_presets\x18\x06 \x03(\x0b\x32\'.Ydb.Table.ReplicationPolicyDescription\x12\x43\n\x16\x63\x61\x63hing_policy_presets\x18\x07 \x03(\x0b\x32#.Ydb.Table.CachingPolicyDescription\"\xc0\x01\n\x08KeyRange\x12\"\n\x07greater\x18\x01 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x00\x12+\n\x10greater_or_equal\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x00\x12\x1f\n\x04less\x18\x03 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x01\x12(\n\rless_or_equal\x18\x04 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x01\x42\x0c\n\nfrom_boundB\n\n\x08to_bound\"\xb8\x02\n\x10ReadTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12&\n\tkey_range\x18\x03 \x01(\x0b\x32\x13.Ydb.Table.KeyRange\x12\x0f\n\x07\x63olumns\x18\x04 \x03(\t\x12\x0f\n\x07ordered\x18\x05 \x01(\x08\x12\x11\n\trow_limit\x18\x06 \x01(\x04\x12-\n\x0cuse_snapshot\x18\x07 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x19\n\x11\x62\x61tch_limit_bytes\x18\x08 \x01(\x04\x12\x18\n\x10\x62\x61tch_limit_rows\x18\t \x01(\x04\x12\x41\n return_not_null_data_as_optional\x18\n \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"\xbc\x01\n\x11ReadTableResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\'\n\x08snapshot\x18\x04 \x01(\x0b\x32\x15.Ydb.VirtualTimestamp\x12*\n\x06result\x18\x03 \x01(\x0b\x32\x1a.Ydb.Table.ReadTableResult\"5\n\x0fReadTableResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\"c\n\x0fReadRowsRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x1d\n\x04keys\x18\x03 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x0f\n\x07\x63olumns\x18\x04 \x03(\t\"\x8a\x01\n\x10ReadRowsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\nresult_set\x18\x03 \x01(\x0b\x32\x0e.Ydb.ResultSet\"\x8d\x02\n\x11\x42ulkUpsertRequest\x12\r\n\x05table\x18\x01 \x01(\t\x12\x1d\n\x04rows\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12?\n\x14\x61rrow_batch_settings\x18\x07 \x01(\x0b\x32\x1f.Ydb.Formats.ArrowBatchSettingsH\x00\x12\x30\n\x0c\x63sv_settings\x18\x08 \x01(\x0b\x32\x18.Ydb.Formats.CsvSettingsH\x00\x12\r\n\x04\x64\x61ta\x18\xe8\x07 \x01(\x0c\x42\r\n\x0b\x64\x61ta_format\"B\n\x12\x42ulkUpsertResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x42ulkUpsertResult\"\xb3\x03\n\x17\x45xecuteScanQueryRequest\x12\x1f\n\x05query\x18\x03 \x01(\x0b\x32\x10.Ydb.Table.Query\x12\x46\n\nparameters\x18\x04 \x03(\x0b\x32\x32.Ydb.Table.ExecuteScanQueryRequest.ParametersEntry\x12\x35\n\x04mode\x18\x06 \x01(\x0e\x32\'.Ydb.Table.ExecuteScanQueryRequest.Mode\x12;\n\rcollect_stats\x18\x08 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\x12 \n\x18\x63ollect_full_diagnostics\x18\t \x01(\x08\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"=\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMODE_EXPLAIN\x10\x01\x12\r\n\tMODE_EXEC\x10\x03J\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06J\x04\x08\x07\x10\x08\"\xaf\x01\n\x1f\x45xecuteScanQueryPartialResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x38\n\x06result\x18\x03 \x01(\x0b\x32(.Ydb.Table.ExecuteScanQueryPartialResult\"\xac\x01\n\x1d\x45xecuteScanQueryPartialResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12/\n\x0bquery_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12\x1e\n\x16query_full_diagnostics\x18\x07 \x01(\tJ\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06*R\n\tStoreType\x12\x1a\n\x16STORE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTORE_TYPE_ROW\x10\x01\x12\x15\n\x11STORE_TYPE_COLUMN\x10\x02\x42S\n\x14tech.ydb.proto.tableZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Table\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_table_pb2', globals()) @@ -38,6 +39,8 @@ _CHANGEFEED_ATTRIBUTESENTRY._serialized_options = b'8\001' _CHANGEFEED.fields_by_name['attributes']._options = None _CHANGEFEED.fields_by_name['attributes']._serialized_options = b'\252\346*\010\n\006\n\004\010\001\020d\242\346*\007\n\005\010\001\020\200 ' + _CHANGEFEED.fields_by_name['aws_region']._options = None + _CHANGEFEED.fields_by_name['aws_region']._serialized_options = b'\242\346*\003\030\200\001' _CHANGEFEEDDESCRIPTION_ATTRIBUTESENTRY._options = None _CHANGEFEEDDESCRIPTION_ATTRIBUTESENTRY._serialized_options = b'8\001' _CREATETABLEREQUEST_ATTRIBUTESENTRY._options = None @@ -72,282 +75,290 @@ _TABLEPROFILEDESCRIPTION_LABELSENTRY._serialized_options = b'8\001' _EXECUTESCANQUERYREQUEST_PARAMETERSENTRY._options = None _EXECUTESCANQUERYREQUEST_PARAMETERSENTRY._serialized_options = b'8\001' - _CREATESESSIONREQUEST._serialized_start=389 - _CREATESESSIONREQUEST._serialized_end=470 - _CREATESESSIONRESPONSE._serialized_start=472 - _CREATESESSIONRESPONSE._serialized_end=541 - _CREATESESSIONRESULT._serialized_start=543 - _CREATESESSIONRESULT._serialized_end=584 - _DELETESESSIONREQUEST._serialized_start=586 - _DELETESESSIONREQUEST._serialized_end=687 - _DELETESESSIONRESPONSE._serialized_start=689 - _DELETESESSIONRESPONSE._serialized_end=758 - _GLOBALINDEX._serialized_start=760 - _GLOBALINDEX._serialized_end=773 - _GLOBALASYNCINDEX._serialized_start=775 - _GLOBALASYNCINDEX._serialized_end=793 - _TABLEINDEX._serialized_start=796 - _TABLEINDEX._serialized_end=982 - _TABLEINDEXDESCRIPTION._serialized_start=985 - _TABLEINDEXDESCRIPTION._serialized_end=1332 - _TABLEINDEXDESCRIPTION_STATUS._serialized_start=1253 - _TABLEINDEXDESCRIPTION_STATUS._serialized_end=1324 - _INDEXBUILDSTATE._serialized_start=1335 - _INDEXBUILDSTATE._serialized_end=1556 - _INDEXBUILDSTATE_STATE._serialized_start=1355 - _INDEXBUILDSTATE_STATE._serialized_end=1556 - _INDEXBUILDDESCRIPTION._serialized_start=1558 - _INDEXBUILDDESCRIPTION._serialized_end=1633 - _INDEXBUILDMETADATA._serialized_start=1636 - _INDEXBUILDMETADATA._serialized_end=1778 - _CHANGEFEEDMODE._serialized_start=1781 - _CHANGEFEEDMODE._serialized_end=1935 - _CHANGEFEEDMODE_MODE._serialized_start=1800 - _CHANGEFEEDMODE_MODE._serialized_end=1935 - _CHANGEFEEDFORMAT._serialized_start=1937 - _CHANGEFEEDFORMAT._serialized_end=2040 - _CHANGEFEEDFORMAT_FORMAT._serialized_start=1957 - _CHANGEFEEDFORMAT_FORMAT._serialized_end=2040 - _CHANGEFEED._serialized_start=2043 - _CHANGEFEED._serialized_end=2405 - _CHANGEFEED_ATTRIBUTESENTRY._serialized_start=2356 - _CHANGEFEED_ATTRIBUTESENTRY._serialized_end=2405 - _CHANGEFEEDDESCRIPTION._serialized_start=2408 - _CHANGEFEEDDESCRIPTION._serialized_end=2842 - _CHANGEFEEDDESCRIPTION_ATTRIBUTESENTRY._serialized_start=2356 - _CHANGEFEEDDESCRIPTION_ATTRIBUTESENTRY._serialized_end=2405 - _CHANGEFEEDDESCRIPTION_STATE._serialized_start=2749 - _CHANGEFEEDDESCRIPTION_STATE._serialized_end=2842 - _STORAGEPOOL._serialized_start=2844 - _STORAGEPOOL._serialized_end=2872 - _STORAGEPOLICY._serialized_start=2875 - _STORAGEPOLICY._serialized_end=3173 - _COLUMNFAMILYPOLICY._serialized_start=3176 - _COLUMNFAMILYPOLICY._serialized_end=3481 - _COLUMNFAMILYPOLICY_COMPRESSION._serialized_start=3405 - _COLUMNFAMILYPOLICY_COMPRESSION._serialized_end=3481 - _COMPACTIONPOLICY._serialized_start=3483 - _COMPACTIONPOLICY._serialized_end=3522 - _EXPLICITPARTITIONS._serialized_start=3524 - _EXPLICITPARTITIONS._serialized_end=3583 - _PARTITIONSTATS._serialized_start=3585 - _PARTITIONSTATS._serialized_end=3644 - _TABLESTATS._serialized_start=3647 - _TABLESTATS._serialized_end=3880 - _PARTITIONINGPOLICY._serialized_start=3883 - _PARTITIONINGPOLICY._serialized_end=4231 - _PARTITIONINGPOLICY_AUTOPARTITIONINGPOLICY._serialized_start=4099 - _PARTITIONINGPOLICY_AUTOPARTITIONINGPOLICY._serialized_end=4217 - _EXECUTIONPOLICY._serialized_start=4233 - _EXECUTIONPOLICY._serialized_end=4271 - _REPLICATIONPOLICY._serialized_start=4274 - _REPLICATIONPOLICY._serialized_end=4451 - _CACHINGPOLICY._serialized_start=4453 - _CACHINGPOLICY._serialized_end=4489 - _TABLEPROFILE._serialized_start=4492 - _TABLEPROFILE._serialized_end=4855 - _COLUMNMETA._serialized_start=4857 - _COLUMNMETA._serialized_end=4924 - _DATETYPECOLUMNMODESETTINGS._serialized_start=4926 - _DATETYPECOLUMNMODESETTINGS._serialized_end=5005 - _VALUESINCEUNIXEPOCHMODESETTINGS._serialized_start=5008 - _VALUESINCEUNIXEPOCHMODESETTINGS._serialized_end=5278 - _VALUESINCEUNIXEPOCHMODESETTINGS_UNIT._serialized_start=5164 - _VALUESINCEUNIXEPOCHMODESETTINGS_UNIT._serialized_end=5278 - _TTLSETTINGS._serialized_start=5281 - _TTLSETTINGS._serialized_end=5477 - _STORAGESETTINGS._serialized_start=5480 - _STORAGESETTINGS._serialized_end=5698 - _COLUMNFAMILY._serialized_start=5701 - _COLUMNFAMILY._serialized_end=5961 - _COLUMNFAMILY_COMPRESSION._serialized_start=5876 - _COLUMNFAMILY_COMPRESSION._serialized_end=5961 - _PARTITIONINGSETTINGS._serialized_start=5964 - _PARTITIONINGSETTINGS._serialized_end=6211 - _AZREADREPLICASSETTINGS._serialized_start=6213 - _AZREADREPLICASSETTINGS._serialized_end=6280 - _CLUSTERREPLICASSETTINGS._serialized_start=6282 - _CLUSTERREPLICASSETTINGS._serialized_end=6377 - _READREPLICASSETTINGS._serialized_start=6379 - _READREPLICASSETTINGS._serialized_end=6495 - _CREATETABLEREQUEST._serialized_start=6498 - _CREATETABLEREQUEST._serialized_end=7375 - _CREATETABLEREQUEST_ATTRIBUTESENTRY._serialized_start=2356 - _CREATETABLEREQUEST_ATTRIBUTESENTRY._serialized_end=2405 - _CREATETABLERESPONSE._serialized_start=7377 - _CREATETABLERESPONSE._serialized_end=7444 - _DROPTABLEREQUEST._serialized_start=7446 - _DROPTABLEREQUEST._serialized_end=7563 - _DROPTABLERESPONSE._serialized_start=7565 - _DROPTABLERESPONSE._serialized_end=7630 - _RENAMEINDEXITEM._serialized_start=7632 - _RENAMEINDEXITEM._serialized_end=7725 - _ALTERTABLEREQUEST._serialized_start=7728 - _ALTERTABLEREQUEST._serialized_end=8901 - _ALTERTABLEREQUEST_ALTERATTRIBUTESENTRY._serialized_start=8815 - _ALTERTABLEREQUEST_ALTERATTRIBUTESENTRY._serialized_end=8869 - _ALTERTABLERESPONSE._serialized_start=8903 - _ALTERTABLERESPONSE._serialized_end=8969 - _COPYTABLEREQUEST._serialized_start=8972 - _COPYTABLEREQUEST._serialized_end=9116 - _COPYTABLERESPONSE._serialized_start=9118 - _COPYTABLERESPONSE._serialized_end=9183 - _COPYTABLEITEM._serialized_start=9185 - _COPYTABLEITEM._serialized_end=9269 - _COPYTABLESREQUEST._serialized_start=9272 - _COPYTABLESREQUEST._serialized_end=9412 - _COPYTABLESRESPONSE._serialized_start=9414 - _COPYTABLESRESPONSE._serialized_end=9480 - _RENAMETABLEITEM._serialized_start=9482 - _RENAMETABLEITEM._serialized_end=9575 - _RENAMETABLESREQUEST._serialized_start=9578 - _RENAMETABLESREQUEST._serialized_end=9722 - _RENAMETABLESRESPONSE._serialized_start=9724 - _RENAMETABLESRESPONSE._serialized_end=9792 - _DESCRIBETABLEREQUEST._serialized_start=9795 - _DESCRIBETABLEREQUEST._serialized_end=10006 - _DESCRIBETABLERESPONSE._serialized_start=10008 - _DESCRIBETABLERESPONSE._serialized_end=10077 - _DESCRIBETABLERESULT._serialized_start=10080 - _DESCRIBETABLERESULT._serialized_end=10860 - _DESCRIBETABLERESULT_ATTRIBUTESENTRY._serialized_start=2356 - _DESCRIBETABLERESULT_ATTRIBUTESENTRY._serialized_end=2405 - _QUERY._serialized_start=10862 - _QUERY._serialized_end=10912 - _SERIALIZABLEMODESETTINGS._serialized_start=10914 - _SERIALIZABLEMODESETTINGS._serialized_end=10940 - _ONLINEMODESETTINGS._serialized_start=10942 - _ONLINEMODESETTINGS._serialized_end=10996 - _STALEMODESETTINGS._serialized_start=10998 - _STALEMODESETTINGS._serialized_end=11017 - _SNAPSHOTMODESETTINGS._serialized_start=11019 - _SNAPSHOTMODESETTINGS._serialized_end=11041 - _TRANSACTIONSETTINGS._serialized_start=11044 - _TRANSACTIONSETTINGS._serialized_end=11327 - _TRANSACTIONCONTROL._serialized_start=11329 - _TRANSACTIONCONTROL._serialized_end=11452 - _QUERYCACHEPOLICY._serialized_start=11454 - _QUERYCACHEPOLICY._serialized_end=11495 - _QUERYSTATSCOLLECTION._serialized_start=11498 - _QUERYSTATSCOLLECTION._serialized_end=11675 - _QUERYSTATSCOLLECTION_MODE._serialized_start=11523 - _QUERYSTATSCOLLECTION_MODE._serialized_end=11675 - _EXECUTEDATAQUERYREQUEST._serialized_start=11678 - _EXECUTEDATAQUERYREQUEST._serialized_end=12124 - _EXECUTEDATAQUERYREQUEST_PARAMETERSENTRY._serialized_start=12058 - _EXECUTEDATAQUERYREQUEST_PARAMETERSENTRY._serialized_end=12124 - _EXECUTEDATAQUERYRESPONSE._serialized_start=12126 - _EXECUTEDATAQUERYRESPONSE._serialized_end=12198 - _EXECUTESCHEMEQUERYREQUEST._serialized_start=12200 - _EXECUTESCHEMEQUERYREQUEST._serialized_end=12324 - _EXECUTESCHEMEQUERYRESPONSE._serialized_start=12326 - _EXECUTESCHEMEQUERYRESPONSE._serialized_end=12400 - _TRANSACTIONMETA._serialized_start=12402 - _TRANSACTIONMETA._serialized_end=12431 - _QUERYMETA._serialized_start=12434 - _QUERYMETA._serialized_end=12593 - _QUERYMETA_PARAMETERSTYPESENTRY._serialized_start=12528 - _QUERYMETA_PARAMETERSTYPESENTRY._serialized_end=12593 - _EXECUTEQUERYRESULT._serialized_start=12596 - _EXECUTEQUERYRESULT._serialized_end=12789 - _EXPLAINDATAQUERYREQUEST._serialized_start=12791 - _EXPLAINDATAQUERYREQUEST._serialized_end=12913 - _EXPLAINDATAQUERYRESPONSE._serialized_start=12915 - _EXPLAINDATAQUERYRESPONSE._serialized_end=12987 - _EXPLAINQUERYRESULT._serialized_start=12989 - _EXPLAINQUERYRESULT._serialized_end=13048 - _PREPAREDATAQUERYREQUEST._serialized_start=13050 - _PREPAREDATAQUERYREQUEST._serialized_end=13172 - _PREPAREDATAQUERYRESPONSE._serialized_start=13174 - _PREPAREDATAQUERYRESPONSE._serialized_end=13246 - _PREPAREQUERYRESULT._serialized_start=13249 - _PREPAREQUERYRESULT._serialized_end=13432 - _PREPAREQUERYRESULT_PARAMETERSTYPESENTRY._serialized_start=12528 - _PREPAREQUERYRESULT_PARAMETERSTYPESENTRY._serialized_end=12593 - _KEEPALIVEREQUEST._serialized_start=13434 - _KEEPALIVEREQUEST._serialized_end=13531 - _KEEPALIVERESPONSE._serialized_start=13533 - _KEEPALIVERESPONSE._serialized_end=13598 - _KEEPALIVERESULT._serialized_start=13601 - _KEEPALIVERESULT._serialized_end=13784 - _KEEPALIVERESULT_SESSIONSTATUS._serialized_start=13686 - _KEEPALIVERESULT_SESSIONSTATUS._serialized_end=13784 - _BEGINTRANSACTIONREQUEST._serialized_start=13787 - _BEGINTRANSACTIONREQUEST._serialized_end=13944 - _BEGINTRANSACTIONRESPONSE._serialized_start=13946 - _BEGINTRANSACTIONRESPONSE._serialized_end=14018 - _BEGINTRANSACTIONRESULT._serialized_start=14020 - _BEGINTRANSACTIONRESULT._serialized_end=14089 - _COMMITTRANSACTIONREQUEST._serialized_start=14092 - _COMMITTRANSACTIONREQUEST._serialized_end=14273 - _COMMITTRANSACTIONRESPONSE._serialized_start=14275 - _COMMITTRANSACTIONRESPONSE._serialized_end=14348 - _COMMITTRANSACTIONRESULT._serialized_start=14350 - _COMMITTRANSACTIONRESULT._serialized_end=14424 - _ROLLBACKTRANSACTIONREQUEST._serialized_start=14426 - _ROLLBACKTRANSACTIONREQUEST._serialized_end=14548 - _ROLLBACKTRANSACTIONRESPONSE._serialized_start=14550 - _ROLLBACKTRANSACTIONRESPONSE._serialized_end=14625 - _STORAGEPOLICYDESCRIPTION._serialized_start=14628 - _STORAGEPOLICYDESCRIPTION._serialized_end=14780 - _STORAGEPOLICYDESCRIPTION_LABELSENTRY._serialized_start=14735 - _STORAGEPOLICYDESCRIPTION_LABELSENTRY._serialized_end=14780 - _COMPACTIONPOLICYDESCRIPTION._serialized_start=14783 - _COMPACTIONPOLICYDESCRIPTION._serialized_end=14941 - _COMPACTIONPOLICYDESCRIPTION_LABELSENTRY._serialized_start=14735 - _COMPACTIONPOLICYDESCRIPTION_LABELSENTRY._serialized_end=14780 - _PARTITIONINGPOLICYDESCRIPTION._serialized_start=14944 - _PARTITIONINGPOLICYDESCRIPTION._serialized_end=15106 - _PARTITIONINGPOLICYDESCRIPTION_LABELSENTRY._serialized_start=14735 - _PARTITIONINGPOLICYDESCRIPTION_LABELSENTRY._serialized_end=14780 - _EXECUTIONPOLICYDESCRIPTION._serialized_start=15109 - _EXECUTIONPOLICYDESCRIPTION._serialized_end=15265 - _EXECUTIONPOLICYDESCRIPTION_LABELSENTRY._serialized_start=14735 - _EXECUTIONPOLICYDESCRIPTION_LABELSENTRY._serialized_end=14780 - _REPLICATIONPOLICYDESCRIPTION._serialized_start=15268 - _REPLICATIONPOLICYDESCRIPTION._serialized_end=15428 - _REPLICATIONPOLICYDESCRIPTION_LABELSENTRY._serialized_start=14735 - _REPLICATIONPOLICYDESCRIPTION_LABELSENTRY._serialized_end=14780 - _CACHINGPOLICYDESCRIPTION._serialized_start=15431 - _CACHINGPOLICYDESCRIPTION._serialized_end=15583 - _CACHINGPOLICYDESCRIPTION_LABELSENTRY._serialized_start=14735 - _CACHINGPOLICYDESCRIPTION_LABELSENTRY._serialized_end=14780 - _TABLEPROFILEDESCRIPTION._serialized_start=15586 - _TABLEPROFILEDESCRIPTION._serialized_end=16160 - _TABLEPROFILEDESCRIPTION_LABELSENTRY._serialized_start=14735 - _TABLEPROFILEDESCRIPTION_LABELSENTRY._serialized_end=14780 - _DESCRIBETABLEOPTIONSREQUEST._serialized_start=16162 - _DESCRIBETABLEOPTIONSREQUEST._serialized_end=16250 - _DESCRIBETABLEOPTIONSRESPONSE._serialized_start=16252 - _DESCRIBETABLEOPTIONSRESPONSE._serialized_end=16328 - _DESCRIBETABLEOPTIONSRESULT._serialized_start=16331 - _DESCRIBETABLEOPTIONSRESULT._serialized_end=16868 - _KEYRANGE._serialized_start=16871 - _KEYRANGE._serialized_end=17063 - _READTABLEREQUEST._serialized_start=17066 - _READTABLEREQUEST._serialized_end=17311 - _READTABLERESPONSE._serialized_start=17314 - _READTABLERESPONSE._serialized_end=17502 - _READTABLERESULT._serialized_start=17504 - _READTABLERESULT._serialized_end=17557 - _READROWSREQUEST._serialized_start=17559 - _READROWSREQUEST._serialized_end=17658 - _READROWSRESPONSE._serialized_start=17661 - _READROWSRESPONSE._serialized_end=17799 - _BULKUPSERTREQUEST._serialized_start=17802 - _BULKUPSERTREQUEST._serialized_end=18071 - _BULKUPSERTRESPONSE._serialized_start=18073 - _BULKUPSERTRESPONSE._serialized_end=18139 - _BULKUPSERTRESULT._serialized_start=18141 - _BULKUPSERTRESULT._serialized_end=18159 - _EXECUTESCANQUERYREQUEST._serialized_start=18162 - _EXECUTESCANQUERYREQUEST._serialized_end=18563 - _EXECUTESCANQUERYREQUEST_PARAMETERSENTRY._serialized_start=12058 - _EXECUTESCANQUERYREQUEST_PARAMETERSENTRY._serialized_end=12124 - _EXECUTESCANQUERYREQUEST_MODE._serialized_start=18478 - _EXECUTESCANQUERYREQUEST_MODE._serialized_end=18539 - _EXECUTESCANQUERYPARTIALRESPONSE._serialized_start=18566 - _EXECUTESCANQUERYPARTIALRESPONSE._serialized_end=18741 - _EXECUTESCANQUERYPARTIALRESULT._serialized_start=18744 - _EXECUTESCANQUERYPARTIALRESULT._serialized_end=18884 + _STORETYPE._serialized_start=20290 + _STORETYPE._serialized_end=20372 + _CREATESESSIONREQUEST._serialized_start=413 + _CREATESESSIONREQUEST._serialized_end=494 + _CREATESESSIONRESPONSE._serialized_start=496 + _CREATESESSIONRESPONSE._serialized_end=565 + _CREATESESSIONRESULT._serialized_start=567 + _CREATESESSIONRESULT._serialized_end=608 + _DELETESESSIONREQUEST._serialized_start=610 + _DELETESESSIONREQUEST._serialized_end=711 + _DELETESESSIONRESPONSE._serialized_start=713 + _DELETESESSIONRESPONSE._serialized_end=782 + _GLOBALINDEX._serialized_start=784 + _GLOBALINDEX._serialized_end=797 + _GLOBALASYNCINDEX._serialized_start=799 + _GLOBALASYNCINDEX._serialized_end=817 + _GLOBALUNIQUEINDEX._serialized_start=819 + _GLOBALUNIQUEINDEX._serialized_end=838 + _TABLEINDEX._serialized_start=841 + _TABLEINDEX._serialized_end=1088 + _TABLEINDEXDESCRIPTION._serialized_start=1091 + _TABLEINDEXDESCRIPTION._serialized_end=1499 + _TABLEINDEXDESCRIPTION_STATUS._serialized_start=1420 + _TABLEINDEXDESCRIPTION_STATUS._serialized_end=1491 + _INDEXBUILDSTATE._serialized_start=1502 + _INDEXBUILDSTATE._serialized_end=1723 + _INDEXBUILDSTATE_STATE._serialized_start=1522 + _INDEXBUILDSTATE_STATE._serialized_end=1723 + _INDEXBUILDDESCRIPTION._serialized_start=1725 + _INDEXBUILDDESCRIPTION._serialized_end=1800 + _INDEXBUILDMETADATA._serialized_start=1803 + _INDEXBUILDMETADATA._serialized_end=1945 + _CHANGEFEEDMODE._serialized_start=1948 + _CHANGEFEEDMODE._serialized_end=2102 + _CHANGEFEEDMODE_MODE._serialized_start=1967 + _CHANGEFEEDMODE_MODE._serialized_end=2102 + _CHANGEFEEDFORMAT._serialized_start=2105 + _CHANGEFEEDFORMAT._serialized_end=2234 + _CHANGEFEEDFORMAT_FORMAT._serialized_start=2125 + _CHANGEFEEDFORMAT_FORMAT._serialized_end=2234 + _CHANGEFEED._serialized_start=2237 + _CHANGEFEED._serialized_end=2763 + _CHANGEFEED_ATTRIBUTESENTRY._serialized_start=2714 + _CHANGEFEED_ATTRIBUTESENTRY._serialized_end=2763 + _CHANGEFEEDDESCRIPTION._serialized_start=2766 + _CHANGEFEEDDESCRIPTION._serialized_end=3285 + _CHANGEFEEDDESCRIPTION_ATTRIBUTESENTRY._serialized_start=2714 + _CHANGEFEEDDESCRIPTION_ATTRIBUTESENTRY._serialized_end=2763 + _CHANGEFEEDDESCRIPTION_STATE._serialized_start=3192 + _CHANGEFEEDDESCRIPTION_STATE._serialized_end=3285 + _STORAGEPOOL._serialized_start=3287 + _STORAGEPOOL._serialized_end=3315 + _STORAGEPOLICY._serialized_start=3318 + _STORAGEPOLICY._serialized_end=3616 + _COLUMNFAMILYPOLICY._serialized_start=3619 + _COLUMNFAMILYPOLICY._serialized_end=3924 + _COLUMNFAMILYPOLICY_COMPRESSION._serialized_start=3848 + _COLUMNFAMILYPOLICY_COMPRESSION._serialized_end=3924 + _COMPACTIONPOLICY._serialized_start=3926 + _COMPACTIONPOLICY._serialized_end=3965 + _EXPLICITPARTITIONS._serialized_start=3967 + _EXPLICITPARTITIONS._serialized_end=4026 + _PARTITIONSTATS._serialized_start=4028 + _PARTITIONSTATS._serialized_end=4111 + _TABLESTATS._serialized_start=4114 + _TABLESTATS._serialized_end=4347 + _PARTITIONINGPOLICY._serialized_start=4350 + _PARTITIONINGPOLICY._serialized_end=4698 + _PARTITIONINGPOLICY_AUTOPARTITIONINGPOLICY._serialized_start=4566 + _PARTITIONINGPOLICY_AUTOPARTITIONINGPOLICY._serialized_end=4684 + _EXECUTIONPOLICY._serialized_start=4700 + _EXECUTIONPOLICY._serialized_end=4738 + _REPLICATIONPOLICY._serialized_start=4741 + _REPLICATIONPOLICY._serialized_end=4918 + _CACHINGPOLICY._serialized_start=4920 + _CACHINGPOLICY._serialized_end=4956 + _TABLEPROFILE._serialized_start=4959 + _TABLEPROFILE._serialized_end=5322 + _SEQUENCEDESCRIPTION._serialized_start=5325 + _SEQUENCEDESCRIPTION._serialized_end=5751 + _SEQUENCEDESCRIPTION_SETVAL._serialized_start=5566 + _SEQUENCEDESCRIPTION_SETVAL._serialized_end=5652 + _COLUMNMETA._serialized_start=5754 + _COLUMNMETA._serialized_end=5972 + _DATETYPECOLUMNMODESETTINGS._serialized_start=5974 + _DATETYPECOLUMNMODESETTINGS._serialized_end=6053 + _VALUESINCEUNIXEPOCHMODESETTINGS._serialized_start=6056 + _VALUESINCEUNIXEPOCHMODESETTINGS._serialized_end=6326 + _VALUESINCEUNIXEPOCHMODESETTINGS_UNIT._serialized_start=6212 + _VALUESINCEUNIXEPOCHMODESETTINGS_UNIT._serialized_end=6326 + _TTLSETTINGS._serialized_start=6329 + _TTLSETTINGS._serialized_end=6525 + _STORAGESETTINGS._serialized_start=6528 + _STORAGESETTINGS._serialized_end=6746 + _COLUMNFAMILY._serialized_start=6749 + _COLUMNFAMILY._serialized_end=7009 + _COLUMNFAMILY_COMPRESSION._serialized_start=6924 + _COLUMNFAMILY_COMPRESSION._serialized_end=7009 + _PARTITIONINGSETTINGS._serialized_start=7012 + _PARTITIONINGSETTINGS._serialized_end=7259 + _AZREADREPLICASSETTINGS._serialized_start=7261 + _AZREADREPLICASSETTINGS._serialized_end=7328 + _CLUSTERREPLICASSETTINGS._serialized_start=7330 + _CLUSTERREPLICASSETTINGS._serialized_end=7425 + _READREPLICASSETTINGS._serialized_start=7427 + _READREPLICASSETTINGS._serialized_end=7543 + _CREATETABLEREQUEST._serialized_start=7546 + _CREATETABLEREQUEST._serialized_end=8484 + _CREATETABLEREQUEST_ATTRIBUTESENTRY._serialized_start=2714 + _CREATETABLEREQUEST_ATTRIBUTESENTRY._serialized_end=2763 + _CREATETABLERESPONSE._serialized_start=8486 + _CREATETABLERESPONSE._serialized_end=8553 + _DROPTABLEREQUEST._serialized_start=8555 + _DROPTABLEREQUEST._serialized_end=8672 + _DROPTABLERESPONSE._serialized_start=8674 + _DROPTABLERESPONSE._serialized_end=8739 + _RENAMEINDEXITEM._serialized_start=8741 + _RENAMEINDEXITEM._serialized_end=8834 + _ALTERTABLEREQUEST._serialized_start=8837 + _ALTERTABLEREQUEST._serialized_end=10010 + _ALTERTABLEREQUEST_ALTERATTRIBUTESENTRY._serialized_start=9924 + _ALTERTABLEREQUEST_ALTERATTRIBUTESENTRY._serialized_end=9978 + _ALTERTABLERESPONSE._serialized_start=10012 + _ALTERTABLERESPONSE._serialized_end=10078 + _COPYTABLEREQUEST._serialized_start=10081 + _COPYTABLEREQUEST._serialized_end=10225 + _COPYTABLERESPONSE._serialized_start=10227 + _COPYTABLERESPONSE._serialized_end=10292 + _COPYTABLEITEM._serialized_start=10294 + _COPYTABLEITEM._serialized_end=10378 + _COPYTABLESREQUEST._serialized_start=10381 + _COPYTABLESREQUEST._serialized_end=10521 + _COPYTABLESRESPONSE._serialized_start=10523 + _COPYTABLESRESPONSE._serialized_end=10589 + _RENAMETABLEITEM._serialized_start=10591 + _RENAMETABLEITEM._serialized_end=10684 + _RENAMETABLESREQUEST._serialized_start=10687 + _RENAMETABLESREQUEST._serialized_end=10831 + _RENAMETABLESRESPONSE._serialized_start=10833 + _RENAMETABLESRESPONSE._serialized_end=10901 + _DESCRIBETABLEREQUEST._serialized_start=10904 + _DESCRIBETABLEREQUEST._serialized_end=11149 + _DESCRIBETABLERESPONSE._serialized_start=11151 + _DESCRIBETABLERESPONSE._serialized_end=11220 + _DESCRIBETABLERESULT._serialized_start=11223 + _DESCRIBETABLERESULT._serialized_end=12064 + _DESCRIBETABLERESULT_ATTRIBUTESENTRY._serialized_start=2714 + _DESCRIBETABLERESULT_ATTRIBUTESENTRY._serialized_end=2763 + _QUERY._serialized_start=12066 + _QUERY._serialized_end=12116 + _SERIALIZABLEMODESETTINGS._serialized_start=12118 + _SERIALIZABLEMODESETTINGS._serialized_end=12144 + _ONLINEMODESETTINGS._serialized_start=12146 + _ONLINEMODESETTINGS._serialized_end=12200 + _STALEMODESETTINGS._serialized_start=12202 + _STALEMODESETTINGS._serialized_end=12221 + _SNAPSHOTMODESETTINGS._serialized_start=12223 + _SNAPSHOTMODESETTINGS._serialized_end=12245 + _TRANSACTIONSETTINGS._serialized_start=12248 + _TRANSACTIONSETTINGS._serialized_end=12531 + _TRANSACTIONCONTROL._serialized_start=12533 + _TRANSACTIONCONTROL._serialized_end=12656 + _QUERYCACHEPOLICY._serialized_start=12658 + _QUERYCACHEPOLICY._serialized_end=12699 + _QUERYSTATSCOLLECTION._serialized_start=12702 + _QUERYSTATSCOLLECTION._serialized_end=12879 + _QUERYSTATSCOLLECTION_MODE._serialized_start=12727 + _QUERYSTATSCOLLECTION_MODE._serialized_end=12879 + _EXECUTEDATAQUERYREQUEST._serialized_start=12882 + _EXECUTEDATAQUERYREQUEST._serialized_end=13328 + _EXECUTEDATAQUERYREQUEST_PARAMETERSENTRY._serialized_start=13262 + _EXECUTEDATAQUERYREQUEST_PARAMETERSENTRY._serialized_end=13328 + _EXECUTEDATAQUERYRESPONSE._serialized_start=13330 + _EXECUTEDATAQUERYRESPONSE._serialized_end=13402 + _EXECUTESCHEMEQUERYREQUEST._serialized_start=13404 + _EXECUTESCHEMEQUERYREQUEST._serialized_end=13528 + _EXECUTESCHEMEQUERYRESPONSE._serialized_start=13530 + _EXECUTESCHEMEQUERYRESPONSE._serialized_end=13604 + _TRANSACTIONMETA._serialized_start=13606 + _TRANSACTIONMETA._serialized_end=13635 + _QUERYMETA._serialized_start=13638 + _QUERYMETA._serialized_end=13797 + _QUERYMETA_PARAMETERSTYPESENTRY._serialized_start=13732 + _QUERYMETA_PARAMETERSTYPESENTRY._serialized_end=13797 + _EXECUTEQUERYRESULT._serialized_start=13800 + _EXECUTEQUERYRESULT._serialized_end=13993 + _EXPLAINDATAQUERYREQUEST._serialized_start=13996 + _EXPLAINDATAQUERYREQUEST._serialized_end=14152 + _EXPLAINDATAQUERYRESPONSE._serialized_start=14154 + _EXPLAINDATAQUERYRESPONSE._serialized_end=14226 + _EXPLAINQUERYRESULT._serialized_start=14228 + _EXPLAINQUERYRESULT._serialized_end=14319 + _PREPAREDATAQUERYREQUEST._serialized_start=14321 + _PREPAREDATAQUERYREQUEST._serialized_end=14443 + _PREPAREDATAQUERYRESPONSE._serialized_start=14445 + _PREPAREDATAQUERYRESPONSE._serialized_end=14517 + _PREPAREQUERYRESULT._serialized_start=14520 + _PREPAREQUERYRESULT._serialized_end=14703 + _PREPAREQUERYRESULT_PARAMETERSTYPESENTRY._serialized_start=13732 + _PREPAREQUERYRESULT_PARAMETERSTYPESENTRY._serialized_end=13797 + _KEEPALIVEREQUEST._serialized_start=14705 + _KEEPALIVEREQUEST._serialized_end=14802 + _KEEPALIVERESPONSE._serialized_start=14804 + _KEEPALIVERESPONSE._serialized_end=14869 + _KEEPALIVERESULT._serialized_start=14872 + _KEEPALIVERESULT._serialized_end=15055 + _KEEPALIVERESULT_SESSIONSTATUS._serialized_start=14957 + _KEEPALIVERESULT_SESSIONSTATUS._serialized_end=15055 + _BEGINTRANSACTIONREQUEST._serialized_start=15058 + _BEGINTRANSACTIONREQUEST._serialized_end=15215 + _BEGINTRANSACTIONRESPONSE._serialized_start=15217 + _BEGINTRANSACTIONRESPONSE._serialized_end=15289 + _BEGINTRANSACTIONRESULT._serialized_start=15291 + _BEGINTRANSACTIONRESULT._serialized_end=15360 + _COMMITTRANSACTIONREQUEST._serialized_start=15363 + _COMMITTRANSACTIONREQUEST._serialized_end=15544 + _COMMITTRANSACTIONRESPONSE._serialized_start=15546 + _COMMITTRANSACTIONRESPONSE._serialized_end=15619 + _COMMITTRANSACTIONRESULT._serialized_start=15621 + _COMMITTRANSACTIONRESULT._serialized_end=15695 + _ROLLBACKTRANSACTIONREQUEST._serialized_start=15697 + _ROLLBACKTRANSACTIONREQUEST._serialized_end=15819 + _ROLLBACKTRANSACTIONRESPONSE._serialized_start=15821 + _ROLLBACKTRANSACTIONRESPONSE._serialized_end=15896 + _STORAGEPOLICYDESCRIPTION._serialized_start=15899 + _STORAGEPOLICYDESCRIPTION._serialized_end=16051 + _STORAGEPOLICYDESCRIPTION_LABELSENTRY._serialized_start=16006 + _STORAGEPOLICYDESCRIPTION_LABELSENTRY._serialized_end=16051 + _COMPACTIONPOLICYDESCRIPTION._serialized_start=16054 + _COMPACTIONPOLICYDESCRIPTION._serialized_end=16212 + _COMPACTIONPOLICYDESCRIPTION_LABELSENTRY._serialized_start=16006 + _COMPACTIONPOLICYDESCRIPTION_LABELSENTRY._serialized_end=16051 + _PARTITIONINGPOLICYDESCRIPTION._serialized_start=16215 + _PARTITIONINGPOLICYDESCRIPTION._serialized_end=16377 + _PARTITIONINGPOLICYDESCRIPTION_LABELSENTRY._serialized_start=16006 + _PARTITIONINGPOLICYDESCRIPTION_LABELSENTRY._serialized_end=16051 + _EXECUTIONPOLICYDESCRIPTION._serialized_start=16380 + _EXECUTIONPOLICYDESCRIPTION._serialized_end=16536 + _EXECUTIONPOLICYDESCRIPTION_LABELSENTRY._serialized_start=16006 + _EXECUTIONPOLICYDESCRIPTION_LABELSENTRY._serialized_end=16051 + _REPLICATIONPOLICYDESCRIPTION._serialized_start=16539 + _REPLICATIONPOLICYDESCRIPTION._serialized_end=16699 + _REPLICATIONPOLICYDESCRIPTION_LABELSENTRY._serialized_start=16006 + _REPLICATIONPOLICYDESCRIPTION_LABELSENTRY._serialized_end=16051 + _CACHINGPOLICYDESCRIPTION._serialized_start=16702 + _CACHINGPOLICYDESCRIPTION._serialized_end=16854 + _CACHINGPOLICYDESCRIPTION_LABELSENTRY._serialized_start=16006 + _CACHINGPOLICYDESCRIPTION_LABELSENTRY._serialized_end=16051 + _TABLEPROFILEDESCRIPTION._serialized_start=16857 + _TABLEPROFILEDESCRIPTION._serialized_end=17431 + _TABLEPROFILEDESCRIPTION_LABELSENTRY._serialized_start=16006 + _TABLEPROFILEDESCRIPTION_LABELSENTRY._serialized_end=16051 + _DESCRIBETABLEOPTIONSREQUEST._serialized_start=17433 + _DESCRIBETABLEOPTIONSREQUEST._serialized_end=17521 + _DESCRIBETABLEOPTIONSRESPONSE._serialized_start=17523 + _DESCRIBETABLEOPTIONSRESPONSE._serialized_end=17599 + _DESCRIBETABLEOPTIONSRESULT._serialized_start=17602 + _DESCRIBETABLEOPTIONSRESULT._serialized_end=18139 + _KEYRANGE._serialized_start=18142 + _KEYRANGE._serialized_end=18334 + _READTABLEREQUEST._serialized_start=18337 + _READTABLEREQUEST._serialized_end=18649 + _READTABLERESPONSE._serialized_start=18652 + _READTABLERESPONSE._serialized_end=18840 + _READTABLERESULT._serialized_start=18842 + _READTABLERESULT._serialized_end=18895 + _READROWSREQUEST._serialized_start=18897 + _READROWSREQUEST._serialized_end=18996 + _READROWSRESPONSE._serialized_start=18999 + _READROWSRESPONSE._serialized_end=19137 + _BULKUPSERTREQUEST._serialized_start=19140 + _BULKUPSERTREQUEST._serialized_end=19409 + _BULKUPSERTRESPONSE._serialized_start=19411 + _BULKUPSERTRESPONSE._serialized_end=19477 + _BULKUPSERTRESULT._serialized_start=19479 + _BULKUPSERTRESULT._serialized_end=19497 + _EXECUTESCANQUERYREQUEST._serialized_start=19500 + _EXECUTESCANQUERYREQUEST._serialized_end=19935 + _EXECUTESCANQUERYREQUEST_PARAMETERSENTRY._serialized_start=13262 + _EXECUTESCANQUERYREQUEST_PARAMETERSENTRY._serialized_end=13328 + _EXECUTESCANQUERYREQUEST_MODE._serialized_start=19850 + _EXECUTESCANQUERYREQUEST_MODE._serialized_end=19911 + _EXECUTESCANQUERYPARTIALRESPONSE._serialized_start=19938 + _EXECUTESCANQUERYPARTIALRESPONSE._serialized_end=20113 + _EXECUTESCANQUERYPARTIALRESULT._serialized_start=20116 + _EXECUTESCANQUERYPARTIALRESULT._serialized_end=20288 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_table_pb2.pyi b/ydb/_grpc/v4/protos/ydb_table_pb2.pyi index a73ddf33..19da81a5 100644 --- a/ydb/_grpc/v4/protos/ydb_table_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_table_pb2.pyi @@ -6,6 +6,7 @@ from protos import ydb_query_stats_pb2 as _ydb_query_stats_pb2 from protos import ydb_value_pb2 as _ydb_value_pb2 from protos import ydb_scheme_pb2 as _ydb_scheme_pb2 from protos import ydb_status_codes_pb2 as _ydb_status_codes_pb2 +from protos import ydb_topic_pb2 as _ydb_topic_pb2 from protos import ydb_formats_pb2 as _ydb_formats_pb2 from google.protobuf import empty_pb2 as _empty_pb2 from google.protobuf import duration_pb2 as _duration_pb2 @@ -17,6 +18,9 @@ from google.protobuf import message as _message from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor +STORE_TYPE_COLUMN: StoreType +STORE_TYPE_ROW: StoreType +STORE_TYPE_UNSPECIFIED: StoreType class AlterTableRequest(_message.Message): __slots__ = ["add_changefeeds", "add_column_families", "add_columns", "add_indexes", "alter_attributes", "alter_column_families", "alter_columns", "alter_partitioning_settings", "alter_storage_settings", "drop_changefeeds", "drop_columns", "drop_indexes", "drop_tiering", "drop_ttl_settings", "operation_params", "path", "rename_indexes", "session_id", "set_compaction_policy", "set_key_bloom_filter", "set_read_replicas_settings", "set_tiering", "set_ttl_settings"] @@ -159,7 +163,7 @@ class CachingPolicyDescription(_message.Message): def __init__(self, name: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ...) -> None: ... class Changefeed(_message.Message): - __slots__ = ["attributes", "format", "initial_scan", "mode", "name", "retention_period", "virtual_timestamps"] + __slots__ = ["attributes", "aws_region", "format", "initial_scan", "mode", "name", "resolved_timestamps_interval", "retention_period", "topic_partitioning_settings", "virtual_timestamps"] class AttributesEntry(_message.Message): __slots__ = ["key", "value"] KEY_FIELD_NUMBER: _ClassVar[int] @@ -168,23 +172,29 @@ class Changefeed(_message.Message): value: str def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] + AWS_REGION_FIELD_NUMBER: _ClassVar[int] FORMAT_FIELD_NUMBER: _ClassVar[int] INITIAL_SCAN_FIELD_NUMBER: _ClassVar[int] MODE_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] + RESOLVED_TIMESTAMPS_INTERVAL_FIELD_NUMBER: _ClassVar[int] RETENTION_PERIOD_FIELD_NUMBER: _ClassVar[int] + TOPIC_PARTITIONING_SETTINGS_FIELD_NUMBER: _ClassVar[int] VIRTUAL_TIMESTAMPS_FIELD_NUMBER: _ClassVar[int] attributes: _containers.ScalarMap[str, str] + aws_region: str format: ChangefeedFormat.Format initial_scan: bool mode: ChangefeedMode.Mode name: str + resolved_timestamps_interval: _duration_pb2.Duration retention_period: _duration_pb2.Duration + topic_partitioning_settings: _ydb_topic_pb2.PartitioningSettings virtual_timestamps: bool - def __init__(self, name: _Optional[str] = ..., mode: _Optional[_Union[ChangefeedMode.Mode, str]] = ..., format: _Optional[_Union[ChangefeedFormat.Format, str]] = ..., retention_period: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., virtual_timestamps: bool = ..., initial_scan: bool = ..., attributes: _Optional[_Mapping[str, str]] = ...) -> None: ... + def __init__(self, name: _Optional[str] = ..., mode: _Optional[_Union[ChangefeedMode.Mode, str]] = ..., format: _Optional[_Union[ChangefeedFormat.Format, str]] = ..., retention_period: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., virtual_timestamps: bool = ..., initial_scan: bool = ..., attributes: _Optional[_Mapping[str, str]] = ..., aws_region: _Optional[str] = ..., resolved_timestamps_interval: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., topic_partitioning_settings: _Optional[_Union[_ydb_topic_pb2.PartitioningSettings, _Mapping]] = ...) -> None: ... class ChangefeedDescription(_message.Message): - __slots__ = ["attributes", "format", "mode", "name", "state", "virtual_timestamps"] + __slots__ = ["attributes", "aws_region", "format", "mode", "name", "resolved_timestamps_interval", "state", "virtual_timestamps"] class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] class AttributesEntry(_message.Message): @@ -195,9 +205,11 @@ class ChangefeedDescription(_message.Message): value: str def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] + AWS_REGION_FIELD_NUMBER: _ClassVar[int] FORMAT_FIELD_NUMBER: _ClassVar[int] MODE_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] + RESOLVED_TIMESTAMPS_INTERVAL_FIELD_NUMBER: _ClassVar[int] STATE_DISABLED: ChangefeedDescription.State STATE_ENABLED: ChangefeedDescription.State STATE_FIELD_NUMBER: _ClassVar[int] @@ -205,17 +217,20 @@ class ChangefeedDescription(_message.Message): STATE_UNSPECIFIED: ChangefeedDescription.State VIRTUAL_TIMESTAMPS_FIELD_NUMBER: _ClassVar[int] attributes: _containers.ScalarMap[str, str] + aws_region: str format: ChangefeedFormat.Format mode: ChangefeedMode.Mode name: str + resolved_timestamps_interval: _duration_pb2.Duration state: ChangefeedDescription.State virtual_timestamps: bool - def __init__(self, name: _Optional[str] = ..., mode: _Optional[_Union[ChangefeedMode.Mode, str]] = ..., format: _Optional[_Union[ChangefeedFormat.Format, str]] = ..., state: _Optional[_Union[ChangefeedDescription.State, str]] = ..., virtual_timestamps: bool = ..., attributes: _Optional[_Mapping[str, str]] = ...) -> None: ... + def __init__(self, name: _Optional[str] = ..., mode: _Optional[_Union[ChangefeedMode.Mode, str]] = ..., format: _Optional[_Union[ChangefeedFormat.Format, str]] = ..., state: _Optional[_Union[ChangefeedDescription.State, str]] = ..., virtual_timestamps: bool = ..., attributes: _Optional[_Mapping[str, str]] = ..., aws_region: _Optional[str] = ..., resolved_timestamps_interval: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...) -> None: ... class ChangefeedFormat(_message.Message): __slots__ = [] class Format(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] + FORMAT_DEBEZIUM_JSON: ChangefeedFormat.Format FORMAT_DYNAMODB_STREAMS_JSON: ChangefeedFormat.Format FORMAT_JSON: ChangefeedFormat.Format FORMAT_UNSPECIFIED: ChangefeedFormat.Format @@ -276,14 +291,20 @@ class ColumnFamilyPolicy(_message.Message): def __init__(self, name: _Optional[str] = ..., data: _Optional[_Union[StoragePool, _Mapping]] = ..., external: _Optional[_Union[StoragePool, _Mapping]] = ..., keep_in_memory: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., compression: _Optional[_Union[ColumnFamilyPolicy.Compression, str]] = ...) -> None: ... class ColumnMeta(_message.Message): - __slots__ = ["family", "name", "type"] + __slots__ = ["family", "from_literal", "from_sequence", "name", "not_null", "type"] FAMILY_FIELD_NUMBER: _ClassVar[int] + FROM_LITERAL_FIELD_NUMBER: _ClassVar[int] + FROM_SEQUENCE_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] + NOT_NULL_FIELD_NUMBER: _ClassVar[int] TYPE_FIELD_NUMBER: _ClassVar[int] family: str + from_literal: _ydb_value_pb2.TypedValue + from_sequence: SequenceDescription name: str + not_null: bool type: _ydb_value_pb2.Type - def __init__(self, name: _Optional[str] = ..., type: _Optional[_Union[_ydb_value_pb2.Type, _Mapping]] = ..., family: _Optional[str] = ...) -> None: ... + def __init__(self, name: _Optional[str] = ..., type: _Optional[_Union[_ydb_value_pb2.Type, _Mapping]] = ..., family: _Optional[str] = ..., not_null: bool = ..., from_literal: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ..., from_sequence: _Optional[_Union[SequenceDescription, _Mapping]] = ...) -> None: ... class CommitTransactionRequest(_message.Message): __slots__ = ["collect_stats", "operation_params", "session_id", "tx_id"] @@ -393,7 +414,7 @@ class CreateSessionResult(_message.Message): def __init__(self, session_id: _Optional[str] = ...) -> None: ... class CreateTableRequest(_message.Message): - __slots__ = ["attributes", "column_families", "columns", "compaction_policy", "indexes", "key_bloom_filter", "operation_params", "partition_at_keys", "partitioning_settings", "path", "primary_key", "profile", "read_replicas_settings", "session_id", "storage_settings", "tiering", "ttl_settings", "uniform_partitions"] + __slots__ = ["attributes", "column_families", "columns", "compaction_policy", "indexes", "key_bloom_filter", "operation_params", "partition_at_keys", "partitioning_settings", "path", "primary_key", "profile", "read_replicas_settings", "session_id", "storage_settings", "store_type", "temporary", "tiering", "ttl_settings", "uniform_partitions"] class AttributesEntry(_message.Message): __slots__ = ["key", "value"] KEY_FIELD_NUMBER: _ClassVar[int] @@ -416,6 +437,8 @@ class CreateTableRequest(_message.Message): READ_REPLICAS_SETTINGS_FIELD_NUMBER: _ClassVar[int] SESSION_ID_FIELD_NUMBER: _ClassVar[int] STORAGE_SETTINGS_FIELD_NUMBER: _ClassVar[int] + STORE_TYPE_FIELD_NUMBER: _ClassVar[int] + TEMPORARY_FIELD_NUMBER: _ClassVar[int] TIERING_FIELD_NUMBER: _ClassVar[int] TTL_SETTINGS_FIELD_NUMBER: _ClassVar[int] UNIFORM_PARTITIONS_FIELD_NUMBER: _ClassVar[int] @@ -434,10 +457,12 @@ class CreateTableRequest(_message.Message): read_replicas_settings: ReadReplicasSettings session_id: str storage_settings: StorageSettings + store_type: StoreType + temporary: bool tiering: str ttl_settings: TtlSettings uniform_partitions: int - def __init__(self, session_id: _Optional[str] = ..., path: _Optional[str] = ..., columns: _Optional[_Iterable[_Union[ColumnMeta, _Mapping]]] = ..., primary_key: _Optional[_Iterable[str]] = ..., profile: _Optional[_Union[TableProfile, _Mapping]] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., indexes: _Optional[_Iterable[_Union[TableIndex, _Mapping]]] = ..., ttl_settings: _Optional[_Union[TtlSettings, _Mapping]] = ..., storage_settings: _Optional[_Union[StorageSettings, _Mapping]] = ..., column_families: _Optional[_Iterable[_Union[ColumnFamily, _Mapping]]] = ..., attributes: _Optional[_Mapping[str, str]] = ..., compaction_policy: _Optional[str] = ..., uniform_partitions: _Optional[int] = ..., partition_at_keys: _Optional[_Union[ExplicitPartitions, _Mapping]] = ..., partitioning_settings: _Optional[_Union[PartitioningSettings, _Mapping]] = ..., key_bloom_filter: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., read_replicas_settings: _Optional[_Union[ReadReplicasSettings, _Mapping]] = ..., tiering: _Optional[str] = ...) -> None: ... + def __init__(self, session_id: _Optional[str] = ..., path: _Optional[str] = ..., columns: _Optional[_Iterable[_Union[ColumnMeta, _Mapping]]] = ..., primary_key: _Optional[_Iterable[str]] = ..., profile: _Optional[_Union[TableProfile, _Mapping]] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., indexes: _Optional[_Iterable[_Union[TableIndex, _Mapping]]] = ..., ttl_settings: _Optional[_Union[TtlSettings, _Mapping]] = ..., storage_settings: _Optional[_Union[StorageSettings, _Mapping]] = ..., column_families: _Optional[_Iterable[_Union[ColumnFamily, _Mapping]]] = ..., attributes: _Optional[_Mapping[str, str]] = ..., compaction_policy: _Optional[str] = ..., uniform_partitions: _Optional[int] = ..., partition_at_keys: _Optional[_Union[ExplicitPartitions, _Mapping]] = ..., partitioning_settings: _Optional[_Union[PartitioningSettings, _Mapping]] = ..., key_bloom_filter: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., read_replicas_settings: _Optional[_Union[ReadReplicasSettings, _Mapping]] = ..., tiering: _Optional[str] = ..., temporary: bool = ..., store_type: _Optional[_Union[StoreType, str]] = ...) -> None: ... class CreateTableResponse(_message.Message): __slots__ = ["operation"] @@ -498,20 +523,22 @@ class DescribeTableOptionsResult(_message.Message): def __init__(self, table_profile_presets: _Optional[_Iterable[_Union[TableProfileDescription, _Mapping]]] = ..., storage_policy_presets: _Optional[_Iterable[_Union[StoragePolicyDescription, _Mapping]]] = ..., compaction_policy_presets: _Optional[_Iterable[_Union[CompactionPolicyDescription, _Mapping]]] = ..., partitioning_policy_presets: _Optional[_Iterable[_Union[PartitioningPolicyDescription, _Mapping]]] = ..., execution_policy_presets: _Optional[_Iterable[_Union[ExecutionPolicyDescription, _Mapping]]] = ..., replication_policy_presets: _Optional[_Iterable[_Union[ReplicationPolicyDescription, _Mapping]]] = ..., caching_policy_presets: _Optional[_Iterable[_Union[CachingPolicyDescription, _Mapping]]] = ...) -> None: ... class DescribeTableRequest(_message.Message): - __slots__ = ["include_partition_stats", "include_shard_key_bounds", "include_table_stats", "operation_params", "path", "session_id"] + __slots__ = ["include_partition_stats", "include_shard_key_bounds", "include_shard_nodes_info", "include_table_stats", "operation_params", "path", "session_id"] INCLUDE_PARTITION_STATS_FIELD_NUMBER: _ClassVar[int] INCLUDE_SHARD_KEY_BOUNDS_FIELD_NUMBER: _ClassVar[int] + INCLUDE_SHARD_NODES_INFO_FIELD_NUMBER: _ClassVar[int] INCLUDE_TABLE_STATS_FIELD_NUMBER: _ClassVar[int] OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] PATH_FIELD_NUMBER: _ClassVar[int] SESSION_ID_FIELD_NUMBER: _ClassVar[int] include_partition_stats: bool include_shard_key_bounds: bool + include_shard_nodes_info: bool include_table_stats: bool operation_params: _ydb_operation_pb2.OperationParams path: str session_id: str - def __init__(self, session_id: _Optional[str] = ..., path: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., include_shard_key_bounds: bool = ..., include_table_stats: bool = ..., include_partition_stats: bool = ...) -> None: ... + def __init__(self, session_id: _Optional[str] = ..., path: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., include_shard_key_bounds: bool = ..., include_table_stats: bool = ..., include_partition_stats: bool = ..., include_shard_nodes_info: bool = ...) -> None: ... class DescribeTableResponse(_message.Message): __slots__ = ["operation"] @@ -520,7 +547,7 @@ class DescribeTableResponse(_message.Message): def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... class DescribeTableResult(_message.Message): - __slots__ = ["attributes", "changefeeds", "column_families", "columns", "indexes", "key_bloom_filter", "partitioning_settings", "primary_key", "read_replicas_settings", "self", "shard_key_bounds", "storage_settings", "table_stats", "tiering", "ttl_settings"] + __slots__ = ["attributes", "changefeeds", "column_families", "columns", "indexes", "key_bloom_filter", "partitioning_settings", "primary_key", "read_replicas_settings", "self", "shard_key_bounds", "storage_settings", "store_type", "table_stats", "temporary", "tiering", "ttl_settings"] class AttributesEntry(_message.Message): __slots__ = ["key", "value"] KEY_FIELD_NUMBER: _ClassVar[int] @@ -540,7 +567,9 @@ class DescribeTableResult(_message.Message): SELF_FIELD_NUMBER: _ClassVar[int] SHARD_KEY_BOUNDS_FIELD_NUMBER: _ClassVar[int] STORAGE_SETTINGS_FIELD_NUMBER: _ClassVar[int] + STORE_TYPE_FIELD_NUMBER: _ClassVar[int] TABLE_STATS_FIELD_NUMBER: _ClassVar[int] + TEMPORARY_FIELD_NUMBER: _ClassVar[int] TIERING_FIELD_NUMBER: _ClassVar[int] TTL_SETTINGS_FIELD_NUMBER: _ClassVar[int] attributes: _containers.ScalarMap[str, str] @@ -555,10 +584,12 @@ class DescribeTableResult(_message.Message): self: _ydb_scheme_pb2.Entry shard_key_bounds: _containers.RepeatedCompositeFieldContainer[_ydb_value_pb2.TypedValue] storage_settings: StorageSettings + store_type: StoreType table_stats: TableStats + temporary: bool tiering: str ttl_settings: TtlSettings - def __init__(self, self_: _Optional[_Union[_ydb_scheme_pb2.Entry, _Mapping]] = ..., columns: _Optional[_Iterable[_Union[ColumnMeta, _Mapping]]] = ..., primary_key: _Optional[_Iterable[str]] = ..., shard_key_bounds: _Optional[_Iterable[_Union[_ydb_value_pb2.TypedValue, _Mapping]]] = ..., indexes: _Optional[_Iterable[_Union[TableIndexDescription, _Mapping]]] = ..., table_stats: _Optional[_Union[TableStats, _Mapping]] = ..., ttl_settings: _Optional[_Union[TtlSettings, _Mapping]] = ..., storage_settings: _Optional[_Union[StorageSettings, _Mapping]] = ..., column_families: _Optional[_Iterable[_Union[ColumnFamily, _Mapping]]] = ..., attributes: _Optional[_Mapping[str, str]] = ..., partitioning_settings: _Optional[_Union[PartitioningSettings, _Mapping]] = ..., key_bloom_filter: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., read_replicas_settings: _Optional[_Union[ReadReplicasSettings, _Mapping]] = ..., changefeeds: _Optional[_Iterable[_Union[ChangefeedDescription, _Mapping]]] = ..., tiering: _Optional[str] = ...) -> None: ... + def __init__(self, self_: _Optional[_Union[_ydb_scheme_pb2.Entry, _Mapping]] = ..., columns: _Optional[_Iterable[_Union[ColumnMeta, _Mapping]]] = ..., primary_key: _Optional[_Iterable[str]] = ..., shard_key_bounds: _Optional[_Iterable[_Union[_ydb_value_pb2.TypedValue, _Mapping]]] = ..., indexes: _Optional[_Iterable[_Union[TableIndexDescription, _Mapping]]] = ..., table_stats: _Optional[_Union[TableStats, _Mapping]] = ..., ttl_settings: _Optional[_Union[TtlSettings, _Mapping]] = ..., storage_settings: _Optional[_Union[StorageSettings, _Mapping]] = ..., column_families: _Optional[_Iterable[_Union[ColumnFamily, _Mapping]]] = ..., attributes: _Optional[_Mapping[str, str]] = ..., partitioning_settings: _Optional[_Union[PartitioningSettings, _Mapping]] = ..., key_bloom_filter: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., read_replicas_settings: _Optional[_Union[ReadReplicasSettings, _Mapping]] = ..., changefeeds: _Optional[_Iterable[_Union[ChangefeedDescription, _Mapping]]] = ..., tiering: _Optional[str] = ..., temporary: bool = ..., store_type: _Optional[_Union[StoreType, str]] = ...) -> None: ... class DropTableRequest(_message.Message): __slots__ = ["operation_params", "path", "session_id"] @@ -630,15 +661,17 @@ class ExecuteScanQueryPartialResponse(_message.Message): def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., result: _Optional[_Union[ExecuteScanQueryPartialResult, _Mapping]] = ...) -> None: ... class ExecuteScanQueryPartialResult(_message.Message): - __slots__ = ["query_stats", "result_set"] + __slots__ = ["query_full_diagnostics", "query_stats", "result_set"] + QUERY_FULL_DIAGNOSTICS_FIELD_NUMBER: _ClassVar[int] QUERY_STATS_FIELD_NUMBER: _ClassVar[int] RESULT_SET_FIELD_NUMBER: _ClassVar[int] + query_full_diagnostics: str query_stats: _ydb_query_stats_pb2.QueryStats result_set: _ydb_value_pb2.ResultSet - def __init__(self, result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ..., query_stats: _Optional[_Union[_ydb_query_stats_pb2.QueryStats, _Mapping]] = ...) -> None: ... + def __init__(self, result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ..., query_stats: _Optional[_Union[_ydb_query_stats_pb2.QueryStats, _Mapping]] = ..., query_full_diagnostics: _Optional[str] = ...) -> None: ... class ExecuteScanQueryRequest(_message.Message): - __slots__ = ["collect_stats", "mode", "parameters", "query"] + __slots__ = ["collect_full_diagnostics", "collect_stats", "mode", "parameters", "query"] class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] class ParametersEntry(_message.Message): @@ -648,6 +681,7 @@ class ExecuteScanQueryRequest(_message.Message): key: str value: _ydb_value_pb2.TypedValue def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... + COLLECT_FULL_DIAGNOSTICS_FIELD_NUMBER: _ClassVar[int] COLLECT_STATS_FIELD_NUMBER: _ClassVar[int] MODE_EXEC: ExecuteScanQueryRequest.Mode MODE_EXPLAIN: ExecuteScanQueryRequest.Mode @@ -655,11 +689,12 @@ class ExecuteScanQueryRequest(_message.Message): MODE_UNSPECIFIED: ExecuteScanQueryRequest.Mode PARAMETERS_FIELD_NUMBER: _ClassVar[int] QUERY_FIELD_NUMBER: _ClassVar[int] + collect_full_diagnostics: bool collect_stats: QueryStatsCollection.Mode mode: ExecuteScanQueryRequest.Mode parameters: _containers.MessageMap[str, _ydb_value_pb2.TypedValue] query: Query - def __init__(self, query: _Optional[_Union[Query, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., mode: _Optional[_Union[ExecuteScanQueryRequest.Mode, str]] = ..., collect_stats: _Optional[_Union[QueryStatsCollection.Mode, str]] = ...) -> None: ... + def __init__(self, query: _Optional[_Union[Query, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., mode: _Optional[_Union[ExecuteScanQueryRequest.Mode, str]] = ..., collect_stats: _Optional[_Union[QueryStatsCollection.Mode, str]] = ..., collect_full_diagnostics: bool = ...) -> None: ... class ExecuteSchemeQueryRequest(_message.Message): __slots__ = ["operation_params", "session_id", "yql_text"] @@ -699,14 +734,16 @@ class ExecutionPolicyDescription(_message.Message): def __init__(self, name: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ...) -> None: ... class ExplainDataQueryRequest(_message.Message): - __slots__ = ["operation_params", "session_id", "yql_text"] + __slots__ = ["collect_full_diagnostics", "operation_params", "session_id", "yql_text"] + COLLECT_FULL_DIAGNOSTICS_FIELD_NUMBER: _ClassVar[int] OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] SESSION_ID_FIELD_NUMBER: _ClassVar[int] YQL_TEXT_FIELD_NUMBER: _ClassVar[int] + collect_full_diagnostics: bool operation_params: _ydb_operation_pb2.OperationParams session_id: str yql_text: str - def __init__(self, session_id: _Optional[str] = ..., yql_text: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + def __init__(self, session_id: _Optional[str] = ..., yql_text: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., collect_full_diagnostics: bool = ...) -> None: ... class ExplainDataQueryResponse(_message.Message): __slots__ = ["operation"] @@ -715,12 +752,14 @@ class ExplainDataQueryResponse(_message.Message): def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... class ExplainQueryResult(_message.Message): - __slots__ = ["query_ast", "query_plan"] + __slots__ = ["query_ast", "query_full_diagnostics", "query_plan"] QUERY_AST_FIELD_NUMBER: _ClassVar[int] + QUERY_FULL_DIAGNOSTICS_FIELD_NUMBER: _ClassVar[int] QUERY_PLAN_FIELD_NUMBER: _ClassVar[int] query_ast: str + query_full_diagnostics: str query_plan: str - def __init__(self, query_ast: _Optional[str] = ..., query_plan: _Optional[str] = ...) -> None: ... + def __init__(self, query_ast: _Optional[str] = ..., query_plan: _Optional[str] = ..., query_full_diagnostics: _Optional[str] = ...) -> None: ... class ExplicitPartitions(_message.Message): __slots__ = ["split_points"] @@ -736,6 +775,10 @@ class GlobalIndex(_message.Message): __slots__ = [] def __init__(self) -> None: ... +class GlobalUniqueIndex(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + class IndexBuildDescription(_message.Message): __slots__ = ["index", "path"] INDEX_FIELD_NUMBER: _ClassVar[int] @@ -813,12 +856,14 @@ class OnlineModeSettings(_message.Message): def __init__(self, allow_inconsistent_reads: bool = ...) -> None: ... class PartitionStats(_message.Message): - __slots__ = ["rows_estimate", "store_size"] + __slots__ = ["leader_node_id", "rows_estimate", "store_size"] + LEADER_NODE_ID_FIELD_NUMBER: _ClassVar[int] ROWS_ESTIMATE_FIELD_NUMBER: _ClassVar[int] STORE_SIZE_FIELD_NUMBER: _ClassVar[int] + leader_node_id: int rows_estimate: int store_size: int - def __init__(self, rows_estimate: _Optional[int] = ..., store_size: _Optional[int] = ...) -> None: ... + def __init__(self, rows_estimate: _Optional[int] = ..., store_size: _Optional[int] = ..., leader_node_id: _Optional[int] = ...) -> None: ... class PartitioningPolicy(_message.Message): __slots__ = ["auto_partitioning", "explicit_partitions", "preset_name", "uniform_partitions"] @@ -971,13 +1016,14 @@ class ReadRowsResponse(_message.Message): def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ...) -> None: ... class ReadTableRequest(_message.Message): - __slots__ = ["batch_limit_bytes", "batch_limit_rows", "columns", "key_range", "ordered", "path", "row_limit", "session_id", "use_snapshot"] + __slots__ = ["batch_limit_bytes", "batch_limit_rows", "columns", "key_range", "ordered", "path", "return_not_null_data_as_optional", "row_limit", "session_id", "use_snapshot"] BATCH_LIMIT_BYTES_FIELD_NUMBER: _ClassVar[int] BATCH_LIMIT_ROWS_FIELD_NUMBER: _ClassVar[int] COLUMNS_FIELD_NUMBER: _ClassVar[int] KEY_RANGE_FIELD_NUMBER: _ClassVar[int] ORDERED_FIELD_NUMBER: _ClassVar[int] PATH_FIELD_NUMBER: _ClassVar[int] + RETURN_NOT_NULL_DATA_AS_OPTIONAL_FIELD_NUMBER: _ClassVar[int] ROW_LIMIT_FIELD_NUMBER: _ClassVar[int] SESSION_ID_FIELD_NUMBER: _ClassVar[int] USE_SNAPSHOT_FIELD_NUMBER: _ClassVar[int] @@ -987,10 +1033,11 @@ class ReadTableRequest(_message.Message): key_range: KeyRange ordered: bool path: str + return_not_null_data_as_optional: _ydb_common_pb2.FeatureFlag.Status row_limit: int session_id: str use_snapshot: _ydb_common_pb2.FeatureFlag.Status - def __init__(self, session_id: _Optional[str] = ..., path: _Optional[str] = ..., key_range: _Optional[_Union[KeyRange, _Mapping]] = ..., columns: _Optional[_Iterable[str]] = ..., ordered: bool = ..., row_limit: _Optional[int] = ..., use_snapshot: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., batch_limit_bytes: _Optional[int] = ..., batch_limit_rows: _Optional[int] = ...) -> None: ... + def __init__(self, session_id: _Optional[str] = ..., path: _Optional[str] = ..., key_range: _Optional[_Union[KeyRange, _Mapping]] = ..., columns: _Optional[_Iterable[str]] = ..., ordered: bool = ..., row_limit: _Optional[int] = ..., use_snapshot: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., batch_limit_bytes: _Optional[int] = ..., batch_limit_rows: _Optional[int] = ..., return_not_null_data_as_optional: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ...) -> None: ... class ReadTableResponse(_message.Message): __slots__ = ["issues", "result", "snapshot", "status"] @@ -1089,6 +1136,33 @@ class RollbackTransactionResponse(_message.Message): operation: _ydb_operation_pb2.Operation def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... +class SequenceDescription(_message.Message): + __slots__ = ["cache", "cycle", "increment", "max_value", "min_value", "name", "set_val", "start_value"] + class SetVal(_message.Message): + __slots__ = ["next_used", "next_value"] + NEXT_USED_FIELD_NUMBER: _ClassVar[int] + NEXT_VALUE_FIELD_NUMBER: _ClassVar[int] + next_used: bool + next_value: int + def __init__(self, next_value: _Optional[int] = ..., next_used: bool = ...) -> None: ... + CACHE_FIELD_NUMBER: _ClassVar[int] + CYCLE_FIELD_NUMBER: _ClassVar[int] + INCREMENT_FIELD_NUMBER: _ClassVar[int] + MAX_VALUE_FIELD_NUMBER: _ClassVar[int] + MIN_VALUE_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + SET_VAL_FIELD_NUMBER: _ClassVar[int] + START_VALUE_FIELD_NUMBER: _ClassVar[int] + cache: int + cycle: bool + increment: int + max_value: int + min_value: int + name: str + set_val: SequenceDescription.SetVal + start_value: int + def __init__(self, name: _Optional[str] = ..., min_value: _Optional[int] = ..., max_value: _Optional[int] = ..., start_value: _Optional[int] = ..., cache: _Optional[int] = ..., increment: _Optional[int] = ..., cycle: bool = ..., set_val: _Optional[_Union[SequenceDescription.SetVal, _Mapping]] = ...) -> None: ... + class SerializableModeSettings(_message.Message): __slots__ = [] def __init__(self) -> None: ... @@ -1153,26 +1227,29 @@ class StorageSettings(_message.Message): def __init__(self, tablet_commit_log0: _Optional[_Union[StoragePool, _Mapping]] = ..., tablet_commit_log1: _Optional[_Union[StoragePool, _Mapping]] = ..., external: _Optional[_Union[StoragePool, _Mapping]] = ..., store_external_blobs: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ...) -> None: ... class TableIndex(_message.Message): - __slots__ = ["data_columns", "global_async_index", "global_index", "index_columns", "name"] + __slots__ = ["data_columns", "global_async_index", "global_index", "global_unique_index", "index_columns", "name"] DATA_COLUMNS_FIELD_NUMBER: _ClassVar[int] GLOBAL_ASYNC_INDEX_FIELD_NUMBER: _ClassVar[int] GLOBAL_INDEX_FIELD_NUMBER: _ClassVar[int] + GLOBAL_UNIQUE_INDEX_FIELD_NUMBER: _ClassVar[int] INDEX_COLUMNS_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] data_columns: _containers.RepeatedScalarFieldContainer[str] global_async_index: GlobalAsyncIndex global_index: GlobalIndex + global_unique_index: GlobalUniqueIndex index_columns: _containers.RepeatedScalarFieldContainer[str] name: str - def __init__(self, name: _Optional[str] = ..., index_columns: _Optional[_Iterable[str]] = ..., global_index: _Optional[_Union[GlobalIndex, _Mapping]] = ..., global_async_index: _Optional[_Union[GlobalAsyncIndex, _Mapping]] = ..., data_columns: _Optional[_Iterable[str]] = ...) -> None: ... + def __init__(self, name: _Optional[str] = ..., index_columns: _Optional[_Iterable[str]] = ..., global_index: _Optional[_Union[GlobalIndex, _Mapping]] = ..., global_async_index: _Optional[_Union[GlobalAsyncIndex, _Mapping]] = ..., global_unique_index: _Optional[_Union[GlobalUniqueIndex, _Mapping]] = ..., data_columns: _Optional[_Iterable[str]] = ...) -> None: ... class TableIndexDescription(_message.Message): - __slots__ = ["data_columns", "global_async_index", "global_index", "index_columns", "name", "size_bytes", "status"] + __slots__ = ["data_columns", "global_async_index", "global_index", "global_unique_index", "index_columns", "name", "size_bytes", "status"] class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] DATA_COLUMNS_FIELD_NUMBER: _ClassVar[int] GLOBAL_ASYNC_INDEX_FIELD_NUMBER: _ClassVar[int] GLOBAL_INDEX_FIELD_NUMBER: _ClassVar[int] + GLOBAL_UNIQUE_INDEX_FIELD_NUMBER: _ClassVar[int] INDEX_COLUMNS_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] SIZE_BYTES_FIELD_NUMBER: _ClassVar[int] @@ -1183,11 +1260,12 @@ class TableIndexDescription(_message.Message): data_columns: _containers.RepeatedScalarFieldContainer[str] global_async_index: GlobalAsyncIndex global_index: GlobalIndex + global_unique_index: GlobalUniqueIndex index_columns: _containers.RepeatedScalarFieldContainer[str] name: str size_bytes: int status: TableIndexDescription.Status - def __init__(self, name: _Optional[str] = ..., index_columns: _Optional[_Iterable[str]] = ..., global_index: _Optional[_Union[GlobalIndex, _Mapping]] = ..., global_async_index: _Optional[_Union[GlobalAsyncIndex, _Mapping]] = ..., status: _Optional[_Union[TableIndexDescription.Status, str]] = ..., data_columns: _Optional[_Iterable[str]] = ..., size_bytes: _Optional[int] = ...) -> None: ... + def __init__(self, name: _Optional[str] = ..., index_columns: _Optional[_Iterable[str]] = ..., global_index: _Optional[_Union[GlobalIndex, _Mapping]] = ..., global_async_index: _Optional[_Union[GlobalAsyncIndex, _Mapping]] = ..., global_unique_index: _Optional[_Union[GlobalUniqueIndex, _Mapping]] = ..., status: _Optional[_Union[TableIndexDescription.Status, str]] = ..., data_columns: _Optional[_Iterable[str]] = ..., size_bytes: _Optional[int] = ...) -> None: ... class TableProfile(_message.Message): __slots__ = ["caching_policy", "compaction_policy", "execution_policy", "partitioning_policy", "preset_name", "replication_policy", "storage_policy"] @@ -1316,3 +1394,6 @@ class ValueSinceUnixEpochModeSettings(_message.Message): column_unit: ValueSinceUnixEpochModeSettings.Unit expire_after_seconds: int def __init__(self, column_name: _Optional[str] = ..., column_unit: _Optional[_Union[ValueSinceUnixEpochModeSettings.Unit, str]] = ..., expire_after_seconds: _Optional[int] = ...) -> None: ... + +class StoreType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] diff --git a/ydb/_grpc/v4/protos/ydb_topic_pb2.py b/ydb/_grpc/v4/protos/ydb_topic_pb2.py index 4c966188..9c1bdd86 100644 --- a/ydb/_grpc/v4/protos/ydb_topic_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_topic_pb2.py @@ -16,12 +16,13 @@ from ydb._grpc.v4.protos import ydb_scheme_pb2 as protos_dot_ydb__scheme__pb2 from ydb._grpc.v4.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 from ydb._grpc.v4.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 +from ydb._grpc.v4.protos.annotations import sensitive_pb2 as protos_dot_annotations_dot_sensitive__pb2 from ydb._grpc.v4.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"#\n\x12UpdateTokenRequest\x12\r\n\x05token\x18\x01 \x01(\t\"\x15\n\x13UpdateTokenResponse\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x87\x12\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xa3\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x13\n\x0bproducer_id\x18\x02 \x01(\t\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12\x1a\n\x10message_group_id\x18\x04 \x01(\tH\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\x96\x03\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x12/\n\x02tx\x18\x03 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentityH\x00\x88\x01\x01\x1a\xf4\x01\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12\x1a\n\x10message_group_id\x18\x05 \x01(\tH\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioningB\x05\n\x03_tx\x1a\x81\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\x8e\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x42\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xca\x1d\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xea\x04\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xc4\x05\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x42\x10\n\x0eserver_message\x1a\xa4\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\xff\x05\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xd1\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12\x18\n\x10message_group_id\x18\x07 \x01(\t\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xc4\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x13\n\x0bproducer_id\x18\x02 \x01(\t\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xb6\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1ag\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x1a<\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\"2\n\x13TransactionIdentity\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07session\x18\x02 \x01(\t\"\xc4\x03\n!UpdateOffsetsInTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12*\n\x02tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentity\x12I\n\x06topics\x18\x03 \x03(\x0b\x32\x39.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x1a\xda\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12^\n\npartitions\x18\x02 \x03(\x0b\x32J.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"R\n\"UpdateOffsetsInTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\"\n UpdateOffsetsInTransactionResult\"\x96\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xb3\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf3\x01\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"h\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbb\x01\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_partition_count_limit\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"v\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa2\x08\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xa4\x01\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\x8b\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xde\x06\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\x80\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x1a\xb3\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\x9c\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x19\n\x11partition_node_id\x18\x08 \x01(\x05\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\")\n\x12UpdateTokenRequest\x12\x13\n\x05token\x18\x01 \x01(\tB\x04\xb8\xe6*\x01\"\x15\n\x13UpdateTokenResponse\"C\n\x17PartitionWithGeneration\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x9e\x14\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xfe\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12#\n\x10message_group_id\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x07 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\xe8\x03\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x12/\n\x02tx\x18\x03 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentityH\x00\x88\x01\x01\x1a\xc6\x02\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12#\n\x10message_group_id\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x08 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioningB\x05\n\x03_tx\x1a\xeb\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\xf8\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x12Y\n\rwritten_in_tx\x18\x04 \x01(\x0b\x32@.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenInTxH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x1a\r\n\x0bWrittenInTxB\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x9c#\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xb1\x05\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x45\n\x0f\x64irect_read_ack\x18\x08 \x01(\x0b\x32*.Ydb.Topic.StreamReadMessage.DirectReadAckH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xf0\x06\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x12W\n\x18update_partition_session\x18\n \x01(\x0b\x32\x33.Ydb.Topic.StreamReadMessage.UpdatePartitionSessionH\x00\x12Q\n\x15\x65nd_partition_session\x18\x0b \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.EndPartitionSessionH\x00\x42\x10\n\x0eserver_message\x1a\xdc\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64irect_read\x18\x04 \x01(\x08\x12!\n\x19\x61uto_partitioning_support\x18\x05 \x01(\x08\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\x91\x06\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xda\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12!\n\x10message_group_id\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xcd\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xf0\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x38\n\x12partition_location\x18\x04 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1a\x84\x01\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x04 \x01(\x03\x1aN\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x1ap\n\x16UpdatePartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x38\n\x12partition_location\x18\x02 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x45\n\rDirectReadAck\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x1ap\n\x13\x45ndPartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1e\n\x16\x61\x64jacent_partition_ids\x18\x02 \x03(\x03\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\"\xf7\x0c\n\x17StreamDirectReadMessage\x1a\xa8\x02\n\nFromClient\x12\x46\n\x0cinit_request\x18\x01 \x01(\x0b\x32..Ydb.Topic.StreamDirectReadMessage.InitRequestH\x00\x12\x80\x01\n+start_direct_read_partition_session_request\x18\x02 \x01(\x0b\x32I.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xca\x04\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12H\n\rinit_response\x18\x06 \x01(\x0b\x32/.Ydb.Topic.StreamDirectReadMessage.InitResponseH\x00\x12\x82\x01\n,start_direct_read_partition_session_response\x18\x07 \x01(\x0b\x32J.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionResponseH\x00\x12o\n\"stop_direct_read_partition_session\x18\x03 \x01(\x0b\x32\x41.Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSessionH\x00\x12U\n\x14\x64irect_read_response\x18\x04 \x01(\x0b\x32\x35.Ydb.Topic.StreamDirectReadMessage.DirectReadResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xb6\x01\n\x0bInitRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12^\n\x14topics_read_settings\x18\x02 \x03(\x0b\x32@.Ydb.Topic.StreamDirectReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x1a!\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x1a\x0e\n\x0cInitResponse\x1aw\n&StartDirectReadPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x02 \x01(\x03\x12\x12\n\ngeneration\x18\x03 \x01(\x03\x1a[\n\'StartDirectReadPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\x1a\xa6\x01\n\x1eStopDirectReadPartitionSession\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1c\n\x14partition_session_id\x18\x03 \x01(\x03\x12\x12\n\ngeneration\x18\x04 \x01(\x03\x1a\x9b\x01\n\x12\x44irectReadResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x12O\n\x0epartition_data\x18\x03 \x01(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\"2\n\x13TransactionIdentity\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07session\x18\x02 \x01(\t\"\xc4\x03\n!UpdateOffsetsInTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12*\n\x02tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentity\x12I\n\x06topics\x18\x03 \x03(\x0b\x32\x39.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x1a\xda\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12^\n\npartitions\x18\x02 \x03(\x0b\x32J.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"R\n\"UpdateOffsetsInTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\"\n UpdateOffsetsInTransactionResult\"\x96\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xb3\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf3\x01\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"\xdc\x01\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12)\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0\x12G\n\x1a\x61uto_partitioning_settings\x18\x04 \x01(\x0b\x32#.Ydb.Topic.AutoPartitioningSettings\"\x9f\x01\n\x18\x41utoPartitioningSettings\x12\x35\n\x08strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategy\x12L\n\x15partition_write_speed\x18\x02 \x01(\x0b\x32-.Ydb.Topic.AutoPartitioningWriteSpeedStrategy\"\xb3\x01\n\"AutoPartitioningWriteSpeedStrategy\x12\x37\n\x14stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n\x16up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12*\n\x18\x64own_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\"\x8b\x03\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x32\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12W\n alter_auto_partitioning_settings\x18\x04 \x01(\x0b\x32(.Ydb.Topic.AlterAutoPartitioningSettingsH\x03\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_max_active_partitionsB\x1c\n\x1a_set_partition_count_limitB#\n!_alter_auto_partitioning_settings\"\xea\x01\n\x1d\x41lterAutoPartitioningSettings\x12>\n\x0cset_strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategyH\x00\x88\x01\x01\x12Z\n\x19set_partition_write_speed\x18\x02 \x01(\x0b\x32\x32.Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategyH\x01\x88\x01\x01\x42\x0f\n\r_set_strategyB\x1c\n\x1a_set_partition_write_speed\"\xb0\x02\n\'AlterAutoPartitioningWriteSpeedStrategy\x12@\n\x18set_stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x12\x31\n\x1aset_up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x33\n\x1cset_down_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x42\x1b\n\x19_set_stabilization_windowB\x1d\n\x1b_set_up_utilization_percentB\x1f\n\x1d_set_down_utilization_percent\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"8\n\x11PartitionLocation\x12\x0f\n\x07node_id\x18\x01 \x01(\x05\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"\x90\x01\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\x12\x18\n\x10include_location\x18\x04 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x11PartitionKeyRange\x12\x17\n\nfrom_bound\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x15\n\x08to_bound\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_from_boundB\x0b\n\t_to_bound\"\xfa\t\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12\x33\n+partition_total_read_speed_bytes_per_second\x18\x0e \x01(\x03\x12\x36\n.partition_consumer_read_speed_bytes_per_second\x18\x0f \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x8f\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12\x38\n\x12partition_location\x18\x06 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x12/\n\tkey_range\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionKeyRange\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\xaa\x01\n\x18\x44\x65scribePartitionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"I\n\x19\x44\x65scribePartitionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Z\n\x17\x44\x65scribePartitionResult\x12?\n\tpartition\x18\x01 \x01(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\"\xa5\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x98\x07\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\xba\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x12\x38\n\x12partition_location\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\xb3\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\xa0\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x1d\n\x11partition_node_id\x18\x08 \x01(\x05\x42\x02\x18\x01\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*\xf1\x01\n\x18\x41utoPartitioningStrategy\x12*\n&AUTO_PARTITIONING_STRATEGY_UNSPECIFIED\x10\x00\x12\'\n#AUTO_PARTITIONING_STRATEGY_DISABLED\x10\x01\x12\'\n#AUTO_PARTITIONING_STRATEGY_SCALE_UP\x10\x02\x12\x30\n,AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN\x10\x03\x12%\n!AUTO_PARTITIONING_STRATEGY_PAUSED\x10\x04*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_topic_pb2', globals()) @@ -31,24 +32,48 @@ DESCRIPTOR._serialized_options = b'\n\024tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\370\001\001' _SUPPORTEDCODECS.fields_by_name['codecs']._options = None _SUPPORTEDCODECS.fields_by_name['codecs']._serialized_options = b'\262\346*\n[1; 19999]\232\346*\002\030d' + _UPDATETOKENREQUEST.fields_by_name['token']._options = None + _UPDATETOKENREQUEST.fields_by_name['token']._serialized_options = b'\270\346*\001' _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._options = None _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._serialized_options = b'8\001' + _STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['producer_id']._options = None + _STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['producer_id']._serialized_options = b'\242\346*\003\030\200\020' + _STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['message_group_id']._options = None + _STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['message_group_id']._serialized_options = b'\242\346*\003\030\200\020' + _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['message_group_id']._options = None + _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['message_group_id']._serialized_options = b'\242\346*\003\030\200\020' _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['metadata_items']._options = None _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['metadata_items']._serialized_options = b'\232\346*\003\030\350\007' + _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA.fields_by_name['message_group_id']._options = None + _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA.fields_by_name['message_group_id']._serialized_options = b'\242\346*\003\030\200\020' _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._options = None _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._serialized_options = b'8\001' + _STREAMREADMESSAGE_READRESPONSE_BATCH.fields_by_name['producer_id']._options = None + _STREAMREADMESSAGE_READRESPONSE_BATCH.fields_by_name['producer_id']._serialized_options = b'\242\346*\003\030\200\020' _CONSUMER_ATTRIBUTESENTRY._options = None _CONSUMER_ATTRIBUTESENTRY._serialized_options = b'8\001' _ALTERCONSUMER_ALTERATTRIBUTESENTRY._options = None _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_options = b'8\001' _PARTITIONINGSETTINGS.fields_by_name['min_active_partitions']._options = None _PARTITIONINGSETTINGS.fields_by_name['min_active_partitions']._serialized_options = b'\262\346*\004>= 0' + _PARTITIONINGSETTINGS.fields_by_name['max_active_partitions']._options = None + _PARTITIONINGSETTINGS.fields_by_name['max_active_partitions']._serialized_options = b'\262\346*\004>= 0' _PARTITIONINGSETTINGS.fields_by_name['partition_count_limit']._options = None - _PARTITIONINGSETTINGS.fields_by_name['partition_count_limit']._serialized_options = b'\262\346*\004>= 0' + _PARTITIONINGSETTINGS.fields_by_name['partition_count_limit']._serialized_options = b'\030\001\262\346*\004>= 0' + _AUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['up_utilization_percent']._options = None + _AUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['up_utilization_percent']._serialized_options = b'\262\346*\004>= 0' + _AUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['down_utilization_percent']._options = None + _AUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['down_utilization_percent']._serialized_options = b'\262\346*\004>= 0' _ALTERPARTITIONINGSETTINGS.fields_by_name['set_min_active_partitions']._options = None _ALTERPARTITIONINGSETTINGS.fields_by_name['set_min_active_partitions']._serialized_options = b'\262\346*\004>= 0' + _ALTERPARTITIONINGSETTINGS.fields_by_name['set_max_active_partitions']._options = None + _ALTERPARTITIONINGSETTINGS.fields_by_name['set_max_active_partitions']._serialized_options = b'\262\346*\004>= 0' _ALTERPARTITIONINGSETTINGS.fields_by_name['set_partition_count_limit']._options = None - _ALTERPARTITIONINGSETTINGS.fields_by_name['set_partition_count_limit']._serialized_options = b'\262\346*\004>= 0' + _ALTERPARTITIONINGSETTINGS.fields_by_name['set_partition_count_limit']._serialized_options = b'\030\001\262\346*\004>= 0' + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_up_utilization_percent']._options = None + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_up_utilization_percent']._serialized_options = b'\262\346*\004>= 0' + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_down_utilization_percent']._options = None + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_down_utilization_percent']._serialized_options = b'\262\346*\004>= 0' _CREATETOPICREQUEST_ATTRIBUTESENTRY._options = None _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_options = b'8\001' _CREATETOPICREQUEST.fields_by_name['retention_storage_mb']._options = None @@ -61,6 +86,8 @@ _CREATETOPICREQUEST.fields_by_name['consumers']._serialized_options = b'\232\346*\003\030\270\027' _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._options = None _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_options = b'8\001' + _PARTITIONSTATS.fields_by_name['partition_node_id']._options = None + _PARTITIONSTATS.fields_by_name['partition_node_id']._serialized_options = b'\030\001' _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._options = None _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_options = b'8\001' _ALTERTOPICREQUEST.fields_by_name['set_retention_storage_mb']._options = None @@ -75,172 +102,222 @@ _ALTERTOPICREQUEST.fields_by_name['drop_consumers']._serialized_options = b'\232\346*\003\030\270\027' _ALTERTOPICREQUEST.fields_by_name['alter_consumers']._options = None _ALTERTOPICREQUEST.fields_by_name['alter_consumers']._serialized_options = b'\232\346*\003\030\270\027' - _CODEC._serialized_start=13214 - _CODEC._serialized_end=13345 - _METERINGMODE._serialized_start=13347 - _METERINGMODE._serialized_end=13462 - _SUPPORTEDCODECS._serialized_start=255 - _SUPPORTEDCODECS._serialized_end=310 - _OFFSETSRANGE._serialized_start=312 - _OFFSETSRANGE._serialized_end=354 - _UPDATETOKENREQUEST._serialized_start=356 - _UPDATETOKENREQUEST._serialized_end=391 - _UPDATETOKENRESPONSE._serialized_start=393 - _UPDATETOKENRESPONSE._serialized_end=414 - _METADATAITEM._serialized_start=416 - _METADATAITEM._serialized_end=458 - _STREAMWRITEMESSAGE._serialized_start=461 - _STREAMWRITEMESSAGE._serialized_end=2772 - _STREAMWRITEMESSAGE_FROMCLIENT._serialized_start=484 - _STREAMWRITEMESSAGE_FROMCLIENT._serialized_end=713 - _STREAMWRITEMESSAGE_FROMSERVER._serialized_start=716 - _STREAMWRITEMESSAGE_FROMSERVER._serialized_end=1035 - _STREAMWRITEMESSAGE_INITREQUEST._serialized_start=1038 - _STREAMWRITEMESSAGE_INITREQUEST._serialized_end=1329 - _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._serialized_start=1258 - _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._serialized_end=1313 - _STREAMWRITEMESSAGE_INITRESPONSE._serialized_start=1332 - _STREAMWRITEMESSAGE_INITRESPONSE._serialized_end=1463 - _STREAMWRITEMESSAGE_WRITEREQUEST._serialized_start=1466 - _STREAMWRITEMESSAGE_WRITEREQUEST._serialized_end=1872 - _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA._serialized_start=1621 - _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA._serialized_end=1865 - _STREAMWRITEMESSAGE_WRITERESPONSE._serialized_start=1875 - _STREAMWRITEMESSAGE_WRITERESPONSE._serialized_end=2772 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK._serialized_start=2070 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK._serialized_end=2468 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN._serialized_start=2260 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN._serialized_end=2285 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED._serialized_start=2288 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED._serialized_end=2444 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON._serialized_start=2384 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON._serialized_end=2444 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS._serialized_start=2471 - _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS._serialized_end=2772 - _STREAMREADMESSAGE._serialized_start=2775 - _STREAMREADMESSAGE._serialized_end=6561 - _STREAMREADMESSAGE_PARTITIONSESSION._serialized_start=2796 - _STREAMREADMESSAGE_PARTITIONSESSION._serialized_end=2880 - _STREAMREADMESSAGE_FROMCLIENT._serialized_start=2883 - _STREAMREADMESSAGE_FROMCLIENT._serialized_end=3501 - _STREAMREADMESSAGE_FROMSERVER._serialized_start=3504 - _STREAMREADMESSAGE_FROMSERVER._serialized_end=4212 - _STREAMREADMESSAGE_INITREQUEST._serialized_start=4215 - _STREAMREADMESSAGE_INITREQUEST._serialized_end=4507 - _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS._serialized_start=4360 - _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS._serialized_end=4507 - _STREAMREADMESSAGE_INITRESPONSE._serialized_start=4509 - _STREAMREADMESSAGE_INITRESPONSE._serialized_end=4543 - _STREAMREADMESSAGE_READREQUEST._serialized_start=4545 - _STREAMREADMESSAGE_READREQUEST._serialized_end=4578 - _STREAMREADMESSAGE_READRESPONSE._serialized_start=4581 - _STREAMREADMESSAGE_READRESPONSE._serialized_end=5348 - _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA._serialized_start=4699 - _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA._serialized_end=4908 - _STREAMREADMESSAGE_READRESPONSE_BATCH._serialized_start=4911 - _STREAMREADMESSAGE_READRESPONSE_BATCH._serialized_end=5235 - _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._serialized_start=1258 - _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._serialized_end=1313 - _STREAMREADMESSAGE_READRESPONSE_PARTITIONDATA._serialized_start=5237 - _STREAMREADMESSAGE_READRESPONSE_PARTITIONDATA._serialized_end=5348 - _STREAMREADMESSAGE_COMMITOFFSETREQUEST._serialized_start=5351 - _STREAMREADMESSAGE_COMMITOFFSETREQUEST._serialized_end=5565 - _STREAMREADMESSAGE_COMMITOFFSETREQUEST_PARTITIONCOMMITOFFSET._serialized_start=5470 - _STREAMREADMESSAGE_COMMITOFFSETREQUEST_PARTITIONCOMMITOFFSET._serialized_end=5565 - _STREAMREADMESSAGE_COMMITOFFSETRESPONSE._serialized_start=5568 - _STREAMREADMESSAGE_COMMITOFFSETRESPONSE._serialized_end=5788 - _STREAMREADMESSAGE_COMMITOFFSETRESPONSE_PARTITIONCOMMITTEDOFFSET._serialized_start=5706 - _STREAMREADMESSAGE_COMMITOFFSETRESPONSE_PARTITIONCOMMITTEDOFFSET._serialized_end=5788 - _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST._serialized_start=5790 - _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST._serialized_end=5851 - _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE._serialized_start=5854 - _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE._serialized_end=6057 - _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST._serialized_start=6060 - _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST._serialized_end=6242 - _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE._serialized_start=6245 - _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE._serialized_end=6394 - _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST._serialized_start=6396 - _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST._serialized_end=6499 - _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE._serialized_start=6501 - _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE._serialized_end=6561 - _TRANSACTIONIDENTITY._serialized_start=6563 - _TRANSACTIONIDENTITY._serialized_end=6613 - _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_start=6616 - _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_end=7068 - _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_start=6850 - _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_end=7068 - _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_start=6976 - _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_end=7068 - _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_start=7070 - _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_end=7152 - _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_start=7154 - _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_end=7188 - _COMMITOFFSETREQUEST._serialized_start=7191 - _COMMITOFFSETREQUEST._serialized_end=7341 - _COMMITOFFSETRESPONSE._serialized_start=7343 - _COMMITOFFSETRESPONSE._serialized_end=7411 - _COMMITOFFSETRESULT._serialized_start=7413 - _COMMITOFFSETRESULT._serialized_end=7433 - _MULTIPLEWINDOWSSTAT._serialized_start=7435 - _MULTIPLEWINDOWSSTAT._serialized_end=7511 - _CONSUMER._serialized_start=7514 - _CONSUMER._serialized_end=8077 - _CONSUMER_ATTRIBUTESENTRY._serialized_start=7776 - _CONSUMER_ATTRIBUTESENTRY._serialized_end=7825 - _CONSUMER_CONSUMERSTATS._serialized_start=7828 - _CONSUMER_CONSUMERSTATS._serialized_end=8071 - _ALTERCONSUMER._serialized_start=8080 - _ALTERCONSUMER._serialized_end=8399 - _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_start=8321 - _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_end=8375 - _PARTITIONINGSETTINGS._serialized_start=8401 - _PARTITIONINGSETTINGS._serialized_end=8505 - _ALTERPARTITIONINGSETTINGS._serialized_start=8508 - _ALTERPARTITIONINGSETTINGS._serialized_end=8695 - _CREATETOPICREQUEST._serialized_start=8698 - _CREATETOPICREQUEST._serialized_end=9328 - _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_start=7776 - _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_end=7825 - _CREATETOPICRESPONSE._serialized_start=9330 - _CREATETOPICRESPONSE._serialized_end=9397 - _CREATETOPICRESULT._serialized_start=9399 - _CREATETOPICRESULT._serialized_end=9418 - _DESCRIBETOPICREQUEST._serialized_start=9420 - _DESCRIBETOPICREQUEST._serialized_end=9538 - _DESCRIBETOPICRESPONSE._serialized_start=9540 - _DESCRIBETOPICRESPONSE._serialized_end=9609 - _DESCRIBETOPICRESULT._serialized_start=9612 - _DESCRIBETOPICRESULT._serialized_end=10670 - _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_start=7776 - _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_end=7825 - _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_start=10292 - _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_end=10456 - _DESCRIBETOPICRESULT_TOPICSTATS._serialized_start=10459 - _DESCRIBETOPICRESULT_TOPICSTATS._serialized_end=10664 - _DESCRIBECONSUMERREQUEST._serialized_start=10673 - _DESCRIBECONSUMERREQUEST._serialized_end=10812 - _DESCRIBECONSUMERRESPONSE._serialized_start=10814 - _DESCRIBECONSUMERRESPONSE._serialized_end=10886 - _DESCRIBECONSUMERRESULT._serialized_start=10889 - _DESCRIBECONSUMERRESULT._serialized_end=11751 - _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_start=11057 - _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_end=11313 - _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_start=11316 - _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_end=11751 - _PARTITIONSTATS._serialized_start=11754 - _PARTITIONSTATS._serialized_end=12038 - _ALTERTOPICREQUEST._serialized_start=12041 - _ALTERTOPICREQUEST._serialized_end=12944 - _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_start=8321 - _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_end=8375 - _ALTERTOPICRESPONSE._serialized_start=12946 - _ALTERTOPICRESPONSE._serialized_end=13012 - _ALTERTOPICRESULT._serialized_start=13014 - _ALTERTOPICRESULT._serialized_end=13032 - _DROPTOPICREQUEST._serialized_start=13034 - _DROPTOPICREQUEST._serialized_end=13125 - _DROPTOPICRESPONSE._serialized_start=13127 - _DROPTOPICRESPONSE._serialized_end=13192 - _DROPTOPICRESULT._serialized_start=13194 - _DROPTOPICRESULT._serialized_end=13211 + _CODEC._serialized_start=18023 + _CODEC._serialized_end=18154 + _AUTOPARTITIONINGSTRATEGY._serialized_start=18157 + _AUTOPARTITIONINGSTRATEGY._serialized_end=18398 + _METERINGMODE._serialized_start=18400 + _METERINGMODE._serialized_end=18515 + _SUPPORTEDCODECS._serialized_start=291 + _SUPPORTEDCODECS._serialized_end=346 + _OFFSETSRANGE._serialized_start=348 + _OFFSETSRANGE._serialized_end=390 + _UPDATETOKENREQUEST._serialized_start=392 + _UPDATETOKENREQUEST._serialized_end=433 + _UPDATETOKENRESPONSE._serialized_start=435 + _UPDATETOKENRESPONSE._serialized_end=456 + _PARTITIONWITHGENERATION._serialized_start=458 + _PARTITIONWITHGENERATION._serialized_end=525 + _METADATAITEM._serialized_start=527 + _METADATAITEM._serialized_end=569 + _STREAMWRITEMESSAGE._serialized_start=572 + _STREAMWRITEMESSAGE._serialized_end=3162 + _STREAMWRITEMESSAGE_FROMCLIENT._serialized_start=595 + _STREAMWRITEMESSAGE_FROMCLIENT._serialized_end=824 + _STREAMWRITEMESSAGE_FROMSERVER._serialized_start=827 + _STREAMWRITEMESSAGE_FROMSERVER._serialized_end=1146 + _STREAMWRITEMESSAGE_INITREQUEST._serialized_start=1149 + _STREAMWRITEMESSAGE_INITREQUEST._serialized_end=1531 + _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._serialized_start=1460 + _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._serialized_end=1515 + _STREAMWRITEMESSAGE_INITRESPONSE._serialized_start=1534 + _STREAMWRITEMESSAGE_INITRESPONSE._serialized_end=1665 + _STREAMWRITEMESSAGE_WRITEREQUEST._serialized_start=1668 + _STREAMWRITEMESSAGE_WRITEREQUEST._serialized_end=2156 + _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA._serialized_start=1823 + _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA._serialized_end=2149 + _STREAMWRITEMESSAGE_WRITERESPONSE._serialized_start=2159 + _STREAMWRITEMESSAGE_WRITERESPONSE._serialized_end=3162 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK._serialized_start=2354 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK._serialized_end=2858 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN._serialized_start=2635 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN._serialized_end=2660 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED._serialized_start=2663 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED._serialized_end=2819 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON._serialized_start=2759 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON._serialized_end=2819 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTENINTX._serialized_start=2821 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTENINTX._serialized_end=2834 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS._serialized_start=2861 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS._serialized_end=3162 + _STREAMREADMESSAGE._serialized_start=3165 + _STREAMREADMESSAGE._serialized_end=7673 + _STREAMREADMESSAGE_PARTITIONSESSION._serialized_start=3186 + _STREAMREADMESSAGE_PARTITIONSESSION._serialized_end=3270 + _STREAMREADMESSAGE_FROMCLIENT._serialized_start=3273 + _STREAMREADMESSAGE_FROMCLIENT._serialized_end=3962 + _STREAMREADMESSAGE_FROMSERVER._serialized_start=3965 + _STREAMREADMESSAGE_FROMSERVER._serialized_end=4845 + _STREAMREADMESSAGE_INITREQUEST._serialized_start=4848 + _STREAMREADMESSAGE_INITREQUEST._serialized_end=5196 + _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS._serialized_start=5049 + _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS._serialized_end=5196 + _STREAMREADMESSAGE_INITRESPONSE._serialized_start=5198 + _STREAMREADMESSAGE_INITRESPONSE._serialized_end=5232 + _STREAMREADMESSAGE_READREQUEST._serialized_start=5234 + _STREAMREADMESSAGE_READREQUEST._serialized_end=5267 + _STREAMREADMESSAGE_READRESPONSE._serialized_start=5270 + _STREAMREADMESSAGE_READRESPONSE._serialized_end=6055 + _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA._serialized_start=5388 + _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA._serialized_end=5606 + _STREAMREADMESSAGE_READRESPONSE_BATCH._serialized_start=5609 + _STREAMREADMESSAGE_READRESPONSE_BATCH._serialized_end=5942 + _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._serialized_start=1460 + _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._serialized_end=1515 + _STREAMREADMESSAGE_READRESPONSE_PARTITIONDATA._serialized_start=5944 + _STREAMREADMESSAGE_READRESPONSE_PARTITIONDATA._serialized_end=6055 + _STREAMREADMESSAGE_COMMITOFFSETREQUEST._serialized_start=6058 + _STREAMREADMESSAGE_COMMITOFFSETREQUEST._serialized_end=6272 + _STREAMREADMESSAGE_COMMITOFFSETREQUEST_PARTITIONCOMMITOFFSET._serialized_start=6177 + _STREAMREADMESSAGE_COMMITOFFSETREQUEST_PARTITIONCOMMITOFFSET._serialized_end=6272 + _STREAMREADMESSAGE_COMMITOFFSETRESPONSE._serialized_start=6275 + _STREAMREADMESSAGE_COMMITOFFSETRESPONSE._serialized_end=6495 + _STREAMREADMESSAGE_COMMITOFFSETRESPONSE_PARTITIONCOMMITTEDOFFSET._serialized_start=6413 + _STREAMREADMESSAGE_COMMITOFFSETRESPONSE_PARTITIONCOMMITTEDOFFSET._serialized_end=6495 + _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST._serialized_start=6497 + _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST._serialized_end=6558 + _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE._serialized_start=6561 + _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE._serialized_end=6764 + _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST._serialized_start=6767 + _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST._serialized_end=7007 + _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE._serialized_start=7010 + _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE._serialized_end=7159 + _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST._serialized_start=7162 + _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST._serialized_end=7294 + _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE._serialized_start=7296 + _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE._serialized_end=7374 + _STREAMREADMESSAGE_UPDATEPARTITIONSESSION._serialized_start=7376 + _STREAMREADMESSAGE_UPDATEPARTITIONSESSION._serialized_end=7488 + _STREAMREADMESSAGE_DIRECTREADACK._serialized_start=7490 + _STREAMREADMESSAGE_DIRECTREADACK._serialized_end=7559 + _STREAMREADMESSAGE_ENDPARTITIONSESSION._serialized_start=7561 + _STREAMREADMESSAGE_ENDPARTITIONSESSION._serialized_end=7673 + _STREAMDIRECTREADMESSAGE._serialized_start=7676 + _STREAMDIRECTREADMESSAGE._serialized_end=9331 + _STREAMDIRECTREADMESSAGE_FROMCLIENT._serialized_start=7704 + _STREAMDIRECTREADMESSAGE_FROMCLIENT._serialized_end=8000 + _STREAMDIRECTREADMESSAGE_FROMSERVER._serialized_start=8003 + _STREAMDIRECTREADMESSAGE_FROMSERVER._serialized_end=8589 + _STREAMDIRECTREADMESSAGE_INITREQUEST._serialized_start=8592 + _STREAMDIRECTREADMESSAGE_INITREQUEST._serialized_end=8774 + _STREAMDIRECTREADMESSAGE_INITREQUEST_TOPICREADSETTINGS._serialized_start=5049 + _STREAMDIRECTREADMESSAGE_INITREQUEST_TOPICREADSETTINGS._serialized_end=5082 + _STREAMDIRECTREADMESSAGE_INITRESPONSE._serialized_start=1534 + _STREAMDIRECTREADMESSAGE_INITRESPONSE._serialized_end=1548 + _STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONREQUEST._serialized_start=8792 + _STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONREQUEST._serialized_end=8911 + _STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONRESPONSE._serialized_start=8913 + _STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONRESPONSE._serialized_end=9004 + _STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION._serialized_start=9007 + _STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION._serialized_end=9173 + _STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE._serialized_start=9176 + _STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE._serialized_end=9331 + _TRANSACTIONIDENTITY._serialized_start=9333 + _TRANSACTIONIDENTITY._serialized_end=9383 + _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_start=9386 + _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_end=9838 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_start=9620 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_end=9838 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_start=9746 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_end=9838 + _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_start=9840 + _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_end=9922 + _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_start=9924 + _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_end=9958 + _COMMITOFFSETREQUEST._serialized_start=9961 + _COMMITOFFSETREQUEST._serialized_end=10111 + _COMMITOFFSETRESPONSE._serialized_start=10113 + _COMMITOFFSETRESPONSE._serialized_end=10181 + _COMMITOFFSETRESULT._serialized_start=10183 + _COMMITOFFSETRESULT._serialized_end=10203 + _MULTIPLEWINDOWSSTAT._serialized_start=10205 + _MULTIPLEWINDOWSSTAT._serialized_end=10281 + _CONSUMER._serialized_start=10284 + _CONSUMER._serialized_end=10847 + _CONSUMER_ATTRIBUTESENTRY._serialized_start=10546 + _CONSUMER_ATTRIBUTESENTRY._serialized_end=10595 + _CONSUMER_CONSUMERSTATS._serialized_start=10598 + _CONSUMER_CONSUMERSTATS._serialized_end=10841 + _ALTERCONSUMER._serialized_start=10850 + _ALTERCONSUMER._serialized_end=11169 + _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_start=11091 + _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_end=11145 + _PARTITIONINGSETTINGS._serialized_start=11172 + _PARTITIONINGSETTINGS._serialized_end=11392 + _AUTOPARTITIONINGSETTINGS._serialized_start=11395 + _AUTOPARTITIONINGSETTINGS._serialized_end=11554 + _AUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_start=11557 + _AUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_end=11736 + _ALTERPARTITIONINGSETTINGS._serialized_start=11739 + _ALTERPARTITIONINGSETTINGS._serialized_end=12134 + _ALTERAUTOPARTITIONINGSETTINGS._serialized_start=12137 + _ALTERAUTOPARTITIONINGSETTINGS._serialized_end=12371 + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_start=12374 + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_end=12678 + _CREATETOPICREQUEST._serialized_start=12681 + _CREATETOPICREQUEST._serialized_end=13311 + _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_start=10546 + _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_end=10595 + _CREATETOPICRESPONSE._serialized_start=13313 + _CREATETOPICRESPONSE._serialized_end=13380 + _CREATETOPICRESULT._serialized_start=13382 + _CREATETOPICRESULT._serialized_end=13401 + _PARTITIONLOCATION._serialized_start=13403 + _PARTITIONLOCATION._serialized_end=13459 + _DESCRIBETOPICREQUEST._serialized_start=13462 + _DESCRIBETOPICREQUEST._serialized_end=13606 + _DESCRIBETOPICRESPONSE._serialized_start=13608 + _DESCRIBETOPICRESPONSE._serialized_end=13677 + _PARTITIONKEYRANGE._serialized_start=13679 + _PARTITIONKEYRANGE._serialized_end=13774 + _DESCRIBETOPICRESULT._serialized_start=13777 + _DESCRIBETOPICRESULT._serialized_end=15051 + _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_start=10546 + _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_end=10595 + _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_start=14566 + _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_end=14837 + _DESCRIBETOPICRESULT_TOPICSTATS._serialized_start=14840 + _DESCRIBETOPICRESULT_TOPICSTATS._serialized_end=15045 + _DESCRIBEPARTITIONREQUEST._serialized_start=15054 + _DESCRIBEPARTITIONREQUEST._serialized_end=15224 + _DESCRIBEPARTITIONRESPONSE._serialized_start=15226 + _DESCRIBEPARTITIONRESPONSE._serialized_end=15299 + _DESCRIBEPARTITIONRESULT._serialized_start=15301 + _DESCRIBEPARTITIONRESULT._serialized_end=15391 + _DESCRIBECONSUMERREQUEST._serialized_start=15394 + _DESCRIBECONSUMERREQUEST._serialized_end=15559 + _DESCRIBECONSUMERRESPONSE._serialized_start=15561 + _DESCRIBECONSUMERRESPONSE._serialized_end=15633 + _DESCRIBECONSUMERRESULT._serialized_start=15636 + _DESCRIBECONSUMERRESULT._serialized_end=16556 + _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_start=15804 + _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_end=16118 + _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_start=16121 + _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_end=16556 + _PARTITIONSTATS._serialized_start=16559 + _PARTITIONSTATS._serialized_end=16847 + _ALTERTOPICREQUEST._serialized_start=16850 + _ALTERTOPICREQUEST._serialized_end=17753 + _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_start=11091 + _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_end=11145 + _ALTERTOPICRESPONSE._serialized_start=17755 + _ALTERTOPICRESPONSE._serialized_end=17821 + _ALTERTOPICRESULT._serialized_start=17823 + _ALTERTOPICRESULT._serialized_end=17841 + _DROPTOPICREQUEST._serialized_start=17843 + _DROPTOPICREQUEST._serialized_end=17934 + _DROPTOPICRESPONSE._serialized_start=17936 + _DROPTOPICRESPONSE._serialized_end=18001 + _DROPTOPICRESULT._serialized_start=18003 + _DROPTOPICRESULT._serialized_end=18020 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_topic_pb2.pyi b/ydb/_grpc/v4/protos/ydb_topic_pb2.pyi index 4fb867d6..58e2156e 100644 --- a/ydb/_grpc/v4/protos/ydb_topic_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_topic_pb2.pyi @@ -2,6 +2,7 @@ from protos import ydb_operation_pb2 as _ydb_operation_pb2 from protos import ydb_scheme_pb2 as _ydb_scheme_pb2 from protos import ydb_status_codes_pb2 as _ydb_status_codes_pb2 from protos import ydb_issue_message_pb2 as _ydb_issue_message_pb2 +from protos.annotations import sensitive_pb2 as _sensitive_pb2 from protos.annotations import validation_pb2 as _validation_pb2 from google.protobuf import duration_pb2 as _duration_pb2 from google.protobuf import timestamp_pb2 as _timestamp_pb2 @@ -11,6 +12,11 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union +AUTO_PARTITIONING_STRATEGY_DISABLED: AutoPartitioningStrategy +AUTO_PARTITIONING_STRATEGY_PAUSED: AutoPartitioningStrategy +AUTO_PARTITIONING_STRATEGY_SCALE_UP: AutoPartitioningStrategy +AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN: AutoPartitioningStrategy +AUTO_PARTITIONING_STRATEGY_UNSPECIFIED: AutoPartitioningStrategy CODEC_CUSTOM: Codec CODEC_GZIP: Codec CODEC_LZOP: Codec @@ -22,6 +28,24 @@ METERING_MODE_REQUEST_UNITS: MeteringMode METERING_MODE_RESERVED_CAPACITY: MeteringMode METERING_MODE_UNSPECIFIED: MeteringMode +class AlterAutoPartitioningSettings(_message.Message): + __slots__ = ["set_partition_write_speed", "set_strategy"] + SET_PARTITION_WRITE_SPEED_FIELD_NUMBER: _ClassVar[int] + SET_STRATEGY_FIELD_NUMBER: _ClassVar[int] + set_partition_write_speed: AlterAutoPartitioningWriteSpeedStrategy + set_strategy: AutoPartitioningStrategy + def __init__(self, set_strategy: _Optional[_Union[AutoPartitioningStrategy, str]] = ..., set_partition_write_speed: _Optional[_Union[AlterAutoPartitioningWriteSpeedStrategy, _Mapping]] = ...) -> None: ... + +class AlterAutoPartitioningWriteSpeedStrategy(_message.Message): + __slots__ = ["set_down_utilization_percent", "set_stabilization_window", "set_up_utilization_percent"] + SET_DOWN_UTILIZATION_PERCENT_FIELD_NUMBER: _ClassVar[int] + SET_STABILIZATION_WINDOW_FIELD_NUMBER: _ClassVar[int] + SET_UP_UTILIZATION_PERCENT_FIELD_NUMBER: _ClassVar[int] + set_down_utilization_percent: int + set_stabilization_window: _duration_pb2.Duration + set_up_utilization_percent: int + def __init__(self, set_stabilization_window: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., set_up_utilization_percent: _Optional[int] = ..., set_down_utilization_percent: _Optional[int] = ...) -> None: ... + class AlterConsumer(_message.Message): __slots__ = ["alter_attributes", "name", "set_important", "set_read_from", "set_supported_codecs"] class AlterAttributesEntry(_message.Message): @@ -44,12 +68,16 @@ class AlterConsumer(_message.Message): def __init__(self, name: _Optional[str] = ..., set_important: bool = ..., set_read_from: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., set_supported_codecs: _Optional[_Union[SupportedCodecs, _Mapping]] = ..., alter_attributes: _Optional[_Mapping[str, str]] = ...) -> None: ... class AlterPartitioningSettings(_message.Message): - __slots__ = ["set_min_active_partitions", "set_partition_count_limit"] + __slots__ = ["alter_auto_partitioning_settings", "set_max_active_partitions", "set_min_active_partitions", "set_partition_count_limit"] + ALTER_AUTO_PARTITIONING_SETTINGS_FIELD_NUMBER: _ClassVar[int] + SET_MAX_ACTIVE_PARTITIONS_FIELD_NUMBER: _ClassVar[int] SET_MIN_ACTIVE_PARTITIONS_FIELD_NUMBER: _ClassVar[int] SET_PARTITION_COUNT_LIMIT_FIELD_NUMBER: _ClassVar[int] + alter_auto_partitioning_settings: AlterAutoPartitioningSettings + set_max_active_partitions: int set_min_active_partitions: int set_partition_count_limit: int - def __init__(self, set_min_active_partitions: _Optional[int] = ..., set_partition_count_limit: _Optional[int] = ...) -> None: ... + def __init__(self, set_min_active_partitions: _Optional[int] = ..., set_max_active_partitions: _Optional[int] = ..., set_partition_count_limit: _Optional[int] = ..., alter_auto_partitioning_settings: _Optional[_Union[AlterAutoPartitioningSettings, _Mapping]] = ...) -> None: ... class AlterTopicRequest(_message.Message): __slots__ = ["add_consumers", "alter_attributes", "alter_consumers", "alter_partitioning_settings", "drop_consumers", "operation_params", "path", "set_metering_mode", "set_partition_write_burst_bytes", "set_partition_write_speed_bytes_per_second", "set_retention_period", "set_retention_storage_mb", "set_supported_codecs"] @@ -98,6 +126,24 @@ class AlterTopicResult(_message.Message): __slots__ = [] def __init__(self) -> None: ... +class AutoPartitioningSettings(_message.Message): + __slots__ = ["partition_write_speed", "strategy"] + PARTITION_WRITE_SPEED_FIELD_NUMBER: _ClassVar[int] + STRATEGY_FIELD_NUMBER: _ClassVar[int] + partition_write_speed: AutoPartitioningWriteSpeedStrategy + strategy: AutoPartitioningStrategy + def __init__(self, strategy: _Optional[_Union[AutoPartitioningStrategy, str]] = ..., partition_write_speed: _Optional[_Union[AutoPartitioningWriteSpeedStrategy, _Mapping]] = ...) -> None: ... + +class AutoPartitioningWriteSpeedStrategy(_message.Message): + __slots__ = ["down_utilization_percent", "stabilization_window", "up_utilization_percent"] + DOWN_UTILIZATION_PERCENT_FIELD_NUMBER: _ClassVar[int] + STABILIZATION_WINDOW_FIELD_NUMBER: _ClassVar[int] + UP_UTILIZATION_PERCENT_FIELD_NUMBER: _ClassVar[int] + down_utilization_percent: int + stabilization_window: _duration_pb2.Duration + up_utilization_percent: int + def __init__(self, stabilization_window: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., up_utilization_percent: _Optional[int] = ..., down_utilization_percent: _Optional[int] = ...) -> None: ... + class CommitOffsetRequest(_message.Message): __slots__ = ["consumer", "offset", "operation_params", "partition_id", "path"] CONSUMER_FIELD_NUMBER: _ClassVar[int] @@ -200,16 +246,18 @@ class CreateTopicResult(_message.Message): def __init__(self) -> None: ... class DescribeConsumerRequest(_message.Message): - __slots__ = ["consumer", "include_stats", "operation_params", "path"] + __slots__ = ["consumer", "include_location", "include_stats", "operation_params", "path"] CONSUMER_FIELD_NUMBER: _ClassVar[int] + INCLUDE_LOCATION_FIELD_NUMBER: _ClassVar[int] INCLUDE_STATS_FIELD_NUMBER: _ClassVar[int] OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] PATH_FIELD_NUMBER: _ClassVar[int] consumer: str + include_location: bool include_stats: bool operation_params: _ydb_operation_pb2.OperationParams path: str - def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., consumer: _Optional[str] = ..., include_stats: bool = ...) -> None: ... + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., consumer: _Optional[str] = ..., include_stats: bool = ..., include_location: bool = ...) -> None: ... class DescribeConsumerResponse(_message.Message): __slots__ = ["operation"] @@ -243,20 +291,22 @@ class DescribeConsumerResult(_message.Message): reader_name: str def __init__(self, last_read_offset: _Optional[int] = ..., committed_offset: _Optional[int] = ..., read_session_id: _Optional[str] = ..., partition_read_session_create_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., last_read_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., max_read_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_write_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., bytes_read: _Optional[_Union[MultipleWindowsStat, _Mapping]] = ..., reader_name: _Optional[str] = ..., connection_node_id: _Optional[int] = ...) -> None: ... class PartitionInfo(_message.Message): - __slots__ = ["active", "child_partition_ids", "parent_partition_ids", "partition_consumer_stats", "partition_id", "partition_stats"] + __slots__ = ["active", "child_partition_ids", "parent_partition_ids", "partition_consumer_stats", "partition_id", "partition_location", "partition_stats"] ACTIVE_FIELD_NUMBER: _ClassVar[int] CHILD_PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] PARENT_PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] PARTITION_CONSUMER_STATS_FIELD_NUMBER: _ClassVar[int] PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_LOCATION_FIELD_NUMBER: _ClassVar[int] PARTITION_STATS_FIELD_NUMBER: _ClassVar[int] active: bool child_partition_ids: _containers.RepeatedScalarFieldContainer[int] parent_partition_ids: _containers.RepeatedScalarFieldContainer[int] partition_consumer_stats: DescribeConsumerResult.PartitionConsumerStats partition_id: int + partition_location: PartitionLocation partition_stats: PartitionStats - def __init__(self, partition_id: _Optional[int] = ..., active: bool = ..., child_partition_ids: _Optional[_Iterable[int]] = ..., parent_partition_ids: _Optional[_Iterable[int]] = ..., partition_stats: _Optional[_Union[PartitionStats, _Mapping]] = ..., partition_consumer_stats: _Optional[_Union[DescribeConsumerResult.PartitionConsumerStats, _Mapping]] = ...) -> None: ... + def __init__(self, partition_id: _Optional[int] = ..., active: bool = ..., child_partition_ids: _Optional[_Iterable[int]] = ..., parent_partition_ids: _Optional[_Iterable[int]] = ..., partition_stats: _Optional[_Union[PartitionStats, _Mapping]] = ..., partition_consumer_stats: _Optional[_Union[DescribeConsumerResult.PartitionConsumerStats, _Mapping]] = ..., partition_location: _Optional[_Union[PartitionLocation, _Mapping]] = ...) -> None: ... CONSUMER_FIELD_NUMBER: _ClassVar[int] PARTITIONS_FIELD_NUMBER: _ClassVar[int] SELF_FIELD_NUMBER: _ClassVar[int] @@ -265,15 +315,43 @@ class DescribeConsumerResult(_message.Message): self: _ydb_scheme_pb2.Entry def __init__(self, self_: _Optional[_Union[_ydb_scheme_pb2.Entry, _Mapping]] = ..., consumer: _Optional[_Union[Consumer, _Mapping]] = ..., partitions: _Optional[_Iterable[_Union[DescribeConsumerResult.PartitionInfo, _Mapping]]] = ...) -> None: ... +class DescribePartitionRequest(_message.Message): + __slots__ = ["include_location", "include_stats", "operation_params", "partition_id", "path"] + INCLUDE_LOCATION_FIELD_NUMBER: _ClassVar[int] + INCLUDE_STATS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + include_location: bool + include_stats: bool + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., include_stats: bool = ..., include_location: bool = ...) -> None: ... + +class DescribePartitionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribePartitionResult(_message.Message): + __slots__ = ["partition"] + PARTITION_FIELD_NUMBER: _ClassVar[int] + partition: DescribeTopicResult.PartitionInfo + def __init__(self, partition: _Optional[_Union[DescribeTopicResult.PartitionInfo, _Mapping]] = ...) -> None: ... + class DescribeTopicRequest(_message.Message): - __slots__ = ["include_stats", "operation_params", "path"] + __slots__ = ["include_location", "include_stats", "operation_params", "path"] + INCLUDE_LOCATION_FIELD_NUMBER: _ClassVar[int] INCLUDE_STATS_FIELD_NUMBER: _ClassVar[int] OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] PATH_FIELD_NUMBER: _ClassVar[int] + include_location: bool include_stats: bool operation_params: _ydb_operation_pb2.OperationParams path: str - def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., include_stats: bool = ...) -> None: ... + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., include_stats: bool = ..., include_location: bool = ...) -> None: ... class DescribeTopicResponse(_message.Message): __slots__ = ["operation"] @@ -282,7 +360,7 @@ class DescribeTopicResponse(_message.Message): def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... class DescribeTopicResult(_message.Message): - __slots__ = ["attributes", "consumers", "metering_mode", "partition_write_burst_bytes", "partition_write_speed_bytes_per_second", "partitioning_settings", "partitions", "retention_period", "retention_storage_mb", "self", "supported_codecs", "topic_stats"] + __slots__ = ["attributes", "consumers", "metering_mode", "partition_consumer_read_speed_bytes_per_second", "partition_total_read_speed_bytes_per_second", "partition_write_burst_bytes", "partition_write_speed_bytes_per_second", "partitioning_settings", "partitions", "retention_period", "retention_storage_mb", "self", "supported_codecs", "topic_stats"] class AttributesEntry(_message.Message): __slots__ = ["key", "value"] KEY_FIELD_NUMBER: _ClassVar[int] @@ -291,18 +369,22 @@ class DescribeTopicResult(_message.Message): value: str def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... class PartitionInfo(_message.Message): - __slots__ = ["active", "child_partition_ids", "parent_partition_ids", "partition_id", "partition_stats"] + __slots__ = ["active", "child_partition_ids", "key_range", "parent_partition_ids", "partition_id", "partition_location", "partition_stats"] ACTIVE_FIELD_NUMBER: _ClassVar[int] CHILD_PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] + KEY_RANGE_FIELD_NUMBER: _ClassVar[int] PARENT_PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_LOCATION_FIELD_NUMBER: _ClassVar[int] PARTITION_STATS_FIELD_NUMBER: _ClassVar[int] active: bool child_partition_ids: _containers.RepeatedScalarFieldContainer[int] + key_range: PartitionKeyRange parent_partition_ids: _containers.RepeatedScalarFieldContainer[int] partition_id: int + partition_location: PartitionLocation partition_stats: PartitionStats - def __init__(self, partition_id: _Optional[int] = ..., active: bool = ..., child_partition_ids: _Optional[_Iterable[int]] = ..., parent_partition_ids: _Optional[_Iterable[int]] = ..., partition_stats: _Optional[_Union[PartitionStats, _Mapping]] = ...) -> None: ... + def __init__(self, partition_id: _Optional[int] = ..., active: bool = ..., child_partition_ids: _Optional[_Iterable[int]] = ..., parent_partition_ids: _Optional[_Iterable[int]] = ..., partition_stats: _Optional[_Union[PartitionStats, _Mapping]] = ..., partition_location: _Optional[_Union[PartitionLocation, _Mapping]] = ..., key_range: _Optional[_Union[PartitionKeyRange, _Mapping]] = ...) -> None: ... class TopicStats(_message.Message): __slots__ = ["bytes_written", "max_write_time_lag", "min_last_write_time", "store_size_bytes"] BYTES_WRITTEN_FIELD_NUMBER: _ClassVar[int] @@ -319,6 +401,8 @@ class DescribeTopicResult(_message.Message): METERING_MODE_FIELD_NUMBER: _ClassVar[int] PARTITIONING_SETTINGS_FIELD_NUMBER: _ClassVar[int] PARTITIONS_FIELD_NUMBER: _ClassVar[int] + PARTITION_CONSUMER_READ_SPEED_BYTES_PER_SECOND_FIELD_NUMBER: _ClassVar[int] + PARTITION_TOTAL_READ_SPEED_BYTES_PER_SECOND_FIELD_NUMBER: _ClassVar[int] PARTITION_WRITE_BURST_BYTES_FIELD_NUMBER: _ClassVar[int] PARTITION_WRITE_SPEED_BYTES_PER_SECOND_FIELD_NUMBER: _ClassVar[int] RETENTION_PERIOD_FIELD_NUMBER: _ClassVar[int] @@ -329,6 +413,8 @@ class DescribeTopicResult(_message.Message): attributes: _containers.ScalarMap[str, str] consumers: _containers.RepeatedCompositeFieldContainer[Consumer] metering_mode: MeteringMode + partition_consumer_read_speed_bytes_per_second: int + partition_total_read_speed_bytes_per_second: int partition_write_burst_bytes: int partition_write_speed_bytes_per_second: int partitioning_settings: PartitioningSettings @@ -338,7 +424,7 @@ class DescribeTopicResult(_message.Message): self: _ydb_scheme_pb2.Entry supported_codecs: SupportedCodecs topic_stats: DescribeTopicResult.TopicStats - def __init__(self, self_: _Optional[_Union[_ydb_scheme_pb2.Entry, _Mapping]] = ..., partitioning_settings: _Optional[_Union[PartitioningSettings, _Mapping]] = ..., partitions: _Optional[_Iterable[_Union[DescribeTopicResult.PartitionInfo, _Mapping]]] = ..., retention_period: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., retention_storage_mb: _Optional[int] = ..., supported_codecs: _Optional[_Union[SupportedCodecs, _Mapping]] = ..., partition_write_speed_bytes_per_second: _Optional[int] = ..., partition_write_burst_bytes: _Optional[int] = ..., attributes: _Optional[_Mapping[str, str]] = ..., consumers: _Optional[_Iterable[_Union[Consumer, _Mapping]]] = ..., metering_mode: _Optional[_Union[MeteringMode, str]] = ..., topic_stats: _Optional[_Union[DescribeTopicResult.TopicStats, _Mapping]] = ...) -> None: ... + def __init__(self, self_: _Optional[_Union[_ydb_scheme_pb2.Entry, _Mapping]] = ..., partitioning_settings: _Optional[_Union[PartitioningSettings, _Mapping]] = ..., partitions: _Optional[_Iterable[_Union[DescribeTopicResult.PartitionInfo, _Mapping]]] = ..., retention_period: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., retention_storage_mb: _Optional[int] = ..., supported_codecs: _Optional[_Union[SupportedCodecs, _Mapping]] = ..., partition_write_speed_bytes_per_second: _Optional[int] = ..., partition_total_read_speed_bytes_per_second: _Optional[int] = ..., partition_consumer_read_speed_bytes_per_second: _Optional[int] = ..., partition_write_burst_bytes: _Optional[int] = ..., attributes: _Optional[_Mapping[str, str]] = ..., consumers: _Optional[_Iterable[_Union[Consumer, _Mapping]]] = ..., metering_mode: _Optional[_Union[MeteringMode, str]] = ..., topic_stats: _Optional[_Union[DescribeTopicResult.TopicStats, _Mapping]] = ...) -> None: ... class DropTopicRequest(_message.Message): __slots__ = ["operation_params", "path"] @@ -384,6 +470,22 @@ class OffsetsRange(_message.Message): start: int def __init__(self, start: _Optional[int] = ..., end: _Optional[int] = ...) -> None: ... +class PartitionKeyRange(_message.Message): + __slots__ = ["from_bound", "to_bound"] + FROM_BOUND_FIELD_NUMBER: _ClassVar[int] + TO_BOUND_FIELD_NUMBER: _ClassVar[int] + from_bound: bytes + to_bound: bytes + def __init__(self, from_bound: _Optional[bytes] = ..., to_bound: _Optional[bytes] = ...) -> None: ... + +class PartitionLocation(_message.Message): + __slots__ = ["generation", "node_id"] + GENERATION_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + generation: int + node_id: int + def __init__(self, node_id: _Optional[int] = ..., generation: _Optional[int] = ...) -> None: ... + class PartitionStats(_message.Message): __slots__ = ["bytes_written", "last_write_time", "max_write_time_lag", "partition_node_id", "partition_offsets", "store_size_bytes"] BYTES_WRITTEN_FIELD_NUMBER: _ClassVar[int] @@ -400,13 +502,108 @@ class PartitionStats(_message.Message): store_size_bytes: int def __init__(self, partition_offsets: _Optional[_Union[OffsetsRange, _Mapping]] = ..., store_size_bytes: _Optional[int] = ..., last_write_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., max_write_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., bytes_written: _Optional[_Union[MultipleWindowsStat, _Mapping]] = ..., partition_node_id: _Optional[int] = ...) -> None: ... +class PartitionWithGeneration(_message.Message): + __slots__ = ["generation", "partition_id"] + GENERATION_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + generation: int + partition_id: int + def __init__(self, partition_id: _Optional[int] = ..., generation: _Optional[int] = ...) -> None: ... + class PartitioningSettings(_message.Message): - __slots__ = ["min_active_partitions", "partition_count_limit"] + __slots__ = ["auto_partitioning_settings", "max_active_partitions", "min_active_partitions", "partition_count_limit"] + AUTO_PARTITIONING_SETTINGS_FIELD_NUMBER: _ClassVar[int] + MAX_ACTIVE_PARTITIONS_FIELD_NUMBER: _ClassVar[int] MIN_ACTIVE_PARTITIONS_FIELD_NUMBER: _ClassVar[int] PARTITION_COUNT_LIMIT_FIELD_NUMBER: _ClassVar[int] + auto_partitioning_settings: AutoPartitioningSettings + max_active_partitions: int min_active_partitions: int partition_count_limit: int - def __init__(self, min_active_partitions: _Optional[int] = ..., partition_count_limit: _Optional[int] = ...) -> None: ... + def __init__(self, min_active_partitions: _Optional[int] = ..., max_active_partitions: _Optional[int] = ..., partition_count_limit: _Optional[int] = ..., auto_partitioning_settings: _Optional[_Union[AutoPartitioningSettings, _Mapping]] = ...) -> None: ... + +class StreamDirectReadMessage(_message.Message): + __slots__ = [] + class DirectReadResponse(_message.Message): + __slots__ = ["direct_read_id", "partition_data", "partition_session_id"] + DIRECT_READ_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_DATA_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + direct_read_id: int + partition_data: StreamReadMessage.ReadResponse.PartitionData + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., direct_read_id: _Optional[int] = ..., partition_data: _Optional[_Union[StreamReadMessage.ReadResponse.PartitionData, _Mapping]] = ...) -> None: ... + class FromClient(_message.Message): + __slots__ = ["init_request", "start_direct_read_partition_session_request", "update_token_request"] + INIT_REQUEST_FIELD_NUMBER: _ClassVar[int] + START_DIRECT_READ_PARTITION_SESSION_REQUEST_FIELD_NUMBER: _ClassVar[int] + UPDATE_TOKEN_REQUEST_FIELD_NUMBER: _ClassVar[int] + init_request: StreamDirectReadMessage.InitRequest + start_direct_read_partition_session_request: StreamDirectReadMessage.StartDirectReadPartitionSessionRequest + update_token_request: UpdateTokenRequest + def __init__(self, init_request: _Optional[_Union[StreamDirectReadMessage.InitRequest, _Mapping]] = ..., start_direct_read_partition_session_request: _Optional[_Union[StreamDirectReadMessage.StartDirectReadPartitionSessionRequest, _Mapping]] = ..., update_token_request: _Optional[_Union[UpdateTokenRequest, _Mapping]] = ...) -> None: ... + class FromServer(_message.Message): + __slots__ = ["direct_read_response", "init_response", "issues", "start_direct_read_partition_session_response", "status", "stop_direct_read_partition_session", "update_token_response"] + DIRECT_READ_RESPONSE_FIELD_NUMBER: _ClassVar[int] + INIT_RESPONSE_FIELD_NUMBER: _ClassVar[int] + ISSUES_FIELD_NUMBER: _ClassVar[int] + START_DIRECT_READ_PARTITION_SESSION_RESPONSE_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + STOP_DIRECT_READ_PARTITION_SESSION_FIELD_NUMBER: _ClassVar[int] + UPDATE_TOKEN_RESPONSE_FIELD_NUMBER: _ClassVar[int] + direct_read_response: StreamDirectReadMessage.DirectReadResponse + init_response: StreamDirectReadMessage.InitResponse + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + start_direct_read_partition_session_response: StreamDirectReadMessage.StartDirectReadPartitionSessionResponse + status: _ydb_status_codes_pb2.StatusIds.StatusCode + stop_direct_read_partition_session: StreamDirectReadMessage.StopDirectReadPartitionSession + update_token_response: UpdateTokenResponse + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., init_response: _Optional[_Union[StreamDirectReadMessage.InitResponse, _Mapping]] = ..., start_direct_read_partition_session_response: _Optional[_Union[StreamDirectReadMessage.StartDirectReadPartitionSessionResponse, _Mapping]] = ..., stop_direct_read_partition_session: _Optional[_Union[StreamDirectReadMessage.StopDirectReadPartitionSession, _Mapping]] = ..., direct_read_response: _Optional[_Union[StreamDirectReadMessage.DirectReadResponse, _Mapping]] = ..., update_token_response: _Optional[_Union[UpdateTokenResponse, _Mapping]] = ...) -> None: ... + class InitRequest(_message.Message): + __slots__ = ["consumer", "session_id", "topics_read_settings"] + class TopicReadSettings(_message.Message): + __slots__ = ["path"] + PATH_FIELD_NUMBER: _ClassVar[int] + path: str + def __init__(self, path: _Optional[str] = ...) -> None: ... + CONSUMER_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TOPICS_READ_SETTINGS_FIELD_NUMBER: _ClassVar[int] + consumer: str + session_id: str + topics_read_settings: _containers.RepeatedCompositeFieldContainer[StreamDirectReadMessage.InitRequest.TopicReadSettings] + def __init__(self, session_id: _Optional[str] = ..., topics_read_settings: _Optional[_Iterable[_Union[StreamDirectReadMessage.InitRequest.TopicReadSettings, _Mapping]]] = ..., consumer: _Optional[str] = ...) -> None: ... + class InitResponse(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + class StartDirectReadPartitionSessionRequest(_message.Message): + __slots__ = ["generation", "last_direct_read_id", "partition_session_id"] + GENERATION_FIELD_NUMBER: _ClassVar[int] + LAST_DIRECT_READ_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + generation: int + last_direct_read_id: int + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., last_direct_read_id: _Optional[int] = ..., generation: _Optional[int] = ...) -> None: ... + class StartDirectReadPartitionSessionResponse(_message.Message): + __slots__ = ["generation", "partition_session_id"] + GENERATION_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + generation: int + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., generation: _Optional[int] = ...) -> None: ... + class StopDirectReadPartitionSession(_message.Message): + __slots__ = ["generation", "issues", "partition_session_id", "status"] + GENERATION_FIELD_NUMBER: _ClassVar[int] + ISSUES_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + generation: int + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + partition_session_id: int + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., partition_session_id: _Optional[int] = ..., generation: _Optional[int] = ...) -> None: ... + def __init__(self) -> None: ... class StreamReadMessage(_message.Message): __slots__ = [] @@ -434,9 +631,26 @@ class StreamReadMessage(_message.Message): PARTITIONS_COMMITTED_OFFSETS_FIELD_NUMBER: _ClassVar[int] partitions_committed_offsets: _containers.RepeatedCompositeFieldContainer[StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset] def __init__(self, partitions_committed_offsets: _Optional[_Iterable[_Union[StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset, _Mapping]]] = ...) -> None: ... + class DirectReadAck(_message.Message): + __slots__ = ["direct_read_id", "partition_session_id"] + DIRECT_READ_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + direct_read_id: int + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., direct_read_id: _Optional[int] = ...) -> None: ... + class EndPartitionSession(_message.Message): + __slots__ = ["adjacent_partition_ids", "child_partition_ids", "partition_session_id"] + ADJACENT_PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] + CHILD_PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + adjacent_partition_ids: _containers.RepeatedScalarFieldContainer[int] + child_partition_ids: _containers.RepeatedScalarFieldContainer[int] + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., adjacent_partition_ids: _Optional[_Iterable[int]] = ..., child_partition_ids: _Optional[_Iterable[int]] = ...) -> None: ... class FromClient(_message.Message): - __slots__ = ["commit_offset_request", "init_request", "partition_session_status_request", "read_request", "start_partition_session_response", "stop_partition_session_response", "update_token_request"] + __slots__ = ["commit_offset_request", "direct_read_ack", "init_request", "partition_session_status_request", "read_request", "start_partition_session_response", "stop_partition_session_response", "update_token_request"] COMMIT_OFFSET_REQUEST_FIELD_NUMBER: _ClassVar[int] + DIRECT_READ_ACK_FIELD_NUMBER: _ClassVar[int] INIT_REQUEST_FIELD_NUMBER: _ClassVar[int] PARTITION_SESSION_STATUS_REQUEST_FIELD_NUMBER: _ClassVar[int] READ_REQUEST_FIELD_NUMBER: _ClassVar[int] @@ -444,16 +658,18 @@ class StreamReadMessage(_message.Message): STOP_PARTITION_SESSION_RESPONSE_FIELD_NUMBER: _ClassVar[int] UPDATE_TOKEN_REQUEST_FIELD_NUMBER: _ClassVar[int] commit_offset_request: StreamReadMessage.CommitOffsetRequest + direct_read_ack: StreamReadMessage.DirectReadAck init_request: StreamReadMessage.InitRequest partition_session_status_request: StreamReadMessage.PartitionSessionStatusRequest read_request: StreamReadMessage.ReadRequest start_partition_session_response: StreamReadMessage.StartPartitionSessionResponse stop_partition_session_response: StreamReadMessage.StopPartitionSessionResponse update_token_request: UpdateTokenRequest - def __init__(self, init_request: _Optional[_Union[StreamReadMessage.InitRequest, _Mapping]] = ..., read_request: _Optional[_Union[StreamReadMessage.ReadRequest, _Mapping]] = ..., commit_offset_request: _Optional[_Union[StreamReadMessage.CommitOffsetRequest, _Mapping]] = ..., partition_session_status_request: _Optional[_Union[StreamReadMessage.PartitionSessionStatusRequest, _Mapping]] = ..., update_token_request: _Optional[_Union[UpdateTokenRequest, _Mapping]] = ..., start_partition_session_response: _Optional[_Union[StreamReadMessage.StartPartitionSessionResponse, _Mapping]] = ..., stop_partition_session_response: _Optional[_Union[StreamReadMessage.StopPartitionSessionResponse, _Mapping]] = ...) -> None: ... + def __init__(self, init_request: _Optional[_Union[StreamReadMessage.InitRequest, _Mapping]] = ..., read_request: _Optional[_Union[StreamReadMessage.ReadRequest, _Mapping]] = ..., commit_offset_request: _Optional[_Union[StreamReadMessage.CommitOffsetRequest, _Mapping]] = ..., partition_session_status_request: _Optional[_Union[StreamReadMessage.PartitionSessionStatusRequest, _Mapping]] = ..., update_token_request: _Optional[_Union[UpdateTokenRequest, _Mapping]] = ..., direct_read_ack: _Optional[_Union[StreamReadMessage.DirectReadAck, _Mapping]] = ..., start_partition_session_response: _Optional[_Union[StreamReadMessage.StartPartitionSessionResponse, _Mapping]] = ..., stop_partition_session_response: _Optional[_Union[StreamReadMessage.StopPartitionSessionResponse, _Mapping]] = ...) -> None: ... class FromServer(_message.Message): - __slots__ = ["commit_offset_response", "init_response", "issues", "partition_session_status_response", "read_response", "start_partition_session_request", "status", "stop_partition_session_request", "update_token_response"] + __slots__ = ["commit_offset_response", "end_partition_session", "init_response", "issues", "partition_session_status_response", "read_response", "start_partition_session_request", "status", "stop_partition_session_request", "update_partition_session", "update_token_response"] COMMIT_OFFSET_RESPONSE_FIELD_NUMBER: _ClassVar[int] + END_PARTITION_SESSION_FIELD_NUMBER: _ClassVar[int] INIT_RESPONSE_FIELD_NUMBER: _ClassVar[int] ISSUES_FIELD_NUMBER: _ClassVar[int] PARTITION_SESSION_STATUS_RESPONSE_FIELD_NUMBER: _ClassVar[int] @@ -461,8 +677,10 @@ class StreamReadMessage(_message.Message): START_PARTITION_SESSION_REQUEST_FIELD_NUMBER: _ClassVar[int] STATUS_FIELD_NUMBER: _ClassVar[int] STOP_PARTITION_SESSION_REQUEST_FIELD_NUMBER: _ClassVar[int] + UPDATE_PARTITION_SESSION_FIELD_NUMBER: _ClassVar[int] UPDATE_TOKEN_RESPONSE_FIELD_NUMBER: _ClassVar[int] commit_offset_response: StreamReadMessage.CommitOffsetResponse + end_partition_session: StreamReadMessage.EndPartitionSession init_response: StreamReadMessage.InitResponse issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] partition_session_status_response: StreamReadMessage.PartitionSessionStatusResponse @@ -470,10 +688,11 @@ class StreamReadMessage(_message.Message): start_partition_session_request: StreamReadMessage.StartPartitionSessionRequest status: _ydb_status_codes_pb2.StatusIds.StatusCode stop_partition_session_request: StreamReadMessage.StopPartitionSessionRequest + update_partition_session: StreamReadMessage.UpdatePartitionSession update_token_response: UpdateTokenResponse - def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., init_response: _Optional[_Union[StreamReadMessage.InitResponse, _Mapping]] = ..., read_response: _Optional[_Union[StreamReadMessage.ReadResponse, _Mapping]] = ..., commit_offset_response: _Optional[_Union[StreamReadMessage.CommitOffsetResponse, _Mapping]] = ..., partition_session_status_response: _Optional[_Union[StreamReadMessage.PartitionSessionStatusResponse, _Mapping]] = ..., update_token_response: _Optional[_Union[UpdateTokenResponse, _Mapping]] = ..., start_partition_session_request: _Optional[_Union[StreamReadMessage.StartPartitionSessionRequest, _Mapping]] = ..., stop_partition_session_request: _Optional[_Union[StreamReadMessage.StopPartitionSessionRequest, _Mapping]] = ...) -> None: ... + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., init_response: _Optional[_Union[StreamReadMessage.InitResponse, _Mapping]] = ..., read_response: _Optional[_Union[StreamReadMessage.ReadResponse, _Mapping]] = ..., commit_offset_response: _Optional[_Union[StreamReadMessage.CommitOffsetResponse, _Mapping]] = ..., partition_session_status_response: _Optional[_Union[StreamReadMessage.PartitionSessionStatusResponse, _Mapping]] = ..., update_token_response: _Optional[_Union[UpdateTokenResponse, _Mapping]] = ..., start_partition_session_request: _Optional[_Union[StreamReadMessage.StartPartitionSessionRequest, _Mapping]] = ..., stop_partition_session_request: _Optional[_Union[StreamReadMessage.StopPartitionSessionRequest, _Mapping]] = ..., update_partition_session: _Optional[_Union[StreamReadMessage.UpdatePartitionSession, _Mapping]] = ..., end_partition_session: _Optional[_Union[StreamReadMessage.EndPartitionSession, _Mapping]] = ...) -> None: ... class InitRequest(_message.Message): - __slots__ = ["consumer", "reader_name", "topics_read_settings"] + __slots__ = ["auto_partitioning_support", "consumer", "direct_read", "reader_name", "topics_read_settings"] class TopicReadSettings(_message.Message): __slots__ = ["max_lag", "partition_ids", "path", "read_from"] MAX_LAG_FIELD_NUMBER: _ClassVar[int] @@ -485,13 +704,17 @@ class StreamReadMessage(_message.Message): path: str read_from: _timestamp_pb2.Timestamp def __init__(self, path: _Optional[str] = ..., partition_ids: _Optional[_Iterable[int]] = ..., max_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., read_from: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + AUTO_PARTITIONING_SUPPORT_FIELD_NUMBER: _ClassVar[int] CONSUMER_FIELD_NUMBER: _ClassVar[int] + DIRECT_READ_FIELD_NUMBER: _ClassVar[int] READER_NAME_FIELD_NUMBER: _ClassVar[int] TOPICS_READ_SETTINGS_FIELD_NUMBER: _ClassVar[int] + auto_partitioning_support: bool consumer: str + direct_read: bool reader_name: str topics_read_settings: _containers.RepeatedCompositeFieldContainer[StreamReadMessage.InitRequest.TopicReadSettings] - def __init__(self, topics_read_settings: _Optional[_Iterable[_Union[StreamReadMessage.InitRequest.TopicReadSettings, _Mapping]]] = ..., consumer: _Optional[str] = ..., reader_name: _Optional[str] = ...) -> None: ... + def __init__(self, topics_read_settings: _Optional[_Iterable[_Union[StreamReadMessage.InitRequest.TopicReadSettings, _Mapping]]] = ..., consumer: _Optional[str] = ..., reader_name: _Optional[str] = ..., direct_read: bool = ..., auto_partitioning_support: bool = ...) -> None: ... class InitResponse(_message.Message): __slots__ = ["session_id"] SESSION_ID_FIELD_NUMBER: _ClassVar[int] @@ -579,14 +802,16 @@ class StreamReadMessage(_message.Message): partition_data: _containers.RepeatedCompositeFieldContainer[StreamReadMessage.ReadResponse.PartitionData] def __init__(self, partition_data: _Optional[_Iterable[_Union[StreamReadMessage.ReadResponse.PartitionData, _Mapping]]] = ..., bytes_size: _Optional[int] = ...) -> None: ... class StartPartitionSessionRequest(_message.Message): - __slots__ = ["committed_offset", "partition_offsets", "partition_session"] + __slots__ = ["committed_offset", "partition_location", "partition_offsets", "partition_session"] COMMITTED_OFFSET_FIELD_NUMBER: _ClassVar[int] + PARTITION_LOCATION_FIELD_NUMBER: _ClassVar[int] PARTITION_OFFSETS_FIELD_NUMBER: _ClassVar[int] PARTITION_SESSION_FIELD_NUMBER: _ClassVar[int] committed_offset: int + partition_location: PartitionLocation partition_offsets: OffsetsRange partition_session: StreamReadMessage.PartitionSession - def __init__(self, partition_session: _Optional[_Union[StreamReadMessage.PartitionSession, _Mapping]] = ..., committed_offset: _Optional[int] = ..., partition_offsets: _Optional[_Union[OffsetsRange, _Mapping]] = ...) -> None: ... + def __init__(self, partition_session: _Optional[_Union[StreamReadMessage.PartitionSession, _Mapping]] = ..., committed_offset: _Optional[int] = ..., partition_offsets: _Optional[_Union[OffsetsRange, _Mapping]] = ..., partition_location: _Optional[_Union[PartitionLocation, _Mapping]] = ...) -> None: ... class StartPartitionSessionResponse(_message.Message): __slots__ = ["commit_offset", "partition_session_id", "read_offset"] COMMIT_OFFSET_FIELD_NUMBER: _ClassVar[int] @@ -597,19 +822,30 @@ class StreamReadMessage(_message.Message): read_offset: int def __init__(self, partition_session_id: _Optional[int] = ..., read_offset: _Optional[int] = ..., commit_offset: _Optional[int] = ...) -> None: ... class StopPartitionSessionRequest(_message.Message): - __slots__ = ["committed_offset", "graceful", "partition_session_id"] + __slots__ = ["committed_offset", "graceful", "last_direct_read_id", "partition_session_id"] COMMITTED_OFFSET_FIELD_NUMBER: _ClassVar[int] GRACEFUL_FIELD_NUMBER: _ClassVar[int] + LAST_DIRECT_READ_ID_FIELD_NUMBER: _ClassVar[int] PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] committed_offset: int graceful: bool + last_direct_read_id: int partition_session_id: int - def __init__(self, partition_session_id: _Optional[int] = ..., graceful: bool = ..., committed_offset: _Optional[int] = ...) -> None: ... + def __init__(self, partition_session_id: _Optional[int] = ..., graceful: bool = ..., committed_offset: _Optional[int] = ..., last_direct_read_id: _Optional[int] = ...) -> None: ... class StopPartitionSessionResponse(_message.Message): - __slots__ = ["partition_session_id"] + __slots__ = ["graceful", "partition_session_id"] + GRACEFUL_FIELD_NUMBER: _ClassVar[int] PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + graceful: bool partition_session_id: int - def __init__(self, partition_session_id: _Optional[int] = ...) -> None: ... + def __init__(self, partition_session_id: _Optional[int] = ..., graceful: bool = ...) -> None: ... + class UpdatePartitionSession(_message.Message): + __slots__ = ["partition_location", "partition_session_id"] + PARTITION_LOCATION_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + partition_location: PartitionLocation + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., partition_location: _Optional[_Union[PartitionLocation, _Mapping]] = ...) -> None: ... def __init__(self) -> None: ... class StreamWriteMessage(_message.Message): @@ -637,7 +873,7 @@ class StreamWriteMessage(_message.Message): write_response: StreamWriteMessage.WriteResponse def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., init_response: _Optional[_Union[StreamWriteMessage.InitResponse, _Mapping]] = ..., write_response: _Optional[_Union[StreamWriteMessage.WriteResponse, _Mapping]] = ..., update_token_response: _Optional[_Union[UpdateTokenResponse, _Mapping]] = ...) -> None: ... class InitRequest(_message.Message): - __slots__ = ["get_last_seq_no", "message_group_id", "partition_id", "path", "producer_id", "write_session_meta"] + __slots__ = ["get_last_seq_no", "message_group_id", "partition_id", "partition_with_generation", "path", "producer_id", "write_session_meta"] class WriteSessionMetaEntry(_message.Message): __slots__ = ["key", "value"] KEY_FIELD_NUMBER: _ClassVar[int] @@ -648,16 +884,18 @@ class StreamWriteMessage(_message.Message): GET_LAST_SEQ_NO_FIELD_NUMBER: _ClassVar[int] MESSAGE_GROUP_ID_FIELD_NUMBER: _ClassVar[int] PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_WITH_GENERATION_FIELD_NUMBER: _ClassVar[int] PATH_FIELD_NUMBER: _ClassVar[int] PRODUCER_ID_FIELD_NUMBER: _ClassVar[int] WRITE_SESSION_META_FIELD_NUMBER: _ClassVar[int] get_last_seq_no: bool message_group_id: str partition_id: int + partition_with_generation: PartitionWithGeneration path: str producer_id: str write_session_meta: _containers.ScalarMap[str, str] - def __init__(self, path: _Optional[str] = ..., producer_id: _Optional[str] = ..., write_session_meta: _Optional[_Mapping[str, str]] = ..., message_group_id: _Optional[str] = ..., partition_id: _Optional[int] = ..., get_last_seq_no: bool = ...) -> None: ... + def __init__(self, path: _Optional[str] = ..., producer_id: _Optional[str] = ..., write_session_meta: _Optional[_Mapping[str, str]] = ..., message_group_id: _Optional[str] = ..., partition_id: _Optional[int] = ..., partition_with_generation: _Optional[_Union[PartitionWithGeneration, _Mapping]] = ..., get_last_seq_no: bool = ...) -> None: ... class InitResponse(_message.Message): __slots__ = ["last_seq_no", "partition_id", "session_id", "supported_codecs"] LAST_SEQ_NO_FIELD_NUMBER: _ClassVar[int] @@ -672,12 +910,13 @@ class StreamWriteMessage(_message.Message): class WriteRequest(_message.Message): __slots__ = ["codec", "messages", "tx"] class MessageData(_message.Message): - __slots__ = ["created_at", "data", "message_group_id", "metadata_items", "partition_id", "seq_no", "uncompressed_size"] + __slots__ = ["created_at", "data", "message_group_id", "metadata_items", "partition_id", "partition_with_generation", "seq_no", "uncompressed_size"] CREATED_AT_FIELD_NUMBER: _ClassVar[int] DATA_FIELD_NUMBER: _ClassVar[int] MESSAGE_GROUP_ID_FIELD_NUMBER: _ClassVar[int] METADATA_ITEMS_FIELD_NUMBER: _ClassVar[int] PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_WITH_GENERATION_FIELD_NUMBER: _ClassVar[int] SEQ_NO_FIELD_NUMBER: _ClassVar[int] UNCOMPRESSED_SIZE_FIELD_NUMBER: _ClassVar[int] created_at: _timestamp_pb2.Timestamp @@ -685,9 +924,10 @@ class StreamWriteMessage(_message.Message): message_group_id: str metadata_items: _containers.RepeatedCompositeFieldContainer[MetadataItem] partition_id: int + partition_with_generation: PartitionWithGeneration seq_no: int uncompressed_size: int - def __init__(self, seq_no: _Optional[int] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., data: _Optional[bytes] = ..., uncompressed_size: _Optional[int] = ..., message_group_id: _Optional[str] = ..., partition_id: _Optional[int] = ..., metadata_items: _Optional[_Iterable[_Union[MetadataItem, _Mapping]]] = ...) -> None: ... + def __init__(self, seq_no: _Optional[int] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., data: _Optional[bytes] = ..., uncompressed_size: _Optional[int] = ..., message_group_id: _Optional[str] = ..., partition_id: _Optional[int] = ..., partition_with_generation: _Optional[_Union[PartitionWithGeneration, _Mapping]] = ..., metadata_items: _Optional[_Iterable[_Union[MetadataItem, _Mapping]]] = ...) -> None: ... CODEC_FIELD_NUMBER: _ClassVar[int] MESSAGES_FIELD_NUMBER: _ClassVar[int] TX_FIELD_NUMBER: _ClassVar[int] @@ -698,7 +938,7 @@ class StreamWriteMessage(_message.Message): class WriteResponse(_message.Message): __slots__ = ["acks", "partition_id", "write_statistics"] class WriteAck(_message.Message): - __slots__ = ["seq_no", "skipped", "written"] + __slots__ = ["seq_no", "skipped", "written", "written_in_tx"] class Skipped(_message.Message): __slots__ = ["reason"] class Reason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): @@ -713,13 +953,18 @@ class StreamWriteMessage(_message.Message): OFFSET_FIELD_NUMBER: _ClassVar[int] offset: int def __init__(self, offset: _Optional[int] = ...) -> None: ... + class WrittenInTx(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... SEQ_NO_FIELD_NUMBER: _ClassVar[int] SKIPPED_FIELD_NUMBER: _ClassVar[int] WRITTEN_FIELD_NUMBER: _ClassVar[int] + WRITTEN_IN_TX_FIELD_NUMBER: _ClassVar[int] seq_no: int skipped: StreamWriteMessage.WriteResponse.WriteAck.Skipped written: StreamWriteMessage.WriteResponse.WriteAck.Written - def __init__(self, seq_no: _Optional[int] = ..., written: _Optional[_Union[StreamWriteMessage.WriteResponse.WriteAck.Written, _Mapping]] = ..., skipped: _Optional[_Union[StreamWriteMessage.WriteResponse.WriteAck.Skipped, _Mapping]] = ...) -> None: ... + written_in_tx: StreamWriteMessage.WriteResponse.WriteAck.WrittenInTx + def __init__(self, seq_no: _Optional[int] = ..., written: _Optional[_Union[StreamWriteMessage.WriteResponse.WriteAck.Written, _Mapping]] = ..., skipped: _Optional[_Union[StreamWriteMessage.WriteResponse.WriteAck.Skipped, _Mapping]] = ..., written_in_tx: _Optional[_Union[StreamWriteMessage.WriteResponse.WriteAck.WrittenInTx, _Mapping]] = ...) -> None: ... class WriteStatistics(_message.Message): __slots__ = ["max_queue_wait_time", "min_queue_wait_time", "partition_quota_wait_time", "persisting_time", "topic_quota_wait_time"] MAX_QUEUE_WAIT_TIME_FIELD_NUMBER: _ClassVar[int] @@ -805,5 +1050,8 @@ class UpdateTokenResponse(_message.Message): class Codec(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] +class AutoPartitioningStrategy(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class MeteringMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] diff --git a/ydb/_grpc/v4/protos/ydb_value_pb2.py b/ydb/_grpc/v4/protos/ydb_value_pb2.py index 9ece33b1..e12a525c 100644 --- a/ydb/_grpc/v4/protos/ydb_value_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_value_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_value.proto\x12\x03Ydb\x1a\x1cgoogle/protobuf/struct.proto\"/\n\x0b\x44\x65\x63imalType\x12\x11\n\tprecision\x18\x01 \x01(\r\x12\r\n\x05scale\x18\x02 \x01(\r\"\'\n\x0cOptionalType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"#\n\x08ListType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"e\n\x0bVariantType\x12%\n\x0btuple_items\x18\x01 \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12\'\n\x0cstruct_items\x18\x02 \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x42\x06\n\x04type\"(\n\tTupleType\x12\x1b\n\x08\x65lements\x18\x01 \x03(\x0b\x32\t.Ydb.Type\"5\n\x0cStructMember\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"0\n\nStructType\x12\"\n\x07members\x18\x01 \x03(\x0b\x32\x11.Ydb.StructMember\">\n\x08\x44ictType\x12\x16\n\x03key\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x1a\n\x07payload\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"2\n\nTaggedType\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"5\n\x06PgType\x12\x0b\n\x03oid\x18\x01 \x01(\r\x12\x0e\n\x06typlen\x18\x02 \x01(\x05\x12\x0e\n\x06typmod\x18\x03 \x01(\x05\"\xe2\x07\n\x04Type\x12,\n\x07type_id\x18\x01 \x01(\x0e\x32\x19.Ydb.Type.PrimitiveTypeIdH\x00\x12(\n\x0c\x64\x65\x63imal_type\x18\x02 \x01(\x0b\x32\x10.Ydb.DecimalTypeH\x00\x12*\n\roptional_type\x18\x65 \x01(\x0b\x32\x11.Ydb.OptionalTypeH\x00\x12\"\n\tlist_type\x18\x66 \x01(\x0b\x32\r.Ydb.ListTypeH\x00\x12$\n\ntuple_type\x18g \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12&\n\x0bstruct_type\x18h \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x12\"\n\tdict_type\x18i \x01(\x0b\x32\r.Ydb.DictTypeH\x00\x12(\n\x0cvariant_type\x18j \x01(\x0b\x32\x10.Ydb.VariantTypeH\x00\x12&\n\x0btagged_type\x18k \x01(\x0b\x32\x0f.Ydb.TaggedTypeH\x00\x12\x30\n\tvoid_type\x18\xc9\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x30\n\tnull_type\x18\xca\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_list_type\x18\xcb\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_dict_type\x18\xcc\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x1f\n\x07pg_type\x18\xcd\x01 \x01(\x0b\x32\x0b.Ydb.PgTypeH\x00\"\xf0\x02\n\x0fPrimitiveTypeId\x12!\n\x1dPRIMITIVE_TYPE_ID_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x06\x12\x08\n\x04INT8\x10\x07\x12\t\n\x05UINT8\x10\x05\x12\t\n\x05INT16\x10\x08\x12\n\n\x06UINT16\x10\t\x12\t\n\x05INT32\x10\x01\x12\n\n\x06UINT32\x10\x02\x12\t\n\x05INT64\x10\x03\x12\n\n\x06UINT64\x10\x04\x12\t\n\x05\x46LOAT\x10!\x12\n\n\x06\x44OUBLE\x10 \x12\x08\n\x04\x44\x41TE\x10\x30\x12\x0c\n\x08\x44\x41TETIME\x10\x31\x12\r\n\tTIMESTAMP\x10\x32\x12\x0c\n\x08INTERVAL\x10\x33\x12\x0b\n\x07TZ_DATE\x10\x34\x12\x0f\n\x0bTZ_DATETIME\x10\x35\x12\x10\n\x0cTZ_TIMESTAMP\x10\x36\x12\x0b\n\x06STRING\x10\x81 \x12\t\n\x04UTF8\x10\x80$\x12\t\n\x04YSON\x10\x81$\x12\t\n\x04JSON\x10\x82$\x12\t\n\x04UUID\x10\x83$\x12\x12\n\rJSON_DOCUMENT\x10\x84$\x12\r\n\x08\x44YNUMBER\x10\x82&B\x06\n\x04type\"A\n\tValuePair\x12\x17\n\x03key\x18\x01 \x01(\x0b\x32\n.Ydb.Value\x12\x1b\n\x07payload\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"\xb1\x03\n\x05Value\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint32_value\x18\x02 \x01(\x0fH\x00\x12\x16\n\x0cuint32_value\x18\x03 \x01(\x07H\x00\x12\x15\n\x0bint64_value\x18\x04 \x01(\x10H\x00\x12\x16\n\x0cuint64_value\x18\x05 \x01(\x06H\x00\x12\x15\n\x0b\x66loat_value\x18\x06 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x07 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x08 \x01(\x0cH\x00\x12\x14\n\ntext_value\x18\t \x01(\tH\x00\x12\x35\n\x0fnull_flag_value\x18\n \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\"\n\x0cnested_value\x18\x0b \x01(\x0b\x32\n.Ydb.ValueH\x00\x12\x11\n\x07low_128\x18\x0f \x01(\x06H\x00\x12\x19\n\x05items\x18\x0c \x03(\x0b\x32\n.Ydb.Value\x12\x1d\n\x05pairs\x18\r \x03(\x0b\x32\x0e.Ydb.ValuePair\x12\x15\n\rvariant_index\x18\x0e \x01(\r\x12\x10\n\x08high_128\x18\x10 \x01(\x06\x42\x07\n\x05value\"@\n\nTypedValue\x12\x17\n\x04type\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"/\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"V\n\tResultSet\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x18\n\x04rows\x18\x02 \x03(\x0b\x32\n.Ydb.Value\x12\x11\n\ttruncated\x18\x03 \x01(\x08\x42T\n\x0etech.ydb.protoB\x0bValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_value.proto\x12\x03Ydb\x1a\x1cgoogle/protobuf/struct.proto\"/\n\x0b\x44\x65\x63imalType\x12\x11\n\tprecision\x18\x01 \x01(\r\x12\r\n\x05scale\x18\x02 \x01(\r\"\'\n\x0cOptionalType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"#\n\x08ListType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"e\n\x0bVariantType\x12%\n\x0btuple_items\x18\x01 \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12\'\n\x0cstruct_items\x18\x02 \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x42\x06\n\x04type\"(\n\tTupleType\x12\x1b\n\x08\x65lements\x18\x01 \x03(\x0b\x32\t.Ydb.Type\"5\n\x0cStructMember\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"0\n\nStructType\x12\"\n\x07members\x18\x01 \x03(\x0b\x32\x11.Ydb.StructMember\">\n\x08\x44ictType\x12\x16\n\x03key\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x1a\n\x07payload\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"2\n\nTaggedType\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"_\n\x06PgType\x12\x11\n\ttype_name\x18\n \x01(\t\x12\x15\n\rtype_modifier\x18\x0b \x01(\t\x12\x0b\n\x03oid\x18\x01 \x01(\r\x12\x0e\n\x06typlen\x18\x02 \x01(\x05\x12\x0e\n\x06typmod\x18\x03 \x01(\x05\"\x9f\x08\n\x04Type\x12,\n\x07type_id\x18\x01 \x01(\x0e\x32\x19.Ydb.Type.PrimitiveTypeIdH\x00\x12(\n\x0c\x64\x65\x63imal_type\x18\x02 \x01(\x0b\x32\x10.Ydb.DecimalTypeH\x00\x12*\n\roptional_type\x18\x65 \x01(\x0b\x32\x11.Ydb.OptionalTypeH\x00\x12\"\n\tlist_type\x18\x66 \x01(\x0b\x32\r.Ydb.ListTypeH\x00\x12$\n\ntuple_type\x18g \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12&\n\x0bstruct_type\x18h \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x12\"\n\tdict_type\x18i \x01(\x0b\x32\r.Ydb.DictTypeH\x00\x12(\n\x0cvariant_type\x18j \x01(\x0b\x32\x10.Ydb.VariantTypeH\x00\x12&\n\x0btagged_type\x18k \x01(\x0b\x32\x0f.Ydb.TaggedTypeH\x00\x12\x30\n\tvoid_type\x18\xc9\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x30\n\tnull_type\x18\xca\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_list_type\x18\xcb\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_dict_type\x18\xcc\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x1f\n\x07pg_type\x18\xcd\x01 \x01(\x0b\x32\x0b.Ydb.PgTypeH\x00\"\xad\x03\n\x0fPrimitiveTypeId\x12!\n\x1dPRIMITIVE_TYPE_ID_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x06\x12\x08\n\x04INT8\x10\x07\x12\t\n\x05UINT8\x10\x05\x12\t\n\x05INT16\x10\x08\x12\n\n\x06UINT16\x10\t\x12\t\n\x05INT32\x10\x01\x12\n\n\x06UINT32\x10\x02\x12\t\n\x05INT64\x10\x03\x12\n\n\x06UINT64\x10\x04\x12\t\n\x05\x46LOAT\x10!\x12\n\n\x06\x44OUBLE\x10 \x12\x08\n\x04\x44\x41TE\x10\x30\x12\x0c\n\x08\x44\x41TETIME\x10\x31\x12\r\n\tTIMESTAMP\x10\x32\x12\x0c\n\x08INTERVAL\x10\x33\x12\x0b\n\x07TZ_DATE\x10\x34\x12\x0f\n\x0bTZ_DATETIME\x10\x35\x12\x10\n\x0cTZ_TIMESTAMP\x10\x36\x12\n\n\x06\x44\x41TE32\x10@\x12\x0e\n\nDATETIME64\x10\x41\x12\x0f\n\x0bTIMESTAMP64\x10\x42\x12\x0e\n\nINTERVAL64\x10\x43\x12\x0b\n\x06STRING\x10\x81 \x12\t\n\x04UTF8\x10\x80$\x12\t\n\x04YSON\x10\x81$\x12\t\n\x04JSON\x10\x82$\x12\t\n\x04UUID\x10\x83$\x12\x12\n\rJSON_DOCUMENT\x10\x84$\x12\r\n\x08\x44YNUMBER\x10\x82&B\x06\n\x04type\"A\n\tValuePair\x12\x17\n\x03key\x18\x01 \x01(\x0b\x32\n.Ydb.Value\x12\x1b\n\x07payload\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"\xb1\x03\n\x05Value\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint32_value\x18\x02 \x01(\x0fH\x00\x12\x16\n\x0cuint32_value\x18\x03 \x01(\x07H\x00\x12\x15\n\x0bint64_value\x18\x04 \x01(\x10H\x00\x12\x16\n\x0cuint64_value\x18\x05 \x01(\x06H\x00\x12\x15\n\x0b\x66loat_value\x18\x06 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x07 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x08 \x01(\x0cH\x00\x12\x14\n\ntext_value\x18\t \x01(\tH\x00\x12\x35\n\x0fnull_flag_value\x18\n \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\"\n\x0cnested_value\x18\x0b \x01(\x0b\x32\n.Ydb.ValueH\x00\x12\x11\n\x07low_128\x18\x0f \x01(\x06H\x00\x12\x19\n\x05items\x18\x0c \x03(\x0b\x32\n.Ydb.Value\x12\x1d\n\x05pairs\x18\r \x03(\x0b\x32\x0e.Ydb.ValuePair\x12\x15\n\rvariant_index\x18\x0e \x01(\r\x12\x10\n\x08high_128\x18\x10 \x01(\x06\x42\x07\n\x05value\"@\n\nTypedValue\x12\x17\n\x04type\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"/\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"V\n\tResultSet\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x18\n\x04rows\x18\x02 \x03(\x0b\x32\n.Ydb.Value\x12\x11\n\ttruncated\x18\x03 \x01(\x08\x42T\n\x0etech.ydb.protoB\x0bValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_value_pb2', globals()) @@ -42,19 +42,19 @@ _TAGGEDTYPE._serialized_start=502 _TAGGEDTYPE._serialized_end=552 _PGTYPE._serialized_start=554 - _PGTYPE._serialized_end=607 - _TYPE._serialized_start=610 - _TYPE._serialized_end=1604 - _TYPE_PRIMITIVETYPEID._serialized_start=1228 - _TYPE_PRIMITIVETYPEID._serialized_end=1596 - _VALUEPAIR._serialized_start=1606 - _VALUEPAIR._serialized_end=1671 - _VALUE._serialized_start=1674 - _VALUE._serialized_end=2107 - _TYPEDVALUE._serialized_start=2109 - _TYPEDVALUE._serialized_end=2173 - _COLUMN._serialized_start=2175 - _COLUMN._serialized_end=2222 - _RESULTSET._serialized_start=2224 - _RESULTSET._serialized_end=2310 + _PGTYPE._serialized_end=649 + _TYPE._serialized_start=652 + _TYPE._serialized_end=1707 + _TYPE_PRIMITIVETYPEID._serialized_start=1270 + _TYPE_PRIMITIVETYPEID._serialized_end=1699 + _VALUEPAIR._serialized_start=1709 + _VALUEPAIR._serialized_end=1774 + _VALUE._serialized_start=1777 + _VALUE._serialized_end=2210 + _TYPEDVALUE._serialized_start=2212 + _TYPEDVALUE._serialized_end=2276 + _COLUMN._serialized_start=2278 + _COLUMN._serialized_end=2325 + _RESULTSET._serialized_start=2327 + _RESULTSET._serialized_end=2413 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_value_pb2.pyi b/ydb/_grpc/v4/protos/ydb_value_pb2.pyi index 23ae11bf..8382a771 100644 --- a/ydb/_grpc/v4/protos/ydb_value_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_value_pb2.pyi @@ -44,14 +44,18 @@ class OptionalType(_message.Message): def __init__(self, item: _Optional[_Union[Type, _Mapping]] = ...) -> None: ... class PgType(_message.Message): - __slots__ = ["oid", "typlen", "typmod"] + __slots__ = ["oid", "type_modifier", "type_name", "typlen", "typmod"] OID_FIELD_NUMBER: _ClassVar[int] + TYPE_MODIFIER_FIELD_NUMBER: _ClassVar[int] + TYPE_NAME_FIELD_NUMBER: _ClassVar[int] TYPLEN_FIELD_NUMBER: _ClassVar[int] TYPMOD_FIELD_NUMBER: _ClassVar[int] oid: int + type_modifier: str + type_name: str typlen: int typmod: int - def __init__(self, oid: _Optional[int] = ..., typlen: _Optional[int] = ..., typmod: _Optional[int] = ...) -> None: ... + def __init__(self, type_name: _Optional[str] = ..., type_modifier: _Optional[str] = ..., oid: _Optional[int] = ..., typlen: _Optional[int] = ..., typmod: _Optional[int] = ...) -> None: ... class ResultSet(_message.Message): __slots__ = ["columns", "rows", "truncated"] @@ -97,7 +101,9 @@ class Type(_message.Message): __slots__ = [] BOOL: Type.PrimitiveTypeId DATE: Type.PrimitiveTypeId + DATE32: Type.PrimitiveTypeId DATETIME: Type.PrimitiveTypeId + DATETIME64: Type.PrimitiveTypeId DECIMAL_TYPE_FIELD_NUMBER: _ClassVar[int] DICT_TYPE_FIELD_NUMBER: _ClassVar[int] DOUBLE: Type.PrimitiveTypeId @@ -110,6 +116,7 @@ class Type(_message.Message): INT64: Type.PrimitiveTypeId INT8: Type.PrimitiveTypeId INTERVAL: Type.PrimitiveTypeId + INTERVAL64: Type.PrimitiveTypeId JSON: Type.PrimitiveTypeId JSON_DOCUMENT: Type.PrimitiveTypeId LIST_TYPE_FIELD_NUMBER: _ClassVar[int] @@ -121,6 +128,7 @@ class Type(_message.Message): STRUCT_TYPE_FIELD_NUMBER: _ClassVar[int] TAGGED_TYPE_FIELD_NUMBER: _ClassVar[int] TIMESTAMP: Type.PrimitiveTypeId + TIMESTAMP64: Type.PrimitiveTypeId TUPLE_TYPE_FIELD_NUMBER: _ClassVar[int] TYPE_ID_FIELD_NUMBER: _ClassVar[int] TZ_DATE: Type.PrimitiveTypeId From 1c544fe9e5ef909c4688ac74e9250301a2f3dde6 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Dec 2024 11:26:35 +0300 Subject: [PATCH 325/429] Revert "Add backslash to database name if needed" This reverts commit 80743e72a3bab485437ac29d11f1d5a1d039bb77. --- ydb/driver.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/ydb/driver.py b/ydb/driver.py index fa116fe3..49bd223c 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -3,7 +3,6 @@ import logging import os from typing import Any # noqa -from typing import Optional from . import credentials as credentials_impl, table, scheme, pool from . import tracing @@ -144,7 +143,7 @@ def __init__( """ self.endpoint = endpoint - self.database = self._maybe_add_slash(database) + self.database = database self.ca_cert = ca_cert self.channel_options = channel_options self.secure_channel = _utilities.is_secure_protocol(endpoint) @@ -170,7 +169,7 @@ def __init__( self.compression = compression def set_database(self, database): - self.database = self._maybe_add_slash(database) + self.database = database return self @classmethod @@ -207,15 +206,6 @@ def _update_attrs_by_kwargs(self, **kwargs): ) setattr(self, key, value) - def _maybe_add_slash(self, database: Optional[str]) -> Optional[str]: - if not database: - return database - - if database.startswith("/"): - return database - - return f"/{database}" - ConnectionParams = DriverConfig From 907f318b91e1e686977a48fdb48263986500c735 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 4 Dec 2024 12:00:12 +0300 Subject: [PATCH 326/429] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fd4a01e..2029114b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +* Update protofiles +* Revert "Add backslash to database name if needed" + ## 3.18.9 ## * Add backslash to database name if needed * Fix attach session timeouts From 052ccbc70b4283f3707416f2e7d92040a94f6ed8 Mon Sep 17 00:00:00 2001 From: robot Date: Wed, 4 Dec 2024 09:02:10 +0000 Subject: [PATCH 327/429] Release: 3.18.10 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2029114b..e7b1996e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.10 ## * Update protofiles * Revert "Add backslash to database name if needed" diff --git a/setup.py b/setup.py index fdbe9615..12562d90 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.9", # AUTOVERSION + version="3.18.10", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 038d2277..6d13618e 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.9" +VERSION = "3.18.10" From 535b3e8c9cdf90e1757c0dcb178845a9ddbc6a79 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 10 Dec 2024 15:49:25 +0300 Subject: [PATCH 328/429] Make created_at utc in topic writer --- ydb/_topic_reader/topic_reader_asyncio_test.py | 2 +- ydb/_topic_writer/topic_writer_asyncio.py | 2 +- ydb/_topic_writer/topic_writer_asyncio_test.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ydb/_topic_reader/topic_reader_asyncio_test.py b/ydb/_topic_reader/topic_reader_asyncio_test.py index 4c76cd1d..b9f1e639 100644 --- a/ydb/_topic_reader/topic_reader_asyncio_test.py +++ b/ydb/_topic_reader/topic_reader_asyncio_test.py @@ -748,7 +748,7 @@ async def test_free_buffer_after_partition_stop(self, stream, stream_reader, par initial_buffer_size = stream_reader._buffer_size_bytes message_size = initial_buffer_size - 1 - t = datetime.datetime.now() + t = datetime.datetime.now(datetime.timezone.utc) stream.from_server.put_nowait( StreamReadMessage.FromServer( diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index c7f88a42..d759072c 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -307,7 +307,7 @@ def _add_messages_to_send_queue(self, internal_messages: List[InternalMessage]): def _prepare_internal_messages(self, messages: List[PublicMessage]) -> List[InternalMessage]: if self._settings.auto_created_at: - now = datetime.datetime.now() + now = datetime.datetime.now(datetime.timezone.utc) else: now = None diff --git a/ydb/_topic_writer/topic_writer_asyncio_test.py b/ydb/_topic_writer/topic_writer_asyncio_test.py index 8fee5cec..dc3f2cad 100644 --- a/ydb/_topic_writer/topic_writer_asyncio_test.py +++ b/ydb/_topic_writer/topic_writer_asyncio_test.py @@ -132,7 +132,7 @@ async def test_init_writer(self, stream): async def test_write_a_message(self, writer_and_stream: WriterWithMockedStream): data = "123".encode() - now = datetime.datetime.now() + now = datetime.datetime.now(datetime.timezone.utc) writer_and_stream.writer.write( [ InternalMessage( @@ -322,7 +322,7 @@ async def test_reconnect_and_resent_non_acked_messages_on_retriable_error( get_stream_writer, default_write_statistic, ): - now = datetime.datetime.now() + now = datetime.datetime.now(datetime.timezone.utc) data = "123".encode() message1 = PublicMessage( @@ -460,7 +460,7 @@ async def test_deny_double_seqno(self, reconnector: WriterAsyncIOReconnector, ge @freezegun.freeze_time("2022-01-13 20:50:00", tz_offset=0) async def test_auto_created_at(self, default_driver, default_settings, get_stream_writer): - now = datetime.datetime.now() + now = datetime.datetime.now(datetime.timezone.utc) settings = copy.deepcopy(default_settings) settings.auto_created_at = True @@ -587,7 +587,7 @@ async def test_custom_encoder(self, default_driver, default_settings, get_stream settings.codec = codec reconnector = WriterAsyncIOReconnector(default_driver, settings) - now = datetime.datetime.now() + now = datetime.datetime.now(datetime.timezone.utc) seqno = self.init_last_seqno + 1 await reconnector.write_with_ack_future([PublicMessage(data=b"123", seqno=seqno, created_at=now)]) From 46291369434f933d71b9a96601a6f44396db483d Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 11 Dec 2024 11:06:08 +0300 Subject: [PATCH 329/429] Update test requirements --- .gitignore | 1 + test-requirements.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fd366ee5..ac9b9ead 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ ydb.egg-info/ /.vscode /tox /venv +/.venv /ydb_certs /ydb_data /tmp diff --git a/test-requirements.txt b/test-requirements.txt index fcf5779b..787bcf34 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -19,7 +19,7 @@ jsonschema==3.2.0 packaging==21.0 paramiko==2.10.1 pluggy==0.13.1 -protobuf==3.18.3 +protobuf>=3.13.0,<5.0.0 py==1.10.0 pycparser==2.20 PyNaCl==1.4.0 From 60b1920ed9d3086a93b8ce1798c2c8421314f9bb Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 12 Dec 2024 10:14:48 +0300 Subject: [PATCH 330/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7b1996e..10d7e5d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Make created_at utc in topic writer + ## 3.18.10 ## * Update protofiles * Revert "Add backslash to database name if needed" From 647bb2b0b5d774ed47d1d5b183e8201fd7fafaeb Mon Sep 17 00:00:00 2001 From: robot Date: Thu, 12 Dec 2024 07:15:30 +0000 Subject: [PATCH 331/429] Release: 3.18.11 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10d7e5d0..ac96bdc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.11 ## * Make created_at utc in topic writer ## 3.18.10 ## diff --git a/setup.py b/setup.py index 12562d90..78156ee1 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.10", # AUTOVERSION + version="3.18.11", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 6d13618e..c51c9d45 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.10" +VERSION = "3.18.11" From 8787a1ca5437828c889d03851a2c081c34f2db4b Mon Sep 17 00:00:00 2001 From: Pseudolukian Date: Mon, 16 Dec 2024 10:40:53 +0100 Subject: [PATCH 332/429] Add .DS_Store in gitignore and delete note --- .gitignore | 1 + examples/static-credentials/example.py | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index ac9b9ead..9e02a7a6 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ ydb.egg-info/ .coverage /cov_html /build +.DS_Store \ No newline at end of file diff --git a/examples/static-credentials/example.py b/examples/static-credentials/example.py index 7a31e07f..2f042f9e 100644 --- a/examples/static-credentials/example.py +++ b/examples/static-credentials/example.py @@ -27,11 +27,6 @@ def auth_with_static_credentials(endpoint: str, database: str, user: str, passwo user (str): Username. password (str): User password. ca_path (str): Path to CA cert - - Notes: - The argument `root_certificates` of the function `ydb.DriverConfig` takes the content of the cluster's root certificate - for connecting to cluster nodes via TLS. - Note that the VM from which you are connecting must be in the cluster's domain for which the CA certificate is issued. """ driver_config = ydb.DriverConfig( endpoint=endpoint, From 4ea96ce85fdceeab9e48091784cd111b7102c310 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 23 Dec 2024 17:41:03 +0300 Subject: [PATCH 333/429] Fix auth credentials --- tests/aio/test_credentials.py | 3 ++- ydb/_topic_reader/topic_reader_asyncio.py | 5 ++++- ydb/_topic_writer/topic_writer_asyncio.py | 5 ++++- ydb/aio/credentials.py | 14 +++++++++++--- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/tests/aio/test_credentials.py b/tests/aio/test_credentials.py index a6f1d170..5000541c 100644 --- a/tests/aio/test_credentials.py +++ b/tests/aio/test_credentials.py @@ -36,9 +36,10 @@ async def test_yandex_service_account_credentials(): tests.auth.test_credentials.PRIVATE_KEY, server.get_endpoint(), ) - t = (await credentials.auth_metadata())[0][1] + t = await credentials.get_auth_token() assert t == "test_token" assert credentials.get_expire_time() <= 42 + server.stop() diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 6833492d..351efb9a 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -516,7 +516,10 @@ async def _read_messages_loop(self): async def _update_token_loop(self): while True: await asyncio.sleep(self._update_token_interval) - await self._update_token(token=self._get_token_function()) + token = self._get_token_function() + if asyncio.iscoroutine(token): + token = await token + await self._update_token(token=token) async def _update_token(self, token: str): await self._update_token_event.wait() diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index d759072c..869808f7 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -686,7 +686,10 @@ def write(self, messages: List[InternalMessage]): async def _update_token_loop(self): while True: await asyncio.sleep(self._update_token_interval) - await self._update_token(token=self._get_token_function()) + token = self._get_token_function() + if asyncio.iscoroutine(token): + token = await token + await self._update_token(token=token) async def _update_token(self, token: str): await self._update_token_event.wait() diff --git a/ydb/aio/credentials.py b/ydb/aio/credentials.py index 08db1fd0..03c96a37 100644 --- a/ydb/aio/credentials.py +++ b/ydb/aio/credentials.py @@ -1,11 +1,13 @@ -import time - import abc import asyncio import logging -from ydb import issues, credentials +import time + +from ydb import credentials +from ydb import issues logger = logging.getLogger(__name__) +YDB_AUTH_TICKET_HEADER = "x-ydb-auth-ticket" class _OneToManyValue(object): @@ -64,6 +66,12 @@ def __init__(self): async def _make_token_request(self): pass + async def get_auth_token(self) -> str: + for header, token in await self.auth_metadata(): + if header == YDB_AUTH_TICKET_HEADER: + return token + return "" + async def _refresh(self): current_time = time.time() self._log_refresh_start(current_time) From 2b1165e3d4263505d8434338d7fd11554494e244 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 23 Dec 2024 19:02:27 +0300 Subject: [PATCH 334/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac96bdc2..36cff621 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Fix aio auth credentials + ## 3.18.11 ## * Make created_at utc in topic writer From 1e3369b847d436b2c8a66f305ab15325a63441b2 Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 23 Dec 2024 16:03:23 +0000 Subject: [PATCH 335/429] Release: 3.18.12 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36cff621..70162be9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.12 ## * Fix aio auth credentials ## 3.18.11 ## diff --git a/setup.py b/setup.py index 78156ee1..af2ec3ab 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.11", # AUTOVERSION + version="3.18.12", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index c51c9d45..9d48446b 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.11" +VERSION = "3.18.12" From 60a4d87f4e8396d5c51d1f8aa2ce7a5b9cef8c3e Mon Sep 17 00:00:00 2001 From: Bogdan Markov Date: Fri, 20 Dec 2024 10:45:04 +0100 Subject: [PATCH 336/429] Cancel queue get in case of cancel of parent. --- tests/aio/test_session_pool.py | 5 +++++ ydb/aio/table.py | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/aio/test_session_pool.py b/tests/aio/test_session_pool.py index c2875ba3..af1ef351 100644 --- a/tests/aio/test_session_pool.py +++ b/tests/aio/test_session_pool.py @@ -34,10 +34,15 @@ async def test_waiter_is_notified(driver): @pytest.mark.asyncio async def test_no_race_after_future_cancel(driver): pool = ydb.aio.SessionPool(driver, 1) + s = await pool.acquire() waiter = asyncio.ensure_future(pool.acquire()) + await asyncio.sleep(0) waiter.cancel() await pool.release(s) + await asyncio.wait([waiter]) + + assert pool._active_queue.qsize() == 1 s = await pool.acquire() assert s.initialized() await pool.stop() diff --git a/ydb/aio/table.py b/ydb/aio/table.py index aec32e1a..538f498b 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -563,7 +563,14 @@ async def _prepare_session(self, timeout, retry_num) -> ydb.ISession: async def _get_session_from_queue(self, timeout: float): task_wait = asyncio.ensure_future(asyncio.wait_for(self._active_queue.get(), timeout=timeout)) task_should_stop = asyncio.ensure_future(self._should_stop.wait()) - done, _ = await asyncio.wait((task_wait, task_should_stop), return_when=asyncio.FIRST_COMPLETED) + try: + done, _ = await asyncio.wait((task_wait, task_should_stop), return_when=asyncio.FIRST_COMPLETED) + except asyncio.CancelledError: + cancelled = task_wait.cancel() + if not cancelled: + priority, session = task_wait.result() + self._active_queue.put_nowait((priority, session)) + raise if task_should_stop in done: task_wait.cancel() return self._create() From 83a4b48a6f3f32679b5a03ba5a376d66f3fc0b74 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 13 Jan 2025 10:50:52 +0300 Subject: [PATCH 337/429] Fix empty tx_id in tx meta --- ydb/query/transaction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index d9c0dfcb..414401da 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -283,7 +283,7 @@ def _execute_call( ) def _move_to_beginned(self, tx_id: str) -> None: - if self._tx_state._already_in(QueryTxStateEnum.BEGINED): + if self._tx_state._already_in(QueryTxStateEnum.BEGINED) or not tx_id: return self._tx_state._change_state(QueryTxStateEnum.BEGINED) self._tx_state.tx_id = tx_id From 09e9e710759ee668a45454832e653a8735495e5c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 13 Jan 2025 12:19:07 +0300 Subject: [PATCH 338/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70162be9..21573bdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Fix empty tx_id in tx meta + ## 3.18.12 ## * Fix aio auth credentials From cf0c906d028bf14cca93e98c05d528e4bb72eea5 Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 13 Jan 2025 09:20:02 +0000 Subject: [PATCH 339/429] Release: 3.18.13 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21573bdf..63131ca3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.13 ## * Fix empty tx_id in tx meta ## 3.18.12 ## diff --git a/setup.py b/setup.py index af2ec3ab..ec5f8666 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.12", # AUTOVERSION + version="3.18.13", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 9d48446b..8fee5eb5 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.12" +VERSION = "3.18.13" From 91ce98c6862e638677eb8f0d85b58dc815882824 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 13 Jan 2025 16:29:17 +0300 Subject: [PATCH 340/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63131ca3..b3d6b731 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Fix cancel logic during SessionPool.acquire + ## 3.18.13 ## * Fix empty tx_id in tx meta From b92e42837efb08e49d3812d0b4adf9dc860f1637 Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 13 Jan 2025 13:30:02 +0000 Subject: [PATCH 341/429] Release: 3.18.14 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3d6b731..ecd5cf75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.14 ## * Fix cancel logic during SessionPool.acquire ## 3.18.13 ## diff --git a/setup.py b/setup.py index ec5f8666..691fe9c2 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.13", # AUTOVERSION + version="3.18.14", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 8fee5eb5..b40f83ba 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.13" +VERSION = "3.18.14" From e53c0d4e1ffc013abfbae1b4d35a692b70fd4360 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 15 Jan 2025 09:58:43 +0300 Subject: [PATCH 342/429] topic metadata --- examples/topic/basic_example.py | 11 +++++-- ydb/_grpc/grpcwrapper/ydb_topic.py | 9 ++++++ ydb/_topic_reader/datatypes.py | 1 + ydb/_topic_reader/topic_reader_asyncio.py | 1 + .../topic_reader_asyncio_test.py | 7 ++++ ydb/_topic_writer/topic_writer.py | 32 ++++++++++++------- ydb/_topic_writer/topic_writer_asyncio.py | 4 +-- .../topic_writer_asyncio_test.py | 4 +-- 8 files changed, 51 insertions(+), 18 deletions(-) diff --git a/examples/topic/basic_example.py b/examples/topic/basic_example.py index 50dd9a5d..fce1c4b7 100644 --- a/examples/topic/basic_example.py +++ b/examples/topic/basic_example.py @@ -7,9 +7,9 @@ async def connect(endpoint: str, database: str) -> ydb.aio.Driver: config = ydb.DriverConfig(endpoint=endpoint, database=database) - config.credentials = ydb.credentials_from_env_variables() + # config.credentials = ydb.credentials_from_env_variables() driver = ydb.aio.Driver(config) - await driver.wait(15) + await driver.wait(5,fail_fast=True) return driver @@ -25,7 +25,11 @@ async def create_topic(driver: ydb.aio.Driver, topic: str, consumer: str): async def write_messages(driver: ydb.aio.Driver, topic: str): async with driver.topic_client.writer(topic) as writer: for i in range(10): - await writer.write(f"mess-{i}") + mess = ydb.TopicWriterMessage( + data = f"mess-{i}", + metadata_items= {"index": f"{i}"} + ) + await writer.write(mess) await asyncio.sleep(1) @@ -38,6 +42,7 @@ async def read_messages(driver: ydb.aio.Driver, topic: str, consumer: str): print(mess.seqno) print(mess.created_at) print(mess.data.decode()) + print(mess.metadata_items) reader.commit(mess) except asyncio.TimeoutError: return diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index c1789b6c..b001504b 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -208,6 +208,7 @@ class MessageData(IToProto): data: bytes uncompressed_size: int partitioning: "StreamWriteMessage.PartitioningType" + metadata_items: Dict[str, bytes] def to_proto( self, @@ -218,6 +219,11 @@ def to_proto( proto.data = self.data proto.uncompressed_size = self.uncompressed_size + for key, value in self.metadata_items.items(): + # TODO: CHECK + item = ydb_topic_pb2.MetadataItem(key=key, value=value) + proto.metadata_items.append(item) + if self.partitioning is None: pass elif isinstance(self.partitioning, StreamWriteMessage.PartitioningPartitionID): @@ -489,16 +495,19 @@ class MessageData(IFromProto): data: bytes uncompresed_size: int message_group_id: str + metadata_items: Dict[str, bytes] @staticmethod def from_proto( msg: ydb_topic_pb2.StreamReadMessage.ReadResponse.MessageData, ) -> "StreamReadMessage.ReadResponse.MessageData": + metadata_items = {meta.key: meta.value for meta in msg.metadata_items} return StreamReadMessage.ReadResponse.MessageData( offset=msg.offset, seq_no=msg.seq_no, created_at=msg.created_at.ToDatetime(), data=msg.data, + metadata_items=metadata_items, uncompresed_size=msg.uncompressed_size, message_group_id=msg.message_group_id, ) diff --git a/ydb/_topic_reader/datatypes.py b/ydb/_topic_reader/datatypes.py index 01501638..a9c811ac 100644 --- a/ydb/_topic_reader/datatypes.py +++ b/ydb/_topic_reader/datatypes.py @@ -40,6 +40,7 @@ class PublicMessage(ICommittable, ISessionAlive): written_at: datetime.datetime producer_id: str data: Union[bytes, Any] # set as original decompressed bytes or deserialized object if deserializer set in reader + metadata_items: Dict[str, bytes] _partition_session: PartitionSession _commit_start_offset: int _commit_end_offset: int diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 351efb9a..e407fe01 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -627,6 +627,7 @@ def _read_response_to_batches(self, message: StreamReadMessage.ReadResponse) -> written_at=server_batch.written_at, producer_id=server_batch.producer_id, data=message_data.data, + metadata_items=message_data.metadata_items, _partition_session=partition_session, _commit_start_offset=partition_session._next_message_start_commit_offset, _commit_end_offset=message_data.offset + 1, diff --git a/ydb/_topic_reader/topic_reader_asyncio_test.py b/ydb/_topic_reader/topic_reader_asyncio_test.py index b9f1e639..072d8415 100644 --- a/ydb/_topic_reader/topic_reader_asyncio_test.py +++ b/ydb/_topic_reader/topic_reader_asyncio_test.py @@ -74,6 +74,7 @@ def stub_message(id: int): written_at=datetime.datetime(2023, 3, 18, 14, 15), producer_id="", data=bytes(), + metadata_items={}, _partition_session=stub_partition_session(), _commit_start_offset=0, _commit_end_offset=1, @@ -445,6 +446,7 @@ async def test_commit_ranges_for_received_messages( written_at=datetime.datetime(2023, 3, 14, 15, 42), producer_id="asd", data=rb"123", + metadata_items={}, _partition_session=None, _commit_start_offset=5, _commit_end_offset=15, @@ -468,6 +470,7 @@ async def test_commit_ranges_for_received_messages( written_at=datetime.datetime(2023, 3, 14, 15, 42), producer_id="asd", data=gzip.compress(rb"123"), + metadata_items={}, _partition_session=None, _commit_start_offset=5, _commit_end_offset=15, @@ -490,6 +493,7 @@ async def test_commit_ranges_for_received_messages( offset=1, written_at=datetime.datetime(2023, 3, 14, 15, 42), producer_id="asd", + metadata_items={}, data=rb"123", _partition_session=None, _commit_start_offset=5, @@ -504,6 +508,7 @@ async def test_commit_ranges_for_received_messages( written_at=datetime.datetime(2023, 3, 14, 15, 42), producer_id="asd", data=rb"456", + metadata_items={}, _partition_session=None, _commit_start_offset=5, _commit_end_offset=15, @@ -527,6 +532,7 @@ async def test_commit_ranges_for_received_messages( written_at=datetime.datetime(2023, 3, 14, 15, 42), producer_id="asd", data=gzip.compress(rb"123"), + metadata_items={}, _partition_session=None, _commit_start_offset=5, _commit_end_offset=15, @@ -540,6 +546,7 @@ async def test_commit_ranges_for_received_messages( written_at=datetime.datetime(2023, 3, 14, 15, 42), producer_id="asd", data=gzip.compress(rb"456"), + metadata_items={}, _partition_session=None, _commit_start_offset=5, _commit_end_offset=15, diff --git a/ydb/_topic_writer/topic_writer.py b/ydb/_topic_writer/topic_writer.py index 527bf03e..8fa5fd48 100644 --- a/ydb/_topic_writer/topic_writer.py +++ b/ydb/_topic_writer/topic_writer.py @@ -15,7 +15,7 @@ from .._grpc.grpcwrapper.ydb_topic_public_types import PublicCodec from .. import connection -Message = typing.Union["PublicMessage", "PublicMessage.SimpleMessageSourceType"] +Message = typing.Union["PublicMessage", "PublicMessage.SimpleSourceType"] @dataclass @@ -91,20 +91,23 @@ class PublicWriterInitInfo: class PublicMessage: seqno: Optional[int] created_at: Optional[datetime.datetime] - data: "PublicMessage.SimpleMessageSourceType" + data: "PublicMessage.SimpleSourceType" + metadata_items: Optional[Dict[str, "PublicMessage.SimpleSourceType"]] - SimpleMessageSourceType = Union[str, bytes] # Will be extend + SimpleSourceType = Union[str, bytes] # Will be extend def __init__( self, - data: SimpleMessageSourceType, + data: SimpleSourceType, *, + metadata_items: Optional[Dict[str, "PublicMessage.SimpleSourceType"]] = None, seqno: Optional[int] = None, created_at: Optional[datetime.datetime] = None, ): self.seqno = seqno self.created_at = created_at self.data = data + self.metadata_items = metadata_items @staticmethod def _create_message(data: Message) -> "PublicMessage": @@ -121,26 +124,32 @@ def __init__(self, mess: PublicMessage): seq_no=mess.seqno, created_at=mess.created_at, data=mess.data, + metadata_items=mess.metadata_items, uncompressed_size=len(mess.data), partitioning=None, ) self.codec = PublicCodec.RAW - def get_bytes(self) -> bytes: - if self.data is None: + def _get_bytes(self, obj: Optional[PublicMessage.SimpleSourceType]) -> bytes: + if obj is None: return bytes() - if isinstance(self.data, bytes): - return self.data - if isinstance(self.data, str): - return self.data.encode("utf-8") + if isinstance(obj, bytes): + return obj + if isinstance(obj, str): + return obj.encode("utf-8") raise ValueError("Bad data type") + def get_data_bytes(self) -> bytes: + return self._get_bytes(self.data) + def to_message_data(self) -> StreamWriteMessage.WriteRequest.MessageData: - data = self.get_bytes() + data = self.get_data_bytes() + metadata_items = {key: self._get_bytes(value) for key, value in self.metadata_items.items()} return StreamWriteMessage.WriteRequest.MessageData( seq_no=self.seq_no, created_at=self.created_at, data=data, + metadata_items=metadata_items, uncompressed_size=len(data), partitioning=None, # unsupported by server now ) @@ -221,6 +230,7 @@ def messages_to_proto_requests( seq_no=_max_int, created_at=datetime.datetime(3000, 1, 1, 1, 1, 1, 1), data=bytes(1), + metadata_items={}, uncompressed_size=_max_int, partitioning=StreamWriteMessage.PartitioningMessageGroupID( message_group_id="a" * 100, diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index 869808f7..32d8fefe 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -427,7 +427,7 @@ async def _encode_data_inplace(self, codec: PublicCodec, messages: List[Internal for message in messages: encoded_data_futures = eventloop.run_in_executor( - self._encode_executor, encoder_function, message.get_bytes() + self._encode_executor, encoder_function, message.get_data_bytes() ) encode_waiters.append(encoded_data_futures) @@ -493,7 +493,7 @@ def get_compressed_size(codec) -> int: f = self._codec_functions[codec] for m in test_messages: - encoded = f(m.get_bytes()) + encoded = f(m.get_data_bytes()) s += len(encoded) return s diff --git a/ydb/_topic_writer/topic_writer_asyncio_test.py b/ydb/_topic_writer/topic_writer_asyncio_test.py index dc3f2cad..8b320f23 100644 --- a/ydb/_topic_writer/topic_writer_asyncio_test.py +++ b/ydb/_topic_writer/topic_writer_asyncio_test.py @@ -544,7 +544,7 @@ def add_messages(_self, messages: typing.List[InternalMessage]): mess = mess[0] assert mess.codec == expected_codecs[i] - assert mess.get_bytes() == expected_datas[i] + assert mess.get_data_bytes() == expected_datas[i] await reconnector.close(flush=False) @@ -575,7 +575,7 @@ async def test_encode_data_inplace( for index, mess in enumerate(messages): assert mess.codec == codec - assert mess.get_bytes() == expected_datas[index] + assert mess.get_data_bytes() == expected_datas[index] await reconnector.close(flush=True) From 859f24f13158c4aa79e3d748ccd013736cb37474 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 15 Jan 2025 09:58:43 +0300 Subject: [PATCH 343/429] lint fixes --- examples/topic/basic_example.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/topic/basic_example.py b/examples/topic/basic_example.py index fce1c4b7..580d68b0 100644 --- a/examples/topic/basic_example.py +++ b/examples/topic/basic_example.py @@ -9,7 +9,7 @@ async def connect(endpoint: str, database: str) -> ydb.aio.Driver: config = ydb.DriverConfig(endpoint=endpoint, database=database) # config.credentials = ydb.credentials_from_env_variables() driver = ydb.aio.Driver(config) - await driver.wait(5,fail_fast=True) + await driver.wait(5, fail_fast=True) return driver @@ -25,10 +25,7 @@ async def create_topic(driver: ydb.aio.Driver, topic: str, consumer: str): async def write_messages(driver: ydb.aio.Driver, topic: str): async with driver.topic_client.writer(topic) as writer: for i in range(10): - mess = ydb.TopicWriterMessage( - data = f"mess-{i}", - metadata_items= {"index": f"{i}"} - ) + mess = ydb.TopicWriterMessage(data=f"mess-{i}", metadata_items={"index": f"{i}"}) await writer.write(mess) await asyncio.sleep(1) From 3e6defb5f70730d60751ab0ec90ac1d9b4e64fa9 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 15 Jan 2025 09:58:43 +0300 Subject: [PATCH 344/429] add tests --- tests/conftest.py | 25 ++++++++++++++++ tests/topics/test_topic_reader.py | 29 +++++++++++++++++++ tests/topics/test_topic_writer.py | 10 +++++++ .../topic_reader_asyncio_test.py | 13 +++++++++ ydb/_topic_writer/topic_writer.py | 3 +- .../topic_writer_asyncio_test.py | 1 + 6 files changed, 80 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 51b265d7..a8177f46 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -263,6 +263,31 @@ async def topic_with_messages(driver, topic_consumer, database): return topic_path +@pytest.fixture() +@pytest.mark.asyncio() +async def topic_with_messages_with_metadata(driver, topic_consumer, database): + topic_path = database + "/test-topic-with-messages-with-metadata" + try: + await driver.topic_client.drop_topic(topic_path) + except issues.SchemeError: + pass + + await driver.topic_client.create_topic( + path=topic_path, + consumers=[topic_consumer], + ) + + writer = driver.topic_client.writer(topic_path, producer_id="fixture-producer-id", codec=ydb.TopicCodec.RAW) + await writer.write_with_ack( + [ + ydb.TopicWriterMessage(data="123".encode(), metadata_items={"key": "value"}), + ydb.TopicWriterMessage(data="456".encode(), metadata_items={"key": b"value"}), + ] + ) + await writer.close() + return topic_path + + @pytest.fixture() @pytest.mark.asyncio() async def topic_reader(driver, topic_consumer, topic_path) -> ydb.TopicReaderAsyncIO: diff --git a/tests/topics/test_topic_reader.py b/tests/topics/test_topic_reader.py index 74c8bccd..23b5b4be 100644 --- a/tests/topics/test_topic_reader.py +++ b/tests/topics/test_topic_reader.py @@ -30,6 +30,21 @@ async def test_read_message(self, driver, topic_with_messages, topic_consumer): await reader.close() + async def test_read_metadata(self, driver, topic_with_messages_with_metadata, topic_consumer): + reader = driver.topic_client.reader(topic_with_messages_with_metadata, topic_consumer) + + expected_metadata_items = {"key": b"value"} + + for _ in range(2): + await reader.wait_message() + msg = await reader.receive_message() + + assert msg is not None + assert msg.metadata_items + assert msg.metadata_items == expected_metadata_items + + await reader.close() + async def test_read_and_commit_with_close_reader(self, driver, topic_with_messages, topic_consumer): async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: message = await reader.receive_message() @@ -135,6 +150,20 @@ def test_read_message(self, driver_sync, topic_with_messages, topic_consumer): reader.close() + def test_read_metadata(self, driver_sync, topic_with_messages_with_metadata, topic_consumer): + reader = driver_sync.topic_client.reader(topic_with_messages_with_metadata, topic_consumer) + + expected_metadata_items = {"key": b"value"} + + for _ in range(2): + msg = reader.receive_message() + + assert msg is not None + assert msg.metadata_items + assert msg.metadata_items == expected_metadata_items + + reader.close() + def test_read_and_commit_with_close_reader(self, driver_sync, topic_with_messages, topic_consumer): with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: message = reader.receive_message() diff --git a/tests/topics/test_topic_writer.py b/tests/topics/test_topic_writer.py index a3cdbe9d..ba5ae74c 100644 --- a/tests/topics/test_topic_writer.py +++ b/tests/topics/test_topic_writer.py @@ -15,6 +15,11 @@ async def test_send_message(self, driver: ydb.aio.Driver, topic_path): await writer.write(ydb.TopicWriterMessage(data="123".encode())) await writer.close() + async def test_send_message_with_metadata(self, driver: ydb.aio.Driver, topic_path): + writer = driver.topic_client.writer(topic_path, producer_id="test") + await writer.write(ydb.TopicWriterMessage(data="123".encode(), metadata_items={"key": "value"})) + await writer.close() + async def test_wait_last_seqno(self, driver: ydb.aio.Driver, topic_path): async with driver.topic_client.writer( topic_path, @@ -136,6 +141,11 @@ def test_send_message(self, driver_sync: ydb.Driver, topic_path): writer.write(ydb.TopicWriterMessage(data="123".encode())) writer.close() + def test_send_message_with_metadata(self, driver_sync: ydb.Driver, topic_path): + writer = driver_sync.topic_client.writer(topic_path, producer_id="test") + writer.write(ydb.TopicWriterMessage(data="123".encode(), metadata_items={"key": "value"})) + writer.close() + def test_wait_last_seqno(self, driver_sync: ydb.Driver, topic_path): with driver_sync.topic_client.writer( topic_path, diff --git a/ydb/_topic_reader/topic_reader_asyncio_test.py b/ydb/_topic_reader/topic_reader_asyncio_test.py index 072d8415..25e08029 100644 --- a/ydb/_topic_reader/topic_reader_asyncio_test.py +++ b/ydb/_topic_reader/topic_reader_asyncio_test.py @@ -208,6 +208,7 @@ def create_message( written_at=datetime.datetime(2023, 2, 3, 14, 16), producer_id="test-producer-id", data=bytes(), + metadata_items={}, _partition_session=partition_session, _commit_start_offset=partition_session._next_message_start_commit_offset + offset_delta - 1, _commit_end_offset=partition_session._next_message_start_commit_offset + offset_delta, @@ -251,6 +252,7 @@ def batch_size(): seq_no=message.seqno, created_at=message.created_at, data=message.data, + metadata_items={}, uncompresed_size=len(message.data), message_group_id=message.message_group_id, ) @@ -773,6 +775,7 @@ async def test_free_buffer_after_partition_stop(self, stream, stream_reader, par seq_no=123, created_at=t, data=bytes(), + metadata_items={}, uncompresed_size=message_size, message_group_id="test-message-group", ) @@ -853,6 +856,7 @@ def reader_batch_count(): created_at=created_at, data=data, uncompresed_size=len(data), + metadata_items={}, message_group_id=message_group_id, ) ], @@ -884,6 +888,7 @@ def reader_batch_count(): written_at=written_at, producer_id=producer_id, data=data, + metadata_items={}, _partition_session=partition_session, _commit_start_offset=expected_message_offset, _commit_end_offset=expected_message_offset + 1, @@ -930,6 +935,7 @@ async def test_read_batches(self, stream_reader, partition_session, second_parti seq_no=3, created_at=created_at, data=data, + metadata_items={}, uncompresed_size=len(data), message_group_id=message_group_id, ) @@ -951,6 +957,7 @@ async def test_read_batches(self, stream_reader, partition_session, second_parti seq_no=2, created_at=created_at2, data=data, + metadata_items={}, uncompresed_size=len(data), message_group_id=message_group_id, ) @@ -967,6 +974,7 @@ async def test_read_batches(self, stream_reader, partition_session, second_parti seq_no=3, created_at=created_at3, data=data2, + metadata_items={}, uncompresed_size=len(data2), message_group_id=message_group_id, ), @@ -975,6 +983,7 @@ async def test_read_batches(self, stream_reader, partition_session, second_parti seq_no=5, created_at=created_at4, data=data, + metadata_items={}, uncompresed_size=len(data), message_group_id=message_group_id2, ), @@ -1005,6 +1014,7 @@ async def test_read_batches(self, stream_reader, partition_session, second_parti written_at=written_at, producer_id=producer_id, data=data, + metadata_items={}, _partition_session=partition_session, _commit_start_offset=partition1_mess1_expected_offset, _commit_end_offset=partition1_mess1_expected_offset + 1, @@ -1025,6 +1035,7 @@ async def test_read_batches(self, stream_reader, partition_session, second_parti written_at=written_at2, producer_id=producer_id, data=data, + metadata_items={}, _partition_session=second_partition_session, _commit_start_offset=partition2_mess1_expected_offset, _commit_end_offset=partition2_mess1_expected_offset + 1, @@ -1045,6 +1056,7 @@ async def test_read_batches(self, stream_reader, partition_session, second_parti written_at=written_at2, producer_id=producer_id2, data=data2, + metadata_items={}, _partition_session=second_partition_session, _commit_start_offset=partition2_mess2_expected_offset, _commit_end_offset=partition2_mess2_expected_offset + 1, @@ -1058,6 +1070,7 @@ async def test_read_batches(self, stream_reader, partition_session, second_parti written_at=written_at2, producer_id=producer_id, data=data, + metadata_items={}, _partition_session=second_partition_session, _commit_start_offset=partition2_mess3_expected_offset, _commit_end_offset=partition2_mess3_expected_offset + 1, diff --git a/ydb/_topic_writer/topic_writer.py b/ydb/_topic_writer/topic_writer.py index 8fa5fd48..aa5fe974 100644 --- a/ydb/_topic_writer/topic_writer.py +++ b/ydb/_topic_writer/topic_writer.py @@ -120,11 +120,12 @@ class InternalMessage(StreamWriteMessage.WriteRequest.MessageData, IToProto): codec: PublicCodec def __init__(self, mess: PublicMessage): + metadata_items = mess.metadata_items or {} super().__init__( seq_no=mess.seqno, created_at=mess.created_at, data=mess.data, - metadata_items=mess.metadata_items, + metadata_items=metadata_items, uncompressed_size=len(mess.data), partitioning=None, ) diff --git a/ydb/_topic_writer/topic_writer_asyncio_test.py b/ydb/_topic_writer/topic_writer_asyncio_test.py index 8b320f23..b288d0f0 100644 --- a/ydb/_topic_writer/topic_writer_asyncio_test.py +++ b/ydb/_topic_writer/topic_writer_asyncio_test.py @@ -153,6 +153,7 @@ async def test_write_a_message(self, writer_and_stream: WriterWithMockedStream): seq_no=1, created_at=now, data=data, + metadata_items={}, uncompressed_size=len(data), partitioning=None, ) From b1273fc5c87244d25f82719f8355c0549330fdd3 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 15 Jan 2025 10:37:01 +0300 Subject: [PATCH 345/429] remove temporary lines --- examples/topic/basic_example.py | 2 +- ydb/_grpc/grpcwrapper/ydb_topic.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/topic/basic_example.py b/examples/topic/basic_example.py index 580d68b0..18e9626f 100644 --- a/examples/topic/basic_example.py +++ b/examples/topic/basic_example.py @@ -7,7 +7,7 @@ async def connect(endpoint: str, database: str) -> ydb.aio.Driver: config = ydb.DriverConfig(endpoint=endpoint, database=database) - # config.credentials = ydb.credentials_from_env_variables() + config.credentials = ydb.credentials_from_env_variables() driver = ydb.aio.Driver(config) await driver.wait(5, fail_fast=True) return driver diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index b001504b..ec84ab08 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -220,7 +220,6 @@ def to_proto( proto.uncompressed_size = self.uncompressed_size for key, value in self.metadata_items.items(): - # TODO: CHECK item = ydb_topic_pb2.MetadataItem(key=key, value=value) proto.metadata_items.append(item) From 7da0986bda52412f2ea86f6bf8c0b00cfb6a1410 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 15 Jan 2025 11:02:44 +0300 Subject: [PATCH 346/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecd5cf75..3ccaf78f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Topic metadata feature + ## 3.18.14 ## * Fix cancel logic during SessionPool.acquire From 228bb52205284413dc3ccecc9467f8d5df4f08b6 Mon Sep 17 00:00:00 2001 From: robot Date: Wed, 15 Jan 2025 08:03:28 +0000 Subject: [PATCH 347/429] Release: 3.18.15 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ccaf78f..485ba312 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.15 ## * Topic metadata feature ## 3.18.14 ## diff --git a/setup.py b/setup.py index 691fe9c2..a7b2b290 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.14", # AUTOVERSION + version="3.18.15", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index b40f83ba..bdc80c21 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.14" +VERSION = "3.18.15" From 030275bb4e02c52e57e1c93db539c9674b17ed98 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 21 Jan 2025 14:04:41 +0300 Subject: [PATCH 348/429] Transactional retryer --- tests/aio/query/test_query_session_pool.py | 34 +++++++++++++++++++++ tests/query/test_query_session_pool.py | 32 ++++++++++++++++++++ ydb/aio/query/pool.py | 35 ++++++++++++++++++++++ ydb/query/pool.py | 35 ++++++++++++++++++++++ 4 files changed, 136 insertions(+) diff --git a/tests/aio/query/test_query_session_pool.py b/tests/aio/query/test_query_session_pool.py index 26b12082..2bf4100b 100644 --- a/tests/aio/query/test_query_session_pool.py +++ b/tests/aio/query/test_query_session_pool.py @@ -1,8 +1,12 @@ import asyncio import pytest import ydb + +from typing import Optional + from ydb.aio.query.pool import QuerySessionPool from ydb.aio.query.session import QuerySession, QuerySessionStateEnum +from ydb.aio.query.transaction import QueryTxContext class TestQuerySessionPool: @@ -55,6 +59,36 @@ async def callee(session: QuerySession): with pytest.raises(CustomException): await pool.retry_operation_async(callee) + @pytest.mark.parametrize( + "tx_mode", + [ + (None), + (ydb.QuerySerializableReadWrite()), + (ydb.QuerySnapshotReadOnly()), + (ydb.QueryOnlineReadOnly()), + (ydb.QueryStaleReadOnly()), + ], + ) + @pytest.mark.asyncio + async def test_retry_tx_normal(self, pool: QuerySessionPool, tx_mode: Optional[ydb.BaseQueryTxMode]): + async def callee(tx: QueryTxContext): + result_stream = await tx.execute("SELECT 1") + return [result_set async for result_set in result_stream] + + result = await pool.retry_tx_async(callee=callee, tx_mode=tx_mode) + assert len(result) == 1 + + @pytest.mark.asyncio + async def test_retry_tx_raises(self, pool: QuerySessionPool): + class CustomException(Exception): + pass + + async def callee(tx: QueryTxContext): + raise CustomException() + + with pytest.raises(CustomException): + await pool.retry_tx_async(callee) + @pytest.mark.asyncio async def test_pool_size_limit_logic(self, pool: QuerySessionPool): target_size = 5 diff --git a/tests/query/test_query_session_pool.py b/tests/query/test_query_session_pool.py index cb476fa8..b22f6092 100644 --- a/tests/query/test_query_session_pool.py +++ b/tests/query/test_query_session_pool.py @@ -1,7 +1,11 @@ import pytest import ydb + +from typing import Optional + from ydb.query.pool import QuerySessionPool from ydb.query.session import QuerySession, QuerySessionStateEnum +from ydb.query.transaction import QueryTxContext class TestQuerySessionPool: @@ -46,6 +50,34 @@ def callee(session: QuerySession): with pytest.raises(CustomException): pool.retry_operation_sync(callee) + @pytest.mark.parametrize( + "tx_mode", + [ + (None), + (ydb.QuerySerializableReadWrite()), + (ydb.QuerySnapshotReadOnly()), + (ydb.QueryOnlineReadOnly()), + (ydb.QueryStaleReadOnly()), + ], + ) + def test_retry_tx_normal(self, pool: QuerySessionPool, tx_mode: Optional[ydb.BaseQueryTxMode]): + def callee(tx: QueryTxContext): + result_stream = tx.execute("SELECT 1") + return [result_set for result_set in result_stream] + + result = pool.retry_tx_sync(callee=callee, tx_mode=tx_mode) + assert len(result) == 1 + + def test_retry_tx_raises(self, pool: QuerySessionPool): + class CustomException(Exception): + pass + + def callee(tx: QueryTxContext): + raise CustomException() + + with pytest.raises(CustomException): + pool.retry_tx_sync(callee) + def test_pool_size_limit_logic(self, pool: QuerySessionPool): target_size = 5 pool._size = target_size diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 456896db..f6a84eb0 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -13,9 +13,11 @@ RetrySettings, retry_operation_async, ) +from ...query.base import BaseQueryTxMode from ...query.base import QueryClientSettings from ... import convert from ..._grpc.grpcwrapper import common_utils +from ..._grpc.grpcwrapper import ydb_query_public_types as _ydb_query_public logger = logging.getLogger(__name__) @@ -122,6 +124,39 @@ async def wrapped_callee(): return await retry_operation_async(wrapped_callee, retry_settings) + async def retry_tx_async( + self, + callee: Callable, + tx_mode: Optional[BaseQueryTxMode] = None, + retry_settings: Optional[RetrySettings] = None, + *args, + **kwargs, + ): + """Special interface to execute a bunch of commands with transaction in a safe, retriable way. + + :param callee: A function, that works with session. + :param tx_mode: Transaction mode, which is a one from the following choises: + 1) QuerySerializableReadWrite() which is default mode; + 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); + 3) QuerySnapshotReadOnly(); + 4) QueryStaleReadOnly(). + :param retry_settings: RetrySettings object. + + :return: Result sets or exception in case of execution errors. + """ + + tx_mode = tx_mode if tx_mode else _ydb_query_public.QuerySerializableReadWrite() + retry_settings = RetrySettings() if retry_settings is None else retry_settings + + async def wrapped_callee(): + async with self.checkout() as session: + async with session.transaction(tx_mode=tx_mode) as tx: + result = await callee(tx, *args, **kwargs) + await tx.commit() + return result + + return await retry_operation_async(wrapped_callee, retry_settings) + async def execute_with_retries( self, query: str, diff --git a/ydb/query/pool.py b/ydb/query/pool.py index f1fcd173..e3775c4d 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -8,6 +8,7 @@ import threading import queue +from .base import BaseQueryTxMode from .base import QueryClientSettings from .session import ( QuerySession, @@ -20,6 +21,7 @@ from .. import convert from ..settings import BaseRequestSettings from .._grpc.grpcwrapper import common_utils +from .._grpc.grpcwrapper import ydb_query_public_types as _ydb_query_public logger = logging.getLogger(__name__) @@ -138,6 +140,39 @@ def wrapped_callee(): return retry_operation_sync(wrapped_callee, retry_settings) + def retry_tx_sync( + self, + callee: Callable, + tx_mode: Optional[BaseQueryTxMode] = None, + retry_settings: Optional[RetrySettings] = None, + *args, + **kwargs, + ): + """Special interface to execute a bunch of commands with transaction in a safe, retriable way. + + :param callee: A function, that works with session. + :param tx_mode: Transaction mode, which is a one from the following choises: + 1) QuerySerializableReadWrite() which is default mode; + 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); + 3) QuerySnapshotReadOnly(); + 4) QueryStaleReadOnly(). + :param retry_settings: RetrySettings object. + + :return: Result sets or exception in case of execution errors. + """ + + tx_mode = tx_mode if tx_mode else _ydb_query_public.QuerySerializableReadWrite() + retry_settings = RetrySettings() if retry_settings is None else retry_settings + + def wrapped_callee(): + with self.checkout(timeout=retry_settings.max_session_acquire_timeout) as session: + with session.transaction(tx_mode=tx_mode) as tx: + result = callee(tx, *args, **kwargs) + tx.commit() + return result + + return retry_operation_sync(wrapped_callee, retry_settings) + def execute_with_retries( self, query: str, From ba5c216fb85f8e3a6c178bf8c79dfdab2db34818 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 23 Jan 2025 13:54:12 +0300 Subject: [PATCH 349/429] add retry logic to normal case tests --- tests/aio/query/test_query_session_pool.py | 7 +++++++ tests/query/test_query_session_pool.py | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/tests/aio/query/test_query_session_pool.py b/tests/aio/query/test_query_session_pool.py index 2bf4100b..f86ff3ed 100644 --- a/tests/aio/query/test_query_session_pool.py +++ b/tests/aio/query/test_query_session_pool.py @@ -71,12 +71,19 @@ async def callee(session: QuerySession): ) @pytest.mark.asyncio async def test_retry_tx_normal(self, pool: QuerySessionPool, tx_mode: Optional[ydb.BaseQueryTxMode]): + retry_no = 0 + async def callee(tx: QueryTxContext): + nonlocal retry_no + if retry_no < 2: + retry_no += 1 + raise ydb.Unavailable("Fake fast backoff error") result_stream = await tx.execute("SELECT 1") return [result_set async for result_set in result_stream] result = await pool.retry_tx_async(callee=callee, tx_mode=tx_mode) assert len(result) == 1 + assert retry_no == 2 @pytest.mark.asyncio async def test_retry_tx_raises(self, pool: QuerySessionPool): diff --git a/tests/query/test_query_session_pool.py b/tests/query/test_query_session_pool.py index b22f6092..4c88ae77 100644 --- a/tests/query/test_query_session_pool.py +++ b/tests/query/test_query_session_pool.py @@ -61,12 +61,19 @@ def callee(session: QuerySession): ], ) def test_retry_tx_normal(self, pool: QuerySessionPool, tx_mode: Optional[ydb.BaseQueryTxMode]): + retry_no = 0 + def callee(tx: QueryTxContext): + nonlocal retry_no + if retry_no < 2: + retry_no += 1 + raise ydb.Unavailable("Fake fast backoff error") result_stream = tx.execute("SELECT 1") return [result_set for result_set in result_stream] result = pool.retry_tx_sync(callee=callee, tx_mode=tx_mode) assert len(result) == 1 + assert retry_no == 2 def test_retry_tx_raises(self, pool: QuerySessionPool): class CustomException(Exception): From 213253faa21a8ab8e1924e70b3dc8021eafd2472 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 27 Jan 2025 12:31:31 +0300 Subject: [PATCH 350/429] Partition autosplit feature --- ydb/_grpc/grpcwrapper/ydb_topic.py | 24 +++++++++++++++++++++++ ydb/_topic_reader/topic_reader.py | 2 ++ ydb/_topic_reader/topic_reader_asyncio.py | 9 +++++++++ 3 files changed, 35 insertions(+) diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index ec84ab08..f8c45d2e 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -419,12 +419,14 @@ def from_proto( class InitRequest(IToProto): topics_read_settings: List["StreamReadMessage.InitRequest.TopicReadSettings"] consumer: str + auto_partitioning_support: bool = False def to_proto(self) -> ydb_topic_pb2.StreamReadMessage.InitRequest: res = ydb_topic_pb2.StreamReadMessage.InitRequest() res.consumer = self.consumer for settings in self.topics_read_settings: res.topics_read_settings.append(settings.to_proto()) + res.auto_partitioning_support = self.auto_partitioning_support return res @dataclass @@ -696,6 +698,20 @@ def to_proto(self) -> ydb_topic_pb2.StreamReadMessage.StopPartitionSessionRespon partition_session_id=self.partition_session_id, ) + @dataclass + class EndPartitionSession(IFromProto): + partition_session_id: int + adjacent_partition_ids: List[int] + child_partition_ids: List[int] + + @staticmethod + def from_proto(msg: ydb_topic_pb2.StreamReadMessage.EndPartitionSession): + return StreamReadMessage.EndPartitionSession( + partition_session_id=msg.partition_session_id, + adjacent_partition_ids=list(msg.adjacent_partition_ids), + child_partition_ids=list(msg.child_partition_ids), + ) + @dataclass class FromClient(IToProto): client_message: "ReaderMessagesFromClientToServer" @@ -775,6 +791,13 @@ def from_proto( msg.partition_session_status_response ), ) + elif mess_type == "end_partition_session": + return StreamReadMessage.FromServer( + server_status=server_status, + server_message=StreamReadMessage.EndPartitionSession.from_proto( + msg.end_partition_session, + ), + ) else: raise issues.UnexpectedGrpcMessage( "Unexpected message while parse ReaderMessagesFromServerToClient: '%s'" % mess_type @@ -799,6 +822,7 @@ def from_proto( UpdateTokenResponse, StreamReadMessage.StartPartitionSessionRequest, StreamReadMessage.StopPartitionSessionRequest, + StreamReadMessage.EndPartitionSession, ] diff --git a/ydb/_topic_reader/topic_reader.py b/ydb/_topic_reader/topic_reader.py index b907ee27..699e2417 100644 --- a/ydb/_topic_reader/topic_reader.py +++ b/ydb/_topic_reader/topic_reader.py @@ -45,6 +45,7 @@ class PublicReaderSettings: consumer: str topic: TopicSelectorTypes buffer_size_bytes: int = 50 * 1024 * 1024 + auto_partitioning_support: bool = False decoders: Union[Mapping[int, Callable[[bytes], bytes]], None] = None """decoders: map[codec_code] func(encoded_bytes)->decoded_bytes""" @@ -77,6 +78,7 @@ def _init_message(self) -> StreamReadMessage.InitRequest: return StreamReadMessage.InitRequest( topics_read_settings=list(map(PublicTopicSelector._to_topic_read_settings, selectors)), # type: ignore consumer=self.consumer, + auto_partitioning_support=self.auto_partitioning_support, ) def _retry_settings(self) -> RetrySettings: diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index e407fe01..6545a451 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -498,6 +498,12 @@ async def _read_messages_loop(self): ): self._on_partition_session_stop(message.server_message) + elif isinstance( + message.server_message, + StreamReadMessage.EndPartitionSession, + ): + self._on_end_partition_session(message.server_message) + elif isinstance(message.server_message, UpdateTokenResponse): self._update_token_event.set() @@ -575,6 +581,9 @@ def _on_partition_session_stop(self, message: StreamReadMessage.StopPartitionSes ) ) + def _on_end_partition_session(self, message: StreamReadMessage.EndPartitionSession): + logger.debug(f"End partition session with id: {message.partition_session_id}") + def _on_read_response(self, message: StreamReadMessage.ReadResponse): self._buffer_consume_bytes(message.bytes_size) From 7c607f5a1aee1ebb175e38ebe632b31644d67bc0 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 31 Jan 2025 10:49:43 +0300 Subject: [PATCH 351/429] Auto partitioning settings to public api --- ydb/_grpc/grpcwrapper/ydb_topic.py | 171 ++++++++++++++++++ .../grpcwrapper/ydb_topic_public_types.py | 33 ++++ ydb/_topic_reader/topic_reader_asyncio.py | 2 +- ydb/topic.py | 11 ++ 4 files changed, 216 insertions(+), 1 deletion(-) diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index f8c45d2e..3d54af39 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -967,18 +967,123 @@ def from_public(alter_consumer: ydb_topic_public_types.PublicAlterConsumer) -> A class PartitioningSettings(IToProto, IFromProto): min_active_partitions: int partition_count_limit: int + max_active_partitions: int + auto_partitioning_settings: AutoPartitioningSettings @staticmethod def from_proto(msg: ydb_topic_pb2.PartitioningSettings) -> "PartitioningSettings": return PartitioningSettings( min_active_partitions=msg.min_active_partitions, partition_count_limit=msg.partition_count_limit, + max_active_partitions=msg.max_active_partitions, + auto_partitioning_settings=AutoPartitioningSettings.from_proto( + msg.auto_partitioning_settings + ), ) def to_proto(self) -> ydb_topic_pb2.PartitioningSettings: return ydb_topic_pb2.PartitioningSettings( min_active_partitions=self.min_active_partitions, partition_count_limit=self.partition_count_limit, + max_active_partitions=self.max_active_partitions, + auto_partitioning_settings=self.auto_partitioning_settings.to_proto() + ) + + +class AutoPartitioningStrategy(int, IFromProto, IFromPublic, IToPublic): + UNSPECIFIED = 0 + DISABLED = 1 + SCALE_UP = 2 + SCALE_UP_AND_DOWN = 3 + PAUSED = 4 + + @staticmethod + def from_public( + strategy: Optional[ydb_topic_public_types.PublicAutoPartitioningStrategy], + ) -> Optional["AutoPartitioningStrategy"]: + if strategy is None: + return None + + return AutoPartitioningStrategy(strategy) + + @staticmethod + def from_proto(code: Optional[int]) -> Optional["AutoPartitioningStrategy"]: + if code is None: + return None + + return AutoPartitioningStrategy(code) + + def to_public(self) -> ydb_topic_public_types.PublicAutoPartitioningStrategy: + try: + ydb_topic_public_types.PublicAutoPartitioningStrategy(int(self)) + except KeyError: + return ydb_topic_public_types.PublicAutoPartitioningStrategy.UNSPECIFIED + + +@dataclass +class AutoPartitioningSettings(IToProto, IFromProto, IFromPublic, IToPublic): + strategy: AutoPartitioningStrategy + partition_write_speed: AutoPartitioningWriteSpeedStrategy + + @staticmethod + def from_public( + settings: Optional[ydb_topic_public_types.PublicAutoPartitioningSettings] + ) -> Optional[AutoPartitioningSettings]: + if not settings: + return None + + return AutoPartitioningSettings( + strategy=settings.strategy, + partition_write_speed=AutoPartitioningWriteSpeedStrategy( + stabilization_window=settings.stabilization_window, + up_utilization_percent=settings.up_utilization_percent, + down_utilization_percent=settings.down_utilization_percent, + ) + ) + + @staticmethod + def from_proto(msg: ydb_topic_pb2.AutoPartitioningSettings) -> AutoPartitioningSettings: + return AutoPartitioningSettings( + strategy=AutoPartitioningStrategy.from_proto(msg.strategy), + partition_write_speed=AutoPartitioningWriteSpeedStrategy.from_proto( + msg.partition_write_speed + ), + ) + + def to_proto(self) -> ydb_topic_pb2.AutoPartitioningSettings: + return ydb_topic_pb2.AutoPartitioningSettings( + strategy=self.strategy, + partition_write_speed=self.partition_write_speed.to_proto() + ) + + def to_public(self) -> ydb_topic_public_types.PublicAutoPartitioningSettings: + return ydb_topic_public_types.PublicAutoPartitioningSettings( + strategy=self.strategy.to_public(), + stabilization_window=self.partition_write_speed.stabilization_window, + up_utilization_percent=self.partition_write_speed.up_utilization_percent, + down_utilization_percent=self.partition_write_speed.down_utilization_percent, + ) + + +@dataclass +class AutoPartitioningWriteSpeedStrategy(IToProto, IFromProto): + stabilization_window: Optional[datetime.timedelta] + up_utilization_percent: Optional[int] + down_utilization_percent: Optional[int] + + def to_proto(self): + return ydb_topic_pb2.AutoPartitioningWriteSpeedStrategy( + stabilization_window=proto_duration_from_timedelta(self.stabilization_window), + up_utilization_percent=self.up_utilization_percent, + down_utilization_percent=self.down_utilization_percent, + ) + + @staticmethod + def from_proto(msg: ydb_topic_pb2.AutoPartitioningWriteSpeedStrategy) -> AutoPartitioningWriteSpeedStrategy: + return AutoPartitioningWriteSpeedStrategy( + stabilization_window=timedelta_from_proto_duration(msg.stabilization_window), + up_utilization_percent=msg.up_utilization_percent, + down_utilization_percent=msg.down_utilization_percent, ) @@ -986,11 +1091,60 @@ def to_proto(self) -> ydb_topic_pb2.PartitioningSettings: class AlterPartitioningSettings(IToProto): set_min_active_partitions: Optional[int] set_partition_count_limit: Optional[int] + set_max_active_partitions: Optional[int] + alter_auto_partitioning_settings: Optional[AlterAutoPartitioningSettings] def to_proto(self) -> ydb_topic_pb2.AlterPartitioningSettings: return ydb_topic_pb2.AlterPartitioningSettings( set_min_active_partitions=self.set_min_active_partitions, set_partition_count_limit=self.set_partition_count_limit, + set_max_active_partitions=self.set_max_active_partitions, + ) + + +@dataclass +class AlterAutoPartitioningSettings(IToProto, IFromPublic): + set_strategy: Optional[AutoPartitioningStrategy] + set_partition_write_speed: Optional[AlterAutoPartitioningWriteSpeedStrategy] + + @staticmethod + def from_public( + settings: Optional[ydb_topic_public_types.PublicAlterAutoPartitioningSettings] + ) -> Optional[AlterAutoPartitioningSettings]: + if not settings: + return None + + return AutoPartitioningSettings( + strategy=settings.set_strategy, + partition_write_speed=AlterAutoPartitioningWriteSpeedStrategy( + stabilization_window=settings.set_stabilization_window, + up_utilization_percent=settings.set_up_utilization_percent, + down_utilization_percent=settings.set_down_utilization_percent, + ) + ) + + def to_proto(self) -> ydb_topic_pb2.AlterAutoPartitioningSettings: + set_partition_write_speed = None + if self.set_partition_write_speed: + set_partition_write_speed = self.set_partition_write_speed.to_proto() + + return ydb_topic_pb2.AlterAutoPartitioningSettings( + set_strategy=self.set_strategy, + set_partition_write_speed=set_partition_write_speed, + ) + + +@dataclass +class AlterAutoPartitioningWriteSpeedStrategy(IToProto): + set_stabilization_window: Optional[datetime.timedelta] + set_up_utilization_percent: Optional[int] + set_down_utilization_percent: Optional[int] + + def to_proto(self) -> ydb_topic_pb2.AlterAutoPartitioningWriteSpeedStrategy: + return ydb_topic_pb2.AlterAutoPartitioningWriteSpeedStrategy( + set_stabilization_window=proto_duration_from_timedelta(self.set_stabilization_window), + set_up_utilization_percent=self.set_up_utilization_percent, + set_down_utilization_percent=self.set_down_utilization_percent, ) @@ -1063,11 +1217,17 @@ def from_public(req: ydb_topic_public_types.CreateTopicRequestParams): consumer = ydb_topic_public_types.PublicConsumer(name=consumer) consumers.append(Consumer.from_public(consumer)) + auto_partitioning_settings = None + if req.auto_partitioning_settings is not None: + auto_partitioning_settings = AutoPartitioningSettings.from_public(req.auto_partitioning_settings) + return CreateTopicRequest( path=req.path, partitioning_settings=PartitioningSettings( min_active_partitions=req.min_active_partitions, partition_count_limit=req.partition_count_limit, + max_active_partitions=req.max_active_partitions, + auto_partitioning_settings=auto_partitioning_settings ), retention_period=req.retention_period, retention_storage_mb=req.retention_storage_mb, @@ -1138,6 +1298,13 @@ def from_public(req: ydb_topic_public_types.AlterTopicRequestParams) -> AlterTop consumer = ydb_topic_public_types.PublicAlterConsumer(name=consumer) alter_consumers.append(AlterConsumer.from_public(consumer)) + alter_auto_partitioning_settings = None + if req.alter_auto_partitioning_settings is not None: + alter_auto_partitioning_settings = AutoPartitioningSettings.from_public( + req.alter_auto_partitioning_settings + ) + + drop_consumers = req.drop_consumers if req.drop_consumers else [] return AlterTopicRequest( @@ -1145,6 +1312,8 @@ def from_public(req: ydb_topic_public_types.AlterTopicRequestParams) -> AlterTop alter_partitioning_settings=AlterPartitioningSettings( set_min_active_partitions=req.set_min_active_partitions, set_partition_count_limit=req.set_partition_count_limit, + set_max_active_partitions=req.set_max_active_partitions, + alter_auto_partitioning_settings=alter_auto_partitioning_settings, ), add_consumers=add_consumers, set_retention_period=req.set_retention_period, @@ -1205,6 +1374,8 @@ def to_public(self) -> ydb_topic_public_types.PublicDescribeTopicResult: return ydb_topic_public_types.PublicDescribeTopicResult( self=scheme._wrap_scheme_entry(self.self_proto), min_active_partitions=self.partitioning_settings.min_active_partitions, + max_active_partitions=self.partitioning_settings.max_active_partitions, + auto_partitioning_settings=self.partitioning_settings.auto_partitioning_settings.to_public(), partition_count_limit=self.partitioning_settings.partition_count_limit, partitions=list(map(DescribeTopicResult.PartitionInfo.to_public, self.partitions)), retention_period=self.retention_period, diff --git a/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py b/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py index d1987546..eebcec6d 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py @@ -19,6 +19,7 @@ class CreateTopicRequestParams: path: str min_active_partitions: Optional[int] + max_active_partitions: Optional[int] partition_count_limit: Optional[int] retention_period: Optional[datetime.timedelta] retention_storage_mb: Optional[int] @@ -28,12 +29,14 @@ class CreateTopicRequestParams: attributes: Optional[Dict[str, str]] consumers: Optional[List[Union["PublicConsumer", str]]] metering_mode: Optional["PublicMeteringMode"] + auto_partitioning_settings: Optional["PublicAutoPartitioningSettings"] @dataclass class AlterTopicRequestParams: path: str set_min_active_partitions: Optional[int] + set_max_active_partitions: Optional[int] set_partition_count_limit: Optional[int] add_consumers: Optional[List[Union["PublicConsumer", str]]] alter_consumers: Optional[List[Union["PublicAlterConsumer", str]]] @@ -45,6 +48,7 @@ class AlterTopicRequestParams: set_retention_period: Optional[datetime.timedelta] set_retention_storage_mb: Optional[int] set_supported_codecs: Optional[List[Union["PublicCodec", int]]] + alter_auto_partitioning_settings: Optional["PublicAlterAutoPartitioningSettings"] class PublicCodec(int): @@ -68,6 +72,30 @@ class PublicMeteringMode(IntEnum): REQUEST_UNITS = 2 +class PublicAutoPartitioningStrategy(IntEnum): + UNSPECIFIED = 0 + DISABLED = 1 + SCALE_UP = 2 + SCALE_UP_AND_DOWN = 3 + PAUSED = 4 + + +@dataclass +class PublicAutoPartitioningSettings: + strategy: Optional["PublicAutoPartitioningStrategy"] + stabilization_window: Optional[datetime.timedelta] + up_utilization_percent: Optional[int] + down_utilization_percent: Optional[int] + + +@dataclass +class PublicAlterAutoPartitioningSettings: + set_strategy: Optional["PublicAutoPartitioningStrategy"] + set_stabilization_window: Optional[datetime.timedelta] + set_up_utilization_percent: Optional[int] + set_down_utilization_percent: Optional[int] + + @dataclass class PublicConsumer: name: str @@ -138,6 +166,9 @@ class PublicDescribeTopicResult: min_active_partitions: int "Minimum partition count auto merge would stop working at" + max_active_partitions: int + "Minimum partition count auto split would stop working at" + partition_count_limit: int "Limit for total partition count, including active (open for write) and read-only partitions" @@ -171,6 +202,8 @@ class PublicDescribeTopicResult: topic_stats: "PublicDescribeTopicResult.TopicStats" "Statistics of topic" + auto_partitioning_settings: "PublicAutoPartitioningSettings" + @dataclass class PartitionInfo: partition_id: int diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 6545a451..e7bba5a7 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -582,7 +582,7 @@ def _on_partition_session_stop(self, message: StreamReadMessage.StopPartitionSes ) def _on_end_partition_session(self, message: StreamReadMessage.EndPartitionSession): - logger.debug(f"End partition session with id: {message.partition_session_id}") + logger.info(f"End partition session with id: {message.partition_session_id}, child partitions: {message.child_partition_ids}") def _on_read_response(self, message: StreamReadMessage.ReadResponse): self._buffer_consume_bytes(message.bytes_size) diff --git a/ydb/topic.py b/ydb/topic.py index f0b872e2..6d0fceee 100644 --- a/ydb/topic.py +++ b/ydb/topic.py @@ -80,6 +80,9 @@ PublicConsumer as TopicConsumer, PublicAlterConsumer as TopicAlterConsumer, PublicMeteringMode as TopicMeteringMode, + PublicAutoPartitioningStrategy as TopicAutoPartitioningStrategy, + PublicAutoPartitioningSettings as TopicAutoPartitioningSettings, + PublicAlterAutoPartitioningSettings as TopicAlterAutoPartitioningSettings, ) @@ -117,6 +120,7 @@ async def create_topic( attributes: Optional[Dict[str, str]] = None, consumers: Optional[List[Union[TopicConsumer, str]]] = None, metering_mode: Optional[TopicMeteringMode] = None, + auto_partitioning_settings: Optional[TopicAutoPartitioningSettings] = None, ): """ create topic command @@ -151,6 +155,7 @@ async def alter_topic( self, path: str, set_min_active_partitions: Optional[int] = None, + set_max_active_partitions: Optional[int] = None, set_partition_count_limit: Optional[int] = None, add_consumers: Optional[List[Union[TopicConsumer, str]]] = None, alter_consumers: Optional[List[Union[TopicAlterConsumer, str]]] = None, @@ -162,6 +167,7 @@ async def alter_topic( set_retention_period: Optional[datetime.timedelta] = None, set_retention_storage_mb: Optional[int] = None, set_supported_codecs: Optional[List[Union[TopicCodec, int]]] = None, + alter_auto_partitioning_settings: Optional[TopicAlterAutoPartitioningSettings] = None, ): """ alter topic command @@ -226,6 +232,7 @@ def reader( # custom decoder executor for call builtin and custom decoders. If None - use shared executor pool. # if max_worker in the executor is 1 - then decoders will be called from the thread without parallel decoder_executor: Optional[concurrent.futures.Executor] = None, + auto_partitioning_support: Optional[bool] = False, # Auto partitioning feature flag. Default - False. ) -> TopicReaderAsyncIO: if not decoder_executor: @@ -314,6 +321,7 @@ def create_topic( attributes: Optional[Dict[str, str]] = None, consumers: Optional[List[Union[TopicConsumer, str]]] = None, metering_mode: Optional[TopicMeteringMode] = None, + auto_partitioning_settings: Optional[TopicAutoPartitioningSettings] = None, ): """ create topic command @@ -350,6 +358,7 @@ def alter_topic( self, path: str, set_min_active_partitions: Optional[int] = None, + set_max_active_partitions: Optional[int] = None, set_partition_count_limit: Optional[int] = None, add_consumers: Optional[List[Union[TopicConsumer, str]]] = None, alter_consumers: Optional[List[Union[TopicAlterConsumer, str]]] = None, @@ -361,6 +370,7 @@ def alter_topic( set_retention_period: Optional[datetime.timedelta] = None, set_retention_storage_mb: Optional[int] = None, set_supported_codecs: Optional[List[Union[TopicCodec, int]]] = None, + alter_auto_partitioning_settings: Optional[TopicAlterAutoPartitioningSettings] = None, ): """ alter topic command @@ -431,6 +441,7 @@ def reader( # custom decoder executor for call builtin and custom decoders. If None - use shared executor pool. # if max_worker in the executor is 1 - then decoders will be called from the thread without parallel decoder_executor: Optional[concurrent.futures.Executor] = None, # default shared client executor pool + auto_partitioning_support: Optional[bool] = False, # Auto partitioning feature flag. Default - False. ) -> TopicReader: if not decoder_executor: decoder_executor = self._executor From 4f38b651eaca87f6815e2c5d4040397d7fea4946 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 31 Jan 2025 11:11:35 +0300 Subject: [PATCH 352/429] style fixes --- ydb/_grpc/grpcwrapper/ydb_topic.py | 24 +++++++++-------------- ydb/_topic_reader/topic_reader_asyncio.py | 4 +++- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index 3d54af39..b5317273 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -976,9 +976,7 @@ def from_proto(msg: ydb_topic_pb2.PartitioningSettings) -> "PartitioningSettings min_active_partitions=msg.min_active_partitions, partition_count_limit=msg.partition_count_limit, max_active_partitions=msg.max_active_partitions, - auto_partitioning_settings=AutoPartitioningSettings.from_proto( - msg.auto_partitioning_settings - ), + auto_partitioning_settings=AutoPartitioningSettings.from_proto(msg.auto_partitioning_settings), ) def to_proto(self) -> ydb_topic_pb2.PartitioningSettings: @@ -986,7 +984,7 @@ def to_proto(self) -> ydb_topic_pb2.PartitioningSettings: min_active_partitions=self.min_active_partitions, partition_count_limit=self.partition_count_limit, max_active_partitions=self.max_active_partitions, - auto_partitioning_settings=self.auto_partitioning_settings.to_proto() + auto_partitioning_settings=self.auto_partitioning_settings.to_proto(), ) @@ -1027,7 +1025,7 @@ class AutoPartitioningSettings(IToProto, IFromProto, IFromPublic, IToPublic): @staticmethod def from_public( - settings: Optional[ydb_topic_public_types.PublicAutoPartitioningSettings] + settings: Optional[ydb_topic_public_types.PublicAutoPartitioningSettings], ) -> Optional[AutoPartitioningSettings]: if not settings: return None @@ -1038,22 +1036,19 @@ def from_public( stabilization_window=settings.stabilization_window, up_utilization_percent=settings.up_utilization_percent, down_utilization_percent=settings.down_utilization_percent, - ) + ), ) @staticmethod def from_proto(msg: ydb_topic_pb2.AutoPartitioningSettings) -> AutoPartitioningSettings: return AutoPartitioningSettings( strategy=AutoPartitioningStrategy.from_proto(msg.strategy), - partition_write_speed=AutoPartitioningWriteSpeedStrategy.from_proto( - msg.partition_write_speed - ), + partition_write_speed=AutoPartitioningWriteSpeedStrategy.from_proto(msg.partition_write_speed), ) def to_proto(self) -> ydb_topic_pb2.AutoPartitioningSettings: return ydb_topic_pb2.AutoPartitioningSettings( - strategy=self.strategy, - partition_write_speed=self.partition_write_speed.to_proto() + strategy=self.strategy, partition_write_speed=self.partition_write_speed.to_proto() ) def to_public(self) -> ydb_topic_public_types.PublicAutoPartitioningSettings: @@ -1109,7 +1104,7 @@ class AlterAutoPartitioningSettings(IToProto, IFromPublic): @staticmethod def from_public( - settings: Optional[ydb_topic_public_types.PublicAlterAutoPartitioningSettings] + settings: Optional[ydb_topic_public_types.PublicAlterAutoPartitioningSettings], ) -> Optional[AlterAutoPartitioningSettings]: if not settings: return None @@ -1120,7 +1115,7 @@ def from_public( stabilization_window=settings.set_stabilization_window, up_utilization_percent=settings.set_up_utilization_percent, down_utilization_percent=settings.set_down_utilization_percent, - ) + ), ) def to_proto(self) -> ydb_topic_pb2.AlterAutoPartitioningSettings: @@ -1227,7 +1222,7 @@ def from_public(req: ydb_topic_public_types.CreateTopicRequestParams): min_active_partitions=req.min_active_partitions, partition_count_limit=req.partition_count_limit, max_active_partitions=req.max_active_partitions, - auto_partitioning_settings=auto_partitioning_settings + auto_partitioning_settings=auto_partitioning_settings, ), retention_period=req.retention_period, retention_storage_mb=req.retention_storage_mb, @@ -1304,7 +1299,6 @@ def from_public(req: ydb_topic_public_types.AlterTopicRequestParams) -> AlterTop req.alter_auto_partitioning_settings ) - drop_consumers = req.drop_consumers if req.drop_consumers else [] return AlterTopicRequest( diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index e7bba5a7..b42c1db2 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -582,7 +582,9 @@ def _on_partition_session_stop(self, message: StreamReadMessage.StopPartitionSes ) def _on_end_partition_session(self, message: StreamReadMessage.EndPartitionSession): - logger.info(f"End partition session with id: {message.partition_session_id}, child partitions: {message.child_partition_ids}") + logger.info( + f"End partition session with id: {message.partition_session_id}, child partitions: {message.child_partition_ids}" + ) def _on_read_response(self, message: StreamReadMessage.ReadResponse): self._buffer_consume_bytes(message.bytes_size) From f7655372108868a6b4bb7c140a1a2d4c0cfda54f Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 31 Jan 2025 12:41:27 +0300 Subject: [PATCH 353/429] Fix unit --- ydb/_grpc/grpcwrapper/ydb_topic.py | 41 ++++++++++++++----- .../grpcwrapper/ydb_topic_public_types.py | 16 ++++---- ydb/_grpc/grpcwrapper/ydb_topic_test.py | 18 +++++++- ydb/topic.py | 2 + 4 files changed, 57 insertions(+), 20 deletions(-) diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index b5317273..570bbb75 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -980,11 +980,15 @@ def from_proto(msg: ydb_topic_pb2.PartitioningSettings) -> "PartitioningSettings ) def to_proto(self) -> ydb_topic_pb2.PartitioningSettings: + auto_partitioning_settings = None + if self.auto_partitioning_settings is not None: + auto_partitioning_settings = self.auto_partitioning_settings.to_proto() + return ydb_topic_pb2.PartitioningSettings( min_active_partitions=self.min_active_partitions, partition_count_limit=self.partition_count_limit, max_active_partitions=self.max_active_partitions, - auto_partitioning_settings=self.auto_partitioning_settings.to_proto(), + auto_partitioning_settings=auto_partitioning_settings, ) @@ -1041,6 +1045,9 @@ def from_public( @staticmethod def from_proto(msg: ydb_topic_pb2.AutoPartitioningSettings) -> AutoPartitioningSettings: + if msg is None: + return None + return AutoPartitioningSettings( strategy=AutoPartitioningStrategy.from_proto(msg.strategy), partition_write_speed=AutoPartitioningWriteSpeedStrategy.from_proto(msg.partition_write_speed), @@ -1074,7 +1081,12 @@ def to_proto(self): ) @staticmethod - def from_proto(msg: ydb_topic_pb2.AutoPartitioningWriteSpeedStrategy) -> AutoPartitioningWriteSpeedStrategy: + def from_proto( + msg: Optional[ydb_topic_pb2.AutoPartitioningWriteSpeedStrategy], + ) -> Optional[AutoPartitioningWriteSpeedStrategy]: + if msg is None: + return None + return AutoPartitioningWriteSpeedStrategy( stabilization_window=timedelta_from_proto_duration(msg.stabilization_window), up_utilization_percent=msg.up_utilization_percent, @@ -1090,10 +1102,15 @@ class AlterPartitioningSettings(IToProto): alter_auto_partitioning_settings: Optional[AlterAutoPartitioningSettings] def to_proto(self) -> ydb_topic_pb2.AlterPartitioningSettings: + alter_auto_partitioning_settings = None + if self.alter_auto_partitioning_settings is not None: + alter_auto_partitioning_settings = self.alter_auto_partitioning_settings.to_proto() + return ydb_topic_pb2.AlterPartitioningSettings( set_min_active_partitions=self.set_min_active_partitions, set_partition_count_limit=self.set_partition_count_limit, set_max_active_partitions=self.set_max_active_partitions, + alter_auto_partitioning_settings=alter_auto_partitioning_settings, ) @@ -1109,12 +1126,12 @@ def from_public( if not settings: return None - return AutoPartitioningSettings( - strategy=settings.set_strategy, - partition_write_speed=AlterAutoPartitioningWriteSpeedStrategy( - stabilization_window=settings.set_stabilization_window, - up_utilization_percent=settings.set_up_utilization_percent, - down_utilization_percent=settings.set_down_utilization_percent, + return AlterAutoPartitioningSettings( + set_strategy=settings.set_strategy, + set_partition_write_speed=AlterAutoPartitioningWriteSpeedStrategy( + set_stabilization_window=settings.set_stabilization_window, + set_up_utilization_percent=settings.set_up_utilization_percent, + set_down_utilization_percent=settings.set_down_utilization_percent, ), ) @@ -1185,9 +1202,13 @@ class CreateTopicRequest(IToProto, IFromPublic): metering_mode: "MeteringMode" def to_proto(self) -> ydb_topic_pb2.CreateTopicRequest: + partitioning_settings = None + if self.partitioning_settings is not None: + partitioning_settings = self.partitioning_settings.to_proto() + return ydb_topic_pb2.CreateTopicRequest( path=self.path, - partitioning_settings=self.partitioning_settings.to_proto(), + partitioning_settings=partitioning_settings, retention_period=proto_duration_from_timedelta(self.retention_period), retention_storage_mb=self.retention_storage_mb, supported_codecs=self.supported_codecs.to_proto(), @@ -1295,7 +1316,7 @@ def from_public(req: ydb_topic_public_types.AlterTopicRequestParams) -> AlterTop alter_auto_partitioning_settings = None if req.alter_auto_partitioning_settings is not None: - alter_auto_partitioning_settings = AutoPartitioningSettings.from_public( + alter_auto_partitioning_settings = AlterAutoPartitioningSettings.from_public( req.alter_auto_partitioning_settings ) diff --git a/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py b/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py index eebcec6d..58e1a05b 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py @@ -82,18 +82,18 @@ class PublicAutoPartitioningStrategy(IntEnum): @dataclass class PublicAutoPartitioningSettings: - strategy: Optional["PublicAutoPartitioningStrategy"] - stabilization_window: Optional[datetime.timedelta] - up_utilization_percent: Optional[int] - down_utilization_percent: Optional[int] + strategy: Optional["PublicAutoPartitioningStrategy"] = 0 + stabilization_window: Optional[datetime.timedelta] = None + up_utilization_percent: Optional[int] = None + down_utilization_percent: Optional[int] = None @dataclass class PublicAlterAutoPartitioningSettings: - set_strategy: Optional["PublicAutoPartitioningStrategy"] - set_stabilization_window: Optional[datetime.timedelta] - set_up_utilization_percent: Optional[int] - set_down_utilization_percent: Optional[int] + set_strategy: Optional["PublicAutoPartitioningStrategy"] = 0 + set_stabilization_window: Optional[datetime.timedelta] = None + set_up_utilization_percent: Optional[int] = None + set_down_utilization_percent: Optional[int] = None @dataclass diff --git a/ydb/_grpc/grpcwrapper/ydb_topic_test.py b/ydb/_grpc/grpcwrapper/ydb_topic_test.py index 53256ac1..b9e30603 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic_test.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic_test.py @@ -7,6 +7,8 @@ from .ydb_topic_public_types import ( AlterTopicRequestParams, PublicAlterConsumer, + PublicAlterAutoPartitioningSettings, + PublicAutoPartitioningStrategy, PublicConsumer, PublicCodec, ) @@ -51,7 +53,11 @@ def test_alter_topic_request_from_public_to_proto(): "alter_attributes": {"key": "value"}, "set_metering_mode": 1, "set_min_active_partitions": 2, - "set_partition_count_limit": 4, + "set_max_active_partitions": 8, + "set_partition_count_limit": 10, + "alter_auto_partitioning_settings": PublicAlterAutoPartitioningSettings( + set_strategy=PublicAutoPartitioningStrategy.DISABLED, + ), } params_public = AlterTopicRequestParams(**params) @@ -62,7 +68,15 @@ def test_alter_topic_request_from_public_to_proto(): expected_dict = { "path": "topic_name", - "alter_partitioning_settings": {"set_min_active_partitions": "2", "set_partition_count_limit": "4"}, + "alter_partitioning_settings": { + "set_min_active_partitions": "2", + "set_max_active_partitions": "8", + "set_partition_count_limit": "10", + "alter_auto_partitioning_settings": { + "set_strategy": "AUTO_PARTITIONING_STRATEGY_DISABLED", + "set_partition_write_speed": {}, + }, + }, "set_retention_period": "2419200s", "set_retention_storage_mb": "4", "set_supported_codecs": {"codecs": [1, 2]}, diff --git a/ydb/topic.py b/ydb/topic.py index 6d0fceee..042d5fe9 100644 --- a/ydb/topic.py +++ b/ydb/topic.py @@ -111,6 +111,7 @@ async def create_topic( self, path: str, min_active_partitions: Optional[int] = None, + max_active_partitions: Optional[int] = None, partition_count_limit: Optional[int] = None, retention_period: Optional[datetime.timedelta] = None, retention_storage_mb: Optional[int] = None, @@ -312,6 +313,7 @@ def create_topic( self, path: str, min_active_partitions: Optional[int] = None, + max_active_partitions: Optional[int] = None, partition_count_limit: Optional[int] = None, retention_period: Optional[datetime.timedelta] = None, retention_storage_mb: Optional[int] = None, From f68af4c96c285f7ec8ceded76ac42924625f1f6c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 4 Feb 2025 12:15:47 +0300 Subject: [PATCH 354/429] auto partitioning control plane --- tests/topics/test_control_plane.py | 34 +++++++++++++++++++ ydb/_grpc/grpcwrapper/ydb_topic.py | 4 +-- .../grpcwrapper/ydb_topic_public_types.py | 8 ++--- ydb/_topic_reader/topic_reader_asyncio.py | 6 ++++ ydb/topic.py | 3 ++ 5 files changed, 49 insertions(+), 6 deletions(-) diff --git a/tests/topics/test_control_plane.py b/tests/topics/test_control_plane.py index 25258b61..79b5976c 100644 --- a/tests/topics/test_control_plane.py +++ b/tests/topics/test_control_plane.py @@ -2,6 +2,7 @@ import pytest +import ydb from ydb import issues @@ -56,6 +57,39 @@ async def test_alter_existed_topic(self, driver, topic_path): topic_after = await client.describe_topic(topic_path) assert topic_after.min_active_partitions == target_min_active_partitions + async def test_alter_auto_partitioning_settings(self, driver, topic_path): + client = driver.topic_client + + topic_before = await client.describe_topic(topic_path) + + expected = topic_before.auto_partitioning_settings + + expected.strategy = ydb.TopicAutoPartitioningStrategy.SCALE_UP + + await client.alter_topic( + topic_path, + alter_auto_partitioning_settings=ydb.TopicAlterAutoPartitioningSettings( + set_strategy=ydb.TopicAutoPartitioningStrategy.SCALE_UP, + ), + ) + + topic_after = await client.describe_topic(topic_path) + + assert topic_after.auto_partitioning_settings == expected + + expected.up_utilization_percent = 88 + + await client.alter_topic( + topic_path, + alter_auto_partitioning_settings=ydb.TopicAlterAutoPartitioningSettings( + set_up_utilization_percent=88, + ), + ) + + topic_after = await client.describe_topic(topic_path) + + assert topic_after.auto_partitioning_settings == expected + class TestTopicClientControlPlane: def test_create_topic(self, driver_sync, database): diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index 570bbb75..4e23d370 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -1017,7 +1017,7 @@ def from_proto(code: Optional[int]) -> Optional["AutoPartitioningStrategy"]: def to_public(self) -> ydb_topic_public_types.PublicAutoPartitioningStrategy: try: - ydb_topic_public_types.PublicAutoPartitioningStrategy(int(self)) + return ydb_topic_public_types.PublicAutoPartitioningStrategy(int(self)) except KeyError: return ydb_topic_public_types.PublicAutoPartitioningStrategy.UNSPECIFIED @@ -1183,7 +1183,7 @@ def from_proto(code: Optional[int]) -> Optional["MeteringMode"]: def to_public(self) -> ydb_topic_public_types.PublicMeteringMode: try: - ydb_topic_public_types.PublicMeteringMode(int(self)) + return ydb_topic_public_types.PublicMeteringMode(int(self)) except KeyError: return ydb_topic_public_types.PublicMeteringMode.UNSPECIFIED diff --git a/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py b/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py index 58e1a05b..37528a2f 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py @@ -82,18 +82,18 @@ class PublicAutoPartitioningStrategy(IntEnum): @dataclass class PublicAutoPartitioningSettings: - strategy: Optional["PublicAutoPartitioningStrategy"] = 0 + strategy: Optional["PublicAutoPartitioningStrategy"] = None stabilization_window: Optional[datetime.timedelta] = None - up_utilization_percent: Optional[int] = None down_utilization_percent: Optional[int] = None + up_utilization_percent: Optional[int] = None @dataclass class PublicAlterAutoPartitioningSettings: - set_strategy: Optional["PublicAutoPartitioningStrategy"] = 0 + set_strategy: Optional["PublicAutoPartitioningStrategy"] = None set_stabilization_window: Optional[datetime.timedelta] = None - set_up_utilization_percent: Optional[int] = None set_down_utilization_percent: Optional[int] = None + set_up_utilization_percent: Optional[int] = None @dataclass diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index b42c1db2..76461959 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -335,6 +335,8 @@ async def _start(self, stream: IGrpcWrapperAsyncIO, init_message: StreamReadMess self._started = True self._stream = stream + print(init_message) + stream.write(StreamReadMessage.FromClient(client_message=init_message)) init_response = await stream.receive() # type: StreamReadMessage.FromServer if isinstance(init_response.server_message, StreamReadMessage.InitResponse): @@ -586,6 +588,10 @@ def _on_end_partition_session(self, message: StreamReadMessage.EndPartitionSessi f"End partition session with id: {message.partition_session_id}, child partitions: {message.child_partition_ids}" ) + print( + f"End partition session with id: {message.partition_session_id}, child partitions: {message.child_partition_ids}" + ) + def _on_read_response(self, message: StreamReadMessage.ReadResponse): self._buffer_consume_bytes(message.bytes_size) diff --git a/ydb/topic.py b/ydb/topic.py index 042d5fe9..f0607aca 100644 --- a/ydb/topic.py +++ b/ydb/topic.py @@ -7,6 +7,9 @@ "TopicCodec", "TopicConsumer", "TopicAlterConsumer", + "TopicAlterAutoPartitioningSettings", + "TopicAutoPartitioningSettings", + "TopicAutoPartitioningStrategy", "TopicDescription", "TopicError", "TopicMeteringMode", From 0d5fa7b110f27bf854dd5ce5b80755e96adaabe9 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 5 Feb 2025 15:33:38 +0300 Subject: [PATCH 355/429] Stop rotation batch queue after split --- ydb/_topic_reader/datatypes.py | 11 +++++++++ ydb/_topic_reader/topic_reader_asyncio.py | 27 +++++++++++++++-------- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/ydb/_topic_reader/datatypes.py b/ydb/_topic_reader/datatypes.py index a9c811ac..b48501af 100644 --- a/ydb/_topic_reader/datatypes.py +++ b/ydb/_topic_reader/datatypes.py @@ -121,6 +121,16 @@ def close(self): def closed(self): return self.state == PartitionSession.State.Stopped + def end(self): + if self.closed: + return + + self.state = PartitionSession.State.Ended + + @property + def ended(self): + return self.state == PartitionSession.State.Ended + def _ensure_not_closed(self): if self.state == PartitionSession.State.Stopped: raise topic_reader_asyncio.PublicTopicReaderPartitionExpiredError() @@ -129,6 +139,7 @@ class State(enum.Enum): Active = 1 GracefulShutdown = 2 Stopped = 3 + Ended = 4 @dataclass(order=True) class CommitAckWaiter: diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 76461959..e959ac17 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -335,8 +335,6 @@ async def _start(self, stream: IGrpcWrapperAsyncIO, init_message: StreamReadMess self._started = True self._stream = stream - print(init_message) - stream.write(StreamReadMessage.FromClient(client_message=init_message)) init_response = await stream.receive() # type: StreamReadMessage.FromServer if isinstance(init_response.server_message, StreamReadMessage.InitResponse): @@ -390,6 +388,15 @@ def _get_first_batch(self) -> typing.Tuple[int, datatypes.PublicBatch]: partition_session_id, batch = self._message_batches.popitem(last=False) return partition_session_id, batch + def _return_batch_to_queue(self, part_sess_id: int, batch: datatypes.PublicBatch): + self._message_batches[part_sess_id] = batch + + # In case of auto-split we should return all parent messages ASAP + # without queue rotation to prevent child's messages before parent's. + if part_sess_id in self._partition_sessions and self._partition_sessions[part_sess_id].ended: + print(f"part_sess_id: {part_sess_id} is ended, return to beginning of queue") + self._message_batches.move_to_end(part_sess_id, last=False) + def receive_batch_nowait(self, max_messages: Optional[int] = None): if self._get_first_error(): raise self._get_first_error() @@ -405,7 +412,8 @@ def receive_batch_nowait(self, max_messages: Optional[int] = None): cutted_batch = batch._pop_batch(message_count=max_messages) - self._message_batches[part_sess_id] = batch + self._return_batch_to_queue(part_sess_id, batch) + self._buffer_release_bytes(cutted_batch._bytes_size) return cutted_batch @@ -425,7 +433,7 @@ def receive_message_nowait(self): self._buffer_release_bytes(batch._bytes_size) else: # TODO: we should somehow release bytes from single message as well - self._message_batches[part_sess_id] = batch + self._return_batch_to_queue(part_sess_id, batch) return message @@ -584,13 +592,14 @@ def _on_partition_session_stop(self, message: StreamReadMessage.StopPartitionSes ) def _on_end_partition_session(self, message: StreamReadMessage.EndPartitionSession): - logger.info( - f"End partition session with id: {message.partition_session_id}, child partitions: {message.child_partition_ids}" + logger.debug( + f"End partition session with id: {message.partition_session_id}, " + f"child partitions: {message.child_partition_ids}" ) - print( - f"End partition session with id: {message.partition_session_id}, child partitions: {message.child_partition_ids}" - ) + if message.partition_session_id in self._partition_sessions: + # Mark partition session as ended not to shuffle messages. + self._partition_sessions[message.partition_session_id].end() def _on_read_response(self, message: StreamReadMessage.ReadResponse): self._buffer_consume_bytes(message.bytes_size) From 0f20070a302d6282d56ea170aaa2779a8d4e2c0f Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 6 Feb 2025 13:32:11 +0300 Subject: [PATCH 356/429] test autosplit message order --- ydb/_topic_reader/topic_reader_asyncio.py | 1 - .../topic_reader_asyncio_test.py | 112 +++++++++++++++++- 2 files changed, 109 insertions(+), 4 deletions(-) diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index e959ac17..7061b4e4 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -394,7 +394,6 @@ def _return_batch_to_queue(self, part_sess_id: int, batch: datatypes.PublicBatch # In case of auto-split we should return all parent messages ASAP # without queue rotation to prevent child's messages before parent's. if part_sess_id in self._partition_sessions and self._partition_sessions[part_sess_id].ended: - print(f"part_sess_id: {part_sess_id} is ended, return to beginning of queue") self._message_batches.move_to_end(part_sess_id, last=False) def receive_batch_nowait(self, max_messages: Optional[int] = None): diff --git a/ydb/_topic_reader/topic_reader_asyncio_test.py b/ydb/_topic_reader/topic_reader_asyncio_test.py index 25e08029..c598d1ce 100644 --- a/ydb/_topic_reader/topic_reader_asyncio_test.py +++ b/ydb/_topic_reader/topic_reader_asyncio_test.py @@ -52,8 +52,8 @@ def default_executor(): executor.shutdown() -def stub_partition_session(id: int = 0): - return datatypes.PartitionSession( +def stub_partition_session(id: int = 0, ended: bool = False): + partition_session = datatypes.PartitionSession( id=id, state=datatypes.PartitionSession.State.Active, topic_path="asd", @@ -63,6 +63,11 @@ def stub_partition_session(id: int = 0): reader_stream_id=513, ) + if ended: + partition_session.end() + + return partition_session + def stub_message(id: int): return PublicMessage( @@ -73,7 +78,7 @@ def stub_message(id: int): offset=0, written_at=datetime.datetime(2023, 3, 18, 14, 15), producer_id="", - data=bytes(), + data=id, metadata_items={}, _partition_session=stub_partition_session(), _commit_start_offset=0, @@ -746,6 +751,31 @@ def session_count(): with pytest.raises(asyncio.QueueEmpty): stream.from_client.get_nowait() + async def test_end_partition_session(self, stream, stream_reader, partition_session): + def session_count(): + return len(stream_reader._partition_sessions) + + initial_session_count = session_count() + + stream.from_server.put_nowait( + StreamReadMessage.FromServer( + server_status=ServerStatus(ydb_status_codes_pb2.StatusIds.SUCCESS, []), + server_message=StreamReadMessage.EndPartitionSession( + partition_session_id=partition_session.id, + adjacent_partition_ids=[], + child_partition_ids=[20, 30], + ), + ) + ) + + await asyncio.sleep(0) # wait next loop + with pytest.raises(asyncio.QueueEmpty): + stream.from_client.get_nowait() + + assert session_count() == initial_session_count + assert partition_session.id in stream_reader._partition_sessions + assert partition_session.ended + @pytest.mark.parametrize( "graceful", ( @@ -1168,6 +1198,82 @@ async def test_read_message( assert mess == expected_message assert dict(stream_reader._message_batches) == batches_after + @pytest.mark.parametrize( + "batches,expected_order", + [ + ( + { + 0: PublicBatch( + messages=[stub_message(1)], + _partition_session=stub_partition_session(0, ended=True), + _bytes_size=0, + _codec=Codec.CODEC_RAW, + ) + }, + [1], + ), + ( + { + 0: PublicBatch( + messages=[stub_message(1), stub_message(2)], + _partition_session=stub_partition_session(0, ended=True), + _bytes_size=0, + _codec=Codec.CODEC_RAW, + ), + 1: PublicBatch( + messages=[stub_message(3), stub_message(4)], + _partition_session=stub_partition_session(1), + _bytes_size=0, + _codec=Codec.CODEC_RAW, + ), + }, + [1, 2, 3, 4], + ), + ( + { + 0: PublicBatch( + messages=[stub_message(1), stub_message(2)], + _partition_session=stub_partition_session(0), + _bytes_size=0, + _codec=Codec.CODEC_RAW, + ), + 1: PublicBatch( + messages=[stub_message(3), stub_message(4)], + _partition_session=stub_partition_session(1, ended=True), + _bytes_size=0, + _codec=Codec.CODEC_RAW, + ), + 2: PublicBatch( + messages=[stub_message(5)], + _partition_session=stub_partition_session(2), + _bytes_size=0, + _codec=Codec.CODEC_RAW, + ), + }, + [1, 3, 4, 5, 2], + ), + ], + ) + async def test_read_message_autosplit_order( + self, + stream_reader, + batches: typing.Dict[int, datatypes.PublicBatch], + expected_order: typing.List[int], + ): + stream_reader._message_batches = OrderedDict(batches) + + for id, batch in batches.items(): + ps = batch._partition_session + stream_reader._partition_sessions[id] = ps + + result = [] + for _ in range(len(expected_order)): + mess = stream_reader.receive_message_nowait() + result.append(mess.data) + + assert result == expected_order + assert stream_reader.receive_message_nowait() is None + @pytest.mark.parametrize( "batches_before,max_messages,actual_messages,batches_after", [ From 818acdddcd3bdf0bd603c32a13929a546e7044a0 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 6 Feb 2025 18:22:19 +0300 Subject: [PATCH 357/429] remove default values from proto DTO --- ydb/_grpc/grpcwrapper/ydb_topic.py | 2 +- ydb/_topic_reader/topic_reader_asyncio_test.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index 4e23d370..600dfb69 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -419,7 +419,7 @@ def from_proto( class InitRequest(IToProto): topics_read_settings: List["StreamReadMessage.InitRequest.TopicReadSettings"] consumer: str - auto_partitioning_support: bool = False + auto_partitioning_support: bool def to_proto(self) -> ydb_topic_pb2.StreamReadMessage.InitRequest: res = ydb_topic_pb2.StreamReadMessage.InitRequest() diff --git a/ydb/_topic_reader/topic_reader_asyncio_test.py b/ydb/_topic_reader/topic_reader_asyncio_test.py index c598d1ce..7ad5077c 100644 --- a/ydb/_topic_reader/topic_reader_asyncio_test.py +++ b/ydb/_topic_reader/topic_reader_asyncio_test.py @@ -610,6 +610,7 @@ async def test_init_reader(self, stream, default_reader_settings): read_from=None, ) ], + auto_partitioning_support=False, ) start_task = asyncio.create_task(reader._start(stream, init_message)) From f5099d337c8704c29721d4763f94d842f532bcdb Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 6 Feb 2025 18:29:43 +0300 Subject: [PATCH 358/429] make auto_partitioning_support enabled by default --- ydb/_topic_reader/topic_reader.py | 2 +- ydb/topic.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ydb/_topic_reader/topic_reader.py b/ydb/_topic_reader/topic_reader.py index 699e2417..8bc12cc0 100644 --- a/ydb/_topic_reader/topic_reader.py +++ b/ydb/_topic_reader/topic_reader.py @@ -45,7 +45,7 @@ class PublicReaderSettings: consumer: str topic: TopicSelectorTypes buffer_size_bytes: int = 50 * 1024 * 1024 - auto_partitioning_support: bool = False + auto_partitioning_support: bool = True decoders: Union[Mapping[int, Callable[[bytes], bytes]], None] = None """decoders: map[codec_code] func(encoded_bytes)->decoded_bytes""" diff --git a/ydb/topic.py b/ydb/topic.py index f0607aca..55f4ea04 100644 --- a/ydb/topic.py +++ b/ydb/topic.py @@ -236,7 +236,7 @@ def reader( # custom decoder executor for call builtin and custom decoders. If None - use shared executor pool. # if max_worker in the executor is 1 - then decoders will be called from the thread without parallel decoder_executor: Optional[concurrent.futures.Executor] = None, - auto_partitioning_support: Optional[bool] = False, # Auto partitioning feature flag. Default - False. + auto_partitioning_support: Optional[bool] = True, # Auto partitioning feature flag. Default - True. ) -> TopicReaderAsyncIO: if not decoder_executor: @@ -446,7 +446,7 @@ def reader( # custom decoder executor for call builtin and custom decoders. If None - use shared executor pool. # if max_worker in the executor is 1 - then decoders will be called from the thread without parallel decoder_executor: Optional[concurrent.futures.Executor] = None, # default shared client executor pool - auto_partitioning_support: Optional[bool] = False, # Auto partitioning feature flag. Default - False. + auto_partitioning_support: Optional[bool] = True, # Auto partitioning feature flag. Default - True. ) -> TopicReader: if not decoder_executor: decoder_executor = self._executor From 4fa3ce0ca1183dcdf941e3c77cf26dc19735e40e Mon Sep 17 00:00:00 2001 From: Semyon Yentsov Date: Wed, 12 Feb 2025 12:37:49 +0300 Subject: [PATCH 359/429] add missing scheme entry types --- ydb/scheme.py | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/ydb/scheme.py b/ydb/scheme.py index 04951b5e..263d1c65 100644 --- a/ydb/scheme.py +++ b/ydb/scheme.py @@ -24,6 +24,10 @@ class SchemeEntryType(enum.IntEnum): SEQUENCE = 15 REPLICATION = 16 TOPIC = 17 + EXTERNAL_TABLE = 18 + EXTERNAL_DATA_SOURCE = 19 + VIEW = 20 + RESOURCE_POOL = 21 @classmethod def _missing_(cls, value): @@ -103,6 +107,38 @@ def is_directory_or_database(entry): """ return entry == SchemeEntryType.DATABASE or entry == SchemeEntryType.DIRECTORY + @staticmethod + def is_external_table(entry): + """ + :param entry: A scheme entry to check + :return: True if scheme entry is an external table and False otherwise + """ + return entry == SchemeEntryType.EXTERNAL_TABLE + + @staticmethod + def is_external_data_source(entry): + """ + :param entry: A scheme entry to check + :return: True if scheme entry is an external data source and False otherwise + """ + return entry == SchemeEntryType.EXTERNAL_DATA_SOURCE + + @staticmethod + def is_external_view(entry): + """ + :param entry: A scheme entry to check + :return: True if scheme entry is a view and False otherwise + """ + return entry == SchemeEntryType.VIEW + + @staticmethod + def is_external_resource_pool(entry): + """ + :param entry: A scheme entry to check + :return: True if scheme entry is a resource pool and False otherwise + """ + return entry == SchemeEntryType.RESOURCE_POOL + class SchemeEntry(object): __slots__ = ( @@ -185,6 +221,30 @@ def is_coordination_node(self): """ return SchemeEntryType.is_coordination_node(self.type) + def is_external_table(self): + """ + :return: True if scheme entry is an external table and False otherwise + """ + return SchemeEntryType.is_external_table(self.type) + + def is_external_data_source(self): + """ + :return: True if scheme entry is an external data source and False otherwise + """ + return SchemeEntryType.is_external_data_source(self.type) + + def is_view(self): + """ + :return: True if scheme entry is a view and False otherwise + """ + return SchemeEntryType.is_view(self.type) + + def is_resource_pool(self): + """ + :return: True if scheme entry is a resource pool and False otherwise + """ + return SchemeEntryType.is_resource_pool(self.type) + class Directory(SchemeEntry): __slots__ = ("children",) From 3da64a076c7fbdea86e4f1b9267d88c4b885cf33 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 12 Feb 2025 16:06:10 +0300 Subject: [PATCH 360/429] add autosplit example --- examples/topic/autosplit_example.py | 89 +++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 examples/topic/autosplit_example.py diff --git a/examples/topic/autosplit_example.py b/examples/topic/autosplit_example.py new file mode 100644 index 00000000..1847c395 --- /dev/null +++ b/examples/topic/autosplit_example.py @@ -0,0 +1,89 @@ +import argparse +import asyncio +import datetime +import logging + +import ydb + +logger = logging.getLogger(__name__) +logger.setLevel(logging.DEBUG) + + +async def connect(endpoint: str, database: str) -> ydb.aio.Driver: + config = ydb.DriverConfig(endpoint=endpoint, database=database) + config.credentials = ydb.credentials_from_env_variables() + driver = ydb.aio.Driver(config) + await driver.wait(5, fail_fast=True) + return driver + + +async def recreate_topic(driver: ydb.aio.Driver, topic: str, consumer: str): + try: + await driver.topic_client.drop_topic(topic) + except ydb.SchemeError: + pass + + await driver.topic_client.create_topic( + topic, + consumers=[consumer], + max_active_partitions=100, + auto_partitioning_settings=ydb.TopicAutoPartitioningSettings( + strategy=ydb.TopicAutoPartitioningStrategy.SCALE_UP, + up_utilization_percent=1, + down_utilization_percent=1, + stabilization_window=datetime.timedelta(seconds=1), + ), + ) + + +async def write_messages(driver: ydb.aio.Driver, topic: str, id: int = 0): + async with driver.topic_client.writer(topic) as writer: + for i in range(100): + mess = ydb.TopicWriterMessage(data=f"[{id}] mess-{i}", metadata_items={"index": f"{i}"}) + await writer.write(mess) + await asyncio.sleep(0.01) + + +async def read_messages(driver: ydb.aio.Driver, topic: str, consumer: str): + async with driver.topic_client.reader(topic, consumer, auto_partitioning_support=True) as reader: + count = 0 + while True: + try: + mess = await asyncio.wait_for(reader.receive_message(), 5) + count += 1 + print(mess.data.decode()) + reader.commit(mess) + except asyncio.TimeoutError: + assert count == 200 + return + + +async def main(): + parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description="""YDB topic basic example.\n""", + ) + parser.add_argument("-d", "--database", default="/local", help="Name of the database to use") + parser.add_argument("-e", "--endpoint", default="grpc://localhost:2136", help="Endpoint url to use") + parser.add_argument("-p", "--path", default="test-topic", help="Topic name") + parser.add_argument("-c", "--consumer", default="consumer", help="Consumer name") + parser.add_argument("-v", "--verbose", default=True, action="store_true") + + args = parser.parse_args() + + if args.verbose: + logger.addHandler(logging.StreamHandler()) + + driver = await connect(args.endpoint, args.database) + + await recreate_topic(driver, args.path, args.consumer) + + await asyncio.gather( + write_messages(driver, args.path, 0), + write_messages(driver, args.path, 1), + read_messages(driver, args.path, args.consumer), + ) + + +if __name__ == "__main__": + asyncio.run(main()) From 0007288154b8e47f8cf477216b61a01d289a92e0 Mon Sep 17 00:00:00 2001 From: stanislav_shchetinin Date: Thu, 13 Feb 2025 11:49:28 +0300 Subject: [PATCH 361/429] Ignore AttributeError in ydb/import_client.py (#555) Ignore AttributeError in ydb/import_client.py --------- Co-authored-by: Stanislav Shchetinin --- ydb/import_client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ydb/import_client.py b/ydb/import_client.py index d94294ca..e967e877 100644 --- a/ydb/import_client.py +++ b/ydb/import_client.py @@ -33,7 +33,10 @@ class ImportProgress(enum.IntEnum): def _initialize_progresses(): for key, value in ydb_import_pb2.ImportProgress.Progress.items(): - _progresses[value] = getattr(ImportProgress, key[len("PROGRESS_") :]) + try: + _progresses[value] = getattr(ImportProgress, key[len("PROGRESS_") :]) + except AttributeError: + pass _initialize_progresses() From 8aee5b25018669df67dd2ebaf6094843d3f6eeaa Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 13 Feb 2025 11:52:33 +0300 Subject: [PATCH 362/429] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 485ba312..5ce32002 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +* Partition autosplit feature +* Transactional retryer +* Ignore AttributeError in ydb/import_client.py +* add missing scheme entry types + ## 3.18.15 ## * Topic metadata feature From f595b61fbcae8e9cf61f557847028462d67ceb7e Mon Sep 17 00:00:00 2001 From: robot Date: Thu, 13 Feb 2025 08:55:06 +0000 Subject: [PATCH 363/429] Release: 3.18.16 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ce32002..cae1e0fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.16 ## * Partition autosplit feature * Transactional retryer * Ignore AttributeError in ydb/import_client.py diff --git a/setup.py b/setup.py index a7b2b290..ab6adc0c 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.15", # AUTOVERSION + version="3.18.16", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index bdc80c21..750aee1d 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.15" +VERSION = "3.18.16" From 0db84bf9dc1b5062511394bfc956ea7b97bed561 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 17 Feb 2025 17:37:14 +0300 Subject: [PATCH 364/429] Fix empty result sets from stream --- tests/aio/query/test_query_session.py | 3 +++ tests/aio/query/test_query_transaction.py | 15 +++++++++++++++ tests/query/test_query_session.py | 3 +++ tests/query/test_query_transaction.py | 13 +++++++++++++ ydb/_utilities.py | 5 ++++- ydb/aio/_utilities.py | 5 ++++- ydb/query/base.py | 5 ++++- 7 files changed, 46 insertions(+), 3 deletions(-) diff --git a/tests/aio/query/test_query_session.py b/tests/aio/query/test_query_session.py index 0bd06fba..67db045a 100644 --- a/tests/aio/query/test_query_session.py +++ b/tests/aio/query/test_query_session.py @@ -103,10 +103,13 @@ async def test_basic_execute(self, session: QuerySession): async def test_two_results(self, session: QuerySession): await session.create() res = [] + counter = 0 async with await session.execute("select 1; select 2") as results: async for result_set in results: + counter += 1 if len(result_set.rows) > 0: res.append(list(result_set.rows[0].values())) assert res == [[1], [2]] + assert counter == 2 diff --git a/tests/aio/query/test_query_transaction.py b/tests/aio/query/test_query_transaction.py index 47222d0b..aa59abb3 100644 --- a/tests/aio/query/test_query_transaction.py +++ b/tests/aio/query/test_query_transaction.py @@ -92,3 +92,18 @@ async def test_execute_as_context_manager(self, tx: QueryTxContext): res = [result_set async for result_set in results] assert len(res) == 1 + + @pytest.mark.asyncio + async def test_execute_two_results(self, tx: QueryTxContext): + await tx.begin() + counter = 0 + res = [] + + async with await tx.execute("select 1; select 2") as results: + async for result_set in results: + counter += 1 + if len(result_set.rows) > 0: + res.append(list(result_set.rows[0].values())) + + assert res == [[1], [2]] + assert counter == 2 diff --git a/tests/query/test_query_session.py b/tests/query/test_query_session.py index 6c1bc3e8..f151661f 100644 --- a/tests/query/test_query_session.py +++ b/tests/query/test_query_session.py @@ -98,13 +98,16 @@ def test_basic_execute(self, session: QuerySession): def test_two_results(self, session: QuerySession): session.create() res = [] + counter = 0 with session.execute("select 1; select 2") as results: for result_set in results: + counter += 1 if len(result_set.rows) > 0: res.append(list(result_set.rows[0].values())) assert res == [[1], [2]] + assert counter == 2 def test_thread_leaks(self, session: QuerySession): session.create() diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 9e78988a..dfc88897 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -79,3 +79,16 @@ def test_execute_as_context_manager(self, tx: QueryTxContext): res = [result_set for result_set in results] assert len(res) == 1 + + def test_execute_two_results(self, tx: QueryTxContext): + tx.begin() + counter = 0 + res = [] + + with tx.execute("select 1; select 2") as results: + for result_set in results: + counter += 1 + res.append(list(result_set.rows[0].values())) + + assert res == [[1], [2]] + assert counter == 2 diff --git a/ydb/_utilities.py b/ydb/_utilities.py index 117c7407..8496dbd9 100644 --- a/ydb/_utilities.py +++ b/ydb/_utilities.py @@ -161,7 +161,10 @@ def __iter__(self): return self def _next(self): - return self.wrapper(next(self.it)) + res = self.wrapper(next(self.it)) + if res is not None: + return res + return self._next() def next(self): return self._next() diff --git a/ydb/aio/_utilities.py b/ydb/aio/_utilities.py index 5bd0f1a0..296cd256 100644 --- a/ydb/aio/_utilities.py +++ b/ydb/aio/_utilities.py @@ -17,7 +17,10 @@ def __aiter__(self): return self async def _next(self): - return self.wrapper(await self.it.__anext__()) + res = self.wrapper(await self.it.__anext__()) + if res is not None: + return res + return await self._next() async def next(self): return await self._next() diff --git a/ydb/query/base.py b/ydb/query/base.py index 9372cbcf..57a769bb 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -192,4 +192,7 @@ def wrap_execute_query_response( elif tx and response_pb.tx_meta and not tx.tx_id: tx._move_to_beginned(response_pb.tx_meta.id) - return convert.ResultSet.from_message(response_pb.result_set, settings) + if response_pb.HasField("result_set"): + return convert.ResultSet.from_message(response_pb.result_set, settings) + + return None From 97cb6aa30f23b3b00240859f5a7143ee32e63e91 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 17 Feb 2025 18:38:55 +0300 Subject: [PATCH 365/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cae1e0fc..7c6e17e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Fix empty result sets from stream + ## 3.18.16 ## * Partition autosplit feature * Transactional retryer From 22c660c108ec0ec5cef7b274d592970f9a98e5ef Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 17 Feb 2025 15:39:49 +0000 Subject: [PATCH 366/429] Release: 3.18.17 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c6e17e0..cec08b6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.18.17 ## * Fix empty result sets from stream ## 3.18.16 ## diff --git a/setup.py b/setup.py index ab6adc0c..82471917 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.16", # AUTOVERSION + version="3.18.17", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 750aee1d..416d33e1 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.16" +VERSION = "3.18.17" From ce321ae7e5ae3d585b330980cbf4b71aa8b23ce6 Mon Sep 17 00:00:00 2001 From: Gleb Nosov Date: Thu, 20 Jun 2024 14:06:54 +0300 Subject: [PATCH 367/429] fix async_wait_message docstring --- ydb/_topic_reader/topic_reader_sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/_topic_reader/topic_reader_sync.py b/ydb/_topic_reader/topic_reader_sync.py index 3048d3c4..eda1d374 100644 --- a/ydb/_topic_reader/topic_reader_sync.py +++ b/ydb/_topic_reader/topic_reader_sync.py @@ -79,7 +79,7 @@ def async_wait_message(self) -> concurrent.futures.Future: Returns a future, which will complete when the reader has at least one message in queue. If the reader already has a message - the future will complete immediately. - A message may expire before it gets read so that the attempt to receive the massage will fail + A message may expire before it gets read so that the attempt to receive the message will fail despite the future has signaled about its availability. """ self._check_closed() From 97ea58acd6593b25d7b3ab4e24ba26df7dab9246 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 26 Feb 2025 11:04:26 +0300 Subject: [PATCH 368/429] preparations to protobuf 5 compat Co-authored-by: Yaroslav Leonov --- .github/workflows/tests.yaml | 4 ++-- Makefile | 8 ++++++-- generate-protobuf.Dockerfile | 2 +- requirements.txt | 2 +- tox.ini | 26 +++++++++++++++++++------- 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 3b477b3c..2eb6b514 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -18,10 +18,10 @@ jobs: fail-fast: false matrix: python-version: [3.8] - environment: [py, py-tls, py-proto3, py-tls-proto3] + environment: [py-proto4, py-tls-proto4, py-proto3, py-tls-proto3] folder: [ydb, tests] exclude: - - environment: py-tls + - environment: py-tls-proto4 folder: ydb - environment: py-tls-proto3 folder: ydb diff --git a/Makefile b/Makefile index acc46bd6..af5780d9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -protobuf: protobuf-3 protobuf-4 +protobuf: protobuf-3 protobuf-4 protobuf-5 protobuf-3: docker build -f generate-protobuf.Dockerfile . -t ydb-python-sdk-proto-generator-env-3 --build-arg GRPCIO_VER=1.39.0 --build-arg PY_PROTOBUF_VER=3.20.3 @@ -6,4 +6,8 @@ protobuf-3: protobuf-4: docker build -f generate-protobuf.Dockerfile . -t ydb-python-sdk-proto-generator-env-4 - docker run --rm -it -v $${PWD}:$${PWD} -w $${PWD} ydb-python-sdk-proto-generator-env-4 python generate_protoc.py + docker run --rm -it -v $${PWD}:$${PWD} -w $${PWD} ydb-python-sdk-proto-generator-env-4 python generate_protoc.py --target-version=v4 + +protobuf-5: + docker build -f generate-protobuf.Dockerfile . -t ydb-python-sdk-proto-generator-env-5 --build-arg PY_PROTOBUF_VER=5.26.1 --build-arg PROTOC_VER=26.1 + docker run --rm -it -v $${PWD}:$${PWD} -w $${PWD} ydb-python-sdk-proto-generator-env-5 python generate_protoc.py --target-version=v5 \ No newline at end of file diff --git a/generate-protobuf.Dockerfile b/generate-protobuf.Dockerfile index 6c31d460..87938271 100644 --- a/generate-protobuf.Dockerfile +++ b/generate-protobuf.Dockerfile @@ -9,7 +9,7 @@ RUN \ python -m pip install grpcio-tools==${GRPCIO_VER} && \ python -m pip install protobuf==${PY_PROTOBUF_VER} -ENV PROTOC_VER=21.8 +ARG PROTOC_VER=21.8 RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VER}/protoc-${PROTOC_VER}-linux-x86_64.zip && \ unzip protoc-*.zip && \ rm -f protoc-*.zip && \ diff --git a/requirements.txt b/requirements.txt index 3b962207..d66b4d10 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ grpcio>=1.42.0 packaging -protobuf>=3.13.0,<5.0.0 +protobuf>=3.13.0,<6.0.0 aiohttp<4 diff --git a/tox.ini b/tox.ini index 8b5c06ae..dbf7d901 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py,py-proto3,py-tls,py-tls-proto3,style,pylint,black,protoc,py-cov +envlist = py-proto4,py-proto3,py-tls-proto4,py-tls-proto3,style,pylint,black,protoc,py-cov minversion = 4.2.6 skipsdist = True ignore_basepython_conflict = true @@ -12,8 +12,11 @@ setenv = deps = -r{toxinidir}/test-requirements.txt -[testenv:dev] +[testenv:dev-proto4] commands = +deps = + -r{toxinidir}/test-requirements.txt + protobuf<5.0.0 [testenv:dev-proto3] commands = @@ -21,15 +24,21 @@ deps = -r{toxinidir}/test-requirements.txt protobuf<4.0.0 -[testenv:py] +[testenv:py-proto4] commands = pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} +deps = + -r{toxinidir}/test-requirements.txt + protobuf<5.0.0 -[testenv:py-cov] +[testenv:py-cov-proto4] commands = pytest -v -m "not tls" \ --cov-report html:cov_html --cov=ydb \ --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} +deps = + -r{toxinidir}/test-requirements.txt + protobuf<5.0.0 [testenv:py-proto3] commands = @@ -38,9 +47,12 @@ deps = -r{toxinidir}/test-requirements.txt protobuf<4.0.0 -[testenv:py-tls] +[testenv:py-tls-proto4] commands = pytest -v -m tls --docker-compose-remove-volumes --docker-compose=docker-compose-tls.yml {posargs} +deps = + -r{toxinidir}/test-requirements.txt + protobuf<5.0.0 [testenv:py-tls-proto3] commands = @@ -52,12 +64,12 @@ deps = [testenv:black-format] skip_install = true commands = - black ydb examples tests --extend-exclude "ydb/_grpc/v3|ydb/_grpc/v4" + black ydb examples tests --extend-exclude "ydb/_grpc/v3|ydb/_grpc/v4|ydb/_grpc/v5" [testenv:black] skip_install = true commands = - black --diff --check ydb examples tests --extend-exclude "ydb/_grpc/v3|ydb/_grpc/v4" + black --diff --check ydb examples tests --extend-exclude "ydb/_grpc/v3|ydb/_grpc/v4|ydb/_grpc/v5" [testenv:pylint] deps = pylint From a55df0b52d7b883a4f27d6180d325926f80fd87c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 26 Feb 2025 11:28:27 +0300 Subject: [PATCH 369/429] Update genproto --- tox.ini | 22 +- ydb/_grpc/v5/__init__.py | 0 ydb/_grpc/v5/draft/__init__.py | 0 ydb/_grpc/v5/draft/protos/__init__.py | 0 .../v5/draft/protos/ydb_dynamic_config_pb2.py | 94 ++ .../draft/protos/ydb_dynamic_config_pb2.pyi | 271 ++++ .../protos/ydb_dynamic_config_pb2_grpc.py | 4 + .../draft/protos/ydb_federated_query_pb2.py | 499 ++++++ .../draft/protos/ydb_federated_query_pb2.pyi | 1125 +++++++++++++ .../protos/ydb_federated_query_pb2_grpc.py | 4 + ydb/_grpc/v5/draft/protos/ydb_keyvalue_pb2.py | 124 ++ .../v5/draft/protos/ydb_keyvalue_pb2.pyi | 437 +++++ .../v5/draft/protos/ydb_keyvalue_pb2_grpc.py | 4 + .../v5/draft/protos/ydb_maintenance_pb2.py | 125 ++ .../v5/draft/protos/ydb_maintenance_pb2.pyi | 282 ++++ .../draft/protos/ydb_maintenance_pb2_grpc.py | 4 + .../v5/draft/protos/ydb_object_storage_pb2.py | 34 + .../draft/protos/ydb_object_storage_pb2.pyi | 52 + .../protos/ydb_object_storage_pb2_grpc.py | 4 + .../v5/draft/ydb_dynamic_config_v1_pb2.py | 28 + .../v5/draft/ydb_dynamic_config_v1_pb2.pyi | 5 + .../draft/ydb_dynamic_config_v1_pb2_grpc.py | 390 +++++ .../v5/draft/ydb_federated_query_v1_pb2.py | 28 + .../v5/draft/ydb_federated_query_v1_pb2.pyi | 5 + .../draft/ydb_federated_query_v1_pb2_grpc.py | 755 +++++++++ ydb/_grpc/v5/draft/ydb_keyvalue_v1_pb2.py | 28 + ydb/_grpc/v5/draft/ydb_keyvalue_v1_pb2.pyi | 5 + .../v5/draft/ydb_keyvalue_v1_pb2_grpc.py | 419 +++++ ydb/_grpc/v5/draft/ydb_maintenance_v1_pb2.py | 28 + ydb/_grpc/v5/draft/ydb_maintenance_v1_pb2.pyi | 5 + .../v5/draft/ydb_maintenance_v1_pb2_grpc.py | 271 ++++ .../v5/draft/ydb_object_storage_v1_pb2.py | 28 + .../v5/draft/ydb_object_storage_v1_pb2.pyi | 5 + .../draft/ydb_object_storage_v1_pb2_grpc.py | 66 + ydb/_grpc/v5/protos/__init__.py | 0 ydb/_grpc/v5/protos/annotations/__init__.py | 0 .../v5/protos/annotations/sensitive_pb2.py | 27 + .../v5/protos/annotations/sensitive_pb2.pyi | 7 + .../protos/annotations/sensitive_pb2_grpc.py | 4 + .../v5/protos/annotations/validation_pb2.py | 37 + .../v5/protos/annotations/validation_pb2.pyi | 47 + .../protos/annotations/validation_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_auth_pb2.py | 32 + ydb/_grpc/v5/protos/ydb_auth_pb2.pyi | 28 + ydb/_grpc/v5/protos/ydb_auth_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_cms_pb2.py | 102 ++ ydb/_grpc/v5/protos/ydb_cms_pb2.pyi | 312 ++++ ydb/_grpc/v5/protos/ydb_cms_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_common_pb2.py | 35 + ydb/_grpc/v5/protos/ydb_common_pb2.pyi | 35 + ydb/_grpc/v5/protos/ydb_common_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_coordination_pb2.py | 107 ++ ydb/_grpc/v5/protos/ydb_coordination_pb2.pyi | 418 +++++ .../v5/protos/ydb_coordination_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_discovery_pb2.py | 52 + ydb/_grpc/v5/protos/ydb_discovery_pb2.pyi | 95 ++ ydb/_grpc/v5/protos/ydb_discovery_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_export_pb2.py | 94 ++ ydb/_grpc/v5/protos/ydb_export_pb2.pyi | 166 ++ ydb/_grpc/v5/protos/ydb_export_pb2_grpc.py | 4 + .../v5/protos/ydb_federation_discovery_pb2.py | 36 + .../protos/ydb_federation_discovery_pb2.pyi | 52 + .../ydb_federation_discovery_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_formats_pb2.py | 31 + ydb/_grpc/v5/protos/ydb_formats_pb2.pyi | 34 + ydb/_grpc/v5/protos/ydb_formats_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_import_pb2.py | 76 + ydb/_grpc/v5/protos/ydb_import_pb2.pyi | 127 ++ ydb/_grpc/v5/protos/ydb_import_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_issue_message_pb2.py | 29 + ydb/_grpc/v5/protos/ydb_issue_message_pb2.pyi | 31 + .../v5/protos/ydb_issue_message_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_monitoring_pb2.py | 90 ++ ydb/_grpc/v5/protos/ydb_monitoring_pb2.pyi | 304 ++++ .../v5/protos/ydb_monitoring_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_operation_pb2.py | 67 + ydb/_grpc/v5/protos/ydb_operation_pb2.pyi | 119 ++ ydb/_grpc/v5/protos/ydb_operation_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_query_pb2.py | 144 ++ ydb/_grpc/v5/protos/ydb_query_pb2.pyi | 317 ++++ ydb/_grpc/v5/protos/ydb_query_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_query_stats_pb2.py | 35 + ydb/_grpc/v5/protos/ydb_query_stats_pb2.pyi | 70 + .../v5/protos/ydb_query_stats_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_rate_limiter_pb2.py | 66 + ydb/_grpc/v5/protos/ydb_rate_limiter_pb2.pyi | 157 ++ .../v5/protos/ydb_rate_limiter_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_scheme_pb2.py | 59 + ydb/_grpc/v5/protos/ydb_scheme_pb2.pyi | 155 ++ ydb/_grpc/v5/protos/ydb_scheme_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_scripting_pb2.py | 57 + ydb/_grpc/v5/protos/ydb_scripting_pb2.pyi | 102 ++ ydb/_grpc/v5/protos/ydb_scripting_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_status_codes_pb2.py | 29 + ydb/_grpc/v5/protos/ydb_status_codes_pb2.pyi | 33 + .../v5/protos/ydb_status_codes_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_table_pb2.py | 364 +++++ ydb/_grpc/v5/protos/ydb_table_pb2.pyi | 1399 +++++++++++++++++ ydb/_grpc/v5/protos/ydb_table_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_topic_pb2.py | 323 ++++ ydb/_grpc/v5/protos/ydb_topic_pb2.pyi | 1057 +++++++++++++ ydb/_grpc/v5/protos/ydb_topic_pb2_grpc.py | 4 + ydb/_grpc/v5/protos/ydb_value_pb2.py | 60 + ydb/_grpc/v5/protos/ydb_value_pb2.pyi | 220 +++ ydb/_grpc/v5/protos/ydb_value_pb2_grpc.py | 4 + ydb/_grpc/v5/ydb_auth_v1_pb2.py | 28 + ydb/_grpc/v5/ydb_auth_v1_pb2.pyi | 5 + ydb/_grpc/v5/ydb_auth_v1_pb2_grpc.py | 67 + ydb/_grpc/v5/ydb_cms_v1_pb2.py | 28 + ydb/_grpc/v5/ydb_cms_v1_pb2.pyi | 5 + ydb/_grpc/v5/ydb_cms_v1_pb2_grpc.py | 249 +++ ydb/_grpc/v5/ydb_coordination_v1_pb2.py | 28 + ydb/_grpc/v5/ydb_coordination_v1_pb2.pyi | 5 + ydb/_grpc/v5/ydb_coordination_v1_pb2_grpc.py | 210 +++ ydb/_grpc/v5/ydb_discovery_v1_pb2.py | 28 + ydb/_grpc/v5/ydb_discovery_v1_pb2.pyi | 5 + ydb/_grpc/v5/ydb_discovery_v1_pb2_grpc.py | 99 ++ ydb/_grpc/v5/ydb_export_v1_pb2.py | 28 + ydb/_grpc/v5/ydb_export_v1_pb2.pyi | 5 + ydb/_grpc/v5/ydb_export_v1_pb2_grpc.py | 103 ++ .../v5/ydb_federation_discovery_v1_pb2.py | 28 + .../v5/ydb_federation_discovery_v1_pb2.pyi | 5 + .../ydb_federation_discovery_v1_pb2_grpc.py | 67 + ydb/_grpc/v5/ydb_import_v1_pb2.py | 28 + ydb/_grpc/v5/ydb_import_v1_pb2.pyi | 5 + ydb/_grpc/v5/ydb_import_v1_pb2_grpc.py | 103 ++ ydb/_grpc/v5/ydb_monitoring_v1_pb2.py | 28 + ydb/_grpc/v5/ydb_monitoring_v1_pb2.pyi | 5 + ydb/_grpc/v5/ydb_monitoring_v1_pb2_grpc.py | 101 ++ ydb/_grpc/v5/ydb_operation_v1_pb2.py | 28 + ydb/_grpc/v5/ydb_operation_v1_pb2.pyi | 5 + ydb/_grpc/v5/ydb_operation_v1_pb2_grpc.py | 217 +++ ydb/_grpc/v5/ydb_query_v1_pb2.py | 29 + ydb/_grpc/v5/ydb_query_v1_pb2.pyi | 6 + ydb/_grpc/v5/ydb_query_v1_pb2_grpc.py | 375 +++++ ydb/_grpc/v5/ydb_rate_limiter_v1_pb2.py | 28 + ydb/_grpc/v5/ydb_rate_limiter_v1_pb2.pyi | 5 + ydb/_grpc/v5/ydb_rate_limiter_v1_pb2_grpc.py | 252 +++ ydb/_grpc/v5/ydb_scheme_v1_pb2.py | 28 + ydb/_grpc/v5/ydb_scheme_v1_pb2.pyi | 5 + ydb/_grpc/v5/ydb_scheme_v1_pb2_grpc.py | 224 +++ ydb/_grpc/v5/ydb_scripting_v1_pb2.py | 28 + ydb/_grpc/v5/ydb_scripting_v1_pb2.pyi | 5 + ydb/_grpc/v5/ydb_scripting_v1_pb2_grpc.py | 133 ++ ydb/_grpc/v5/ydb_table_v1_pb2.py | 28 + ydb/_grpc/v5/ydb_table_v1_pb2.pyi | 5 + ydb/_grpc/v5/ydb_table_v1_pb2_grpc.py | 793 ++++++++++ ydb/_grpc/v5/ydb_topic_v1_pb2.py | 28 + ydb/_grpc/v5/ydb_topic_v1_pb2.pyi | 5 + ydb/_grpc/v5/ydb_topic_v1_pb2_grpc.py | 389 +++++ 150 files changed, 16358 insertions(+), 1 deletion(-) create mode 100644 ydb/_grpc/v5/__init__.py create mode 100644 ydb/_grpc/v5/draft/__init__.py create mode 100644 ydb/_grpc/v5/draft/protos/__init__.py create mode 100644 ydb/_grpc/v5/draft/protos/ydb_dynamic_config_pb2.py create mode 100644 ydb/_grpc/v5/draft/protos/ydb_dynamic_config_pb2.pyi create mode 100644 ydb/_grpc/v5/draft/protos/ydb_dynamic_config_pb2_grpc.py create mode 100644 ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.py create mode 100644 ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.pyi create mode 100644 ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2_grpc.py create mode 100644 ydb/_grpc/v5/draft/protos/ydb_keyvalue_pb2.py create mode 100644 ydb/_grpc/v5/draft/protos/ydb_keyvalue_pb2.pyi create mode 100644 ydb/_grpc/v5/draft/protos/ydb_keyvalue_pb2_grpc.py create mode 100644 ydb/_grpc/v5/draft/protos/ydb_maintenance_pb2.py create mode 100644 ydb/_grpc/v5/draft/protos/ydb_maintenance_pb2.pyi create mode 100644 ydb/_grpc/v5/draft/protos/ydb_maintenance_pb2_grpc.py create mode 100644 ydb/_grpc/v5/draft/protos/ydb_object_storage_pb2.py create mode 100644 ydb/_grpc/v5/draft/protos/ydb_object_storage_pb2.pyi create mode 100644 ydb/_grpc/v5/draft/protos/ydb_object_storage_pb2_grpc.py create mode 100644 ydb/_grpc/v5/draft/ydb_dynamic_config_v1_pb2.py create mode 100644 ydb/_grpc/v5/draft/ydb_dynamic_config_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/draft/ydb_dynamic_config_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/draft/ydb_federated_query_v1_pb2.py create mode 100644 ydb/_grpc/v5/draft/ydb_federated_query_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/draft/ydb_federated_query_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/draft/ydb_keyvalue_v1_pb2.py create mode 100644 ydb/_grpc/v5/draft/ydb_keyvalue_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/draft/ydb_keyvalue_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/draft/ydb_maintenance_v1_pb2.py create mode 100644 ydb/_grpc/v5/draft/ydb_maintenance_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/draft/ydb_maintenance_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/draft/ydb_object_storage_v1_pb2.py create mode 100644 ydb/_grpc/v5/draft/ydb_object_storage_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/draft/ydb_object_storage_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/__init__.py create mode 100644 ydb/_grpc/v5/protos/annotations/__init__.py create mode 100644 ydb/_grpc/v5/protos/annotations/sensitive_pb2.py create mode 100644 ydb/_grpc/v5/protos/annotations/sensitive_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/annotations/sensitive_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/annotations/validation_pb2.py create mode 100644 ydb/_grpc/v5/protos/annotations/validation_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/annotations/validation_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_auth_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_auth_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_auth_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_cms_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_cms_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_cms_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_common_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_common_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_common_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_coordination_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_coordination_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_coordination_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_discovery_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_discovery_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_discovery_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_export_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_export_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_export_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_federation_discovery_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_federation_discovery_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_federation_discovery_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_formats_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_formats_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_formats_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_import_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_import_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_import_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_issue_message_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_issue_message_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_issue_message_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_monitoring_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_monitoring_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_monitoring_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_operation_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_operation_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_operation_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_query_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_query_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_query_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_query_stats_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_query_stats_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_query_stats_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_rate_limiter_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_rate_limiter_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_rate_limiter_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_scheme_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_scheme_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_scheme_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_scripting_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_scripting_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_scripting_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_status_codes_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_status_codes_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_status_codes_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_table_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_table_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_table_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_topic_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_topic_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_topic_pb2_grpc.py create mode 100644 ydb/_grpc/v5/protos/ydb_value_pb2.py create mode 100644 ydb/_grpc/v5/protos/ydb_value_pb2.pyi create mode 100644 ydb/_grpc/v5/protos/ydb_value_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_auth_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_auth_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_auth_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_cms_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_cms_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_cms_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_coordination_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_coordination_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_coordination_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_discovery_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_discovery_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_discovery_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_export_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_export_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_export_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_federation_discovery_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_federation_discovery_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_federation_discovery_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_import_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_import_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_import_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_monitoring_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_monitoring_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_monitoring_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_operation_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_operation_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_operation_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_query_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_query_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_query_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_rate_limiter_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_rate_limiter_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_rate_limiter_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_scheme_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_scheme_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_scheme_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_scripting_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_scripting_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_scripting_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_table_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_table_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_table_v1_pb2_grpc.py create mode 100644 ydb/_grpc/v5/ydb_topic_v1_pb2.py create mode 100644 ydb/_grpc/v5/ydb_topic_v1_pb2.pyi create mode 100644 ydb/_grpc/v5/ydb_topic_v1_pb2_grpc.py diff --git a/tox.ini b/tox.ini index dbf7d901..df029d2a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py-proto4,py-proto3,py-tls-proto4,py-tls-proto3,style,pylint,black,protoc,py-cov +envlist = py-proto5,py-proto4,py-proto3,py-tls-proto5,py-tls-proto4,py-tls-proto3,style,pylint,black,protoc,py-cov-proto4 minversion = 4.2.6 skipsdist = True ignore_basepython_conflict = true @@ -12,6 +12,12 @@ setenv = deps = -r{toxinidir}/test-requirements.txt +[testenv:dev-proto5] +commands = +deps = + -r{toxinidir}/test-requirements.txt + protobuf<6.0.0 + [testenv:dev-proto4] commands = deps = @@ -24,6 +30,13 @@ deps = -r{toxinidir}/test-requirements.txt protobuf<4.0.0 +[testenv:py-proto5] +commands = + pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} +deps = + -r{toxinidir}/test-requirements.txt + protobuf<6.0.0 + [testenv:py-proto4] commands = pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} @@ -47,6 +60,13 @@ deps = -r{toxinidir}/test-requirements.txt protobuf<4.0.0 +[testenv:py-tls-proto5] +commands = + pytest -v -m tls --docker-compose-remove-volumes --docker-compose=docker-compose-tls.yml {posargs} +deps = + -r{toxinidir}/test-requirements.txt + protobuf<6.0.0 + [testenv:py-tls-proto4] commands = pytest -v -m tls --docker-compose-remove-volumes --docker-compose=docker-compose-tls.yml {posargs} diff --git a/ydb/_grpc/v5/__init__.py b/ydb/_grpc/v5/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ydb/_grpc/v5/draft/__init__.py b/ydb/_grpc/v5/draft/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ydb/_grpc/v5/draft/protos/__init__.py b/ydb/_grpc/v5/draft/protos/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ydb/_grpc/v5/draft/protos/ydb_dynamic_config_pb2.py b/ydb/_grpc/v5/draft/protos/ydb_dynamic_config_pb2.py new file mode 100644 index 00000000..511a3f42 --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_dynamic_config_pb2.py @@ -0,0 +1,94 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/protos/ydb_dynamic_config.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%draft/protos/ydb_dynamic_config.proto\x12\x11Ydb.DynamicConfig\x1a\x1aprotos/ydb_operation.proto\"2\n\x0e\x43onfigIdentity\x12\x0f\n\x07version\x18\x01 \x01(\x04\x12\x0f\n\x07\x63luster\x18\x02 \x01(\t\"\x8c\x01\n\x10SetConfigRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0e\n\x06\x63onfig\x18\x02 \x01(\t\x12\x0f\n\x07\x64ry_run\x18\x03 \x01(\x08\x12\x1c\n\x14\x61llow_unknown_fields\x18\x04 \x01(\x08\"A\n\x11SetConfigResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x90\x01\n\x14ReplaceConfigRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0e\n\x06\x63onfig\x18\x02 \x01(\t\x12\x0f\n\x07\x64ry_run\x18\x03 \x01(\x08\x12\x1c\n\x14\x61llow_unknown_fields\x18\x04 \x01(\x08\"E\n\x15ReplaceConfigResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x83\x01\n\x11\x44ropConfigRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x33\n\x08identity\x18\x02 \x01(\x0b\x32!.Ydb.DynamicConfig.ConfigIdentity\"B\n\x12\x44ropConfigResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"e\n\x18\x41\x64\x64VolatileConfigRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0e\n\x06\x63onfig\x18\x02 \x01(\t\"I\n\x19\x41\x64\x64VolatileConfigResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\",\n\x0eVolatileConfig\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x0e\n\x06\x63onfig\x18\x02 \x01(\t\"M\n\x10GetConfigRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"A\n\x11GetConfigResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x93\x01\n\x0fGetConfigResult\x12\x0e\n\x06\x63onfig\x18\x01 \x01(\t\x12;\n\x10volatile_configs\x18\x02 \x03(\x0b\x32!.Ydb.DynamicConfig.VolatileConfig\x12\x33\n\x08identity\x18\x03 \x01(\x0b\x32!.Ydb.DynamicConfig.ConfigIdentity\"6\n\x16VolatileConfigMetadata\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x10\n\x08metadata\x18\x02 \x01(\t\"O\n\x12GetMetadataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"C\n\x13GetMetadataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"j\n\x11GetMetadataResult\x12\x10\n\x08metadata\x18\x01 \x01(\t\x12\x43\n\x10volatile_configs\x18\x02 \x03(\x0b\x32).Ydb.DynamicConfig.VolatileConfigMetadata\"\xb7\x02\n\x1bRemoveVolatileConfigRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x35\n\x08identity\x18\x02 \x01(\x0b\x32!.Ydb.DynamicConfig.ConfigIdentityH\x00\x12\x0f\n\x05\x66orce\x18\x03 \x01(\x08H\x00\x12I\n\x03ids\x18\x04 \x01(\x0b\x32:.Ydb.DynamicConfig.RemoveVolatileConfigRequest.IdsToDeleteH\x01\x12\r\n\x03\x61ll\x18\x05 \x01(\x08H\x01\x1a\x1a\n\x0bIdsToDelete\x12\x0b\n\x03ids\x18\x01 \x03(\x04\x42\x13\n\x11\x63onsistency_checkB\n\n\x08selector\"L\n\x1cRemoveVolatileConfigResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"b\n\x14GetNodeLabelsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0f\n\x07node_id\x18\x02 \x01(\r\")\n\tYamlLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"E\n\x15GetNodeLabelsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"C\n\x13GetNodeLabelsResult\x12,\n\x06labels\x18\x01 \x03(\x0b\x32\x1c.Ydb.DynamicConfig.YamlLabel\"\xcc\x01\n\x14ResolveConfigRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0e\n\x06\x63onfig\x18\x02 \x01(\t\x12;\n\x10volatile_configs\x18\x03 \x03(\x0b\x32!.Ydb.DynamicConfig.VolatileConfig\x12,\n\x06labels\x18\x04 \x03(\x0b\x32\x1c.Ydb.DynamicConfig.YamlLabel\"E\n\x15ResolveConfigResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"%\n\x13ResolveConfigResult\x12\x0e\n\x06\x63onfig\x18\x01 \x01(\t\"\xbb\x01\n\x17ResolveAllConfigRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0e\n\x06\x63onfig\x18\x02 \x01(\t\x12;\n\x10volatile_configs\x18\x03 \x03(\x0b\x32!.Ydb.DynamicConfig.VolatileConfig\x12\x18\n\x10verbose_response\x18\x04 \x01(\x08\"\xb6\x01\n\x0cYamlLabelExt\x12\r\n\x05label\x18\x01 \x01(\t\x12\x37\n\x04type\x18\x02 \x01(\x0e\x32).Ydb.DynamicConfig.YamlLabelExt.LabelType\x12\x12\n\x05value\x18\x03 \x01(\tH\x00\x88\x01\x01\"@\n\tLabelType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06\x43OMMON\x10\x01\x12\x0b\n\x07NOT_SET\x10\x02\x12\t\n\x05\x45MPTY\x10\x03\x42\x08\n\x06_value\";\n\x08LabelSet\x12/\n\x06labels\x18\x01 \x03(\x0b\x32\x1f.Ydb.DynamicConfig.YamlLabelExt\"Q\n\x0eResolvedConfig\x12/\n\nlabel_sets\x18\x01 \x03(\x0b\x32\x1b.Ydb.DynamicConfig.LabelSet\x12\x0e\n\x06\x63onfig\x18\x02 \x01(\t\"H\n\x18ResolveAllConfigResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\\\n\x16ResolveAllConfigResult\x12\x0e\n\x06\x63onfig\x18\x01 \x01(\t\x12\x32\n\x07\x63onfigs\x18\x02 \x03(\x0b\x32!.Ydb.DynamicConfig.ResolvedConfigBo\n\"tech.ydb.proto.draft.dynamicconfigZFgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_DynamicConfig\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.protos.ydb_dynamic_config_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\"tech.ydb.proto.draft.dynamicconfigZFgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_DynamicConfig\370\001\001' + _CONFIGIDENTITY._serialized_start=88 + _CONFIGIDENTITY._serialized_end=138 + _SETCONFIGREQUEST._serialized_start=141 + _SETCONFIGREQUEST._serialized_end=281 + _SETCONFIGRESPONSE._serialized_start=283 + _SETCONFIGRESPONSE._serialized_end=348 + _REPLACECONFIGREQUEST._serialized_start=351 + _REPLACECONFIGREQUEST._serialized_end=495 + _REPLACECONFIGRESPONSE._serialized_start=497 + _REPLACECONFIGRESPONSE._serialized_end=566 + _DROPCONFIGREQUEST._serialized_start=569 + _DROPCONFIGREQUEST._serialized_end=700 + _DROPCONFIGRESPONSE._serialized_start=702 + _DROPCONFIGRESPONSE._serialized_end=768 + _ADDVOLATILECONFIGREQUEST._serialized_start=770 + _ADDVOLATILECONFIGREQUEST._serialized_end=871 + _ADDVOLATILECONFIGRESPONSE._serialized_start=873 + _ADDVOLATILECONFIGRESPONSE._serialized_end=946 + _VOLATILECONFIG._serialized_start=948 + _VOLATILECONFIG._serialized_end=992 + _GETCONFIGREQUEST._serialized_start=994 + _GETCONFIGREQUEST._serialized_end=1071 + _GETCONFIGRESPONSE._serialized_start=1073 + _GETCONFIGRESPONSE._serialized_end=1138 + _GETCONFIGRESULT._serialized_start=1141 + _GETCONFIGRESULT._serialized_end=1288 + _VOLATILECONFIGMETADATA._serialized_start=1290 + _VOLATILECONFIGMETADATA._serialized_end=1344 + _GETMETADATAREQUEST._serialized_start=1346 + _GETMETADATAREQUEST._serialized_end=1425 + _GETMETADATARESPONSE._serialized_start=1427 + _GETMETADATARESPONSE._serialized_end=1494 + _GETMETADATARESULT._serialized_start=1496 + _GETMETADATARESULT._serialized_end=1602 + _REMOVEVOLATILECONFIGREQUEST._serialized_start=1605 + _REMOVEVOLATILECONFIGREQUEST._serialized_end=1916 + _REMOVEVOLATILECONFIGREQUEST_IDSTODELETE._serialized_start=1857 + _REMOVEVOLATILECONFIGREQUEST_IDSTODELETE._serialized_end=1883 + _REMOVEVOLATILECONFIGRESPONSE._serialized_start=1918 + _REMOVEVOLATILECONFIGRESPONSE._serialized_end=1994 + _GETNODELABELSREQUEST._serialized_start=1996 + _GETNODELABELSREQUEST._serialized_end=2094 + _YAMLLABEL._serialized_start=2096 + _YAMLLABEL._serialized_end=2137 + _GETNODELABELSRESPONSE._serialized_start=2139 + _GETNODELABELSRESPONSE._serialized_end=2208 + _GETNODELABELSRESULT._serialized_start=2210 + _GETNODELABELSRESULT._serialized_end=2277 + _RESOLVECONFIGREQUEST._serialized_start=2280 + _RESOLVECONFIGREQUEST._serialized_end=2484 + _RESOLVECONFIGRESPONSE._serialized_start=2486 + _RESOLVECONFIGRESPONSE._serialized_end=2555 + _RESOLVECONFIGRESULT._serialized_start=2557 + _RESOLVECONFIGRESULT._serialized_end=2594 + _RESOLVEALLCONFIGREQUEST._serialized_start=2597 + _RESOLVEALLCONFIGREQUEST._serialized_end=2784 + _YAMLLABELEXT._serialized_start=2787 + _YAMLLABELEXT._serialized_end=2969 + _YAMLLABELEXT_LABELTYPE._serialized_start=2895 + _YAMLLABELEXT_LABELTYPE._serialized_end=2959 + _LABELSET._serialized_start=2971 + _LABELSET._serialized_end=3030 + _RESOLVEDCONFIG._serialized_start=3032 + _RESOLVEDCONFIG._serialized_end=3113 + _RESOLVEALLCONFIGRESPONSE._serialized_start=3115 + _RESOLVEALLCONFIGRESPONSE._serialized_end=3187 + _RESOLVEALLCONFIGRESULT._serialized_start=3189 + _RESOLVEALLCONFIGRESULT._serialized_end=3281 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/draft/protos/ydb_dynamic_config_pb2.pyi b/ydb/_grpc/v5/draft/protos/ydb_dynamic_config_pb2.pyi new file mode 100644 index 00000000..0a66d6a6 --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_dynamic_config_pb2.pyi @@ -0,0 +1,271 @@ +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class AddVolatileConfigRequest(_message.Message): + __slots__ = ["config", "operation_params"] + CONFIG_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + config: str + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., config: _Optional[str] = ...) -> None: ... + +class AddVolatileConfigResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ConfigIdentity(_message.Message): + __slots__ = ["cluster", "version"] + CLUSTER_FIELD_NUMBER: _ClassVar[int] + VERSION_FIELD_NUMBER: _ClassVar[int] + cluster: str + version: int + def __init__(self, version: _Optional[int] = ..., cluster: _Optional[str] = ...) -> None: ... + +class DropConfigRequest(_message.Message): + __slots__ = ["identity", "operation_params"] + IDENTITY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + identity: ConfigIdentity + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., identity: _Optional[_Union[ConfigIdentity, _Mapping]] = ...) -> None: ... + +class DropConfigResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class GetConfigRequest(_message.Message): + __slots__ = ["operation_params"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class GetConfigResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class GetConfigResult(_message.Message): + __slots__ = ["config", "identity", "volatile_configs"] + CONFIG_FIELD_NUMBER: _ClassVar[int] + IDENTITY_FIELD_NUMBER: _ClassVar[int] + VOLATILE_CONFIGS_FIELD_NUMBER: _ClassVar[int] + config: str + identity: ConfigIdentity + volatile_configs: _containers.RepeatedCompositeFieldContainer[VolatileConfig] + def __init__(self, config: _Optional[str] = ..., volatile_configs: _Optional[_Iterable[_Union[VolatileConfig, _Mapping]]] = ..., identity: _Optional[_Union[ConfigIdentity, _Mapping]] = ...) -> None: ... + +class GetMetadataRequest(_message.Message): + __slots__ = ["operation_params"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class GetMetadataResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class GetMetadataResult(_message.Message): + __slots__ = ["metadata", "volatile_configs"] + METADATA_FIELD_NUMBER: _ClassVar[int] + VOLATILE_CONFIGS_FIELD_NUMBER: _ClassVar[int] + metadata: str + volatile_configs: _containers.RepeatedCompositeFieldContainer[VolatileConfigMetadata] + def __init__(self, metadata: _Optional[str] = ..., volatile_configs: _Optional[_Iterable[_Union[VolatileConfigMetadata, _Mapping]]] = ...) -> None: ... + +class GetNodeLabelsRequest(_message.Message): + __slots__ = ["node_id", "operation_params"] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + node_id: int + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., node_id: _Optional[int] = ...) -> None: ... + +class GetNodeLabelsResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class GetNodeLabelsResult(_message.Message): + __slots__ = ["labels"] + LABELS_FIELD_NUMBER: _ClassVar[int] + labels: _containers.RepeatedCompositeFieldContainer[YamlLabel] + def __init__(self, labels: _Optional[_Iterable[_Union[YamlLabel, _Mapping]]] = ...) -> None: ... + +class LabelSet(_message.Message): + __slots__ = ["labels"] + LABELS_FIELD_NUMBER: _ClassVar[int] + labels: _containers.RepeatedCompositeFieldContainer[YamlLabelExt] + def __init__(self, labels: _Optional[_Iterable[_Union[YamlLabelExt, _Mapping]]] = ...) -> None: ... + +class RemoveVolatileConfigRequest(_message.Message): + __slots__ = ["all", "force", "identity", "ids", "operation_params"] + class IdsToDelete(_message.Message): + __slots__ = ["ids"] + IDS_FIELD_NUMBER: _ClassVar[int] + ids: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, ids: _Optional[_Iterable[int]] = ...) -> None: ... + ALL_FIELD_NUMBER: _ClassVar[int] + FORCE_FIELD_NUMBER: _ClassVar[int] + IDENTITY_FIELD_NUMBER: _ClassVar[int] + IDS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + all: bool + force: bool + identity: ConfigIdentity + ids: RemoveVolatileConfigRequest.IdsToDelete + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., identity: _Optional[_Union[ConfigIdentity, _Mapping]] = ..., force: bool = ..., ids: _Optional[_Union[RemoveVolatileConfigRequest.IdsToDelete, _Mapping]] = ..., all: bool = ...) -> None: ... + +class RemoveVolatileConfigResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ReplaceConfigRequest(_message.Message): + __slots__ = ["allow_unknown_fields", "config", "dry_run", "operation_params"] + ALLOW_UNKNOWN_FIELDS_FIELD_NUMBER: _ClassVar[int] + CONFIG_FIELD_NUMBER: _ClassVar[int] + DRY_RUN_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + allow_unknown_fields: bool + config: str + dry_run: bool + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., config: _Optional[str] = ..., dry_run: bool = ..., allow_unknown_fields: bool = ...) -> None: ... + +class ReplaceConfigResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ResolveAllConfigRequest(_message.Message): + __slots__ = ["config", "operation_params", "verbose_response", "volatile_configs"] + CONFIG_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + VERBOSE_RESPONSE_FIELD_NUMBER: _ClassVar[int] + VOLATILE_CONFIGS_FIELD_NUMBER: _ClassVar[int] + config: str + operation_params: _ydb_operation_pb2.OperationParams + verbose_response: bool + volatile_configs: _containers.RepeatedCompositeFieldContainer[VolatileConfig] + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., config: _Optional[str] = ..., volatile_configs: _Optional[_Iterable[_Union[VolatileConfig, _Mapping]]] = ..., verbose_response: bool = ...) -> None: ... + +class ResolveAllConfigResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ResolveAllConfigResult(_message.Message): + __slots__ = ["config", "configs"] + CONFIGS_FIELD_NUMBER: _ClassVar[int] + CONFIG_FIELD_NUMBER: _ClassVar[int] + config: str + configs: _containers.RepeatedCompositeFieldContainer[ResolvedConfig] + def __init__(self, config: _Optional[str] = ..., configs: _Optional[_Iterable[_Union[ResolvedConfig, _Mapping]]] = ...) -> None: ... + +class ResolveConfigRequest(_message.Message): + __slots__ = ["config", "labels", "operation_params", "volatile_configs"] + CONFIG_FIELD_NUMBER: _ClassVar[int] + LABELS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + VOLATILE_CONFIGS_FIELD_NUMBER: _ClassVar[int] + config: str + labels: _containers.RepeatedCompositeFieldContainer[YamlLabel] + operation_params: _ydb_operation_pb2.OperationParams + volatile_configs: _containers.RepeatedCompositeFieldContainer[VolatileConfig] + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., config: _Optional[str] = ..., volatile_configs: _Optional[_Iterable[_Union[VolatileConfig, _Mapping]]] = ..., labels: _Optional[_Iterable[_Union[YamlLabel, _Mapping]]] = ...) -> None: ... + +class ResolveConfigResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ResolveConfigResult(_message.Message): + __slots__ = ["config"] + CONFIG_FIELD_NUMBER: _ClassVar[int] + config: str + def __init__(self, config: _Optional[str] = ...) -> None: ... + +class ResolvedConfig(_message.Message): + __slots__ = ["config", "label_sets"] + CONFIG_FIELD_NUMBER: _ClassVar[int] + LABEL_SETS_FIELD_NUMBER: _ClassVar[int] + config: str + label_sets: _containers.RepeatedCompositeFieldContainer[LabelSet] + def __init__(self, label_sets: _Optional[_Iterable[_Union[LabelSet, _Mapping]]] = ..., config: _Optional[str] = ...) -> None: ... + +class SetConfigRequest(_message.Message): + __slots__ = ["allow_unknown_fields", "config", "dry_run", "operation_params"] + ALLOW_UNKNOWN_FIELDS_FIELD_NUMBER: _ClassVar[int] + CONFIG_FIELD_NUMBER: _ClassVar[int] + DRY_RUN_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + allow_unknown_fields: bool + config: str + dry_run: bool + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., config: _Optional[str] = ..., dry_run: bool = ..., allow_unknown_fields: bool = ...) -> None: ... + +class SetConfigResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class VolatileConfig(_message.Message): + __slots__ = ["config", "id"] + CONFIG_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + config: str + id: int + def __init__(self, id: _Optional[int] = ..., config: _Optional[str] = ...) -> None: ... + +class VolatileConfigMetadata(_message.Message): + __slots__ = ["id", "metadata"] + ID_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + id: int + metadata: str + def __init__(self, id: _Optional[int] = ..., metadata: _Optional[str] = ...) -> None: ... + +class YamlLabel(_message.Message): + __slots__ = ["label", "value"] + LABEL_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + label: str + value: str + def __init__(self, label: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + +class YamlLabelExt(_message.Message): + __slots__ = ["label", "type", "value"] + class LabelType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + COMMON: YamlLabelExt.LabelType + EMPTY: YamlLabelExt.LabelType + LABEL_FIELD_NUMBER: _ClassVar[int] + NOT_SET: YamlLabelExt.LabelType + TYPE_FIELD_NUMBER: _ClassVar[int] + UNSPECIFIED: YamlLabelExt.LabelType + VALUE_FIELD_NUMBER: _ClassVar[int] + label: str + type: YamlLabelExt.LabelType + value: str + def __init__(self, label: _Optional[str] = ..., type: _Optional[_Union[YamlLabelExt.LabelType, str]] = ..., value: _Optional[str] = ...) -> None: ... diff --git a/ydb/_grpc/v5/draft/protos/ydb_dynamic_config_pb2_grpc.py b/ydb/_grpc/v5/draft/protos/ydb_dynamic_config_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_dynamic_config_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.py b/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.py new file mode 100644 index 00000000..bd97faea --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.py @@ -0,0 +1,499 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/protos/ydb_federated_query.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos.annotations import sensitive_pb2 as protos_dot_annotations_dot_sensitive__pb2 +from ydb._grpc.v5.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 +from ydb._grpc.v5.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 +from ydb._grpc.v5.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&draft/protos/ydb_federated_query.proto\x12\x0e\x46\x65\x64\x65ratedQuery\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x16protos/ydb_value.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"{\n\x03\x41\x63l\x12\x32\n\nvisibility\x18\x01 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"@\n\nVisibility\x12\x1a\n\x16VISIBILITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\t\n\x05SCOPE\x10\x02\"\x83\x03\n\x06Limits\x12!\n\x0fvcpu_rate_limit\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0f\x66low_rate_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fvcpu_time_limit\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_size\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_rows\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1e\n\x0cmemory_limit\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\nresult_ttl\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x11\x65xecution_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x38\n\x12\x65xecution_deadline\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\t\n\x07timeout\"\xef\x03\n\x14StreamingDisposition\x12(\n\x06oldest\x18\x01 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\'\n\x05\x66resh\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x42\n\tfrom_time\x18\x03 \x01(\x0b\x32-.FederatedQuery.StreamingDisposition.FromTimeH\x00\x12@\n\x08time_ago\x18\x04 \x01(\x0b\x32,.FederatedQuery.StreamingDisposition.TimeAgoH\x00\x12W\n\x14\x66rom_last_checkpoint\x18\x05 \x01(\x0b\x32\x37.FederatedQuery.StreamingDisposition.FromLastCheckpointH\x00\x1a\x39\n\x08\x46romTime\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x36\n\x07TimeAgo\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a#\n\x12\x46romLastCheckpoint\x12\r\n\x05\x66orce\x18\x01 \x01(\x08\x42\r\n\x0b\x64isposition\"\xd4\x04\n\x0cQueryContent\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12&\n\x06limits\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Limits\x12\x1a\n\x04text\x18\x05 \x01(\tB\x0c\xa2\xe6*\x08\n\x06\x08\x01\x10\x80\xa0\x06\x12\x11\n\tautomatic\x18\x06 \x01(\x08\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\x12\x64\n\x12\x65xecution_settings\x18\n \x03(\x0b\x32\x33.FederatedQuery.QueryContent.ExecutionSettingsEntryB\x13\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x03\x18\x80 \x12\x38\n\x06syntax\x18\x0b \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\x1a\x38\n\x16\x45xecutionSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"E\n\tQueryType\x12\x1a\n\x16QUERY_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tANALYTICS\x10\x01\x12\r\n\tSTREAMING\x10\x02\"?\n\x0bQuerySyntax\x12\x1c\n\x18QUERY_SYNTAX_UNSPECIFIED\x10\x00\x12\n\n\x06YQL_V1\x10\x01\x12\x06\n\x02PG\x10\x02\"\xe5\x01\n\nCommonMeta\x12\x17\n\x02id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x1f\n\ncreated_by\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12 \n\x0bmodified_by\x18\x03 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12.\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bmodified_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x08revision\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbf\x06\n\tQueryMeta\x12*\n\x06\x63ommon\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x30\n\x0csubmitted_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstarted_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x37\n\x06status\x18\x05 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x1f\n\x17last_job_query_revision\x18\x06 \x01(\x03\x12\x13\n\x0blast_job_id\x18\x07 \x01(\t\x12-\n\texpire_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10result_expire_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nstarted_by\x18\n \x01(\t\x12\x14\n\naborted_by\x18\x0b \x01(\tH\x00\x12\x13\n\tpaused_by\x18\x0c \x01(\tH\x00\x12\x1d\n\x15has_saved_checkpoints\x18\r \x01(\x08\"\x83\x02\n\rComputeStatus\x12\x1e\n\x1a\x43OMPUTE_STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STARTING\x10\x01\x12\x13\n\x0f\x41\x42ORTED_BY_USER\x10\x02\x12\x15\n\x11\x41\x42ORTED_BY_SYSTEM\x10\x03\x12\x14\n\x10\x41\x42ORTING_BY_USER\x10\x04\x12\x16\n\x12\x41\x42ORTING_BY_SYSTEM\x10\x05\x12\x0c\n\x08RESUMING\x10\x06\x12\x0b\n\x07RUNNING\x10\x07\x12\r\n\tCOMPLETED\x10\x08\x12\x0e\n\nCOMPLETING\x10\x0c\x12\n\n\x06\x46\x41ILED\x10\t\x12\x0b\n\x07\x46\x41ILING\x10\r\x12\n\n\x06PAUSED\x10\x0b\x12\x0b\n\x07PAUSING\x10\nB\x08\n\x06\x61\x63tion\"\xc9\x01\n\nBriefQuery\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\'\n\x04meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x05 \x01(\x08\"\x19\n\tQueryPlan\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x18\n\x08QueryAst\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\t\"]\n\rResultSetMeta\x12\x1b\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x1c\n\nrows_count\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x11\n\ttruncated\x18\x03 \x01(\x08\"\xf6\x02\n\x05Query\x12\'\n\x04meta\x18\x01 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\'\n\x04plan\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x04 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x30\n\x0ftransient_issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\"\x1f\n\x0fQueryStatistics\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x8e\x02\n\x12\x43reateQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x04 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x43reateQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\".\n\x11\x43reateQueryResult\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x93\x04\n\x12ListQueriesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x39\n\x06\x66ilter\x18\x04 \x01(\x0b\x32).FederatedQuery.ListQueriesRequest.Filter\x1a\xcc\x02\n\x06\x46ilter\x12:\n\nquery_type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12?\n\x06status\x18\x02 \x03(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatusB\x06\x9a\xe6*\x02\x18\x14\x12\x31\n\x04mode\x18\x03 \x03(\x0e\x32\x1b.FederatedQuery.ExecuteModeB\x06\x9a\xe6*\x02\x18\x14\x12\x15\n\x04name\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x05 \x01(\x08\x12\x32\n\nvisibility\x18\x06 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x30\n\tautomatic\x18\x07 \x01(\x0e\x32\x1d.FederatedQuery.AutomaticType\"C\n\x13ListQueriesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"`\n\x11ListQueriesResult\x12)\n\x05query\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.BriefQuery\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"p\n\x14\x44\x65scribeQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"E\n\x15\x44\x65scribeQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\";\n\x13\x44\x65scribeQueryResult\x12$\n\x05query\x18\x01 \x01(\x0b\x32\x15.FederatedQuery.Query\"q\n\x15GetQueryStatusRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"F\n\x16GetQueryStatusResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"f\n\x14GetQueryStatusResult\x12\x37\n\x06status\x18\x01 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x15\n\rmeta_revision\x18\x02 \x01(\x03\"\xb5\x01\n\x12\x44\x65leteQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x44\x65leteQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x44\x65leteQueryResult\"\x8a\x03\n\x12ModifyQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12-\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x05 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12\x36\n\x0fstate_load_mode\x18\x06 \x01(\x0e\x32\x1d.FederatedQuery.StateLoadMode\x12#\n\x11previous_revision\x18\x07 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13ModifyQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11ModifyQueryResult\"\xe3\x01\n\x13\x43ontrolQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12+\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.QueryAction\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"D\n\x14\x43ontrolQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ontrolQueryResult\"\xed\x01\n\x08\x42riefJob\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x12\n\nquery_name\x18\t \x01(\t\x12\x32\n\nvisibility\x18\n \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x83\x04\n\x03Job\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x0c\n\x04text\x18\x02 \x01(\t\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\'\n\x04plan\x18\x04 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\x12\x12\n\nquery_name\x18\t \x01(\t\x12 \n\x03\x61\x63l\x18\n \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x06syntax\x18\r \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\"\x8c\x02\n\x0fListJobsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x10\n\x08query_id\x18\x05 \x01(\t\x12\x36\n\x06\x66ilter\x18\x04 \x01(\x0b\x32&.FederatedQuery.ListJobsRequest.Filter\x1a:\n\x06\x46ilter\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\"@\n\x10ListJobsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Y\n\x0eListJobsResult\x12%\n\x03job\x18\x01 \x03(\x0b\x32\x18.FederatedQuery.BriefJob\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"l\n\x12\x44\x65scribeJobRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\x06job_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"C\n\x13\x44\x65scribeJobResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"5\n\x11\x44\x65scribeJobResult\x12 \n\x03job\x18\x01 \x01(\x0b\x32\x13.FederatedQuery.Job\"\x15\n\x13\x43urrentIAMTokenAuth\"\n\n\x08NoneAuth\")\n\x12ServiceAccountAuth\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\xba\x01\n\x07IamAuth\x12:\n\x0b\x63urrent_iam\x18\x01 \x01(\x0b\x32#.FederatedQuery.CurrentIAMTokenAuthH\x00\x12=\n\x0fservice_account\x18\x02 \x01(\x0b\x32\".FederatedQuery.ServiceAccountAuthH\x00\x12(\n\x04none\x18\x03 \x01(\x0b\x32\x18.FederatedQuery.NoneAuthH\x00\x42\n\n\x08identity\"\x98\x01\n\x0b\x44\x61taStreams\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"g\n\nMonitoring\x12\x18\n\x07project\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12\x18\n\x07\x63luster\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12%\n\x04\x61uth\x18\x03 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x98\x01\n\x0bYdbDatabase\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"\xf8\x01\n\x11\x43lickHouseCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"Y\n\x17ObjectStorageConnection\x12\x17\n\x06\x62ucket\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x91\x02\n\x11PostgreSQLCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x17\n\x06schema\x18\t \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"\xae\x04\n\x11\x43onnectionSetting\x12\x33\n\x0cydb_database\x18\x01 \x01(\x0b\x32\x1b.FederatedQuery.YdbDatabaseH\x00\x12?\n\x12\x63lickhouse_cluster\x18\x02 \x01(\x0b\x32!.FederatedQuery.ClickHouseClusterH\x00\x12\x33\n\x0c\x64\x61ta_streams\x18\x03 \x01(\x0b\x32\x1b.FederatedQuery.DataStreamsH\x00\x12\x41\n\x0eobject_storage\x18\x04 \x01(\x0b\x32\'.FederatedQuery.ObjectStorageConnectionH\x00\x12\x30\n\nmonitoring\x18\x05 \x01(\x0b\x32\x1a.FederatedQuery.MonitoringH\x00\x12?\n\x12postgresql_cluster\x18\x06 \x01(\x0b\x32!.FederatedQuery.PostgreSQLClusterH\x00\"\xa9\x01\n\x0e\x43onnectionType\x12\x1f\n\x1b\x43ONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cYDB_DATABASE\x10\x01\x12\x16\n\x12\x43LICKHOUSE_CLUSTER\x10\x02\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x03\x12\x12\n\x0eOBJECT_STORAGE\x10\x04\x12\x0e\n\nMONITORING\x10\x05\x12\x16\n\x12POSTGRESQL_CLUSTER\x10\x06\x42\x0c\n\nconnection\"\xa2\x01\n\x11\x43onnectionContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"j\n\nConnection\x12\x32\n\x07\x63ontent\x18\x01 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xaa\x01\n\x17\x43reateConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x43reateConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"<\n\x16\x43reateConnectionResult\x12\"\n\rconnection_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\x84\x03\n\x16ListConnectionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12=\n\x06\x66ilter\x18\x04 \x01(\x0b\x32-.FederatedQuery.ListConnectionsRequest.Filter\x1a\xb5\x01\n\x06\x46ilter\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\x12I\n\x0f\x63onnection_type\x18\x03 \x01(\x0e\x32\x30.FederatedQuery.ConnectionSetting.ConnectionType\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"G\n\x17ListConnectionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"i\n\x15ListConnectionsResult\x12.\n\nconnection\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.Connection\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"z\n\x19\x44\x65scribeConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"J\n\x1a\x44\x65scribeConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"J\n\x18\x44\x65scribeConnectionResult\x12.\n\nconnection\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.Connection\"\xf3\x01\n\x17ModifyConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07\x63ontent\x18\x03 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18ModifyConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16ModifyConnectionResult\"\xbf\x01\n\x17\x44\x65leteConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x44\x65leteConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16\x44\x65leteConnectionResult\"\x86\x01\n\x15TestConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\"F\n\x16TestConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x16\n\x14TestConnectionResult\"\xcc\x01\n\x14GetResultDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\x10result_set_index\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12\x18\n\x06offset\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1c\n\x05limit\x18\x05 \x01(\x03\x42\r\xb2\xe6*\t[1; 1000]\"E\n\x15GetResultDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"9\n\x13GetResultDataResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\".\n\x06Schema\x12$\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.ColumnB\x07\x9a\xe6*\x03\x18\xe8\x07\"\xa2\x02\n\x12\x44\x61taStreamsBinding\x12 \n\x0bstream_name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x0b\x63ompression\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12U\n\x0e\x66ormat_setting\x18\x05 \x03(\x0b\x32\x35.FederatedQuery.DataStreamsBinding.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x92\x04\n\x14ObjectStorageBinding\x12;\n\x06subset\x18\x01 \x03(\x0b\x32+.FederatedQuery.ObjectStorageBinding.Subset\x1a\xbc\x03\n\x06Subset\x12!\n\x0cpath_pattern\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12^\n\x0e\x66ormat_setting\x18\x03 \x03(\x0b\x32>.FederatedQuery.ObjectStorageBinding.Subset.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x12\x1c\n\x0b\x63ompression\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x05 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12O\n\nprojection\x18\x06 \x03(\x0b\x32;.FederatedQuery.ObjectStorageBinding.Subset.ProjectionEntry\x12\x16\n\x0epartitioned_by\x18\x07 \x03(\t\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fProjectionEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xea\x01\n\x0e\x42indingSetting\x12:\n\x0c\x64\x61ta_streams\x18\x01 \x01(\x0b\x32\".FederatedQuery.DataStreamsBindingH\x00\x12>\n\x0eobject_storage\x18\x02 \x01(\x0b\x32$.FederatedQuery.ObjectStorageBindingH\x00\"Q\n\x0b\x42indingType\x12\x1c\n\x18\x42INDING_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x01\x12\x12\n\x0eOBJECT_STORAGE\x10\x02\x42\t\n\x07\x62inding\"\xe5\x01\n\x0c\x42riefBinding\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12(\n\x04meta\x18\x03 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x38\n\x04type\x18\x04 \x01(\x0e\x32*.FederatedQuery.BindingSetting.BindingType\x12\x32\n\nvisibility\x18\x05 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"\xc0\x01\n\x0e\x42indingContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07setting\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingSetting\x12 \n\x03\x61\x63l\x18\x04 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"d\n\x07\x42inding\x12/\n\x07\x63ontent\x18\x01 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xa4\x01\n\x14\x43reateBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12/\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x43reateBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"6\n\x13\x43reateBindingResult\x12\x1f\n\nbinding_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\xd3\x02\n\x13ListBindingsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12:\n\x06\x66ilter\x18\x04 \x01(\x0b\x32*.FederatedQuery.ListBindingsRequest.Filter\x1a\x8a\x01\n\x06\x46ilter\x12\x1e\n\rconnection_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x03 \x01(\x08\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"D\n\x14ListBindingsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"e\n\x12ListBindingsResult\x12-\n\x07\x62inding\x18\x01 \x03(\x0b\x32\x1c.FederatedQuery.BriefBinding\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"t\n\x16\x44\x65scribeBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"G\n\x17\x44\x65scribeBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"A\n\x15\x44\x65scribeBindingResult\x12(\n\x07\x62inding\x18\x01 \x01(\x0b\x32\x17.FederatedQuery.Binding\"\xea\x01\n\x14ModifyBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15ModifyBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13ModifyBindingResult\"\xb9\x01\n\x14\x44\x65leteBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x44\x65leteBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13\x44\x65leteBindingResult*q\n\x0b\x45xecuteMode\x12\x1c\n\x18\x45XECUTE_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04SAVE\x10\x01\x12\t\n\x05PARSE\x10\x02\x12\x0b\n\x07\x43OMPILE\x10\x03\x12\x0c\n\x08VALIDATE\x10\x04\x12\x0b\n\x07\x45XPLAIN\x10\x05\x12\x07\n\x03RUN\x10\x06*y\n\x0bQueryAction\x12\x1c\n\x18QUERY_ACTION_UNSPECIFIED\x10\x00\x12\t\n\x05PAUSE\x10\x01\x12\x14\n\x10PAUSE_GRACEFULLY\x10\x02\x12\t\n\x05\x41\x42ORT\x10\x03\x12\x14\n\x10\x41\x42ORT_GRACEFULLY\x10\x04\x12\n\n\x06RESUME\x10\x05*U\n\rStateLoadMode\x12\x1f\n\x1bSTATE_LOAD_MODE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45MPTY\x10\x01\x12\x18\n\x14\x46ROM_LAST_CHECKPOINT\x10\x02*Q\n\rAutomaticType\x12\x1e\n\x1a\x41UTOMATIC_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\x11\n\rNOT_AUTOMATIC\x10\x02\x42r\n$tech.ydb.proto.draft.federated.queryZGgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_FederatedQuery\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.protos.ydb_federated_query_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n$tech.ydb.proto.draft.federated.queryZGgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_FederatedQuery\370\001\001' + _LIMITS.fields_by_name['vcpu_rate_limit']._options = None + _LIMITS.fields_by_name['vcpu_rate_limit']._serialized_options = b'\262\346*\004>= 0' + _LIMITS.fields_by_name['flow_rate_limit']._options = None + _LIMITS.fields_by_name['flow_rate_limit']._serialized_options = b'\262\346*\004>= 0' + _LIMITS.fields_by_name['vcpu_time_limit']._options = None + _LIMITS.fields_by_name['vcpu_time_limit']._serialized_options = b'\262\346*\004>= 0' + _LIMITS.fields_by_name['max_result_size']._options = None + _LIMITS.fields_by_name['max_result_size']._serialized_options = b'\262\346*\004>= 0' + _LIMITS.fields_by_name['max_result_rows']._options = None + _LIMITS.fields_by_name['max_result_rows']._serialized_options = b'\262\346*\004>= 0' + _LIMITS.fields_by_name['memory_limit']._options = None + _LIMITS.fields_by_name['memory_limit']._serialized_options = b'\262\346*\004>= 0' + _QUERYCONTENT_EXECUTIONSETTINGSENTRY._options = None + _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_options = b'8\001' + _QUERYCONTENT.fields_by_name['name']._options = None + _QUERYCONTENT.fields_by_name['name']._serialized_options = b'\242\346*\003\030\200\010' + _QUERYCONTENT.fields_by_name['text']._options = None + _QUERYCONTENT.fields_by_name['text']._serialized_options = b'\242\346*\010\n\006\010\001\020\200\240\006' + _QUERYCONTENT.fields_by_name['description']._options = None + _QUERYCONTENT.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200P' + _QUERYCONTENT.fields_by_name['execution_settings']._options = None + _QUERYCONTENT.fields_by_name['execution_settings']._serialized_options = b'\252\346*\010\n\006\n\004\010\001\020d\242\346*\003\030\200 ' + _COMMONMETA.fields_by_name['id']._options = None + _COMMONMETA.fields_by_name['id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _COMMONMETA.fields_by_name['created_by']._options = None + _COMMONMETA.fields_by_name['created_by']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _COMMONMETA.fields_by_name['modified_by']._options = None + _COMMONMETA.fields_by_name['modified_by']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _COMMONMETA.fields_by_name['revision']._options = None + _COMMONMETA.fields_by_name['revision']._serialized_options = b'\262\346*\004>= 0' + _BRIEFQUERY.fields_by_name['name']._options = None + _BRIEFQUERY.fields_by_name['name']._serialized_options = b'\242\346*\003\030\200\010' + _RESULTSETMETA.fields_by_name['rows_count']._options = None + _RESULTSETMETA.fields_by_name['rows_count']._serialized_options = b'\262\346*\004>= 0' + _CREATEQUERYREQUEST.fields_by_name['idempotency_key']._options = None + _CREATEQUERYREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _CREATEQUERYRESULT.fields_by_name['query_id']._options = None + _CREATEQUERYRESULT.fields_by_name['query_id']._serialized_options = b'\242\346*\003\030\200\010' + _LISTQUERIESREQUEST_FILTER.fields_by_name['status']._options = None + _LISTQUERIESREQUEST_FILTER.fields_by_name['status']._serialized_options = b'\232\346*\002\030\024' + _LISTQUERIESREQUEST_FILTER.fields_by_name['mode']._options = None + _LISTQUERIESREQUEST_FILTER.fields_by_name['mode']._serialized_options = b'\232\346*\002\030\024' + _LISTQUERIESREQUEST_FILTER.fields_by_name['name']._options = None + _LISTQUERIESREQUEST_FILTER.fields_by_name['name']._serialized_options = b'\242\346*\003\030\200\010' + _LISTQUERIESREQUEST.fields_by_name['page_token']._options = None + _LISTQUERIESREQUEST.fields_by_name['page_token']._serialized_options = b'\242\346*\003\030\200\010' + _LISTQUERIESREQUEST.fields_by_name['limit']._options = None + _LISTQUERIESREQUEST.fields_by_name['limit']._serialized_options = b'\262\346*\010[1; 100]' + _LISTQUERIESRESULT.fields_by_name['next_page_token']._options = None + _LISTQUERIESRESULT.fields_by_name['next_page_token']._serialized_options = b'\242\346*\003\030\200\010' + _DESCRIBEQUERYREQUEST.fields_by_name['query_id']._options = None + _DESCRIBEQUERYREQUEST.fields_by_name['query_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _GETQUERYSTATUSREQUEST.fields_by_name['query_id']._options = None + _GETQUERYSTATUSREQUEST.fields_by_name['query_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _DELETEQUERYREQUEST.fields_by_name['query_id']._options = None + _DELETEQUERYREQUEST.fields_by_name['query_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _DELETEQUERYREQUEST.fields_by_name['previous_revision']._options = None + _DELETEQUERYREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' + _DELETEQUERYREQUEST.fields_by_name['idempotency_key']._options = None + _DELETEQUERYREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _MODIFYQUERYREQUEST.fields_by_name['query_id']._options = None + _MODIFYQUERYREQUEST.fields_by_name['query_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _MODIFYQUERYREQUEST.fields_by_name['previous_revision']._options = None + _MODIFYQUERYREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' + _MODIFYQUERYREQUEST.fields_by_name['idempotency_key']._options = None + _MODIFYQUERYREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _CONTROLQUERYREQUEST.fields_by_name['query_id']._options = None + _CONTROLQUERYREQUEST.fields_by_name['query_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _CONTROLQUERYREQUEST.fields_by_name['previous_revision']._options = None + _CONTROLQUERYREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' + _CONTROLQUERYREQUEST.fields_by_name['idempotency_key']._options = None + _CONTROLQUERYREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _LISTJOBSREQUEST_FILTER.fields_by_name['query_id']._options = None + _LISTJOBSREQUEST_FILTER.fields_by_name['query_id']._serialized_options = b'\242\346*\003\030\200\010' + _LISTJOBSREQUEST.fields_by_name['page_token']._options = None + _LISTJOBSREQUEST.fields_by_name['page_token']._serialized_options = b'\242\346*\003\030\200\010' + _LISTJOBSREQUEST.fields_by_name['limit']._options = None + _LISTJOBSREQUEST.fields_by_name['limit']._serialized_options = b'\262\346*\010[1; 100]' + _LISTJOBSRESULT.fields_by_name['next_page_token']._options = None + _LISTJOBSRESULT.fields_by_name['next_page_token']._serialized_options = b'\242\346*\003\030\200\010' + _DESCRIBEJOBREQUEST.fields_by_name['job_id']._options = None + _DESCRIBEJOBREQUEST.fields_by_name['job_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _SERVICEACCOUNTAUTH.fields_by_name['id']._options = None + _SERVICEACCOUNTAUTH.fields_by_name['id']._serialized_options = b'\242\346*\003\030\200\010' + _DATASTREAMS.fields_by_name['database_id']._options = None + _DATASTREAMS.fields_by_name['database_id']._serialized_options = b'\242\346*\003\030\200\010' + _DATASTREAMS.fields_by_name['endpoint']._options = None + _DATASTREAMS.fields_by_name['endpoint']._serialized_options = b'\242\346*\003\030\200\010' + _DATASTREAMS.fields_by_name['database']._options = None + _DATASTREAMS.fields_by_name['database']._serialized_options = b'\242\346*\003\030\200\010' + _MONITORING.fields_by_name['project']._options = None + _MONITORING.fields_by_name['project']._serialized_options = b'\242\346*\003\030\310\001' + _MONITORING.fields_by_name['cluster']._options = None + _MONITORING.fields_by_name['cluster']._serialized_options = b'\242\346*\003\030\310\001' + _YDBDATABASE.fields_by_name['database_id']._options = None + _YDBDATABASE.fields_by_name['database_id']._serialized_options = b'\242\346*\003\030\200\010' + _YDBDATABASE.fields_by_name['endpoint']._options = None + _YDBDATABASE.fields_by_name['endpoint']._serialized_options = b'\242\346*\003\030\200\010' + _YDBDATABASE.fields_by_name['database']._options = None + _YDBDATABASE.fields_by_name['database']._serialized_options = b'\242\346*\003\030\200\010' + _CLICKHOUSECLUSTER.fields_by_name['database_id']._options = None + _CLICKHOUSECLUSTER.fields_by_name['database_id']._serialized_options = b'\242\346*\003\030\200\010' + _CLICKHOUSECLUSTER.fields_by_name['database_name']._options = None + _CLICKHOUSECLUSTER.fields_by_name['database_name']._serialized_options = b'\242\346*\003\030\200\010' + _CLICKHOUSECLUSTER.fields_by_name['login']._options = None + _CLICKHOUSECLUSTER.fields_by_name['login']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _CLICKHOUSECLUSTER.fields_by_name['password']._options = None + _CLICKHOUSECLUSTER.fields_by_name['password']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _CLICKHOUSECLUSTER.fields_by_name['host']._options = None + _CLICKHOUSECLUSTER.fields_by_name['host']._serialized_options = b'\242\346*\003\030\200\010' + _CLICKHOUSECLUSTER.fields_by_name['port']._options = None + _CLICKHOUSECLUSTER.fields_by_name['port']._serialized_options = b'\262\346*\n[0; 65536]' + _OBJECTSTORAGECONNECTION.fields_by_name['bucket']._options = None + _OBJECTSTORAGECONNECTION.fields_by_name['bucket']._serialized_options = b'\242\346*\003\030\200\010' + _POSTGRESQLCLUSTER.fields_by_name['database_id']._options = None + _POSTGRESQLCLUSTER.fields_by_name['database_id']._serialized_options = b'\242\346*\003\030\200\010' + _POSTGRESQLCLUSTER.fields_by_name['database_name']._options = None + _POSTGRESQLCLUSTER.fields_by_name['database_name']._serialized_options = b'\242\346*\003\030\200\010' + _POSTGRESQLCLUSTER.fields_by_name['login']._options = None + _POSTGRESQLCLUSTER.fields_by_name['login']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _POSTGRESQLCLUSTER.fields_by_name['password']._options = None + _POSTGRESQLCLUSTER.fields_by_name['password']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _POSTGRESQLCLUSTER.fields_by_name['schema']._options = None + _POSTGRESQLCLUSTER.fields_by_name['schema']._serialized_options = b'\242\346*\003\030\200\010' + _POSTGRESQLCLUSTER.fields_by_name['host']._options = None + _POSTGRESQLCLUSTER.fields_by_name['host']._serialized_options = b'\242\346*\003\030\200\010' + _POSTGRESQLCLUSTER.fields_by_name['port']._options = None + _POSTGRESQLCLUSTER.fields_by_name['port']._serialized_options = b'\262\346*\n[0; 65536]' + _CONNECTIONCONTENT.fields_by_name['name']._options = None + _CONNECTIONCONTENT.fields_by_name['name']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _CONNECTIONCONTENT.fields_by_name['description']._options = None + _CONNECTIONCONTENT.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200P' + _CREATECONNECTIONREQUEST.fields_by_name['idempotency_key']._options = None + _CREATECONNECTIONREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _CREATECONNECTIONRESULT.fields_by_name['connection_id']._options = None + _CREATECONNECTIONRESULT.fields_by_name['connection_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _LISTCONNECTIONSREQUEST_FILTER.fields_by_name['name']._options = None + _LISTCONNECTIONSREQUEST_FILTER.fields_by_name['name']._serialized_options = b'\242\346*\003\030\200\010' + _LISTCONNECTIONSREQUEST.fields_by_name['page_token']._options = None + _LISTCONNECTIONSREQUEST.fields_by_name['page_token']._serialized_options = b'\242\346*\003\030\200\010' + _LISTCONNECTIONSREQUEST.fields_by_name['limit']._options = None + _LISTCONNECTIONSREQUEST.fields_by_name['limit']._serialized_options = b'\262\346*\010[1; 100]' + _LISTCONNECTIONSRESULT.fields_by_name['next_page_token']._options = None + _LISTCONNECTIONSRESULT.fields_by_name['next_page_token']._serialized_options = b'\242\346*\003\030\200\010' + _DESCRIBECONNECTIONREQUEST.fields_by_name['connection_id']._options = None + _DESCRIBECONNECTIONREQUEST.fields_by_name['connection_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _MODIFYCONNECTIONREQUEST.fields_by_name['connection_id']._options = None + _MODIFYCONNECTIONREQUEST.fields_by_name['connection_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _MODIFYCONNECTIONREQUEST.fields_by_name['previous_revision']._options = None + _MODIFYCONNECTIONREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' + _MODIFYCONNECTIONREQUEST.fields_by_name['idempotency_key']._options = None + _MODIFYCONNECTIONREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _DELETECONNECTIONREQUEST.fields_by_name['connection_id']._options = None + _DELETECONNECTIONREQUEST.fields_by_name['connection_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _DELETECONNECTIONREQUEST.fields_by_name['previous_revision']._options = None + _DELETECONNECTIONREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' + _DELETECONNECTIONREQUEST.fields_by_name['idempotency_key']._options = None + _DELETECONNECTIONREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _GETRESULTDATAREQUEST.fields_by_name['query_id']._options = None + _GETRESULTDATAREQUEST.fields_by_name['query_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _GETRESULTDATAREQUEST.fields_by_name['result_set_index']._options = None + _GETRESULTDATAREQUEST.fields_by_name['result_set_index']._serialized_options = b'\262\346*\004>= 0' + _GETRESULTDATAREQUEST.fields_by_name['offset']._options = None + _GETRESULTDATAREQUEST.fields_by_name['offset']._serialized_options = b'\262\346*\004>= 0' + _GETRESULTDATAREQUEST.fields_by_name['limit']._options = None + _GETRESULTDATAREQUEST.fields_by_name['limit']._serialized_options = b'\262\346*\t[1; 1000]' + _SCHEMA.fields_by_name['column']._options = None + _SCHEMA.fields_by_name['column']._serialized_options = b'\232\346*\003\030\350\007' + _DATASTREAMSBINDING_FORMATSETTINGENTRY._options = None + _DATASTREAMSBINDING_FORMATSETTINGENTRY._serialized_options = b'8\001' + _DATASTREAMSBINDING.fields_by_name['stream_name']._options = None + _DATASTREAMSBINDING.fields_by_name['stream_name']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _DATASTREAMSBINDING.fields_by_name['format']._options = None + _DATASTREAMSBINDING.fields_by_name['format']._serialized_options = b'\242\346*\003\030\200\010' + _DATASTREAMSBINDING.fields_by_name['compression']._options = None + _DATASTREAMSBINDING.fields_by_name['compression']._serialized_options = b'\242\346*\003\030\200\010' + _DATASTREAMSBINDING.fields_by_name['format_setting']._options = None + _DATASTREAMSBINDING.fields_by_name['format_setting']._serialized_options = b'\232\346*\002\030d' + _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._options = None + _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._serialized_options = b'8\001' + _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._options = None + _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._serialized_options = b'8\001' + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['path_pattern']._options = None + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['path_pattern']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['format']._options = None + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['format']._serialized_options = b'\242\346*\003\030\200\010' + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['format_setting']._options = None + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['format_setting']._serialized_options = b'\232\346*\002\030d' + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['compression']._options = None + _OBJECTSTORAGEBINDING_SUBSET.fields_by_name['compression']._serialized_options = b'\242\346*\003\030\200\010' + _BRIEFBINDING.fields_by_name['name']._options = None + _BRIEFBINDING.fields_by_name['name']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _BRIEFBINDING.fields_by_name['connection_id']._options = None + _BRIEFBINDING.fields_by_name['connection_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _BINDINGCONTENT.fields_by_name['name']._options = None + _BINDINGCONTENT.fields_by_name['name']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _BINDINGCONTENT.fields_by_name['connection_id']._options = None + _BINDINGCONTENT.fields_by_name['connection_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _BINDINGCONTENT.fields_by_name['description']._options = None + _BINDINGCONTENT.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200P' + _CREATEBINDINGREQUEST.fields_by_name['idempotency_key']._options = None + _CREATEBINDINGREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _CREATEBINDINGRESULT.fields_by_name['binding_id']._options = None + _CREATEBINDINGRESULT.fields_by_name['binding_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _LISTBINDINGSREQUEST_FILTER.fields_by_name['connection_id']._options = None + _LISTBINDINGSREQUEST_FILTER.fields_by_name['connection_id']._serialized_options = b'\242\346*\003\030\200\010' + _LISTBINDINGSREQUEST_FILTER.fields_by_name['name']._options = None + _LISTBINDINGSREQUEST_FILTER.fields_by_name['name']._serialized_options = b'\242\346*\003\030\200\010' + _LISTBINDINGSREQUEST.fields_by_name['page_token']._options = None + _LISTBINDINGSREQUEST.fields_by_name['page_token']._serialized_options = b'\242\346*\003\030\200\010' + _LISTBINDINGSREQUEST.fields_by_name['limit']._options = None + _LISTBINDINGSREQUEST.fields_by_name['limit']._serialized_options = b'\262\346*\010[1; 100]' + _LISTBINDINGSRESULT.fields_by_name['next_page_token']._options = None + _LISTBINDINGSRESULT.fields_by_name['next_page_token']._serialized_options = b'\242\346*\003\030\200\010' + _DESCRIBEBINDINGREQUEST.fields_by_name['binding_id']._options = None + _DESCRIBEBINDINGREQUEST.fields_by_name['binding_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _MODIFYBINDINGREQUEST.fields_by_name['binding_id']._options = None + _MODIFYBINDINGREQUEST.fields_by_name['binding_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _MODIFYBINDINGREQUEST.fields_by_name['previous_revision']._options = None + _MODIFYBINDINGREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' + _MODIFYBINDINGREQUEST.fields_by_name['idempotency_key']._options = None + _MODIFYBINDINGREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _DELETEBINDINGREQUEST.fields_by_name['binding_id']._options = None + _DELETEBINDINGREQUEST.fields_by_name['binding_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' + _DELETEBINDINGREQUEST.fields_by_name['previous_revision']._options = None + _DELETEBINDINGREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' + _DELETEBINDINGREQUEST.fields_by_name['idempotency_key']._options = None + _DELETEBINDINGREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _EXECUTEMODE._serialized_start=15700 + _EXECUTEMODE._serialized_end=15813 + _QUERYACTION._serialized_start=15815 + _QUERYACTION._serialized_end=15936 + _STATELOADMODE._serialized_start=15938 + _STATELOADMODE._serialized_end=16023 + _AUTOMATICTYPE._serialized_start=16025 + _AUTOMATICTYPE._serialized_end=16106 + _ACL._serialized_start=309 + _ACL._serialized_end=432 + _ACL_VISIBILITY._serialized_start=368 + _ACL_VISIBILITY._serialized_end=432 + _LIMITS._serialized_start=435 + _LIMITS._serialized_end=822 + _STREAMINGDISPOSITION._serialized_start=825 + _STREAMINGDISPOSITION._serialized_end=1320 + _STREAMINGDISPOSITION_FROMTIME._serialized_start=1155 + _STREAMINGDISPOSITION_FROMTIME._serialized_end=1212 + _STREAMINGDISPOSITION_TIMEAGO._serialized_start=1214 + _STREAMINGDISPOSITION_TIMEAGO._serialized_end=1268 + _STREAMINGDISPOSITION_FROMLASTCHECKPOINT._serialized_start=1270 + _STREAMINGDISPOSITION_FROMLASTCHECKPOINT._serialized_end=1305 + _QUERYCONTENT._serialized_start=1323 + _QUERYCONTENT._serialized_end=1919 + _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_start=1727 + _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_end=1783 + _QUERYCONTENT_QUERYTYPE._serialized_start=1785 + _QUERYCONTENT_QUERYTYPE._serialized_end=1854 + _QUERYCONTENT_QUERYSYNTAX._serialized_start=1856 + _QUERYCONTENT_QUERYSYNTAX._serialized_end=1919 + _COMMONMETA._serialized_start=1922 + _COMMONMETA._serialized_end=2151 + _QUERYMETA._serialized_start=2154 + _QUERYMETA._serialized_end=2985 + _QUERYMETA_COMPUTESTATUS._serialized_start=2716 + _QUERYMETA_COMPUTESTATUS._serialized_end=2975 + _BRIEFQUERY._serialized_start=2988 + _BRIEFQUERY._serialized_end=3189 + _QUERYPLAN._serialized_start=3191 + _QUERYPLAN._serialized_end=3216 + _QUERYAST._serialized_start=3218 + _QUERYAST._serialized_end=3242 + _RESULTSETMETA._serialized_start=3244 + _RESULTSETMETA._serialized_end=3337 + _QUERY._serialized_start=3340 + _QUERY._serialized_end=3714 + _QUERYSTATISTICS._serialized_start=3716 + _QUERYSTATISTICS._serialized_end=3747 + _CREATEQUERYREQUEST._serialized_start=3750 + _CREATEQUERYREQUEST._serialized_end=4020 + _CREATEQUERYRESPONSE._serialized_start=4022 + _CREATEQUERYRESPONSE._serialized_end=4089 + _CREATEQUERYRESULT._serialized_start=4091 + _CREATEQUERYRESULT._serialized_end=4137 + _LISTQUERIESREQUEST._serialized_start=4140 + _LISTQUERIESREQUEST._serialized_end=4671 + _LISTQUERIESREQUEST_FILTER._serialized_start=4339 + _LISTQUERIESREQUEST_FILTER._serialized_end=4671 + _LISTQUERIESRESPONSE._serialized_start=4673 + _LISTQUERIESRESPONSE._serialized_end=4740 + _LISTQUERIESRESULT._serialized_start=4742 + _LISTQUERIESRESULT._serialized_end=4838 + _DESCRIBEQUERYREQUEST._serialized_start=4840 + _DESCRIBEQUERYREQUEST._serialized_end=4952 + _DESCRIBEQUERYRESPONSE._serialized_start=4954 + _DESCRIBEQUERYRESPONSE._serialized_end=5023 + _DESCRIBEQUERYRESULT._serialized_start=5025 + _DESCRIBEQUERYRESULT._serialized_end=5084 + _GETQUERYSTATUSREQUEST._serialized_start=5086 + _GETQUERYSTATUSREQUEST._serialized_end=5199 + _GETQUERYSTATUSRESPONSE._serialized_start=5201 + _GETQUERYSTATUSRESPONSE._serialized_end=5271 + _GETQUERYSTATUSRESULT._serialized_start=5273 + _GETQUERYSTATUSRESULT._serialized_end=5375 + _DELETEQUERYREQUEST._serialized_start=5378 + _DELETEQUERYREQUEST._serialized_end=5559 + _DELETEQUERYRESPONSE._serialized_start=5561 + _DELETEQUERYRESPONSE._serialized_end=5628 + _DELETEQUERYRESULT._serialized_start=5630 + _DELETEQUERYRESULT._serialized_end=5649 + _MODIFYQUERYREQUEST._serialized_start=5652 + _MODIFYQUERYREQUEST._serialized_end=6046 + _MODIFYQUERYRESPONSE._serialized_start=6048 + _MODIFYQUERYRESPONSE._serialized_end=6115 + _MODIFYQUERYRESULT._serialized_start=6117 + _MODIFYQUERYRESULT._serialized_end=6136 + _CONTROLQUERYREQUEST._serialized_start=6139 + _CONTROLQUERYREQUEST._serialized_end=6366 + _CONTROLQUERYRESPONSE._serialized_start=6368 + _CONTROLQUERYRESPONSE._serialized_end=6436 + _CONTROLQUERYRESULT._serialized_start=6438 + _CONTROLQUERYRESULT._serialized_end=6458 + _BRIEFJOB._serialized_start=6461 + _BRIEFJOB._serialized_end=6698 + _JOB._serialized_start=6701 + _JOB._serialized_end=7216 + _LISTJOBSREQUEST._serialized_start=7219 + _LISTJOBSREQUEST._serialized_end=7487 + _LISTJOBSREQUEST_FILTER._serialized_start=7429 + _LISTJOBSREQUEST_FILTER._serialized_end=7487 + _LISTJOBSRESPONSE._serialized_start=7489 + _LISTJOBSRESPONSE._serialized_end=7553 + _LISTJOBSRESULT._serialized_start=7555 + _LISTJOBSRESULT._serialized_end=7644 + _DESCRIBEJOBREQUEST._serialized_start=7646 + _DESCRIBEJOBREQUEST._serialized_end=7754 + _DESCRIBEJOBRESPONSE._serialized_start=7756 + _DESCRIBEJOBRESPONSE._serialized_end=7823 + _DESCRIBEJOBRESULT._serialized_start=7825 + _DESCRIBEJOBRESULT._serialized_end=7878 + _CURRENTIAMTOKENAUTH._serialized_start=7880 + _CURRENTIAMTOKENAUTH._serialized_end=7901 + _NONEAUTH._serialized_start=7903 + _NONEAUTH._serialized_end=7913 + _SERVICEACCOUNTAUTH._serialized_start=7915 + _SERVICEACCOUNTAUTH._serialized_end=7956 + _IAMAUTH._serialized_start=7959 + _IAMAUTH._serialized_end=8145 + _DATASTREAMS._serialized_start=8148 + _DATASTREAMS._serialized_end=8300 + _MONITORING._serialized_start=8302 + _MONITORING._serialized_end=8405 + _YDBDATABASE._serialized_start=8408 + _YDBDATABASE._serialized_end=8560 + _CLICKHOUSECLUSTER._serialized_start=8563 + _CLICKHOUSECLUSTER._serialized_end=8811 + _OBJECTSTORAGECONNECTION._serialized_start=8813 + _OBJECTSTORAGECONNECTION._serialized_end=8902 + _POSTGRESQLCLUSTER._serialized_start=8905 + _POSTGRESQLCLUSTER._serialized_end=9178 + _CONNECTIONSETTING._serialized_start=9181 + _CONNECTIONSETTING._serialized_end=9739 + _CONNECTIONSETTING_CONNECTIONTYPE._serialized_start=9556 + _CONNECTIONSETTING_CONNECTIONTYPE._serialized_end=9725 + _CONNECTIONCONTENT._serialized_start=9742 + _CONNECTIONCONTENT._serialized_end=9904 + _CONNECTION._serialized_start=9906 + _CONNECTION._serialized_end=10012 + _CREATECONNECTIONREQUEST._serialized_start=10015 + _CREATECONNECTIONREQUEST._serialized_end=10185 + _CREATECONNECTIONRESPONSE._serialized_start=10187 + _CREATECONNECTIONRESPONSE._serialized_end=10259 + _CREATECONNECTIONRESULT._serialized_start=10261 + _CREATECONNECTIONRESULT._serialized_end=10321 + _LISTCONNECTIONSREQUEST._serialized_start=10324 + _LISTCONNECTIONSREQUEST._serialized_end=10712 + _LISTCONNECTIONSREQUEST_FILTER._serialized_start=10531 + _LISTCONNECTIONSREQUEST_FILTER._serialized_end=10712 + _LISTCONNECTIONSRESPONSE._serialized_start=10714 + _LISTCONNECTIONSRESPONSE._serialized_end=10785 + _LISTCONNECTIONSRESULT._serialized_start=10787 + _LISTCONNECTIONSRESULT._serialized_end=10892 + _DESCRIBECONNECTIONREQUEST._serialized_start=10894 + _DESCRIBECONNECTIONREQUEST._serialized_end=11016 + _DESCRIBECONNECTIONRESPONSE._serialized_start=11018 + _DESCRIBECONNECTIONRESPONSE._serialized_end=11092 + _DESCRIBECONNECTIONRESULT._serialized_start=11094 + _DESCRIBECONNECTIONRESULT._serialized_end=11168 + _MODIFYCONNECTIONREQUEST._serialized_start=11171 + _MODIFYCONNECTIONREQUEST._serialized_end=11414 + _MODIFYCONNECTIONRESPONSE._serialized_start=11416 + _MODIFYCONNECTIONRESPONSE._serialized_end=11488 + _MODIFYCONNECTIONRESULT._serialized_start=11490 + _MODIFYCONNECTIONRESULT._serialized_end=11514 + _DELETECONNECTIONREQUEST._serialized_start=11517 + _DELETECONNECTIONREQUEST._serialized_end=11708 + _DELETECONNECTIONRESPONSE._serialized_start=11710 + _DELETECONNECTIONRESPONSE._serialized_end=11782 + _DELETECONNECTIONRESULT._serialized_start=11784 + _DELETECONNECTIONRESULT._serialized_end=11808 + _TESTCONNECTIONREQUEST._serialized_start=11811 + _TESTCONNECTIONREQUEST._serialized_end=11945 + _TESTCONNECTIONRESPONSE._serialized_start=11947 + _TESTCONNECTIONRESPONSE._serialized_end=12017 + _TESTCONNECTIONRESULT._serialized_start=12019 + _TESTCONNECTIONRESULT._serialized_end=12041 + _GETRESULTDATAREQUEST._serialized_start=12044 + _GETRESULTDATAREQUEST._serialized_end=12248 + _GETRESULTDATARESPONSE._serialized_start=12250 + _GETRESULTDATARESPONSE._serialized_end=12319 + _GETRESULTDATARESULT._serialized_start=12321 + _GETRESULTDATARESULT._serialized_end=12378 + _SCHEMA._serialized_start=12380 + _SCHEMA._serialized_end=12426 + _DATASTREAMSBINDING._serialized_start=12429 + _DATASTREAMSBINDING._serialized_end=12719 + _DATASTREAMSBINDING_FORMATSETTINGENTRY._serialized_start=12667 + _DATASTREAMSBINDING_FORMATSETTINGENTRY._serialized_end=12719 + _OBJECTSTORAGEBINDING._serialized_start=12722 + _OBJECTSTORAGEBINDING._serialized_end=13252 + _OBJECTSTORAGEBINDING_SUBSET._serialized_start=12808 + _OBJECTSTORAGEBINDING_SUBSET._serialized_end=13252 + _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._serialized_start=12667 + _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._serialized_end=12719 + _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._serialized_start=13203 + _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._serialized_end=13252 + _BINDINGSETTING._serialized_start=13255 + _BINDINGSETTING._serialized_end=13489 + _BINDINGSETTING_BINDINGTYPE._serialized_start=13397 + _BINDINGSETTING_BINDINGTYPE._serialized_end=13478 + _BRIEFBINDING._serialized_start=13492 + _BRIEFBINDING._serialized_end=13721 + _BINDINGCONTENT._serialized_start=13724 + _BINDINGCONTENT._serialized_end=13916 + _BINDING._serialized_start=13918 + _BINDING._serialized_end=14018 + _CREATEBINDINGREQUEST._serialized_start=14021 + _CREATEBINDINGREQUEST._serialized_end=14185 + _CREATEBINDINGRESPONSE._serialized_start=14187 + _CREATEBINDINGRESPONSE._serialized_end=14256 + _CREATEBINDINGRESULT._serialized_start=14258 + _CREATEBINDINGRESULT._serialized_end=14312 + _LISTBINDINGSREQUEST._serialized_start=14315 + _LISTBINDINGSREQUEST._serialized_end=14654 + _LISTBINDINGSREQUEST_FILTER._serialized_start=14516 + _LISTBINDINGSREQUEST_FILTER._serialized_end=14654 + _LISTBINDINGSRESPONSE._serialized_start=14656 + _LISTBINDINGSRESPONSE._serialized_end=14724 + _LISTBINDINGSRESULT._serialized_start=14726 + _LISTBINDINGSRESULT._serialized_end=14827 + _DESCRIBEBINDINGREQUEST._serialized_start=14829 + _DESCRIBEBINDINGREQUEST._serialized_end=14945 + _DESCRIBEBINDINGRESPONSE._serialized_start=14947 + _DESCRIBEBINDINGRESPONSE._serialized_end=15018 + _DESCRIBEBINDINGRESULT._serialized_start=15020 + _DESCRIBEBINDINGRESULT._serialized_end=15085 + _MODIFYBINDINGREQUEST._serialized_start=15088 + _MODIFYBINDINGREQUEST._serialized_end=15322 + _MODIFYBINDINGRESPONSE._serialized_start=15324 + _MODIFYBINDINGRESPONSE._serialized_end=15393 + _MODIFYBINDINGRESULT._serialized_start=15395 + _MODIFYBINDINGRESULT._serialized_end=15416 + _DELETEBINDINGREQUEST._serialized_start=15419 + _DELETEBINDINGREQUEST._serialized_end=15604 + _DELETEBINDINGRESPONSE._serialized_start=15606 + _DELETEBINDINGRESPONSE._serialized_end=15675 + _DELETEBINDINGRESULT._serialized_start=15677 + _DELETEBINDINGRESULT._serialized_end=15698 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.pyi b/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.pyi new file mode 100644 index 00000000..bc950b0a --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.pyi @@ -0,0 +1,1125 @@ +from protos.annotations import sensitive_pb2 as _sensitive_pb2 +from protos.annotations import validation_pb2 as _validation_pb2 +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from protos import ydb_value_pb2 as _ydb_value_pb2 +from protos import ydb_issue_message_pb2 as _ydb_issue_message_pb2 +from google.protobuf import duration_pb2 as _duration_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import empty_pb2 as _empty_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +ABORT: QueryAction +ABORT_GRACEFULLY: QueryAction +AUTOMATIC: AutomaticType +AUTOMATIC_TYPE_UNSPECIFIED: AutomaticType +COMPILE: ExecuteMode +DESCRIPTOR: _descriptor.FileDescriptor +EMPTY: StateLoadMode +EXECUTE_MODE_UNSPECIFIED: ExecuteMode +EXPLAIN: ExecuteMode +FROM_LAST_CHECKPOINT: StateLoadMode +NOT_AUTOMATIC: AutomaticType +PARSE: ExecuteMode +PAUSE: QueryAction +PAUSE_GRACEFULLY: QueryAction +QUERY_ACTION_UNSPECIFIED: QueryAction +RESUME: QueryAction +RUN: ExecuteMode +SAVE: ExecuteMode +STATE_LOAD_MODE_UNSPECIFIED: StateLoadMode +VALIDATE: ExecuteMode + +class Acl(_message.Message): + __slots__ = ["visibility"] + class Visibility(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + PRIVATE: Acl.Visibility + SCOPE: Acl.Visibility + VISIBILITY_FIELD_NUMBER: _ClassVar[int] + VISIBILITY_UNSPECIFIED: Acl.Visibility + visibility: Acl.Visibility + def __init__(self, visibility: _Optional[_Union[Acl.Visibility, str]] = ...) -> None: ... + +class Binding(_message.Message): + __slots__ = ["content", "meta"] + CONTENT_FIELD_NUMBER: _ClassVar[int] + META_FIELD_NUMBER: _ClassVar[int] + content: BindingContent + meta: CommonMeta + def __init__(self, content: _Optional[_Union[BindingContent, _Mapping]] = ..., meta: _Optional[_Union[CommonMeta, _Mapping]] = ...) -> None: ... + +class BindingContent(_message.Message): + __slots__ = ["acl", "connection_id", "description", "name", "setting"] + ACL_FIELD_NUMBER: _ClassVar[int] + CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + SETTING_FIELD_NUMBER: _ClassVar[int] + acl: Acl + connection_id: str + description: str + name: str + setting: BindingSetting + def __init__(self, name: _Optional[str] = ..., connection_id: _Optional[str] = ..., setting: _Optional[_Union[BindingSetting, _Mapping]] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., description: _Optional[str] = ...) -> None: ... + +class BindingSetting(_message.Message): + __slots__ = ["data_streams", "object_storage"] + class BindingType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + BINDING_TYPE_UNSPECIFIED: BindingSetting.BindingType + DATA_STREAMS: BindingSetting.BindingType + DATA_STREAMS_FIELD_NUMBER: _ClassVar[int] + OBJECT_STORAGE: BindingSetting.BindingType + OBJECT_STORAGE_FIELD_NUMBER: _ClassVar[int] + data_streams: DataStreamsBinding + object_storage: ObjectStorageBinding + def __init__(self, data_streams: _Optional[_Union[DataStreamsBinding, _Mapping]] = ..., object_storage: _Optional[_Union[ObjectStorageBinding, _Mapping]] = ...) -> None: ... + +class BriefBinding(_message.Message): + __slots__ = ["connection_id", "meta", "name", "type", "visibility"] + CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] + META_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + VISIBILITY_FIELD_NUMBER: _ClassVar[int] + connection_id: str + meta: CommonMeta + name: str + type: BindingSetting.BindingType + visibility: Acl.Visibility + def __init__(self, name: _Optional[str] = ..., connection_id: _Optional[str] = ..., meta: _Optional[_Union[CommonMeta, _Mapping]] = ..., type: _Optional[_Union[BindingSetting.BindingType, str]] = ..., visibility: _Optional[_Union[Acl.Visibility, str]] = ...) -> None: ... + +class BriefJob(_message.Message): + __slots__ = ["automatic", "expire_at", "meta", "query_meta", "query_name", "visibility"] + AUTOMATIC_FIELD_NUMBER: _ClassVar[int] + EXPIRE_AT_FIELD_NUMBER: _ClassVar[int] + META_FIELD_NUMBER: _ClassVar[int] + QUERY_META_FIELD_NUMBER: _ClassVar[int] + QUERY_NAME_FIELD_NUMBER: _ClassVar[int] + VISIBILITY_FIELD_NUMBER: _ClassVar[int] + automatic: bool + expire_at: _timestamp_pb2.Timestamp + meta: CommonMeta + query_meta: QueryMeta + query_name: str + visibility: Acl.Visibility + def __init__(self, meta: _Optional[_Union[CommonMeta, _Mapping]] = ..., query_meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., query_name: _Optional[str] = ..., visibility: _Optional[_Union[Acl.Visibility, str]] = ..., automatic: bool = ..., expire_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class BriefQuery(_message.Message): + __slots__ = ["automatic", "meta", "name", "type", "visibility"] + AUTOMATIC_FIELD_NUMBER: _ClassVar[int] + META_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + VISIBILITY_FIELD_NUMBER: _ClassVar[int] + automatic: bool + meta: QueryMeta + name: str + type: QueryContent.QueryType + visibility: Acl.Visibility + def __init__(self, type: _Optional[_Union[QueryContent.QueryType, str]] = ..., name: _Optional[str] = ..., meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., visibility: _Optional[_Union[Acl.Visibility, str]] = ..., automatic: bool = ...) -> None: ... + +class ClickHouseCluster(_message.Message): + __slots__ = ["auth", "database_id", "database_name", "host", "login", "password", "port", "secure"] + AUTH_FIELD_NUMBER: _ClassVar[int] + DATABASE_ID_FIELD_NUMBER: _ClassVar[int] + DATABASE_NAME_FIELD_NUMBER: _ClassVar[int] + HOST_FIELD_NUMBER: _ClassVar[int] + LOGIN_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + SECURE_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + database_id: str + database_name: str + host: str + login: str + password: str + port: int + secure: bool + def __init__(self, database_id: _Optional[str] = ..., database_name: _Optional[str] = ..., login: _Optional[str] = ..., password: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ..., host: _Optional[str] = ..., port: _Optional[int] = ..., secure: bool = ...) -> None: ... + +class CommonMeta(_message.Message): + __slots__ = ["created_at", "created_by", "id", "modified_at", "modified_by", "revision"] + CREATED_AT_FIELD_NUMBER: _ClassVar[int] + CREATED_BY_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + MODIFIED_AT_FIELD_NUMBER: _ClassVar[int] + MODIFIED_BY_FIELD_NUMBER: _ClassVar[int] + REVISION_FIELD_NUMBER: _ClassVar[int] + created_at: _timestamp_pb2.Timestamp + created_by: str + id: str + modified_at: _timestamp_pb2.Timestamp + modified_by: str + revision: int + def __init__(self, id: _Optional[str] = ..., created_by: _Optional[str] = ..., modified_by: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., modified_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., revision: _Optional[int] = ...) -> None: ... + +class Connection(_message.Message): + __slots__ = ["content", "meta"] + CONTENT_FIELD_NUMBER: _ClassVar[int] + META_FIELD_NUMBER: _ClassVar[int] + content: ConnectionContent + meta: CommonMeta + def __init__(self, content: _Optional[_Union[ConnectionContent, _Mapping]] = ..., meta: _Optional[_Union[CommonMeta, _Mapping]] = ...) -> None: ... + +class ConnectionContent(_message.Message): + __slots__ = ["acl", "description", "name", "setting"] + ACL_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + SETTING_FIELD_NUMBER: _ClassVar[int] + acl: Acl + description: str + name: str + setting: ConnectionSetting + def __init__(self, name: _Optional[str] = ..., setting: _Optional[_Union[ConnectionSetting, _Mapping]] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., description: _Optional[str] = ...) -> None: ... + +class ConnectionSetting(_message.Message): + __slots__ = ["clickhouse_cluster", "data_streams", "monitoring", "object_storage", "postgresql_cluster", "ydb_database"] + class ConnectionType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + CLICKHOUSE_CLUSTER: ConnectionSetting.ConnectionType + CLICKHOUSE_CLUSTER_FIELD_NUMBER: _ClassVar[int] + CONNECTION_TYPE_UNSPECIFIED: ConnectionSetting.ConnectionType + DATA_STREAMS: ConnectionSetting.ConnectionType + DATA_STREAMS_FIELD_NUMBER: _ClassVar[int] + MONITORING: ConnectionSetting.ConnectionType + MONITORING_FIELD_NUMBER: _ClassVar[int] + OBJECT_STORAGE: ConnectionSetting.ConnectionType + OBJECT_STORAGE_FIELD_NUMBER: _ClassVar[int] + POSTGRESQL_CLUSTER: ConnectionSetting.ConnectionType + POSTGRESQL_CLUSTER_FIELD_NUMBER: _ClassVar[int] + YDB_DATABASE: ConnectionSetting.ConnectionType + YDB_DATABASE_FIELD_NUMBER: _ClassVar[int] + clickhouse_cluster: ClickHouseCluster + data_streams: DataStreams + monitoring: Monitoring + object_storage: ObjectStorageConnection + postgresql_cluster: PostgreSQLCluster + ydb_database: YdbDatabase + def __init__(self, ydb_database: _Optional[_Union[YdbDatabase, _Mapping]] = ..., clickhouse_cluster: _Optional[_Union[ClickHouseCluster, _Mapping]] = ..., data_streams: _Optional[_Union[DataStreams, _Mapping]] = ..., object_storage: _Optional[_Union[ObjectStorageConnection, _Mapping]] = ..., monitoring: _Optional[_Union[Monitoring, _Mapping]] = ..., postgresql_cluster: _Optional[_Union[PostgreSQLCluster, _Mapping]] = ...) -> None: ... + +class ControlQueryRequest(_message.Message): + __slots__ = ["action", "idempotency_key", "operation_params", "previous_revision", "query_id"] + ACTION_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PREVIOUS_REVISION_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + action: QueryAction + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + previous_revision: int + query_id: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., query_id: _Optional[str] = ..., action: _Optional[_Union[QueryAction, str]] = ..., previous_revision: _Optional[int] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class ControlQueryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ControlQueryResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class CreateBindingRequest(_message.Message): + __slots__ = ["content", "idempotency_key", "operation_params"] + CONTENT_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + content: BindingContent + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., content: _Optional[_Union[BindingContent, _Mapping]] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class CreateBindingResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CreateBindingResult(_message.Message): + __slots__ = ["binding_id"] + BINDING_ID_FIELD_NUMBER: _ClassVar[int] + binding_id: str + def __init__(self, binding_id: _Optional[str] = ...) -> None: ... + +class CreateConnectionRequest(_message.Message): + __slots__ = ["content", "idempotency_key", "operation_params"] + CONTENT_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + content: ConnectionContent + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., content: _Optional[_Union[ConnectionContent, _Mapping]] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class CreateConnectionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CreateConnectionResult(_message.Message): + __slots__ = ["connection_id"] + CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] + connection_id: str + def __init__(self, connection_id: _Optional[str] = ...) -> None: ... + +class CreateQueryRequest(_message.Message): + __slots__ = ["content", "disposition", "execute_mode", "idempotency_key", "operation_params"] + CONTENT_FIELD_NUMBER: _ClassVar[int] + DISPOSITION_FIELD_NUMBER: _ClassVar[int] + EXECUTE_MODE_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + content: QueryContent + disposition: StreamingDisposition + execute_mode: ExecuteMode + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., content: _Optional[_Union[QueryContent, _Mapping]] = ..., execute_mode: _Optional[_Union[ExecuteMode, str]] = ..., disposition: _Optional[_Union[StreamingDisposition, _Mapping]] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class CreateQueryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CreateQueryResult(_message.Message): + __slots__ = ["query_id"] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + query_id: str + def __init__(self, query_id: _Optional[str] = ...) -> None: ... + +class CurrentIAMTokenAuth(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class DataStreams(_message.Message): + __slots__ = ["auth", "database", "database_id", "endpoint", "secure"] + AUTH_FIELD_NUMBER: _ClassVar[int] + DATABASE_FIELD_NUMBER: _ClassVar[int] + DATABASE_ID_FIELD_NUMBER: _ClassVar[int] + ENDPOINT_FIELD_NUMBER: _ClassVar[int] + SECURE_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + database: str + database_id: str + endpoint: str + secure: bool + def __init__(self, database_id: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ..., endpoint: _Optional[str] = ..., database: _Optional[str] = ..., secure: bool = ...) -> None: ... + +class DataStreamsBinding(_message.Message): + __slots__ = ["compression", "format", "format_setting", "schema", "stream_name"] + class FormatSettingEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + COMPRESSION_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + FORMAT_SETTING_FIELD_NUMBER: _ClassVar[int] + SCHEMA_FIELD_NUMBER: _ClassVar[int] + STREAM_NAME_FIELD_NUMBER: _ClassVar[int] + compression: str + format: str + format_setting: _containers.ScalarMap[str, str] + schema: Schema + stream_name: str + def __init__(self, stream_name: _Optional[str] = ..., format: _Optional[str] = ..., compression: _Optional[str] = ..., schema: _Optional[_Union[Schema, _Mapping]] = ..., format_setting: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class DeleteBindingRequest(_message.Message): + __slots__ = ["binding_id", "idempotency_key", "operation_params", "previous_revision"] + BINDING_ID_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PREVIOUS_REVISION_FIELD_NUMBER: _ClassVar[int] + binding_id: str + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + previous_revision: int + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., binding_id: _Optional[str] = ..., previous_revision: _Optional[int] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class DeleteBindingResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DeleteBindingResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class DeleteConnectionRequest(_message.Message): + __slots__ = ["connection_id", "idempotency_key", "operation_params", "previous_revision"] + CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PREVIOUS_REVISION_FIELD_NUMBER: _ClassVar[int] + connection_id: str + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + previous_revision: int + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., connection_id: _Optional[str] = ..., previous_revision: _Optional[int] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class DeleteConnectionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DeleteConnectionResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class DeleteQueryRequest(_message.Message): + __slots__ = ["idempotency_key", "operation_params", "previous_revision", "query_id"] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PREVIOUS_REVISION_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + previous_revision: int + query_id: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., query_id: _Optional[str] = ..., previous_revision: _Optional[int] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class DeleteQueryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DeleteQueryResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class DescribeBindingRequest(_message.Message): + __slots__ = ["binding_id", "operation_params"] + BINDING_ID_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + binding_id: str + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., binding_id: _Optional[str] = ...) -> None: ... + +class DescribeBindingResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeBindingResult(_message.Message): + __slots__ = ["binding"] + BINDING_FIELD_NUMBER: _ClassVar[int] + binding: Binding + def __init__(self, binding: _Optional[_Union[Binding, _Mapping]] = ...) -> None: ... + +class DescribeConnectionRequest(_message.Message): + __slots__ = ["connection_id", "operation_params"] + CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + connection_id: str + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., connection_id: _Optional[str] = ...) -> None: ... + +class DescribeConnectionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeConnectionResult(_message.Message): + __slots__ = ["connection"] + CONNECTION_FIELD_NUMBER: _ClassVar[int] + connection: Connection + def __init__(self, connection: _Optional[_Union[Connection, _Mapping]] = ...) -> None: ... + +class DescribeJobRequest(_message.Message): + __slots__ = ["job_id", "operation_params"] + JOB_ID_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + job_id: str + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., job_id: _Optional[str] = ...) -> None: ... + +class DescribeJobResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeJobResult(_message.Message): + __slots__ = ["job"] + JOB_FIELD_NUMBER: _ClassVar[int] + job: Job + def __init__(self, job: _Optional[_Union[Job, _Mapping]] = ...) -> None: ... + +class DescribeQueryRequest(_message.Message): + __slots__ = ["operation_params", "query_id"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + query_id: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., query_id: _Optional[str] = ...) -> None: ... + +class DescribeQueryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeQueryResult(_message.Message): + __slots__ = ["query"] + QUERY_FIELD_NUMBER: _ClassVar[int] + query: Query + def __init__(self, query: _Optional[_Union[Query, _Mapping]] = ...) -> None: ... + +class GetQueryStatusRequest(_message.Message): + __slots__ = ["operation_params", "query_id"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + query_id: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., query_id: _Optional[str] = ...) -> None: ... + +class GetQueryStatusResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class GetQueryStatusResult(_message.Message): + __slots__ = ["meta_revision", "status"] + META_REVISION_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + meta_revision: int + status: QueryMeta.ComputeStatus + def __init__(self, status: _Optional[_Union[QueryMeta.ComputeStatus, str]] = ..., meta_revision: _Optional[int] = ...) -> None: ... + +class GetResultDataRequest(_message.Message): + __slots__ = ["limit", "offset", "operation_params", "query_id", "result_set_index"] + LIMIT_FIELD_NUMBER: _ClassVar[int] + OFFSET_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_INDEX_FIELD_NUMBER: _ClassVar[int] + limit: int + offset: int + operation_params: _ydb_operation_pb2.OperationParams + query_id: str + result_set_index: int + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., query_id: _Optional[str] = ..., result_set_index: _Optional[int] = ..., offset: _Optional[int] = ..., limit: _Optional[int] = ...) -> None: ... + +class GetResultDataResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class GetResultDataResult(_message.Message): + __slots__ = ["result_set"] + RESULT_SET_FIELD_NUMBER: _ClassVar[int] + result_set: _ydb_value_pb2.ResultSet + def __init__(self, result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ...) -> None: ... + +class IamAuth(_message.Message): + __slots__ = ["current_iam", "none", "service_account"] + CURRENT_IAM_FIELD_NUMBER: _ClassVar[int] + NONE_FIELD_NUMBER: _ClassVar[int] + SERVICE_ACCOUNT_FIELD_NUMBER: _ClassVar[int] + current_iam: CurrentIAMTokenAuth + none: NoneAuth + service_account: ServiceAccountAuth + def __init__(self, current_iam: _Optional[_Union[CurrentIAMTokenAuth, _Mapping]] = ..., service_account: _Optional[_Union[ServiceAccountAuth, _Mapping]] = ..., none: _Optional[_Union[NoneAuth, _Mapping]] = ...) -> None: ... + +class Job(_message.Message): + __slots__ = ["acl", "ast", "automatic", "expire_at", "issue", "meta", "plan", "query_meta", "query_name", "result_set_meta", "statistics", "syntax", "text"] + ACL_FIELD_NUMBER: _ClassVar[int] + AST_FIELD_NUMBER: _ClassVar[int] + AUTOMATIC_FIELD_NUMBER: _ClassVar[int] + EXPIRE_AT_FIELD_NUMBER: _ClassVar[int] + ISSUE_FIELD_NUMBER: _ClassVar[int] + META_FIELD_NUMBER: _ClassVar[int] + PLAN_FIELD_NUMBER: _ClassVar[int] + QUERY_META_FIELD_NUMBER: _ClassVar[int] + QUERY_NAME_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_META_FIELD_NUMBER: _ClassVar[int] + STATISTICS_FIELD_NUMBER: _ClassVar[int] + SYNTAX_FIELD_NUMBER: _ClassVar[int] + TEXT_FIELD_NUMBER: _ClassVar[int] + acl: Acl + ast: QueryAst + automatic: bool + expire_at: _timestamp_pb2.Timestamp + issue: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + meta: CommonMeta + plan: QueryPlan + query_meta: QueryMeta + query_name: str + result_set_meta: _containers.RepeatedCompositeFieldContainer[ResultSetMeta] + statistics: QueryStatistics + syntax: QueryContent.QuerySyntax + text: str + def __init__(self, meta: _Optional[_Union[CommonMeta, _Mapping]] = ..., text: _Optional[str] = ..., query_meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., plan: _Optional[_Union[QueryPlan, _Mapping]] = ..., issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., statistics: _Optional[_Union[QueryStatistics, _Mapping]] = ..., result_set_meta: _Optional[_Iterable[_Union[ResultSetMeta, _Mapping]]] = ..., ast: _Optional[_Union[QueryAst, _Mapping]] = ..., query_name: _Optional[str] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., automatic: bool = ..., expire_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., syntax: _Optional[_Union[QueryContent.QuerySyntax, str]] = ...) -> None: ... + +class Limits(_message.Message): + __slots__ = ["execution_deadline", "execution_timeout", "flow_rate_limit", "max_result_rows", "max_result_size", "memory_limit", "result_ttl", "vcpu_rate_limit", "vcpu_time_limit"] + EXECUTION_DEADLINE_FIELD_NUMBER: _ClassVar[int] + EXECUTION_TIMEOUT_FIELD_NUMBER: _ClassVar[int] + FLOW_RATE_LIMIT_FIELD_NUMBER: _ClassVar[int] + MAX_RESULT_ROWS_FIELD_NUMBER: _ClassVar[int] + MAX_RESULT_SIZE_FIELD_NUMBER: _ClassVar[int] + MEMORY_LIMIT_FIELD_NUMBER: _ClassVar[int] + RESULT_TTL_FIELD_NUMBER: _ClassVar[int] + VCPU_RATE_LIMIT_FIELD_NUMBER: _ClassVar[int] + VCPU_TIME_LIMIT_FIELD_NUMBER: _ClassVar[int] + execution_deadline: _timestamp_pb2.Timestamp + execution_timeout: _duration_pb2.Duration + flow_rate_limit: int + max_result_rows: int + max_result_size: int + memory_limit: int + result_ttl: _duration_pb2.Duration + vcpu_rate_limit: int + vcpu_time_limit: int + def __init__(self, vcpu_rate_limit: _Optional[int] = ..., flow_rate_limit: _Optional[int] = ..., vcpu_time_limit: _Optional[int] = ..., max_result_size: _Optional[int] = ..., max_result_rows: _Optional[int] = ..., memory_limit: _Optional[int] = ..., result_ttl: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., execution_timeout: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., execution_deadline: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class ListBindingsRequest(_message.Message): + __slots__ = ["filter", "limit", "operation_params", "page_token"] + class Filter(_message.Message): + __slots__ = ["connection_id", "created_by_me", "name", "visibility"] + CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] + CREATED_BY_ME_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + VISIBILITY_FIELD_NUMBER: _ClassVar[int] + connection_id: str + created_by_me: bool + name: str + visibility: Acl.Visibility + def __init__(self, connection_id: _Optional[str] = ..., name: _Optional[str] = ..., created_by_me: bool = ..., visibility: _Optional[_Union[Acl.Visibility, str]] = ...) -> None: ... + FILTER_FIELD_NUMBER: _ClassVar[int] + LIMIT_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + filter: ListBindingsRequest.Filter + limit: int + operation_params: _ydb_operation_pb2.OperationParams + page_token: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., page_token: _Optional[str] = ..., limit: _Optional[int] = ..., filter: _Optional[_Union[ListBindingsRequest.Filter, _Mapping]] = ...) -> None: ... + +class ListBindingsResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListBindingsResult(_message.Message): + __slots__ = ["binding", "next_page_token"] + BINDING_FIELD_NUMBER: _ClassVar[int] + NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + binding: _containers.RepeatedCompositeFieldContainer[BriefBinding] + next_page_token: str + def __init__(self, binding: _Optional[_Iterable[_Union[BriefBinding, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ... + +class ListConnectionsRequest(_message.Message): + __slots__ = ["filter", "limit", "operation_params", "page_token"] + class Filter(_message.Message): + __slots__ = ["connection_type", "created_by_me", "name", "visibility"] + CONNECTION_TYPE_FIELD_NUMBER: _ClassVar[int] + CREATED_BY_ME_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + VISIBILITY_FIELD_NUMBER: _ClassVar[int] + connection_type: ConnectionSetting.ConnectionType + created_by_me: bool + name: str + visibility: Acl.Visibility + def __init__(self, name: _Optional[str] = ..., created_by_me: bool = ..., connection_type: _Optional[_Union[ConnectionSetting.ConnectionType, str]] = ..., visibility: _Optional[_Union[Acl.Visibility, str]] = ...) -> None: ... + FILTER_FIELD_NUMBER: _ClassVar[int] + LIMIT_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + filter: ListConnectionsRequest.Filter + limit: int + operation_params: _ydb_operation_pb2.OperationParams + page_token: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., page_token: _Optional[str] = ..., limit: _Optional[int] = ..., filter: _Optional[_Union[ListConnectionsRequest.Filter, _Mapping]] = ...) -> None: ... + +class ListConnectionsResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListConnectionsResult(_message.Message): + __slots__ = ["connection", "next_page_token"] + CONNECTION_FIELD_NUMBER: _ClassVar[int] + NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + connection: _containers.RepeatedCompositeFieldContainer[Connection] + next_page_token: str + def __init__(self, connection: _Optional[_Iterable[_Union[Connection, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ... + +class ListJobsRequest(_message.Message): + __slots__ = ["filter", "limit", "operation_params", "page_token", "query_id"] + class Filter(_message.Message): + __slots__ = ["created_by_me", "query_id"] + CREATED_BY_ME_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + created_by_me: bool + query_id: str + def __init__(self, query_id: _Optional[str] = ..., created_by_me: bool = ...) -> None: ... + FILTER_FIELD_NUMBER: _ClassVar[int] + LIMIT_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + filter: ListJobsRequest.Filter + limit: int + operation_params: _ydb_operation_pb2.OperationParams + page_token: str + query_id: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., page_token: _Optional[str] = ..., limit: _Optional[int] = ..., query_id: _Optional[str] = ..., filter: _Optional[_Union[ListJobsRequest.Filter, _Mapping]] = ...) -> None: ... + +class ListJobsResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListJobsResult(_message.Message): + __slots__ = ["job", "next_page_token"] + JOB_FIELD_NUMBER: _ClassVar[int] + NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + job: _containers.RepeatedCompositeFieldContainer[BriefJob] + next_page_token: str + def __init__(self, job: _Optional[_Iterable[_Union[BriefJob, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ... + +class ListQueriesRequest(_message.Message): + __slots__ = ["filter", "limit", "operation_params", "page_token"] + class Filter(_message.Message): + __slots__ = ["automatic", "created_by_me", "mode", "name", "query_type", "status", "visibility"] + AUTOMATIC_FIELD_NUMBER: _ClassVar[int] + CREATED_BY_ME_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + QUERY_TYPE_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + VISIBILITY_FIELD_NUMBER: _ClassVar[int] + automatic: AutomaticType + created_by_me: bool + mode: _containers.RepeatedScalarFieldContainer[ExecuteMode] + name: str + query_type: QueryContent.QueryType + status: _containers.RepeatedScalarFieldContainer[QueryMeta.ComputeStatus] + visibility: Acl.Visibility + def __init__(self, query_type: _Optional[_Union[QueryContent.QueryType, str]] = ..., status: _Optional[_Iterable[_Union[QueryMeta.ComputeStatus, str]]] = ..., mode: _Optional[_Iterable[_Union[ExecuteMode, str]]] = ..., name: _Optional[str] = ..., created_by_me: bool = ..., visibility: _Optional[_Union[Acl.Visibility, str]] = ..., automatic: _Optional[_Union[AutomaticType, str]] = ...) -> None: ... + FILTER_FIELD_NUMBER: _ClassVar[int] + LIMIT_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + filter: ListQueriesRequest.Filter + limit: int + operation_params: _ydb_operation_pb2.OperationParams + page_token: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., page_token: _Optional[str] = ..., limit: _Optional[int] = ..., filter: _Optional[_Union[ListQueriesRequest.Filter, _Mapping]] = ...) -> None: ... + +class ListQueriesResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListQueriesResult(_message.Message): + __slots__ = ["next_page_token", "query"] + NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + QUERY_FIELD_NUMBER: _ClassVar[int] + next_page_token: str + query: _containers.RepeatedCompositeFieldContainer[BriefQuery] + def __init__(self, query: _Optional[_Iterable[_Union[BriefQuery, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ... + +class ModifyBindingRequest(_message.Message): + __slots__ = ["binding_id", "content", "idempotency_key", "operation_params", "previous_revision"] + BINDING_ID_FIELD_NUMBER: _ClassVar[int] + CONTENT_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PREVIOUS_REVISION_FIELD_NUMBER: _ClassVar[int] + binding_id: str + content: BindingContent + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + previous_revision: int + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., binding_id: _Optional[str] = ..., content: _Optional[_Union[BindingContent, _Mapping]] = ..., previous_revision: _Optional[int] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class ModifyBindingResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ModifyBindingResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ModifyConnectionRequest(_message.Message): + __slots__ = ["connection_id", "content", "idempotency_key", "operation_params", "previous_revision"] + CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] + CONTENT_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PREVIOUS_REVISION_FIELD_NUMBER: _ClassVar[int] + connection_id: str + content: ConnectionContent + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + previous_revision: int + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., connection_id: _Optional[str] = ..., content: _Optional[_Union[ConnectionContent, _Mapping]] = ..., previous_revision: _Optional[int] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class ModifyConnectionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ModifyConnectionResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ModifyQueryRequest(_message.Message): + __slots__ = ["content", "disposition", "execute_mode", "idempotency_key", "operation_params", "previous_revision", "query_id", "state_load_mode"] + CONTENT_FIELD_NUMBER: _ClassVar[int] + DISPOSITION_FIELD_NUMBER: _ClassVar[int] + EXECUTE_MODE_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PREVIOUS_REVISION_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + STATE_LOAD_MODE_FIELD_NUMBER: _ClassVar[int] + content: QueryContent + disposition: StreamingDisposition + execute_mode: ExecuteMode + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + previous_revision: int + query_id: str + state_load_mode: StateLoadMode + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., query_id: _Optional[str] = ..., content: _Optional[_Union[QueryContent, _Mapping]] = ..., execute_mode: _Optional[_Union[ExecuteMode, str]] = ..., disposition: _Optional[_Union[StreamingDisposition, _Mapping]] = ..., state_load_mode: _Optional[_Union[StateLoadMode, str]] = ..., previous_revision: _Optional[int] = ..., idempotency_key: _Optional[str] = ...) -> None: ... + +class ModifyQueryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ModifyQueryResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class Monitoring(_message.Message): + __slots__ = ["auth", "cluster", "project"] + AUTH_FIELD_NUMBER: _ClassVar[int] + CLUSTER_FIELD_NUMBER: _ClassVar[int] + PROJECT_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + cluster: str + project: str + def __init__(self, project: _Optional[str] = ..., cluster: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ...) -> None: ... + +class NoneAuth(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ObjectStorageBinding(_message.Message): + __slots__ = ["subset"] + class Subset(_message.Message): + __slots__ = ["compression", "format", "format_setting", "partitioned_by", "path_pattern", "projection", "schema"] + class FormatSettingEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + class ProjectionEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + COMPRESSION_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + FORMAT_SETTING_FIELD_NUMBER: _ClassVar[int] + PARTITIONED_BY_FIELD_NUMBER: _ClassVar[int] + PATH_PATTERN_FIELD_NUMBER: _ClassVar[int] + PROJECTION_FIELD_NUMBER: _ClassVar[int] + SCHEMA_FIELD_NUMBER: _ClassVar[int] + compression: str + format: str + format_setting: _containers.ScalarMap[str, str] + partitioned_by: _containers.RepeatedScalarFieldContainer[str] + path_pattern: str + projection: _containers.ScalarMap[str, str] + schema: Schema + def __init__(self, path_pattern: _Optional[str] = ..., format: _Optional[str] = ..., format_setting: _Optional[_Mapping[str, str]] = ..., compression: _Optional[str] = ..., schema: _Optional[_Union[Schema, _Mapping]] = ..., projection: _Optional[_Mapping[str, str]] = ..., partitioned_by: _Optional[_Iterable[str]] = ...) -> None: ... + SUBSET_FIELD_NUMBER: _ClassVar[int] + subset: _containers.RepeatedCompositeFieldContainer[ObjectStorageBinding.Subset] + def __init__(self, subset: _Optional[_Iterable[_Union[ObjectStorageBinding.Subset, _Mapping]]] = ...) -> None: ... + +class ObjectStorageConnection(_message.Message): + __slots__ = ["auth", "bucket"] + AUTH_FIELD_NUMBER: _ClassVar[int] + BUCKET_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + bucket: str + def __init__(self, bucket: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ...) -> None: ... + +class PostgreSQLCluster(_message.Message): + __slots__ = ["auth", "database_id", "database_name", "host", "login", "password", "port", "schema", "secure"] + AUTH_FIELD_NUMBER: _ClassVar[int] + DATABASE_ID_FIELD_NUMBER: _ClassVar[int] + DATABASE_NAME_FIELD_NUMBER: _ClassVar[int] + HOST_FIELD_NUMBER: _ClassVar[int] + LOGIN_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + SCHEMA_FIELD_NUMBER: _ClassVar[int] + SECURE_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + database_id: str + database_name: str + host: str + login: str + password: str + port: int + schema: str + secure: bool + def __init__(self, database_id: _Optional[str] = ..., database_name: _Optional[str] = ..., login: _Optional[str] = ..., password: _Optional[str] = ..., schema: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ..., host: _Optional[str] = ..., port: _Optional[int] = ..., secure: bool = ...) -> None: ... + +class Query(_message.Message): + __slots__ = ["ast", "content", "issue", "meta", "plan", "result_set_meta", "statistics", "transient_issue"] + AST_FIELD_NUMBER: _ClassVar[int] + CONTENT_FIELD_NUMBER: _ClassVar[int] + ISSUE_FIELD_NUMBER: _ClassVar[int] + META_FIELD_NUMBER: _ClassVar[int] + PLAN_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_META_FIELD_NUMBER: _ClassVar[int] + STATISTICS_FIELD_NUMBER: _ClassVar[int] + TRANSIENT_ISSUE_FIELD_NUMBER: _ClassVar[int] + ast: QueryAst + content: QueryContent + issue: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + meta: QueryMeta + plan: QueryPlan + result_set_meta: _containers.RepeatedCompositeFieldContainer[ResultSetMeta] + statistics: QueryStatistics + transient_issue: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + def __init__(self, meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., content: _Optional[_Union[QueryContent, _Mapping]] = ..., plan: _Optional[_Union[QueryPlan, _Mapping]] = ..., issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., transient_issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., statistics: _Optional[_Union[QueryStatistics, _Mapping]] = ..., result_set_meta: _Optional[_Iterable[_Union[ResultSetMeta, _Mapping]]] = ..., ast: _Optional[_Union[QueryAst, _Mapping]] = ...) -> None: ... + +class QueryAst(_message.Message): + __slots__ = ["data"] + DATA_FIELD_NUMBER: _ClassVar[int] + data: str + def __init__(self, data: _Optional[str] = ...) -> None: ... + +class QueryContent(_message.Message): + __slots__ = ["acl", "automatic", "description", "execution_settings", "limits", "name", "syntax", "text", "type"] + class QuerySyntax(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class QueryType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class ExecutionSettingsEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ACL_FIELD_NUMBER: _ClassVar[int] + ANALYTICS: QueryContent.QueryType + AUTOMATIC_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + EXECUTION_SETTINGS_FIELD_NUMBER: _ClassVar[int] + LIMITS_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + PG: QueryContent.QuerySyntax + QUERY_SYNTAX_UNSPECIFIED: QueryContent.QuerySyntax + QUERY_TYPE_UNSPECIFIED: QueryContent.QueryType + STREAMING: QueryContent.QueryType + SYNTAX_FIELD_NUMBER: _ClassVar[int] + TEXT_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + YQL_V1: QueryContent.QuerySyntax + acl: Acl + automatic: bool + description: str + execution_settings: _containers.ScalarMap[str, str] + limits: Limits + name: str + syntax: QueryContent.QuerySyntax + text: str + type: QueryContent.QueryType + def __init__(self, type: _Optional[_Union[QueryContent.QueryType, str]] = ..., name: _Optional[str] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., limits: _Optional[_Union[Limits, _Mapping]] = ..., text: _Optional[str] = ..., automatic: bool = ..., description: _Optional[str] = ..., execution_settings: _Optional[_Mapping[str, str]] = ..., syntax: _Optional[_Union[QueryContent.QuerySyntax, str]] = ...) -> None: ... + +class QueryMeta(_message.Message): + __slots__ = ["aborted_by", "common", "execute_mode", "expire_at", "finished_at", "has_saved_checkpoints", "last_job_id", "last_job_query_revision", "paused_by", "result_expire_at", "started_at", "started_by", "status", "submitted_at"] + class ComputeStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ABORTED_BY_FIELD_NUMBER: _ClassVar[int] + ABORTED_BY_SYSTEM: QueryMeta.ComputeStatus + ABORTED_BY_USER: QueryMeta.ComputeStatus + ABORTING_BY_SYSTEM: QueryMeta.ComputeStatus + ABORTING_BY_USER: QueryMeta.ComputeStatus + COMMON_FIELD_NUMBER: _ClassVar[int] + COMPLETED: QueryMeta.ComputeStatus + COMPLETING: QueryMeta.ComputeStatus + COMPUTE_STATUS_UNSPECIFIED: QueryMeta.ComputeStatus + EXECUTE_MODE_FIELD_NUMBER: _ClassVar[int] + EXPIRE_AT_FIELD_NUMBER: _ClassVar[int] + FAILED: QueryMeta.ComputeStatus + FAILING: QueryMeta.ComputeStatus + FINISHED_AT_FIELD_NUMBER: _ClassVar[int] + HAS_SAVED_CHECKPOINTS_FIELD_NUMBER: _ClassVar[int] + LAST_JOB_ID_FIELD_NUMBER: _ClassVar[int] + LAST_JOB_QUERY_REVISION_FIELD_NUMBER: _ClassVar[int] + PAUSED: QueryMeta.ComputeStatus + PAUSED_BY_FIELD_NUMBER: _ClassVar[int] + PAUSING: QueryMeta.ComputeStatus + RESULT_EXPIRE_AT_FIELD_NUMBER: _ClassVar[int] + RESUMING: QueryMeta.ComputeStatus + RUNNING: QueryMeta.ComputeStatus + STARTED_AT_FIELD_NUMBER: _ClassVar[int] + STARTED_BY_FIELD_NUMBER: _ClassVar[int] + STARTING: QueryMeta.ComputeStatus + STATUS_FIELD_NUMBER: _ClassVar[int] + SUBMITTED_AT_FIELD_NUMBER: _ClassVar[int] + aborted_by: str + common: CommonMeta + execute_mode: ExecuteMode + expire_at: _timestamp_pb2.Timestamp + finished_at: _timestamp_pb2.Timestamp + has_saved_checkpoints: bool + last_job_id: str + last_job_query_revision: int + paused_by: str + result_expire_at: _timestamp_pb2.Timestamp + started_at: _timestamp_pb2.Timestamp + started_by: str + status: QueryMeta.ComputeStatus + submitted_at: _timestamp_pb2.Timestamp + def __init__(self, common: _Optional[_Union[CommonMeta, _Mapping]] = ..., submitted_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., started_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., finished_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., execute_mode: _Optional[_Union[ExecuteMode, str]] = ..., status: _Optional[_Union[QueryMeta.ComputeStatus, str]] = ..., last_job_query_revision: _Optional[int] = ..., last_job_id: _Optional[str] = ..., expire_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., result_expire_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., started_by: _Optional[str] = ..., aborted_by: _Optional[str] = ..., paused_by: _Optional[str] = ..., has_saved_checkpoints: bool = ...) -> None: ... + +class QueryPlan(_message.Message): + __slots__ = ["json"] + JSON_FIELD_NUMBER: _ClassVar[int] + json: str + def __init__(self, json: _Optional[str] = ...) -> None: ... + +class QueryStatistics(_message.Message): + __slots__ = ["json"] + JSON_FIELD_NUMBER: _ClassVar[int] + json: str + def __init__(self, json: _Optional[str] = ...) -> None: ... + +class ResultSetMeta(_message.Message): + __slots__ = ["column", "rows_count", "truncated"] + COLUMN_FIELD_NUMBER: _ClassVar[int] + ROWS_COUNT_FIELD_NUMBER: _ClassVar[int] + TRUNCATED_FIELD_NUMBER: _ClassVar[int] + column: _containers.RepeatedCompositeFieldContainer[_ydb_value_pb2.Column] + rows_count: int + truncated: bool + def __init__(self, column: _Optional[_Iterable[_Union[_ydb_value_pb2.Column, _Mapping]]] = ..., rows_count: _Optional[int] = ..., truncated: bool = ...) -> None: ... + +class Schema(_message.Message): + __slots__ = ["column"] + COLUMN_FIELD_NUMBER: _ClassVar[int] + column: _containers.RepeatedCompositeFieldContainer[_ydb_value_pb2.Column] + def __init__(self, column: _Optional[_Iterable[_Union[_ydb_value_pb2.Column, _Mapping]]] = ...) -> None: ... + +class ServiceAccountAuth(_message.Message): + __slots__ = ["id"] + ID_FIELD_NUMBER: _ClassVar[int] + id: str + def __init__(self, id: _Optional[str] = ...) -> None: ... + +class StreamingDisposition(_message.Message): + __slots__ = ["fresh", "from_last_checkpoint", "from_time", "oldest", "time_ago"] + class FromLastCheckpoint(_message.Message): + __slots__ = ["force"] + FORCE_FIELD_NUMBER: _ClassVar[int] + force: bool + def __init__(self, force: bool = ...) -> None: ... + class FromTime(_message.Message): + __slots__ = ["timestamp"] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + timestamp: _timestamp_pb2.Timestamp + def __init__(self, timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + class TimeAgo(_message.Message): + __slots__ = ["duration"] + DURATION_FIELD_NUMBER: _ClassVar[int] + duration: _duration_pb2.Duration + def __init__(self, duration: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...) -> None: ... + FRESH_FIELD_NUMBER: _ClassVar[int] + FROM_LAST_CHECKPOINT_FIELD_NUMBER: _ClassVar[int] + FROM_TIME_FIELD_NUMBER: _ClassVar[int] + OLDEST_FIELD_NUMBER: _ClassVar[int] + TIME_AGO_FIELD_NUMBER: _ClassVar[int] + fresh: _empty_pb2.Empty + from_last_checkpoint: StreamingDisposition.FromLastCheckpoint + from_time: StreamingDisposition.FromTime + oldest: _empty_pb2.Empty + time_ago: StreamingDisposition.TimeAgo + def __init__(self, oldest: _Optional[_Union[_empty_pb2.Empty, _Mapping]] = ..., fresh: _Optional[_Union[_empty_pb2.Empty, _Mapping]] = ..., from_time: _Optional[_Union[StreamingDisposition.FromTime, _Mapping]] = ..., time_ago: _Optional[_Union[StreamingDisposition.TimeAgo, _Mapping]] = ..., from_last_checkpoint: _Optional[_Union[StreamingDisposition.FromLastCheckpoint, _Mapping]] = ...) -> None: ... + +class TestConnectionRequest(_message.Message): + __slots__ = ["operation_params", "setting"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SETTING_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + setting: ConnectionSetting + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., setting: _Optional[_Union[ConnectionSetting, _Mapping]] = ...) -> None: ... + +class TestConnectionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class TestConnectionResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class YdbDatabase(_message.Message): + __slots__ = ["auth", "database", "database_id", "endpoint", "secure"] + AUTH_FIELD_NUMBER: _ClassVar[int] + DATABASE_FIELD_NUMBER: _ClassVar[int] + DATABASE_ID_FIELD_NUMBER: _ClassVar[int] + ENDPOINT_FIELD_NUMBER: _ClassVar[int] + SECURE_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + database: str + database_id: str + endpoint: str + secure: bool + def __init__(self, database_id: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ..., endpoint: _Optional[str] = ..., database: _Optional[str] = ..., secure: bool = ...) -> None: ... + +class ExecuteMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class QueryAction(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class StateLoadMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class AutomaticType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] diff --git a/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2_grpc.py b/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/draft/protos/ydb_keyvalue_pb2.py b/ydb/_grpc/v5/draft/protos/ydb_keyvalue_pb2.py new file mode 100644 index 00000000..2392cd2b --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_keyvalue_pb2.py @@ -0,0 +1,124 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/protos/ydb_keyvalue.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1f\x64raft/protos/ydb_keyvalue.proto\x12\x0cYdb.KeyValue\x1a\x1aprotos/ydb_operation.proto\"\xf0\x01\n\x12StorageChannelInfo\x12\x17\n\x0fstorage_channel\x18\x01 \x01(\r\x12@\n\x0bstatus_flag\x18\x02 \x01(\x0e\x32+.Ydb.KeyValue.StorageChannelInfo.StatusFlag\"\x7f\n\nStatusFlag\x12\x1b\n\x17STATUS_FLAG_UNSPECIFIED\x10\x00\x12\x15\n\x11STATUS_FLAG_GREEN\x10\n\x12\x1b\n\x17STATUS_FLAG_YELLOW_STOP\x10\x14\x12 \n\x1cSTATUS_FLAG_ORANGE_OUT_SPACE\x10\x1e\"b\n\nPriorities\"T\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x15\n\x11PRIORITY_REALTIME\x10\x01\x12\x17\n\x13PRIORITY_BACKGROUND\x10\x02\"k\n\rStorageConfig\x12:\n\x07\x63hannel\x18\x01 \x03(\x0b\x32).Ydb.KeyValue.StorageConfig.ChannelConfig\x1a\x1e\n\rChannelConfig\x12\r\n\x05media\x18\x01 \x01(\t\"\x98\x01\n\x08KeyRange\x12\x1c\n\x12\x66rom_key_inclusive\x18\x01 \x01(\tH\x00\x12\x1c\n\x12\x66rom_key_exclusive\x18\x02 \x01(\tH\x00\x12\x1a\n\x10to_key_inclusive\x18\x03 \x01(\tH\x01\x12\x1a\n\x10to_key_exclusive\x18\x04 \x01(\tH\x01\x42\x0c\n\nfrom_boundB\n\n\x08to_bound\"s\n\x12\x41\x63quireLockRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\"C\n\x13\x41\x63quireLockResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"=\n\x11\x41\x63quireLockResult\x12\x17\n\x0flock_generation\x18\x01 \x01(\x04\x12\x0f\n\x07node_id\x18\x02 \x01(\r\"\xac\t\n\x19\x45xecuteTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12\x41\n\x08\x63ommands\x18\x05 \x03(\x0b\x32/.Ydb.KeyValue.ExecuteTransactionRequest.Command\x1a\xba\x07\n\x07\x43ommand\x12S\n\x0c\x64\x65lete_range\x18\x01 \x01(\x0b\x32;.Ydb.KeyValue.ExecuteTransactionRequest.Command.DeleteRangeH\x00\x12H\n\x06rename\x18\x02 \x01(\x0b\x32\x36.Ydb.KeyValue.ExecuteTransactionRequest.Command.RenameH\x00\x12O\n\ncopy_range\x18\x03 \x01(\x0b\x32\x39.Ydb.KeyValue.ExecuteTransactionRequest.Command.CopyRangeH\x00\x12H\n\x06\x63oncat\x18\x04 \x01(\x0b\x32\x36.Ydb.KeyValue.ExecuteTransactionRequest.Command.ConcatH\x00\x12\x46\n\x05write\x18\x05 \x01(\x0b\x32\x35.Ydb.KeyValue.ExecuteTransactionRequest.Command.WriteH\x00\x1a*\n\x06Rename\x12\x0f\n\x07old_key\x18\x01 \x01(\t\x12\x0f\n\x07new_key\x18\x02 \x01(\t\x1a\x45\n\x06\x43oncat\x12\x12\n\ninput_keys\x18\x01 \x03(\t\x12\x12\n\noutput_key\x18\x02 \x01(\t\x12\x13\n\x0bkeep_inputs\x18\x03 \x01(\x08\x1a\x63\n\tCopyRange\x12%\n\x05range\x18\x01 \x01(\x0b\x32\x16.Ydb.KeyValue.KeyRange\x12\x18\n\x10prefix_to_remove\x18\x02 \x01(\t\x12\x15\n\rprefix_to_add\x18\x03 \x01(\t\x1a\x94\x02\n\x05Write\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\x12\x17\n\x0fstorage_channel\x18\x03 \x01(\r\x12\x33\n\x08priority\x18\x04 \x01(\x0e\x32!.Ydb.KeyValue.Priorities.Priority\x12L\n\x06tactic\x18\x05 \x01(\x0e\x32<.Ydb.KeyValue.ExecuteTransactionRequest.Command.Write.Tactic\"S\n\x06Tactic\x12\x16\n\x12TACTIC_UNSPECIFIED\x10\x00\x12\x19\n\x15TACTIC_MAX_THROUGHPUT\x10\x01\x12\x16\n\x12TACTIC_MIN_LATENCY\x10\x02\x1a\x34\n\x0b\x44\x65leteRange\x12%\n\x05range\x18\x01 \x01(\x0b\x32\x16.Ydb.KeyValue.KeyRangeB\x08\n\x06\x61\x63tionB\x12\n\x10_lock_generation\"J\n\x1a\x45xecuteTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"k\n\x18\x45xecuteTransactionResult\x12>\n\x14storage_channel_info\x18\x01 \x03(\x0b\x32 .Ydb.KeyValue.StorageChannelInfo\x12\x0f\n\x07node_id\x18\x02 \x01(\r\"\x93\x02\n\x0bReadRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12\x0b\n\x03key\x18\x05 \x01(\t\x12\x0e\n\x06offset\x18\x06 \x01(\x04\x12\x0c\n\x04size\x18\x07 \x01(\x04\x12\x13\n\x0blimit_bytes\x18\x08 \x01(\x04\x12\x33\n\x08priority\x18\t \x01(\x0e\x32!.Ydb.KeyValue.Priorities.PriorityB\x12\n\x10_lock_generation\"<\n\x0cReadResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x89\x01\n\nReadResult\x12\x15\n\rrequested_key\x18\x01 \x01(\t\x12\x18\n\x10requested_offset\x18\x02 \x01(\x04\x12\x16\n\x0erequested_size\x18\x03 \x01(\x04\x12\r\n\x05value\x18\x04 \x01(\x0c\x12\x12\n\nis_overrun\x18\x05 \x01(\x08\x12\x0f\n\x07node_id\x18\x06 \x01(\r\"\x94\x02\n\x10ReadRangeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12%\n\x05range\x18\x05 \x01(\x0b\x32\x16.Ydb.KeyValue.KeyRange\x12\x13\n\x0blimit_bytes\x18\x06 \x01(\x04\x12\x33\n\x08priority\x18\x07 \x01(\x0e\x32!.Ydb.KeyValue.Priorities.PriorityB\x12\n\x10_lock_generation\"A\n\x11ReadRangeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xd1\x01\n\x0fReadRangeResult\x12\x38\n\x04pair\x18\x01 \x03(\x0b\x32*.Ydb.KeyValue.ReadRangeResult.KeyValuePair\x12\x12\n\nis_overrun\x18\x02 \x01(\x08\x12\x0f\n\x07node_id\x18\x03 \x01(\r\x1a_\n\x0cKeyValuePair\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\x12\x1a\n\x12\x63reation_unix_time\x18\x04 \x01(\x04\x12\x17\n\x0fstorage_channel\x18\x05 \x01(\r\"\xdf\x01\n\x10ListRangeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12%\n\x05range\x18\x05 \x01(\x0b\x32\x16.Ydb.KeyValue.KeyRange\x12\x13\n\x0blimit_bytes\x18\x06 \x01(\x04\x42\x12\n\x10_lock_generation\"A\n\x11ListRangeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xcb\x01\n\x0fListRangeResult\x12\x32\n\x03key\x18\x01 \x03(\x0b\x32%.Ydb.KeyValue.ListRangeResult.KeyInfo\x12\x12\n\nis_overrun\x18\x02 \x01(\x08\x12\x0f\n\x07node_id\x18\x03 \x01(\r\x1a_\n\x07KeyInfo\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x12\n\nvalue_size\x18\x02 \x01(\r\x12\x1a\n\x12\x63reation_unix_time\x18\x03 \x01(\x04\x12\x17\n\x0fstorage_channel\x18\x04 \x01(\r\"\xca\x01\n\x1eGetStorageChannelStatusRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x04\x12\x1c\n\x0flock_generation\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12\x17\n\x0fstorage_channel\x18\x05 \x03(\rB\x12\n\x10_lock_generation\"O\n\x1fGetStorageChannelStatusResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"p\n\x1dGetStorageChannelStatusResult\x12>\n\x14storage_channel_info\x18\x01 \x03(\x0b\x32 .Ydb.KeyValue.StorageChannelInfo\x12\x0f\n\x07node_id\x18\x02 \x01(\r\"\xac\x01\n\x13\x43reateVolumeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x17\n\x0fpartition_count\x18\x04 \x01(\r\x12\x33\n\x0estorage_config\x18\x05 \x01(\x0b\x32\x1b.Ydb.KeyValue.StorageConfig\"D\n\x14\x43reateVolumeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43reateVolumeResult\"\\\n\x11\x44ropVolumeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"B\n\x12\x44ropVolumeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x44ropVolumeResult\"\xb1\x01\n\x12\x41lterVolumeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x1d\n\x15\x61lter_partition_count\x18\x03 \x01(\r\x12\x33\n\x0estorage_config\x18\x04 \x01(\x0b\x32\x1b.Ydb.KeyValue.StorageConfig\"C\n\x13\x41lterVolumeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x41lterVolumeResult\"`\n\x15\x44\x65scribeVolumeRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"F\n\x16\x44\x65scribeVolumeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"=\n\x14\x44\x65scribeVolumeResult\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x17\n\x0fpartition_count\x18\x02 \x01(\x04\"v\n\x1aListLocalPartitionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x0f\n\x07node_id\x18\x03 \x01(\x04\"K\n\x1bListLocalPartitionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Q\n\x19ListLocalPartitionsResult\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0f\n\x07node_id\x18\x02 \x01(\x04\x12\x15\n\rpartition_ids\x18\x03 \x03(\x04\x42h\n tech.ydb.proto.draft.keyvalue.v1ZAgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_KeyValue\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.protos.ydb_keyvalue_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n tech.ydb.proto.draft.keyvalue.v1ZAgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_KeyValue\370\001\001' + _STORAGECHANNELINFO._serialized_start=78 + _STORAGECHANNELINFO._serialized_end=318 + _STORAGECHANNELINFO_STATUSFLAG._serialized_start=191 + _STORAGECHANNELINFO_STATUSFLAG._serialized_end=318 + _PRIORITIES._serialized_start=320 + _PRIORITIES._serialized_end=418 + _PRIORITIES_PRIORITY._serialized_start=334 + _PRIORITIES_PRIORITY._serialized_end=418 + _STORAGECONFIG._serialized_start=420 + _STORAGECONFIG._serialized_end=527 + _STORAGECONFIG_CHANNELCONFIG._serialized_start=497 + _STORAGECONFIG_CHANNELCONFIG._serialized_end=527 + _KEYRANGE._serialized_start=530 + _KEYRANGE._serialized_end=682 + _ACQUIRELOCKREQUEST._serialized_start=684 + _ACQUIRELOCKREQUEST._serialized_end=799 + _ACQUIRELOCKRESPONSE._serialized_start=801 + _ACQUIRELOCKRESPONSE._serialized_end=868 + _ACQUIRELOCKRESULT._serialized_start=870 + _ACQUIRELOCKRESULT._serialized_end=931 + _EXECUTETRANSACTIONREQUEST._serialized_start=934 + _EXECUTETRANSACTIONREQUEST._serialized_end=2130 + _EXECUTETRANSACTIONREQUEST_COMMAND._serialized_start=1156 + _EXECUTETRANSACTIONREQUEST_COMMAND._serialized_end=2110 + _EXECUTETRANSACTIONREQUEST_COMMAND_RENAME._serialized_start=1553 + _EXECUTETRANSACTIONREQUEST_COMMAND_RENAME._serialized_end=1595 + _EXECUTETRANSACTIONREQUEST_COMMAND_CONCAT._serialized_start=1597 + _EXECUTETRANSACTIONREQUEST_COMMAND_CONCAT._serialized_end=1666 + _EXECUTETRANSACTIONREQUEST_COMMAND_COPYRANGE._serialized_start=1668 + _EXECUTETRANSACTIONREQUEST_COMMAND_COPYRANGE._serialized_end=1767 + _EXECUTETRANSACTIONREQUEST_COMMAND_WRITE._serialized_start=1770 + _EXECUTETRANSACTIONREQUEST_COMMAND_WRITE._serialized_end=2046 + _EXECUTETRANSACTIONREQUEST_COMMAND_WRITE_TACTIC._serialized_start=1963 + _EXECUTETRANSACTIONREQUEST_COMMAND_WRITE_TACTIC._serialized_end=2046 + _EXECUTETRANSACTIONREQUEST_COMMAND_DELETERANGE._serialized_start=2048 + _EXECUTETRANSACTIONREQUEST_COMMAND_DELETERANGE._serialized_end=2100 + _EXECUTETRANSACTIONRESPONSE._serialized_start=2132 + _EXECUTETRANSACTIONRESPONSE._serialized_end=2206 + _EXECUTETRANSACTIONRESULT._serialized_start=2208 + _EXECUTETRANSACTIONRESULT._serialized_end=2315 + _READREQUEST._serialized_start=2318 + _READREQUEST._serialized_end=2593 + _READRESPONSE._serialized_start=2595 + _READRESPONSE._serialized_end=2655 + _READRESULT._serialized_start=2658 + _READRESULT._serialized_end=2795 + _READRANGEREQUEST._serialized_start=2798 + _READRANGEREQUEST._serialized_end=3074 + _READRANGERESPONSE._serialized_start=3076 + _READRANGERESPONSE._serialized_end=3141 + _READRANGERESULT._serialized_start=3144 + _READRANGERESULT._serialized_end=3353 + _READRANGERESULT_KEYVALUEPAIR._serialized_start=3258 + _READRANGERESULT_KEYVALUEPAIR._serialized_end=3353 + _LISTRANGEREQUEST._serialized_start=3356 + _LISTRANGEREQUEST._serialized_end=3579 + _LISTRANGERESPONSE._serialized_start=3581 + _LISTRANGERESPONSE._serialized_end=3646 + _LISTRANGERESULT._serialized_start=3649 + _LISTRANGERESULT._serialized_end=3852 + _LISTRANGERESULT_KEYINFO._serialized_start=3757 + _LISTRANGERESULT_KEYINFO._serialized_end=3852 + _GETSTORAGECHANNELSTATUSREQUEST._serialized_start=3855 + _GETSTORAGECHANNELSTATUSREQUEST._serialized_end=4057 + _GETSTORAGECHANNELSTATUSRESPONSE._serialized_start=4059 + _GETSTORAGECHANNELSTATUSRESPONSE._serialized_end=4138 + _GETSTORAGECHANNELSTATUSRESULT._serialized_start=4140 + _GETSTORAGECHANNELSTATUSRESULT._serialized_end=4252 + _CREATEVOLUMEREQUEST._serialized_start=4255 + _CREATEVOLUMEREQUEST._serialized_end=4427 + _CREATEVOLUMERESPONSE._serialized_start=4429 + _CREATEVOLUMERESPONSE._serialized_end=4497 + _CREATEVOLUMERESULT._serialized_start=4499 + _CREATEVOLUMERESULT._serialized_end=4519 + _DROPVOLUMEREQUEST._serialized_start=4521 + _DROPVOLUMEREQUEST._serialized_end=4613 + _DROPVOLUMERESPONSE._serialized_start=4615 + _DROPVOLUMERESPONSE._serialized_end=4681 + _DROPVOLUMERESULT._serialized_start=4683 + _DROPVOLUMERESULT._serialized_end=4701 + _ALTERVOLUMEREQUEST._serialized_start=4704 + _ALTERVOLUMEREQUEST._serialized_end=4881 + _ALTERVOLUMERESPONSE._serialized_start=4883 + _ALTERVOLUMERESPONSE._serialized_end=4950 + _ALTERVOLUMERESULT._serialized_start=4952 + _ALTERVOLUMERESULT._serialized_end=4971 + _DESCRIBEVOLUMEREQUEST._serialized_start=4973 + _DESCRIBEVOLUMEREQUEST._serialized_end=5069 + _DESCRIBEVOLUMERESPONSE._serialized_start=5071 + _DESCRIBEVOLUMERESPONSE._serialized_end=5141 + _DESCRIBEVOLUMERESULT._serialized_start=5143 + _DESCRIBEVOLUMERESULT._serialized_end=5204 + _LISTLOCALPARTITIONSREQUEST._serialized_start=5206 + _LISTLOCALPARTITIONSREQUEST._serialized_end=5324 + _LISTLOCALPARTITIONSRESPONSE._serialized_start=5326 + _LISTLOCALPARTITIONSRESPONSE._serialized_end=5401 + _LISTLOCALPARTITIONSRESULT._serialized_start=5403 + _LISTLOCALPARTITIONSRESULT._serialized_end=5484 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/draft/protos/ydb_keyvalue_pb2.pyi b/ydb/_grpc/v5/draft/protos/ydb_keyvalue_pb2.pyi new file mode 100644 index 00000000..52e93e5b --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_keyvalue_pb2.pyi @@ -0,0 +1,437 @@ +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class AcquireLockRequest(_message.Message): + __slots__ = ["operation_params", "partition_id", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ...) -> None: ... + +class AcquireLockResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class AcquireLockResult(_message.Message): + __slots__ = ["lock_generation", "node_id"] + LOCK_GENERATION_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + lock_generation: int + node_id: int + def __init__(self, lock_generation: _Optional[int] = ..., node_id: _Optional[int] = ...) -> None: ... + +class AlterVolumeRequest(_message.Message): + __slots__ = ["alter_partition_count", "operation_params", "path", "storage_config"] + ALTER_PARTITION_COUNT_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + STORAGE_CONFIG_FIELD_NUMBER: _ClassVar[int] + alter_partition_count: int + operation_params: _ydb_operation_pb2.OperationParams + path: str + storage_config: StorageConfig + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., alter_partition_count: _Optional[int] = ..., storage_config: _Optional[_Union[StorageConfig, _Mapping]] = ...) -> None: ... + +class AlterVolumeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class AlterVolumeResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class CreateVolumeRequest(_message.Message): + __slots__ = ["operation_params", "partition_count", "path", "storage_config"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_COUNT_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + STORAGE_CONFIG_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + partition_count: int + path: str + storage_config: StorageConfig + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_count: _Optional[int] = ..., storage_config: _Optional[_Union[StorageConfig, _Mapping]] = ...) -> None: ... + +class CreateVolumeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CreateVolumeResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class DescribeVolumeRequest(_message.Message): + __slots__ = ["operation_params", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ...) -> None: ... + +class DescribeVolumeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeVolumeResult(_message.Message): + __slots__ = ["partition_count", "path"] + PARTITION_COUNT_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + partition_count: int + path: str + def __init__(self, path: _Optional[str] = ..., partition_count: _Optional[int] = ...) -> None: ... + +class DropVolumeRequest(_message.Message): + __slots__ = ["operation_params", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ...) -> None: ... + +class DropVolumeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DropVolumeResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ExecuteTransactionRequest(_message.Message): + __slots__ = ["commands", "lock_generation", "operation_params", "partition_id", "path"] + class Command(_message.Message): + __slots__ = ["concat", "copy_range", "delete_range", "rename", "write"] + class Concat(_message.Message): + __slots__ = ["input_keys", "keep_inputs", "output_key"] + INPUT_KEYS_FIELD_NUMBER: _ClassVar[int] + KEEP_INPUTS_FIELD_NUMBER: _ClassVar[int] + OUTPUT_KEY_FIELD_NUMBER: _ClassVar[int] + input_keys: _containers.RepeatedScalarFieldContainer[str] + keep_inputs: bool + output_key: str + def __init__(self, input_keys: _Optional[_Iterable[str]] = ..., output_key: _Optional[str] = ..., keep_inputs: bool = ...) -> None: ... + class CopyRange(_message.Message): + __slots__ = ["prefix_to_add", "prefix_to_remove", "range"] + PREFIX_TO_ADD_FIELD_NUMBER: _ClassVar[int] + PREFIX_TO_REMOVE_FIELD_NUMBER: _ClassVar[int] + RANGE_FIELD_NUMBER: _ClassVar[int] + prefix_to_add: str + prefix_to_remove: str + range: KeyRange + def __init__(self, range: _Optional[_Union[KeyRange, _Mapping]] = ..., prefix_to_remove: _Optional[str] = ..., prefix_to_add: _Optional[str] = ...) -> None: ... + class DeleteRange(_message.Message): + __slots__ = ["range"] + RANGE_FIELD_NUMBER: _ClassVar[int] + range: KeyRange + def __init__(self, range: _Optional[_Union[KeyRange, _Mapping]] = ...) -> None: ... + class Rename(_message.Message): + __slots__ = ["new_key", "old_key"] + NEW_KEY_FIELD_NUMBER: _ClassVar[int] + OLD_KEY_FIELD_NUMBER: _ClassVar[int] + new_key: str + old_key: str + def __init__(self, old_key: _Optional[str] = ..., new_key: _Optional[str] = ...) -> None: ... + class Write(_message.Message): + __slots__ = ["key", "priority", "storage_channel", "tactic", "value"] + class Tactic(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + KEY_FIELD_NUMBER: _ClassVar[int] + PRIORITY_FIELD_NUMBER: _ClassVar[int] + STORAGE_CHANNEL_FIELD_NUMBER: _ClassVar[int] + TACTIC_FIELD_NUMBER: _ClassVar[int] + TACTIC_MAX_THROUGHPUT: ExecuteTransactionRequest.Command.Write.Tactic + TACTIC_MIN_LATENCY: ExecuteTransactionRequest.Command.Write.Tactic + TACTIC_UNSPECIFIED: ExecuteTransactionRequest.Command.Write.Tactic + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + priority: Priorities.Priority + storage_channel: int + tactic: ExecuteTransactionRequest.Command.Write.Tactic + value: bytes + def __init__(self, key: _Optional[str] = ..., value: _Optional[bytes] = ..., storage_channel: _Optional[int] = ..., priority: _Optional[_Union[Priorities.Priority, str]] = ..., tactic: _Optional[_Union[ExecuteTransactionRequest.Command.Write.Tactic, str]] = ...) -> None: ... + CONCAT_FIELD_NUMBER: _ClassVar[int] + COPY_RANGE_FIELD_NUMBER: _ClassVar[int] + DELETE_RANGE_FIELD_NUMBER: _ClassVar[int] + RENAME_FIELD_NUMBER: _ClassVar[int] + WRITE_FIELD_NUMBER: _ClassVar[int] + concat: ExecuteTransactionRequest.Command.Concat + copy_range: ExecuteTransactionRequest.Command.CopyRange + delete_range: ExecuteTransactionRequest.Command.DeleteRange + rename: ExecuteTransactionRequest.Command.Rename + write: ExecuteTransactionRequest.Command.Write + def __init__(self, delete_range: _Optional[_Union[ExecuteTransactionRequest.Command.DeleteRange, _Mapping]] = ..., rename: _Optional[_Union[ExecuteTransactionRequest.Command.Rename, _Mapping]] = ..., copy_range: _Optional[_Union[ExecuteTransactionRequest.Command.CopyRange, _Mapping]] = ..., concat: _Optional[_Union[ExecuteTransactionRequest.Command.Concat, _Mapping]] = ..., write: _Optional[_Union[ExecuteTransactionRequest.Command.Write, _Mapping]] = ...) -> None: ... + COMMANDS_FIELD_NUMBER: _ClassVar[int] + LOCK_GENERATION_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + commands: _containers.RepeatedCompositeFieldContainer[ExecuteTransactionRequest.Command] + lock_generation: int + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., lock_generation: _Optional[int] = ..., commands: _Optional[_Iterable[_Union[ExecuteTransactionRequest.Command, _Mapping]]] = ...) -> None: ... + +class ExecuteTransactionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ExecuteTransactionResult(_message.Message): + __slots__ = ["node_id", "storage_channel_info"] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + STORAGE_CHANNEL_INFO_FIELD_NUMBER: _ClassVar[int] + node_id: int + storage_channel_info: _containers.RepeatedCompositeFieldContainer[StorageChannelInfo] + def __init__(self, storage_channel_info: _Optional[_Iterable[_Union[StorageChannelInfo, _Mapping]]] = ..., node_id: _Optional[int] = ...) -> None: ... + +class GetStorageChannelStatusRequest(_message.Message): + __slots__ = ["lock_generation", "operation_params", "partition_id", "path", "storage_channel"] + LOCK_GENERATION_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + STORAGE_CHANNEL_FIELD_NUMBER: _ClassVar[int] + lock_generation: int + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + storage_channel: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., lock_generation: _Optional[int] = ..., storage_channel: _Optional[_Iterable[int]] = ...) -> None: ... + +class GetStorageChannelStatusResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class GetStorageChannelStatusResult(_message.Message): + __slots__ = ["node_id", "storage_channel_info"] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + STORAGE_CHANNEL_INFO_FIELD_NUMBER: _ClassVar[int] + node_id: int + storage_channel_info: _containers.RepeatedCompositeFieldContainer[StorageChannelInfo] + def __init__(self, storage_channel_info: _Optional[_Iterable[_Union[StorageChannelInfo, _Mapping]]] = ..., node_id: _Optional[int] = ...) -> None: ... + +class KeyRange(_message.Message): + __slots__ = ["from_key_exclusive", "from_key_inclusive", "to_key_exclusive", "to_key_inclusive"] + FROM_KEY_EXCLUSIVE_FIELD_NUMBER: _ClassVar[int] + FROM_KEY_INCLUSIVE_FIELD_NUMBER: _ClassVar[int] + TO_KEY_EXCLUSIVE_FIELD_NUMBER: _ClassVar[int] + TO_KEY_INCLUSIVE_FIELD_NUMBER: _ClassVar[int] + from_key_exclusive: str + from_key_inclusive: str + to_key_exclusive: str + to_key_inclusive: str + def __init__(self, from_key_inclusive: _Optional[str] = ..., from_key_exclusive: _Optional[str] = ..., to_key_inclusive: _Optional[str] = ..., to_key_exclusive: _Optional[str] = ...) -> None: ... + +class ListLocalPartitionsRequest(_message.Message): + __slots__ = ["node_id", "operation_params", "path"] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + node_id: int + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., node_id: _Optional[int] = ...) -> None: ... + +class ListLocalPartitionsResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListLocalPartitionsResult(_message.Message): + __slots__ = ["node_id", "partition_ids", "path"] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + node_id: int + partition_ids: _containers.RepeatedScalarFieldContainer[int] + path: str + def __init__(self, path: _Optional[str] = ..., node_id: _Optional[int] = ..., partition_ids: _Optional[_Iterable[int]] = ...) -> None: ... + +class ListRangeRequest(_message.Message): + __slots__ = ["limit_bytes", "lock_generation", "operation_params", "partition_id", "path", "range"] + LIMIT_BYTES_FIELD_NUMBER: _ClassVar[int] + LOCK_GENERATION_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + RANGE_FIELD_NUMBER: _ClassVar[int] + limit_bytes: int + lock_generation: int + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + range: KeyRange + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., lock_generation: _Optional[int] = ..., range: _Optional[_Union[KeyRange, _Mapping]] = ..., limit_bytes: _Optional[int] = ...) -> None: ... + +class ListRangeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListRangeResult(_message.Message): + __slots__ = ["is_overrun", "key", "node_id"] + class KeyInfo(_message.Message): + __slots__ = ["creation_unix_time", "key", "storage_channel", "value_size"] + CREATION_UNIX_TIME_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + STORAGE_CHANNEL_FIELD_NUMBER: _ClassVar[int] + VALUE_SIZE_FIELD_NUMBER: _ClassVar[int] + creation_unix_time: int + key: str + storage_channel: int + value_size: int + def __init__(self, key: _Optional[str] = ..., value_size: _Optional[int] = ..., creation_unix_time: _Optional[int] = ..., storage_channel: _Optional[int] = ...) -> None: ... + IS_OVERRUN_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + is_overrun: bool + key: _containers.RepeatedCompositeFieldContainer[ListRangeResult.KeyInfo] + node_id: int + def __init__(self, key: _Optional[_Iterable[_Union[ListRangeResult.KeyInfo, _Mapping]]] = ..., is_overrun: bool = ..., node_id: _Optional[int] = ...) -> None: ... + +class Priorities(_message.Message): + __slots__ = [] + class Priority(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + PRIORITY_BACKGROUND: Priorities.Priority + PRIORITY_REALTIME: Priorities.Priority + PRIORITY_UNSPECIFIED: Priorities.Priority + def __init__(self) -> None: ... + +class ReadRangeRequest(_message.Message): + __slots__ = ["limit_bytes", "lock_generation", "operation_params", "partition_id", "path", "priority", "range"] + LIMIT_BYTES_FIELD_NUMBER: _ClassVar[int] + LOCK_GENERATION_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + PRIORITY_FIELD_NUMBER: _ClassVar[int] + RANGE_FIELD_NUMBER: _ClassVar[int] + limit_bytes: int + lock_generation: int + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + priority: Priorities.Priority + range: KeyRange + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., lock_generation: _Optional[int] = ..., range: _Optional[_Union[KeyRange, _Mapping]] = ..., limit_bytes: _Optional[int] = ..., priority: _Optional[_Union[Priorities.Priority, str]] = ...) -> None: ... + +class ReadRangeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ReadRangeResult(_message.Message): + __slots__ = ["is_overrun", "node_id", "pair"] + class KeyValuePair(_message.Message): + __slots__ = ["creation_unix_time", "key", "storage_channel", "value"] + CREATION_UNIX_TIME_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + STORAGE_CHANNEL_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + creation_unix_time: int + key: str + storage_channel: int + value: bytes + def __init__(self, key: _Optional[str] = ..., value: _Optional[bytes] = ..., creation_unix_time: _Optional[int] = ..., storage_channel: _Optional[int] = ...) -> None: ... + IS_OVERRUN_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + PAIR_FIELD_NUMBER: _ClassVar[int] + is_overrun: bool + node_id: int + pair: _containers.RepeatedCompositeFieldContainer[ReadRangeResult.KeyValuePair] + def __init__(self, pair: _Optional[_Iterable[_Union[ReadRangeResult.KeyValuePair, _Mapping]]] = ..., is_overrun: bool = ..., node_id: _Optional[int] = ...) -> None: ... + +class ReadRequest(_message.Message): + __slots__ = ["key", "limit_bytes", "lock_generation", "offset", "operation_params", "partition_id", "path", "priority", "size"] + KEY_FIELD_NUMBER: _ClassVar[int] + LIMIT_BYTES_FIELD_NUMBER: _ClassVar[int] + LOCK_GENERATION_FIELD_NUMBER: _ClassVar[int] + OFFSET_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + PRIORITY_FIELD_NUMBER: _ClassVar[int] + SIZE_FIELD_NUMBER: _ClassVar[int] + key: str + limit_bytes: int + lock_generation: int + offset: int + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + priority: Priorities.Priority + size: int + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., lock_generation: _Optional[int] = ..., key: _Optional[str] = ..., offset: _Optional[int] = ..., size: _Optional[int] = ..., limit_bytes: _Optional[int] = ..., priority: _Optional[_Union[Priorities.Priority, str]] = ...) -> None: ... + +class ReadResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ReadResult(_message.Message): + __slots__ = ["is_overrun", "node_id", "requested_key", "requested_offset", "requested_size", "value"] + IS_OVERRUN_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + REQUESTED_KEY_FIELD_NUMBER: _ClassVar[int] + REQUESTED_OFFSET_FIELD_NUMBER: _ClassVar[int] + REQUESTED_SIZE_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + is_overrun: bool + node_id: int + requested_key: str + requested_offset: int + requested_size: int + value: bytes + def __init__(self, requested_key: _Optional[str] = ..., requested_offset: _Optional[int] = ..., requested_size: _Optional[int] = ..., value: _Optional[bytes] = ..., is_overrun: bool = ..., node_id: _Optional[int] = ...) -> None: ... + +class StorageChannelInfo(_message.Message): + __slots__ = ["status_flag", "storage_channel"] + class StatusFlag(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + STATUS_FLAG_FIELD_NUMBER: _ClassVar[int] + STATUS_FLAG_GREEN: StorageChannelInfo.StatusFlag + STATUS_FLAG_ORANGE_OUT_SPACE: StorageChannelInfo.StatusFlag + STATUS_FLAG_UNSPECIFIED: StorageChannelInfo.StatusFlag + STATUS_FLAG_YELLOW_STOP: StorageChannelInfo.StatusFlag + STORAGE_CHANNEL_FIELD_NUMBER: _ClassVar[int] + status_flag: StorageChannelInfo.StatusFlag + storage_channel: int + def __init__(self, storage_channel: _Optional[int] = ..., status_flag: _Optional[_Union[StorageChannelInfo.StatusFlag, str]] = ...) -> None: ... + +class StorageConfig(_message.Message): + __slots__ = ["channel"] + class ChannelConfig(_message.Message): + __slots__ = ["media"] + MEDIA_FIELD_NUMBER: _ClassVar[int] + media: str + def __init__(self, media: _Optional[str] = ...) -> None: ... + CHANNEL_FIELD_NUMBER: _ClassVar[int] + channel: _containers.RepeatedCompositeFieldContainer[StorageConfig.ChannelConfig] + def __init__(self, channel: _Optional[_Iterable[_Union[StorageConfig.ChannelConfig, _Mapping]]] = ...) -> None: ... diff --git a/ydb/_grpc/v5/draft/protos/ydb_keyvalue_pb2_grpc.py b/ydb/_grpc/v5/draft/protos/ydb_keyvalue_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_keyvalue_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/draft/protos/ydb_maintenance_pb2.py b/ydb/_grpc/v5/draft/protos/ydb_maintenance_pb2.py new file mode 100644 index 00000000..eb00d035 --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_maintenance_pb2.py @@ -0,0 +1,125 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/protos/ydb_maintenance.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 +from ydb._grpc.v5.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 +from ydb._grpc.v5.protos import ydb_discovery_pb2 as protos_dot_ydb__discovery__pb2 +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"draft/protos/ydb_maintenance.proto\x12\x0fYdb.Maintenance\x1a#protos/annotations/validation.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1aprotos/ydb_discovery.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf0\x02\n\x04Node\x12\x0f\n\x07node_id\x18\x01 \x01(\r\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\r\x12-\n\x08location\x18\x04 \x01(\x0b\x32\x1b.Ydb.Discovery.NodeLocation\x12)\n\x05state\x18\x05 \x01(\x0e\x32\x1a.Ydb.Maintenance.ItemState\x12\x34\n\x07storage\x18\x06 \x01(\x0b\x32!.Ydb.Maintenance.Node.StorageNodeH\x00\x12\x34\n\x07\x64ynamic\x18\x07 \x01(\x0b\x32!.Ydb.Maintenance.Node.DynamicNodeH\x00\x12.\n\nstart_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\t \x01(\t\x1a\r\n\x0bStorageNode\x1a\x1d\n\x0b\x44ynamicNode\x12\x0e\n\x06tenant\x18\x01 \x01(\tB\x06\n\x04type\"T\n\x17ListClusterNodesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\">\n\x16ListClusterNodesResult\x12$\n\x05nodes\x18\x01 \x03(\x0b\x32\x15.Ydb.Maintenance.Node\"H\n\x18ListClusterNodesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xc3\x01\n\x16MaintenanceTaskOptions\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1c\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12<\n\x11\x61vailability_mode\x18\x03 \x01(\x0e\x32!.Ydb.Maintenance.AvailabilityMode\x12\x0f\n\x07\x64ry_run\x18\x04 \x01(\x08\x12!\n\x08priority\x18\x05 \x01(\x05\x42\x0f\xb2\xe6*\x0b[-100; 100]\"B\n\x0b\x41\x63tionScope\x12\x11\n\x07node_id\x18\x01 \x01(\rH\x00\x12\x17\n\x04host\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xff\x01H\x00\x42\x07\n\x05scope\"f\n\nLockAction\x12+\n\x05scope\x18\x01 \x01(\x0b\x32\x1c.Ydb.Maintenance.ActionScope\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"F\n\x06\x41\x63tion\x12\x32\n\x0block_action\x18\x01 \x01(\x0b\x32\x1b.Ydb.Maintenance.LockActionH\x00\x42\x08\n\x06\x61\x63tion\"?\n\x0b\x41\x63tionGroup\x12\x30\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x17.Ydb.Maintenance.ActionB\x06\x9a\xe6*\x02(\x01\"\xd5\x01\n\x1c\x43reateMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12=\n\x0ctask_options\x18\x02 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12;\n\raction_groups\x18\x03 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionGroupB\x06\x9a\xe6*\x02(\x01\"u\n\x1dRefreshMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"]\n\tActionUid\x12\x19\n\x08task_uid\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x08group_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x1a\n\taction_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\x8f\x06\n\x0b\x41\x63tionState\x12\'\n\x06\x61\x63tion\x18\x01 \x01(\x0b\x32\x17.Ydb.Maintenance.Action\x12.\n\naction_uid\x18\x02 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12\x39\n\x06status\x18\x03 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionStatus\x12\x39\n\x06reason\x18\x04 \x01(\x0e\x32).Ydb.Maintenance.ActionState.ActionReason\x12\x16\n\x0ereason_details\x18\x06 \x01(\t\x12,\n\x08\x64\x65\x61\x64line\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x0c\x41\x63tionStatus\x12\x1d\n\x19\x41\x43TION_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41\x43TION_STATUS_PENDING\x10\x01\x12\x1b\n\x17\x41\x43TION_STATUS_PERFORMED\x10\x02\"\x83\x03\n\x0c\x41\x63tionReason\x12\x1d\n\x19\x41\x43TION_REASON_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41\x43TION_REASON_OK\x10\x01\x12-\n)ACTION_REASON_TOO_MANY_UNAVAILABLE_VDISKS\x10\x02\x12:\n6ACTION_REASON_TOO_MANY_UNAVAILABLE_STATE_STORAGE_RINGS\x10\x03\x12.\n*ACTION_REASON_DISABLED_NODES_LIMIT_REACHED\x10\x04\x12\x35\n1ACTION_REASON_TENANT_DISABLED_NODES_LIMIT_REACHED\x10\x05\x12\x1f\n\x1b\x41\x43TION_REASON_WRONG_REQUEST\x10\x06\x12\x30\n,ACTION_REASON_SYS_TABLETS_NODE_LIMIT_REACHED\x10\x07\x12\x19\n\x15\x41\x43TION_REASON_GENERIC\x10\x08\"H\n\x11\x41\x63tionGroupStates\x12\x33\n\raction_states\x18\x01 \x03(\x0b\x32\x1c.Ydb.Maintenance.ActionState\"\xb0\x01\n\x15MaintenanceTaskResult\x12\x10\n\x08task_uid\x18\x01 \x01(\t\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\x12\x34\n\x0bretry_after\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x42\x0e\n\x0c_retry_after\"G\n\x17MaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"q\n\x19GetMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"\x9a\x01\n\x18GetMaintenanceTaskResult\x12=\n\x0ctask_options\x18\x01 \x01(\x0b\x32\'.Ydb.Maintenance.MaintenanceTaskOptions\x12?\n\x13\x61\x63tion_group_states\x18\x02 \x03(\x0b\x32\".Ydb.Maintenance.ActionGroupStates\"J\n\x1aGetMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"t\n\x1bListMaintenanceTasksRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x11\n\x04user\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_user\"0\n\x1aListMaintenanceTasksResult\x12\x12\n\ntasks_uids\x18\x01 \x03(\t\"L\n\x1cListMaintenanceTasksResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"r\n\x1a\x44ropMaintenanceTaskRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x19\n\x08task_uid\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\"M\n\x1dManageMaintenanceTaskResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x8b\x01\n\x15\x43ompleteActionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x37\n\x0b\x61\x63tion_uids\x18\x02 \x03(\x0b\x32\x1a.Ydb.Maintenance.ActionUidB\x06\x9a\xe6*\x02(\x01\"\xbe\x01\n\x12ManageActionResult\x12\x43\n\x0f\x61\x63tion_statuses\x18\x01 \x03(\x0b\x32*.Ydb.Maintenance.ManageActionResult.Status\x1a\x63\n\x06Status\x12.\n\naction_uid\x18\x01 \x01(\x0b\x32\x1a.Ydb.Maintenance.ActionUid\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\"D\n\x14ManageActionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation*k\n\tItemState\x12\x1a\n\x16ITEM_STATE_UNSPECIFIED\x10\x00\x12\x11\n\rITEM_STATE_UP\x10\x01\x12\x1a\n\x16ITEM_STATE_MAINTENANCE\x10\x02\x12\x13\n\x0fITEM_STATE_DOWN\x10\x03*\x8c\x01\n\x10\x41vailabilityMode\x12!\n\x1d\x41VAILABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41VAILABILITY_MODE_STRONG\x10\x01\x12\x1a\n\x16\x41VAILABILITY_MODE_WEAK\x10\x02\x12\x1b\n\x17\x41VAILABILITY_MODE_FORCE\x10\x03\x42n\n#tech.ydb.proto.draft.maintenance.v1ZDgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_Maintenance\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.protos.ydb_maintenance_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n#tech.ydb.proto.draft.maintenance.v1ZDgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_Maintenance\370\001\001' + _MAINTENANCETASKOPTIONS.fields_by_name['task_uid']._options = None + _MAINTENANCETASKOPTIONS.fields_by_name['task_uid']._serialized_options = b'\242\346*\003\030\200\001' + _MAINTENANCETASKOPTIONS.fields_by_name['description']._options = None + _MAINTENANCETASKOPTIONS.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200\001' + _MAINTENANCETASKOPTIONS.fields_by_name['priority']._options = None + _MAINTENANCETASKOPTIONS.fields_by_name['priority']._serialized_options = b'\262\346*\013[-100; 100]' + _ACTIONSCOPE.fields_by_name['host']._options = None + _ACTIONSCOPE.fields_by_name['host']._serialized_options = b'\242\346*\003\030\377\001' + _ACTIONGROUP.fields_by_name['actions']._options = None + _ACTIONGROUP.fields_by_name['actions']._serialized_options = b'\232\346*\002(\001' + _CREATEMAINTENANCETASKREQUEST.fields_by_name['action_groups']._options = None + _CREATEMAINTENANCETASKREQUEST.fields_by_name['action_groups']._serialized_options = b'\232\346*\002(\001' + _REFRESHMAINTENANCETASKREQUEST.fields_by_name['task_uid']._options = None + _REFRESHMAINTENANCETASKREQUEST.fields_by_name['task_uid']._serialized_options = b'\242\346*\003\030\200\001' + _ACTIONUID.fields_by_name['task_uid']._options = None + _ACTIONUID.fields_by_name['task_uid']._serialized_options = b'\242\346*\003\030\200\001' + _ACTIONUID.fields_by_name['group_id']._options = None + _ACTIONUID.fields_by_name['group_id']._serialized_options = b'\242\346*\003\030\200\001' + _ACTIONUID.fields_by_name['action_id']._options = None + _ACTIONUID.fields_by_name['action_id']._serialized_options = b'\242\346*\003\030\200\001' + _GETMAINTENANCETASKREQUEST.fields_by_name['task_uid']._options = None + _GETMAINTENANCETASKREQUEST.fields_by_name['task_uid']._serialized_options = b'\242\346*\003\030\200\001' + _DROPMAINTENANCETASKREQUEST.fields_by_name['task_uid']._options = None + _DROPMAINTENANCETASKREQUEST.fields_by_name['task_uid']._serialized_options = b'\242\346*\003\030\200\001' + _COMPLETEACTIONREQUEST.fields_by_name['action_uids']._options = None + _COMPLETEACTIONREQUEST.fields_by_name['action_uids']._serialized_options = b'\232\346*\002(\001' + _ITEMSTATE._serialized_start=4082 + _ITEMSTATE._serialized_end=4189 + _AVAILABILITYMODE._serialized_start=4192 + _AVAILABILITYMODE._serialized_end=4332 + _NODE._serialized_start=245 + _NODE._serialized_end=613 + _NODE_STORAGENODE._serialized_start=561 + _NODE_STORAGENODE._serialized_end=574 + _NODE_DYNAMICNODE._serialized_start=576 + _NODE_DYNAMICNODE._serialized_end=605 + _LISTCLUSTERNODESREQUEST._serialized_start=615 + _LISTCLUSTERNODESREQUEST._serialized_end=699 + _LISTCLUSTERNODESRESULT._serialized_start=701 + _LISTCLUSTERNODESRESULT._serialized_end=763 + _LISTCLUSTERNODESRESPONSE._serialized_start=765 + _LISTCLUSTERNODESRESPONSE._serialized_end=837 + _MAINTENANCETASKOPTIONS._serialized_start=840 + _MAINTENANCETASKOPTIONS._serialized_end=1035 + _ACTIONSCOPE._serialized_start=1037 + _ACTIONSCOPE._serialized_end=1103 + _LOCKACTION._serialized_start=1105 + _LOCKACTION._serialized_end=1207 + _ACTION._serialized_start=1209 + _ACTION._serialized_end=1279 + _ACTIONGROUP._serialized_start=1281 + _ACTIONGROUP._serialized_end=1344 + _CREATEMAINTENANCETASKREQUEST._serialized_start=1347 + _CREATEMAINTENANCETASKREQUEST._serialized_end=1560 + _REFRESHMAINTENANCETASKREQUEST._serialized_start=1562 + _REFRESHMAINTENANCETASKREQUEST._serialized_end=1679 + _ACTIONUID._serialized_start=1681 + _ACTIONUID._serialized_end=1774 + _ACTIONSTATE._serialized_start=1777 + _ACTIONSTATE._serialized_end=2560 + _ACTIONSTATE_ACTIONSTATUS._serialized_start=2069 + _ACTIONSTATE_ACTIONSTATUS._serialized_end=2170 + _ACTIONSTATE_ACTIONREASON._serialized_start=2173 + _ACTIONSTATE_ACTIONREASON._serialized_end=2560 + _ACTIONGROUPSTATES._serialized_start=2562 + _ACTIONGROUPSTATES._serialized_end=2634 + _MAINTENANCETASKRESULT._serialized_start=2637 + _MAINTENANCETASKRESULT._serialized_end=2813 + _MAINTENANCETASKRESPONSE._serialized_start=2815 + _MAINTENANCETASKRESPONSE._serialized_end=2886 + _GETMAINTENANCETASKREQUEST._serialized_start=2888 + _GETMAINTENANCETASKREQUEST._serialized_end=3001 + _GETMAINTENANCETASKRESULT._serialized_start=3004 + _GETMAINTENANCETASKRESULT._serialized_end=3158 + _GETMAINTENANCETASKRESPONSE._serialized_start=3160 + _GETMAINTENANCETASKRESPONSE._serialized_end=3234 + _LISTMAINTENANCETASKSREQUEST._serialized_start=3236 + _LISTMAINTENANCETASKSREQUEST._serialized_end=3352 + _LISTMAINTENANCETASKSRESULT._serialized_start=3354 + _LISTMAINTENANCETASKSRESULT._serialized_end=3402 + _LISTMAINTENANCETASKSRESPONSE._serialized_start=3404 + _LISTMAINTENANCETASKSRESPONSE._serialized_end=3480 + _DROPMAINTENANCETASKREQUEST._serialized_start=3482 + _DROPMAINTENANCETASKREQUEST._serialized_end=3596 + _MANAGEMAINTENANCETASKRESPONSE._serialized_start=3598 + _MANAGEMAINTENANCETASKRESPONSE._serialized_end=3675 + _COMPLETEACTIONREQUEST._serialized_start=3678 + _COMPLETEACTIONREQUEST._serialized_end=3817 + _MANAGEACTIONRESULT._serialized_start=3820 + _MANAGEACTIONRESULT._serialized_end=4010 + _MANAGEACTIONRESULT_STATUS._serialized_start=3911 + _MANAGEACTIONRESULT_STATUS._serialized_end=4010 + _MANAGEACTIONRESPONSE._serialized_start=4012 + _MANAGEACTIONRESPONSE._serialized_end=4080 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/draft/protos/ydb_maintenance_pb2.pyi b/ydb/_grpc/v5/draft/protos/ydb_maintenance_pb2.pyi new file mode 100644 index 00000000..20533943 --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_maintenance_pb2.pyi @@ -0,0 +1,282 @@ +from protos.annotations import validation_pb2 as _validation_pb2 +from protos import ydb_status_codes_pb2 as _ydb_status_codes_pb2 +from protos import ydb_discovery_pb2 as _ydb_discovery_pb2 +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from google.protobuf import duration_pb2 as _duration_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +AVAILABILITY_MODE_FORCE: AvailabilityMode +AVAILABILITY_MODE_STRONG: AvailabilityMode +AVAILABILITY_MODE_UNSPECIFIED: AvailabilityMode +AVAILABILITY_MODE_WEAK: AvailabilityMode +DESCRIPTOR: _descriptor.FileDescriptor +ITEM_STATE_DOWN: ItemState +ITEM_STATE_MAINTENANCE: ItemState +ITEM_STATE_UNSPECIFIED: ItemState +ITEM_STATE_UP: ItemState + +class Action(_message.Message): + __slots__ = ["lock_action"] + LOCK_ACTION_FIELD_NUMBER: _ClassVar[int] + lock_action: LockAction + def __init__(self, lock_action: _Optional[_Union[LockAction, _Mapping]] = ...) -> None: ... + +class ActionGroup(_message.Message): + __slots__ = ["actions"] + ACTIONS_FIELD_NUMBER: _ClassVar[int] + actions: _containers.RepeatedCompositeFieldContainer[Action] + def __init__(self, actions: _Optional[_Iterable[_Union[Action, _Mapping]]] = ...) -> None: ... + +class ActionGroupStates(_message.Message): + __slots__ = ["action_states"] + ACTION_STATES_FIELD_NUMBER: _ClassVar[int] + action_states: _containers.RepeatedCompositeFieldContainer[ActionState] + def __init__(self, action_states: _Optional[_Iterable[_Union[ActionState, _Mapping]]] = ...) -> None: ... + +class ActionScope(_message.Message): + __slots__ = ["host", "node_id"] + HOST_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + host: str + node_id: int + def __init__(self, node_id: _Optional[int] = ..., host: _Optional[str] = ...) -> None: ... + +class ActionState(_message.Message): + __slots__ = ["action", "action_uid", "deadline", "reason", "reason_details", "status"] + class ActionReason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class ActionStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ACTION_FIELD_NUMBER: _ClassVar[int] + ACTION_REASON_DISABLED_NODES_LIMIT_REACHED: ActionState.ActionReason + ACTION_REASON_GENERIC: ActionState.ActionReason + ACTION_REASON_OK: ActionState.ActionReason + ACTION_REASON_SYS_TABLETS_NODE_LIMIT_REACHED: ActionState.ActionReason + ACTION_REASON_TENANT_DISABLED_NODES_LIMIT_REACHED: ActionState.ActionReason + ACTION_REASON_TOO_MANY_UNAVAILABLE_STATE_STORAGE_RINGS: ActionState.ActionReason + ACTION_REASON_TOO_MANY_UNAVAILABLE_VDISKS: ActionState.ActionReason + ACTION_REASON_UNSPECIFIED: ActionState.ActionReason + ACTION_REASON_WRONG_REQUEST: ActionState.ActionReason + ACTION_STATUS_PENDING: ActionState.ActionStatus + ACTION_STATUS_PERFORMED: ActionState.ActionStatus + ACTION_STATUS_UNSPECIFIED: ActionState.ActionStatus + ACTION_UID_FIELD_NUMBER: _ClassVar[int] + DEADLINE_FIELD_NUMBER: _ClassVar[int] + REASON_DETAILS_FIELD_NUMBER: _ClassVar[int] + REASON_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + action: Action + action_uid: ActionUid + deadline: _timestamp_pb2.Timestamp + reason: ActionState.ActionReason + reason_details: str + status: ActionState.ActionStatus + def __init__(self, action: _Optional[_Union[Action, _Mapping]] = ..., action_uid: _Optional[_Union[ActionUid, _Mapping]] = ..., status: _Optional[_Union[ActionState.ActionStatus, str]] = ..., reason: _Optional[_Union[ActionState.ActionReason, str]] = ..., reason_details: _Optional[str] = ..., deadline: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class ActionUid(_message.Message): + __slots__ = ["action_id", "group_id", "task_uid"] + ACTION_ID_FIELD_NUMBER: _ClassVar[int] + GROUP_ID_FIELD_NUMBER: _ClassVar[int] + TASK_UID_FIELD_NUMBER: _ClassVar[int] + action_id: str + group_id: str + task_uid: str + def __init__(self, task_uid: _Optional[str] = ..., group_id: _Optional[str] = ..., action_id: _Optional[str] = ...) -> None: ... + +class CompleteActionRequest(_message.Message): + __slots__ = ["action_uids", "operation_params"] + ACTION_UIDS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + action_uids: _containers.RepeatedCompositeFieldContainer[ActionUid] + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., action_uids: _Optional[_Iterable[_Union[ActionUid, _Mapping]]] = ...) -> None: ... + +class CreateMaintenanceTaskRequest(_message.Message): + __slots__ = ["action_groups", "operation_params", "task_options"] + ACTION_GROUPS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + TASK_OPTIONS_FIELD_NUMBER: _ClassVar[int] + action_groups: _containers.RepeatedCompositeFieldContainer[ActionGroup] + operation_params: _ydb_operation_pb2.OperationParams + task_options: MaintenanceTaskOptions + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., task_options: _Optional[_Union[MaintenanceTaskOptions, _Mapping]] = ..., action_groups: _Optional[_Iterable[_Union[ActionGroup, _Mapping]]] = ...) -> None: ... + +class DropMaintenanceTaskRequest(_message.Message): + __slots__ = ["operation_params", "task_uid"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + TASK_UID_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + task_uid: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., task_uid: _Optional[str] = ...) -> None: ... + +class GetMaintenanceTaskRequest(_message.Message): + __slots__ = ["operation_params", "task_uid"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + TASK_UID_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + task_uid: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., task_uid: _Optional[str] = ...) -> None: ... + +class GetMaintenanceTaskResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class GetMaintenanceTaskResult(_message.Message): + __slots__ = ["action_group_states", "task_options"] + ACTION_GROUP_STATES_FIELD_NUMBER: _ClassVar[int] + TASK_OPTIONS_FIELD_NUMBER: _ClassVar[int] + action_group_states: _containers.RepeatedCompositeFieldContainer[ActionGroupStates] + task_options: MaintenanceTaskOptions + def __init__(self, task_options: _Optional[_Union[MaintenanceTaskOptions, _Mapping]] = ..., action_group_states: _Optional[_Iterable[_Union[ActionGroupStates, _Mapping]]] = ...) -> None: ... + +class ListClusterNodesRequest(_message.Message): + __slots__ = ["operation_params"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class ListClusterNodesResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListClusterNodesResult(_message.Message): + __slots__ = ["nodes"] + NODES_FIELD_NUMBER: _ClassVar[int] + nodes: _containers.RepeatedCompositeFieldContainer[Node] + def __init__(self, nodes: _Optional[_Iterable[_Union[Node, _Mapping]]] = ...) -> None: ... + +class ListMaintenanceTasksRequest(_message.Message): + __slots__ = ["operation_params", "user"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + USER_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + user: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., user: _Optional[str] = ...) -> None: ... + +class ListMaintenanceTasksResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListMaintenanceTasksResult(_message.Message): + __slots__ = ["tasks_uids"] + TASKS_UIDS_FIELD_NUMBER: _ClassVar[int] + tasks_uids: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, tasks_uids: _Optional[_Iterable[str]] = ...) -> None: ... + +class LockAction(_message.Message): + __slots__ = ["duration", "scope"] + DURATION_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + duration: _duration_pb2.Duration + scope: ActionScope + def __init__(self, scope: _Optional[_Union[ActionScope, _Mapping]] = ..., duration: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...) -> None: ... + +class MaintenanceTaskOptions(_message.Message): + __slots__ = ["availability_mode", "description", "dry_run", "priority", "task_uid"] + AVAILABILITY_MODE_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + DRY_RUN_FIELD_NUMBER: _ClassVar[int] + PRIORITY_FIELD_NUMBER: _ClassVar[int] + TASK_UID_FIELD_NUMBER: _ClassVar[int] + availability_mode: AvailabilityMode + description: str + dry_run: bool + priority: int + task_uid: str + def __init__(self, task_uid: _Optional[str] = ..., description: _Optional[str] = ..., availability_mode: _Optional[_Union[AvailabilityMode, str]] = ..., dry_run: bool = ..., priority: _Optional[int] = ...) -> None: ... + +class MaintenanceTaskResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class MaintenanceTaskResult(_message.Message): + __slots__ = ["action_group_states", "retry_after", "task_uid"] + ACTION_GROUP_STATES_FIELD_NUMBER: _ClassVar[int] + RETRY_AFTER_FIELD_NUMBER: _ClassVar[int] + TASK_UID_FIELD_NUMBER: _ClassVar[int] + action_group_states: _containers.RepeatedCompositeFieldContainer[ActionGroupStates] + retry_after: _timestamp_pb2.Timestamp + task_uid: str + def __init__(self, task_uid: _Optional[str] = ..., action_group_states: _Optional[_Iterable[_Union[ActionGroupStates, _Mapping]]] = ..., retry_after: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class ManageActionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ManageActionResult(_message.Message): + __slots__ = ["action_statuses"] + class Status(_message.Message): + __slots__ = ["action_uid", "status"] + ACTION_UID_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + action_uid: ActionUid + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, action_uid: _Optional[_Union[ActionUid, _Mapping]] = ..., status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ...) -> None: ... + ACTION_STATUSES_FIELD_NUMBER: _ClassVar[int] + action_statuses: _containers.RepeatedCompositeFieldContainer[ManageActionResult.Status] + def __init__(self, action_statuses: _Optional[_Iterable[_Union[ManageActionResult.Status, _Mapping]]] = ...) -> None: ... + +class ManageMaintenanceTaskResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class Node(_message.Message): + __slots__ = ["dynamic", "host", "location", "node_id", "port", "start_time", "state", "storage", "version"] + class DynamicNode(_message.Message): + __slots__ = ["tenant"] + TENANT_FIELD_NUMBER: _ClassVar[int] + tenant: str + def __init__(self, tenant: _Optional[str] = ...) -> None: ... + class StorageNode(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + DYNAMIC_FIELD_NUMBER: _ClassVar[int] + HOST_FIELD_NUMBER: _ClassVar[int] + LOCATION_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + START_TIME_FIELD_NUMBER: _ClassVar[int] + STATE_FIELD_NUMBER: _ClassVar[int] + STORAGE_FIELD_NUMBER: _ClassVar[int] + VERSION_FIELD_NUMBER: _ClassVar[int] + dynamic: Node.DynamicNode + host: str + location: _ydb_discovery_pb2.NodeLocation + node_id: int + port: int + start_time: _timestamp_pb2.Timestamp + state: ItemState + storage: Node.StorageNode + version: str + def __init__(self, node_id: _Optional[int] = ..., host: _Optional[str] = ..., port: _Optional[int] = ..., location: _Optional[_Union[_ydb_discovery_pb2.NodeLocation, _Mapping]] = ..., state: _Optional[_Union[ItemState, str]] = ..., storage: _Optional[_Union[Node.StorageNode, _Mapping]] = ..., dynamic: _Optional[_Union[Node.DynamicNode, _Mapping]] = ..., start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., version: _Optional[str] = ...) -> None: ... + +class RefreshMaintenanceTaskRequest(_message.Message): + __slots__ = ["operation_params", "task_uid"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + TASK_UID_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + task_uid: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., task_uid: _Optional[str] = ...) -> None: ... + +class ItemState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class AvailabilityMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] diff --git a/ydb/_grpc/v5/draft/protos/ydb_maintenance_pb2_grpc.py b/ydb/_grpc/v5/draft/protos/ydb_maintenance_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_maintenance_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/draft/protos/ydb_object_storage_pb2.py b/ydb/_grpc/v5/draft/protos/ydb_object_storage_pb2.py new file mode 100644 index 00000000..ce6f400b --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_object_storage_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/protos/ydb_object_storage.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 +from ydb._grpc.v5.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 +from ydb._grpc.v5.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%draft/protos/ydb_object_storage.proto\x12\x11Ydb.ObjectStorage\x1a\x1eprotos/ydb_issue_message.proto\x1a\x16protos/ydb_value.proto\x1a\x1dprotos/ydb_status_codes.proto\"\xd6\x02\n\x0eListingRequest\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12#\n\nkey_prefix\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x1a\n\x12path_column_prefix\x18\x03 \x01(\t\x12\x1d\n\x15path_column_delimiter\x18\x04 \x01(\t\x12\x1a\n\x12\x63ontinuation_token\x18\x05 \x01(\x0c\x12/\n\x16start_after_key_suffix\x18\x06 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x10\n\x08max_keys\x18\x07 \x01(\x05\x12\x19\n\x11\x63olumns_to_return\x18\x08 \x03(\t\x12(\n\x0fmatching_filter\x18\n \x01(\x0b\x32\x0f.Ydb.TypedValue\"&\n\nEMatchType\x12\t\n\x05\x45QUAL\x10\x00\x12\r\n\tNOT_EQUAL\x10\x01J\x04\x08\t\x10\n\"\xd7\x01\n\x0fListingResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x17\n\x0f\x63ommon_prefixes\x18\x03 \x03(\t\x12 \n\x08\x63ontents\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12\x14\n\x0cis_truncated\x18\x05 \x01(\x08\x12\x1f\n\x17next_continuation_token\x18\x06 \x01(\x0c\x42p\n#tech.ydb.proto.draft.object_storageZFgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_ObjectStorage\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.protos.ydb_object_storage_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n#tech.ydb.proto.draft.object_storageZFgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_ObjectStorage\370\001\001' + _LISTINGREQUEST._serialized_start=148 + _LISTINGREQUEST._serialized_end=490 + _LISTINGREQUEST_EMATCHTYPE._serialized_start=446 + _LISTINGREQUEST_EMATCHTYPE._serialized_end=484 + _LISTINGRESPONSE._serialized_start=493 + _LISTINGRESPONSE._serialized_end=708 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/draft/protos/ydb_object_storage_pb2.pyi b/ydb/_grpc/v5/draft/protos/ydb_object_storage_pb2.pyi new file mode 100644 index 00000000..3fabda60 --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_object_storage_pb2.pyi @@ -0,0 +1,52 @@ +from protos import ydb_issue_message_pb2 as _ydb_issue_message_pb2 +from protos import ydb_value_pb2 as _ydb_value_pb2 +from protos import ydb_status_codes_pb2 as _ydb_status_codes_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ListingRequest(_message.Message): + __slots__ = ["columns_to_return", "continuation_token", "key_prefix", "matching_filter", "max_keys", "path_column_delimiter", "path_column_prefix", "start_after_key_suffix", "table_name"] + class EMatchType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + COLUMNS_TO_RETURN_FIELD_NUMBER: _ClassVar[int] + CONTINUATION_TOKEN_FIELD_NUMBER: _ClassVar[int] + EQUAL: ListingRequest.EMatchType + KEY_PREFIX_FIELD_NUMBER: _ClassVar[int] + MATCHING_FILTER_FIELD_NUMBER: _ClassVar[int] + MAX_KEYS_FIELD_NUMBER: _ClassVar[int] + NOT_EQUAL: ListingRequest.EMatchType + PATH_COLUMN_DELIMITER_FIELD_NUMBER: _ClassVar[int] + PATH_COLUMN_PREFIX_FIELD_NUMBER: _ClassVar[int] + START_AFTER_KEY_SUFFIX_FIELD_NUMBER: _ClassVar[int] + TABLE_NAME_FIELD_NUMBER: _ClassVar[int] + columns_to_return: _containers.RepeatedScalarFieldContainer[str] + continuation_token: bytes + key_prefix: _ydb_value_pb2.TypedValue + matching_filter: _ydb_value_pb2.TypedValue + max_keys: int + path_column_delimiter: str + path_column_prefix: str + start_after_key_suffix: _ydb_value_pb2.TypedValue + table_name: str + def __init__(self, table_name: _Optional[str] = ..., key_prefix: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ..., path_column_prefix: _Optional[str] = ..., path_column_delimiter: _Optional[str] = ..., continuation_token: _Optional[bytes] = ..., start_after_key_suffix: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ..., max_keys: _Optional[int] = ..., columns_to_return: _Optional[_Iterable[str]] = ..., matching_filter: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... + +class ListingResponse(_message.Message): + __slots__ = ["common_prefixes", "contents", "is_truncated", "issues", "next_continuation_token", "status"] + COMMON_PREFIXES_FIELD_NUMBER: _ClassVar[int] + CONTENTS_FIELD_NUMBER: _ClassVar[int] + ISSUES_FIELD_NUMBER: _ClassVar[int] + IS_TRUNCATED_FIELD_NUMBER: _ClassVar[int] + NEXT_CONTINUATION_TOKEN_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + common_prefixes: _containers.RepeatedScalarFieldContainer[str] + contents: _ydb_value_pb2.ResultSet + is_truncated: bool + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + next_continuation_token: bytes + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., common_prefixes: _Optional[_Iterable[str]] = ..., contents: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ..., is_truncated: bool = ..., next_continuation_token: _Optional[bytes] = ...) -> None: ... diff --git a/ydb/_grpc/v5/draft/protos/ydb_object_storage_pb2_grpc.py b/ydb/_grpc/v5/draft/protos/ydb_object_storage_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/draft/protos/ydb_object_storage_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/draft/ydb_dynamic_config_v1_pb2.py b/ydb/_grpc/v5/draft/ydb_dynamic_config_v1_pb2.py new file mode 100644 index 00000000..6ca4181b --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_dynamic_config_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/ydb_dynamic_config_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.draft.protos import ydb_dynamic_config_pb2 as draft_dot_protos_dot_ydb__dynamic__config__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!draft/ydb_dynamic_config_v1.proto\x12\x14Ydb.DynamicConfig.V1\x1a%draft/protos/ydb_dynamic_config.proto2\x81\x08\n\x14\x44ynamicConfigService\x12V\n\tSetConfig\x12#.Ydb.DynamicConfig.SetConfigRequest\x1a$.Ydb.DynamicConfig.SetConfigResponse\x12\x62\n\rReplaceConfig\x12\'.Ydb.DynamicConfig.ReplaceConfigRequest\x1a(.Ydb.DynamicConfig.ReplaceConfigResponse\x12\\\n\x0bGetMetadata\x12%.Ydb.DynamicConfig.GetMetadataRequest\x1a&.Ydb.DynamicConfig.GetMetadataResponse\x12V\n\tGetConfig\x12#.Ydb.DynamicConfig.GetConfigRequest\x1a$.Ydb.DynamicConfig.GetConfigResponse\x12Y\n\nDropConfig\x12$.Ydb.DynamicConfig.DropConfigRequest\x1a%.Ydb.DynamicConfig.DropConfigResponse\x12n\n\x11\x41\x64\x64VolatileConfig\x12+.Ydb.DynamicConfig.AddVolatileConfigRequest\x1a,.Ydb.DynamicConfig.AddVolatileConfigResponse\x12w\n\x14RemoveVolatileConfig\x12..Ydb.DynamicConfig.RemoveVolatileConfigRequest\x1a/.Ydb.DynamicConfig.RemoveVolatileConfigResponse\x12\x62\n\rGetNodeLabels\x12\'.Ydb.DynamicConfig.GetNodeLabelsRequest\x1a(.Ydb.DynamicConfig.GetNodeLabelsResponse\x12\x62\n\rResolveConfig\x12\'.Ydb.DynamicConfig.ResolveConfigRequest\x1a(.Ydb.DynamicConfig.ResolveConfigResponse\x12k\n\x10ResolveAllConfig\x12*.Ydb.DynamicConfig.ResolveAllConfigRequest\x1a+.Ydb.DynamicConfig.ResolveAllConfigResponseBn\n%tech.ydb.proto.draft.dynamicconfig.v1ZBgithub.com/ydb-platform/ydb-go-genproto/draft/Ydb_DynamicConfig_V1\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.ydb_dynamic_config_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n%tech.ydb.proto.draft.dynamicconfig.v1ZBgithub.com/ydb-platform/ydb-go-genproto/draft/Ydb_DynamicConfig_V1\370\001\001' + _DYNAMICCONFIGSERVICE._serialized_start=99 + _DYNAMICCONFIGSERVICE._serialized_end=1124 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/draft/ydb_dynamic_config_v1_pb2.pyi b/ydb/_grpc/v5/draft/ydb_dynamic_config_v1_pb2.pyi new file mode 100644 index 00000000..3e78c154 --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_dynamic_config_v1_pb2.pyi @@ -0,0 +1,5 @@ +from draft.protos import ydb_dynamic_config_pb2 as _ydb_dynamic_config_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/draft/ydb_dynamic_config_v1_pb2_grpc.py b/ydb/_grpc/v5/draft/ydb_dynamic_config_v1_pb2_grpc.py new file mode 100644 index 00000000..a8fef354 --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_dynamic_config_v1_pb2_grpc.py @@ -0,0 +1,390 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.draft.protos import ydb_dynamic_config_pb2 as draft_dot_protos_dot_ydb__dynamic__config__pb2 + + +class DynamicConfigServiceStub(object): + """Dynamic Config is the configuration applied to dynamic nodes without static configuration + and is utilized by certain services, such as logging, which can update their settings + seamlessly without requiring any restarts. + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.SetConfig = channel.unary_unary( + '/Ydb.DynamicConfig.V1.DynamicConfigService/SetConfig', + request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.SetConfigRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.SetConfigResponse.FromString, + ) + self.ReplaceConfig = channel.unary_unary( + '/Ydb.DynamicConfig.V1.DynamicConfigService/ReplaceConfig', + request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ReplaceConfigRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ReplaceConfigResponse.FromString, + ) + self.GetMetadata = channel.unary_unary( + '/Ydb.DynamicConfig.V1.DynamicConfigService/GetMetadata', + request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetMetadataRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetMetadataResponse.FromString, + ) + self.GetConfig = channel.unary_unary( + '/Ydb.DynamicConfig.V1.DynamicConfigService/GetConfig', + request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetConfigRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetConfigResponse.FromString, + ) + self.DropConfig = channel.unary_unary( + '/Ydb.DynamicConfig.V1.DynamicConfigService/DropConfig', + request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.DropConfigRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.DropConfigResponse.FromString, + ) + self.AddVolatileConfig = channel.unary_unary( + '/Ydb.DynamicConfig.V1.DynamicConfigService/AddVolatileConfig', + request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.AddVolatileConfigRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.AddVolatileConfigResponse.FromString, + ) + self.RemoveVolatileConfig = channel.unary_unary( + '/Ydb.DynamicConfig.V1.DynamicConfigService/RemoveVolatileConfig', + request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.RemoveVolatileConfigRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.RemoveVolatileConfigResponse.FromString, + ) + self.GetNodeLabels = channel.unary_unary( + '/Ydb.DynamicConfig.V1.DynamicConfigService/GetNodeLabels', + request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetNodeLabelsRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetNodeLabelsResponse.FromString, + ) + self.ResolveConfig = channel.unary_unary( + '/Ydb.DynamicConfig.V1.DynamicConfigService/ResolveConfig', + request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveConfigRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveConfigResponse.FromString, + ) + self.ResolveAllConfig = channel.unary_unary( + '/Ydb.DynamicConfig.V1.DynamicConfigService/ResolveAllConfig', + request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveAllConfigRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveAllConfigResponse.FromString, + ) + + +class DynamicConfigServiceServicer(object): + """Dynamic Config is the configuration applied to dynamic nodes without static configuration + and is utilized by certain services, such as logging, which can update their settings + seamlessly without requiring any restarts. + + """ + + def SetConfig(self, request, context): + """Apply new version of config. + Overwrites previous version. + This call is idempotent: + - Two subsequent identical calls will return success, + - After applying next version another identical call will result in an error. + The field version within the YAML in the request must strictly be set to the current version increment by one. + The field cluster within the YAML should be identical to the one configured on the node used by the console tablet. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReplaceConfig(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetMetadata(self, request, context): + """Get current configs metadata. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetConfig(self, request, context): + """Get current configs. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DropConfig(self, request, context): + """Drop current config. + This call is idempotent. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AddVolatileConfig(self, request, context): + """Add volatile config. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemoveVolatileConfig(self, request, context): + """Remove volatile config. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetNodeLabels(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ResolveConfig(self, request, context): + """Resolve config for particular labels. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ResolveAllConfig(self, request, context): + """Resolve config for all possible labels combinations. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_DynamicConfigServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'SetConfig': grpc.unary_unary_rpc_method_handler( + servicer.SetConfig, + request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.SetConfigRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.SetConfigResponse.SerializeToString, + ), + 'ReplaceConfig': grpc.unary_unary_rpc_method_handler( + servicer.ReplaceConfig, + request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ReplaceConfigRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ReplaceConfigResponse.SerializeToString, + ), + 'GetMetadata': grpc.unary_unary_rpc_method_handler( + servicer.GetMetadata, + request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetMetadataRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetMetadataResponse.SerializeToString, + ), + 'GetConfig': grpc.unary_unary_rpc_method_handler( + servicer.GetConfig, + request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetConfigRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetConfigResponse.SerializeToString, + ), + 'DropConfig': grpc.unary_unary_rpc_method_handler( + servicer.DropConfig, + request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.DropConfigRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.DropConfigResponse.SerializeToString, + ), + 'AddVolatileConfig': grpc.unary_unary_rpc_method_handler( + servicer.AddVolatileConfig, + request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.AddVolatileConfigRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.AddVolatileConfigResponse.SerializeToString, + ), + 'RemoveVolatileConfig': grpc.unary_unary_rpc_method_handler( + servicer.RemoveVolatileConfig, + request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.RemoveVolatileConfigRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.RemoveVolatileConfigResponse.SerializeToString, + ), + 'GetNodeLabels': grpc.unary_unary_rpc_method_handler( + servicer.GetNodeLabels, + request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetNodeLabelsRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetNodeLabelsResponse.SerializeToString, + ), + 'ResolveConfig': grpc.unary_unary_rpc_method_handler( + servicer.ResolveConfig, + request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveConfigRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveConfigResponse.SerializeToString, + ), + 'ResolveAllConfig': grpc.unary_unary_rpc_method_handler( + servicer.ResolveAllConfig, + request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveAllConfigRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveAllConfigResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.DynamicConfig.V1.DynamicConfigService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class DynamicConfigService(object): + """Dynamic Config is the configuration applied to dynamic nodes without static configuration + and is utilized by certain services, such as logging, which can update their settings + seamlessly without requiring any restarts. + + """ + + @staticmethod + def SetConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/SetConfig', + draft_dot_protos_dot_ydb__dynamic__config__pb2.SetConfigRequest.SerializeToString, + draft_dot_protos_dot_ydb__dynamic__config__pb2.SetConfigResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReplaceConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/ReplaceConfig', + draft_dot_protos_dot_ydb__dynamic__config__pb2.ReplaceConfigRequest.SerializeToString, + draft_dot_protos_dot_ydb__dynamic__config__pb2.ReplaceConfigResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetMetadata(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/GetMetadata', + draft_dot_protos_dot_ydb__dynamic__config__pb2.GetMetadataRequest.SerializeToString, + draft_dot_protos_dot_ydb__dynamic__config__pb2.GetMetadataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/GetConfig', + draft_dot_protos_dot_ydb__dynamic__config__pb2.GetConfigRequest.SerializeToString, + draft_dot_protos_dot_ydb__dynamic__config__pb2.GetConfigResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DropConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/DropConfig', + draft_dot_protos_dot_ydb__dynamic__config__pb2.DropConfigRequest.SerializeToString, + draft_dot_protos_dot_ydb__dynamic__config__pb2.DropConfigResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AddVolatileConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/AddVolatileConfig', + draft_dot_protos_dot_ydb__dynamic__config__pb2.AddVolatileConfigRequest.SerializeToString, + draft_dot_protos_dot_ydb__dynamic__config__pb2.AddVolatileConfigResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemoveVolatileConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/RemoveVolatileConfig', + draft_dot_protos_dot_ydb__dynamic__config__pb2.RemoveVolatileConfigRequest.SerializeToString, + draft_dot_protos_dot_ydb__dynamic__config__pb2.RemoveVolatileConfigResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetNodeLabels(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/GetNodeLabels', + draft_dot_protos_dot_ydb__dynamic__config__pb2.GetNodeLabelsRequest.SerializeToString, + draft_dot_protos_dot_ydb__dynamic__config__pb2.GetNodeLabelsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ResolveConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/ResolveConfig', + draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveConfigRequest.SerializeToString, + draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveConfigResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ResolveAllConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/ResolveAllConfig', + draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveAllConfigRequest.SerializeToString, + draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveAllConfigResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/draft/ydb_federated_query_v1_pb2.py b/ydb/_grpc/v5/draft/ydb_federated_query_v1_pb2.py new file mode 100644 index 00000000..02b465c4 --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_federated_query_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/ydb_federated_query_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.draft.protos import ydb_federated_query_pb2 as draft_dot_protos_dot_ydb__federated__query__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"draft/ydb_federated_query_v1.proto\x12\x11\x46\x65\x64\x65ratedQuery.V1\x1a&draft/protos/ydb_federated_query.proto2\xd6\x0f\n\x15\x46\x65\x64\x65ratedQueryService\x12V\n\x0b\x43reateQuery\x12\".FederatedQuery.CreateQueryRequest\x1a#.FederatedQuery.CreateQueryResponse\x12V\n\x0bListQueries\x12\".FederatedQuery.ListQueriesRequest\x1a#.FederatedQuery.ListQueriesResponse\x12\\\n\rDescribeQuery\x12$.FederatedQuery.DescribeQueryRequest\x1a%.FederatedQuery.DescribeQueryResponse\x12_\n\x0eGetQueryStatus\x12%.FederatedQuery.GetQueryStatusRequest\x1a&.FederatedQuery.GetQueryStatusResponse\x12V\n\x0bModifyQuery\x12\".FederatedQuery.ModifyQueryRequest\x1a#.FederatedQuery.ModifyQueryResponse\x12V\n\x0b\x44\x65leteQuery\x12\".FederatedQuery.DeleteQueryRequest\x1a#.FederatedQuery.DeleteQueryResponse\x12Y\n\x0c\x43ontrolQuery\x12#.FederatedQuery.ControlQueryRequest\x1a$.FederatedQuery.ControlQueryResponse\x12\\\n\rGetResultData\x12$.FederatedQuery.GetResultDataRequest\x1a%.FederatedQuery.GetResultDataResponse\x12M\n\x08ListJobs\x12\x1f.FederatedQuery.ListJobsRequest\x1a .FederatedQuery.ListJobsResponse\x12V\n\x0b\x44\x65scribeJob\x12\".FederatedQuery.DescribeJobRequest\x1a#.FederatedQuery.DescribeJobResponse\x12\x65\n\x10\x43reateConnection\x12\'.FederatedQuery.CreateConnectionRequest\x1a(.FederatedQuery.CreateConnectionResponse\x12\x62\n\x0fListConnections\x12&.FederatedQuery.ListConnectionsRequest\x1a\'.FederatedQuery.ListConnectionsResponse\x12k\n\x12\x44\x65scribeConnection\x12).FederatedQuery.DescribeConnectionRequest\x1a*.FederatedQuery.DescribeConnectionResponse\x12\x65\n\x10ModifyConnection\x12\'.FederatedQuery.ModifyConnectionRequest\x1a(.FederatedQuery.ModifyConnectionResponse\x12\x65\n\x10\x44\x65leteConnection\x12\'.FederatedQuery.DeleteConnectionRequest\x1a(.FederatedQuery.DeleteConnectionResponse\x12_\n\x0eTestConnection\x12%.FederatedQuery.TestConnectionRequest\x1a&.FederatedQuery.TestConnectionResponse\x12\\\n\rCreateBinding\x12$.FederatedQuery.CreateBindingRequest\x1a%.FederatedQuery.CreateBindingResponse\x12Y\n\x0cListBindings\x12#.FederatedQuery.ListBindingsRequest\x1a$.FederatedQuery.ListBindingsResponse\x12\x62\n\x0f\x44\x65scribeBinding\x12&.FederatedQuery.DescribeBindingRequest\x1a\'.FederatedQuery.DescribeBindingResponse\x12\\\n\rModifyBinding\x12$.FederatedQuery.ModifyBindingRequest\x1a%.FederatedQuery.ModifyBindingResponse\x12\\\n\rDeleteBinding\x12$.FederatedQuery.DeleteBindingRequest\x1a%.FederatedQuery.DeleteBindingResponseBn\n\'tech.ydb.proto.draft.federated.query.v1ZCgithub.com/ydb-platform/ydb-go-genproto/draft/Ydb_FederatedQuery_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.ydb_federated_query_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\'tech.ydb.proto.draft.federated.query.v1ZCgithub.com/ydb-platform/ydb-go-genproto/draft/Ydb_FederatedQuery_V1' + _FEDERATEDQUERYSERVICE._serialized_start=98 + _FEDERATEDQUERYSERVICE._serialized_end=2104 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/draft/ydb_federated_query_v1_pb2.pyi b/ydb/_grpc/v5/draft/ydb_federated_query_v1_pb2.pyi new file mode 100644 index 00000000..786beec0 --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_federated_query_v1_pb2.pyi @@ -0,0 +1,5 @@ +from draft.protos import ydb_federated_query_pb2 as _ydb_federated_query_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/draft/ydb_federated_query_v1_pb2_grpc.py b/ydb/_grpc/v5/draft/ydb_federated_query_v1_pb2_grpc.py new file mode 100644 index 00000000..6687dd3c --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_federated_query_v1_pb2_grpc.py @@ -0,0 +1,755 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.draft.protos import ydb_federated_query_pb2 as draft_dot_protos_dot_ydb__federated__query__pb2 + + +class FederatedQueryServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/CreateQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryResponse.FromString, + ) + self.ListQueries = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ListQueries', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesResponse.FromString, + ) + self.DescribeQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DescribeQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryResponse.FromString, + ) + self.GetQueryStatus = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/GetQueryStatus', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusResponse.FromString, + ) + self.ModifyQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ModifyQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryResponse.FromString, + ) + self.DeleteQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DeleteQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryResponse.FromString, + ) + self.ControlQuery = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ControlQuery', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryResponse.FromString, + ) + self.GetResultData = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/GetResultData', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataResponse.FromString, + ) + self.ListJobs = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ListJobs', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsResponse.FromString, + ) + self.DescribeJob = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DescribeJob', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobResponse.FromString, + ) + self.CreateConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/CreateConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionResponse.FromString, + ) + self.ListConnections = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ListConnections', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsResponse.FromString, + ) + self.DescribeConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DescribeConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionResponse.FromString, + ) + self.ModifyConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ModifyConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionResponse.FromString, + ) + self.DeleteConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DeleteConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionResponse.FromString, + ) + self.TestConnection = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/TestConnection', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionResponse.FromString, + ) + self.CreateBinding = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/CreateBinding', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingResponse.FromString, + ) + self.ListBindings = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ListBindings', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsResponse.FromString, + ) + self.DescribeBinding = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DescribeBinding', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingResponse.FromString, + ) + self.ModifyBinding = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/ModifyBinding', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingResponse.FromString, + ) + self.DeleteBinding = channel.unary_unary( + '/FederatedQuery.V1.FederatedQueryService/DeleteBinding', + request_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingResponse.FromString, + ) + + +class FederatedQueryServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def CreateQuery(self, request, context): + """Query + Query is the text of an SQL request, the results of the last run and the state after the last run (partitions offsets, consumer in YDS) + Create a query object with a given SQL + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListQueries(self, request, context): + """Get a list of brief queries objects + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeQuery(self, request, context): + """Get full information about the object of the query + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetQueryStatus(self, request, context): + """Get status of the query + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ModifyQuery(self, request, context): + """Change the attributes of the query (acl, name, ...) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteQuery(self, request, context): + """Completely delete the query + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ControlQuery(self, request, context): + """Change the state of the query lifecycle + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetResultData(self, request, context): + """Get a results page + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListJobs(self, request, context): + """Job + Job - appears immediately after starting the request and contains the request metadata + Get a list of jobs + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeJob(self, request, context): + """Get information about the job + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateConnection(self, request, context): + """Connection + Connection - entity that describes connection points. This can be imagined as an analogue of a network address. + Create a connection object (ObjectStorage, YDB, YDS, ...) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListConnections(self, request, context): + """Get a list of connections objects + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeConnection(self, request, context): + """Get information about the object of the connection + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ModifyConnection(self, request, context): + """Change the attributes of the connection + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteConnection(self, request, context): + """Completely delete the connection + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def TestConnection(self, request, context): + """Test the connection (permissions, network, ...) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateBinding(self, request, context): + """Binding + Binding - entity using which a schema is assigned to non-schematic data + Create a binding object - bind schema with ObjectStorage object or YDS stream + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListBindings(self, request, context): + """Get a list of bindings objects + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeBinding(self, request, context): + """Get information about the object of the binding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ModifyBinding(self, request, context): + """Change the attributes of the binding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteBinding(self, request, context): + """Completely delete the binding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_FederatedQueryServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateQuery': grpc.unary_unary_rpc_method_handler( + servicer.CreateQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryResponse.SerializeToString, + ), + 'ListQueries': grpc.unary_unary_rpc_method_handler( + servicer.ListQueries, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesResponse.SerializeToString, + ), + 'DescribeQuery': grpc.unary_unary_rpc_method_handler( + servicer.DescribeQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryResponse.SerializeToString, + ), + 'GetQueryStatus': grpc.unary_unary_rpc_method_handler( + servicer.GetQueryStatus, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusResponse.SerializeToString, + ), + 'ModifyQuery': grpc.unary_unary_rpc_method_handler( + servicer.ModifyQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryResponse.SerializeToString, + ), + 'DeleteQuery': grpc.unary_unary_rpc_method_handler( + servicer.DeleteQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryResponse.SerializeToString, + ), + 'ControlQuery': grpc.unary_unary_rpc_method_handler( + servicer.ControlQuery, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryResponse.SerializeToString, + ), + 'GetResultData': grpc.unary_unary_rpc_method_handler( + servicer.GetResultData, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataResponse.SerializeToString, + ), + 'ListJobs': grpc.unary_unary_rpc_method_handler( + servicer.ListJobs, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsResponse.SerializeToString, + ), + 'DescribeJob': grpc.unary_unary_rpc_method_handler( + servicer.DescribeJob, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobResponse.SerializeToString, + ), + 'CreateConnection': grpc.unary_unary_rpc_method_handler( + servicer.CreateConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionResponse.SerializeToString, + ), + 'ListConnections': grpc.unary_unary_rpc_method_handler( + servicer.ListConnections, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsResponse.SerializeToString, + ), + 'DescribeConnection': grpc.unary_unary_rpc_method_handler( + servicer.DescribeConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionResponse.SerializeToString, + ), + 'ModifyConnection': grpc.unary_unary_rpc_method_handler( + servicer.ModifyConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionResponse.SerializeToString, + ), + 'DeleteConnection': grpc.unary_unary_rpc_method_handler( + servicer.DeleteConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionResponse.SerializeToString, + ), + 'TestConnection': grpc.unary_unary_rpc_method_handler( + servicer.TestConnection, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionResponse.SerializeToString, + ), + 'CreateBinding': grpc.unary_unary_rpc_method_handler( + servicer.CreateBinding, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingResponse.SerializeToString, + ), + 'ListBindings': grpc.unary_unary_rpc_method_handler( + servicer.ListBindings, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsResponse.SerializeToString, + ), + 'DescribeBinding': grpc.unary_unary_rpc_method_handler( + servicer.DescribeBinding, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingResponse.SerializeToString, + ), + 'ModifyBinding': grpc.unary_unary_rpc_method_handler( + servicer.ModifyBinding, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingResponse.SerializeToString, + ), + 'DeleteBinding': grpc.unary_unary_rpc_method_handler( + servicer.DeleteBinding, + request_deserializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'FederatedQuery.V1.FederatedQueryService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class FederatedQueryService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def CreateQuery(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, '/FederatedQuery.V1.FederatedQueryService/CreateQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.CreateQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListQueries(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, '/FederatedQuery.V1.FederatedQueryService/ListQueries', + draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ListQueriesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeQuery(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, '/FederatedQuery.V1.FederatedQueryService/DescribeQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetQueryStatus(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, '/FederatedQuery.V1.FederatedQueryService/GetQueryStatus', + draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.GetQueryStatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ModifyQuery(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, '/FederatedQuery.V1.FederatedQueryService/ModifyQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteQuery(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, '/FederatedQuery.V1.FederatedQueryService/DeleteQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ControlQuery(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, '/FederatedQuery.V1.FederatedQueryService/ControlQuery', + draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ControlQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetResultData(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, '/FederatedQuery.V1.FederatedQueryService/GetResultData', + draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.GetResultDataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListJobs(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, '/FederatedQuery.V1.FederatedQueryService/ListJobs', + draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ListJobsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeJob(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, '/FederatedQuery.V1.FederatedQueryService/DescribeJob', + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeJobResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateConnection(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, '/FederatedQuery.V1.FederatedQueryService/CreateConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.CreateConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListConnections(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, '/FederatedQuery.V1.FederatedQueryService/ListConnections', + draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ListConnectionsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeConnection(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, '/FederatedQuery.V1.FederatedQueryService/DescribeConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ModifyConnection(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, '/FederatedQuery.V1.FederatedQueryService/ModifyConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteConnection(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, '/FederatedQuery.V1.FederatedQueryService/DeleteConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def TestConnection(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, '/FederatedQuery.V1.FederatedQueryService/TestConnection', + draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.TestConnectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateBinding(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, '/FederatedQuery.V1.FederatedQueryService/CreateBinding', + draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.CreateBindingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListBindings(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, '/FederatedQuery.V1.FederatedQueryService/ListBindings', + draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ListBindingsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeBinding(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, '/FederatedQuery.V1.FederatedQueryService/DescribeBinding', + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DescribeBindingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ModifyBinding(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, '/FederatedQuery.V1.FederatedQueryService/ModifyBinding', + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.ModifyBindingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteBinding(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, '/FederatedQuery.V1.FederatedQueryService/DeleteBinding', + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingRequest.SerializeToString, + draft_dot_protos_dot_ydb__federated__query__pb2.DeleteBindingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/draft/ydb_keyvalue_v1_pb2.py b/ydb/_grpc/v5/draft/ydb_keyvalue_v1_pb2.py new file mode 100644 index 00000000..762dc3bf --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_keyvalue_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/ydb_keyvalue_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.draft.protos import ydb_keyvalue_pb2 as draft_dot_protos_dot_ydb__keyvalue__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x64raft/ydb_keyvalue_v1.proto\x12\x0fYdb.KeyValue.V1\x1a\x1f\x64raft/protos/ydb_keyvalue.proto2\xe6\x07\n\x0fKeyValueService\x12U\n\x0c\x43reateVolume\x12!.Ydb.KeyValue.CreateVolumeRequest\x1a\".Ydb.KeyValue.CreateVolumeResponse\x12O\n\nDropVolume\x12\x1f.Ydb.KeyValue.DropVolumeRequest\x1a .Ydb.KeyValue.DropVolumeResponse\x12R\n\x0b\x41lterVolume\x12 .Ydb.KeyValue.AlterVolumeRequest\x1a!.Ydb.KeyValue.AlterVolumeResponse\x12[\n\x0e\x44\x65scribeVolume\x12#.Ydb.KeyValue.DescribeVolumeRequest\x1a$.Ydb.KeyValue.DescribeVolumeResponse\x12j\n\x13ListLocalPartitions\x12(.Ydb.KeyValue.ListLocalPartitionsRequest\x1a).Ydb.KeyValue.ListLocalPartitionsResponse\x12R\n\x0b\x41\x63quireLock\x12 .Ydb.KeyValue.AcquireLockRequest\x1a!.Ydb.KeyValue.AcquireLockResponse\x12g\n\x12\x45xecuteTransaction\x12\'.Ydb.KeyValue.ExecuteTransactionRequest\x1a(.Ydb.KeyValue.ExecuteTransactionResponse\x12=\n\x04Read\x12\x19.Ydb.KeyValue.ReadRequest\x1a\x1a.Ydb.KeyValue.ReadResponse\x12L\n\tReadRange\x12\x1e.Ydb.KeyValue.ReadRangeRequest\x1a\x1f.Ydb.KeyValue.ReadRangeResponse\x12L\n\tListRange\x12\x1e.Ydb.KeyValue.ListRangeRequest\x1a\x1f.Ydb.KeyValue.ListRangeResponse\x12v\n\x17GetStorageChannelStatus\x12,.Ydb.KeyValue.GetStorageChannelStatusRequest\x1a-.Ydb.KeyValue.GetStorageChannelStatusResponseB^\n\x1dtech.ydb.proto.draft.keyvalueZ=github.com/ydb-platform/ydb-go-genproto/draft/Ydb_KeyValue_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.ydb_keyvalue_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\035tech.ydb.proto.draft.keyvalueZ=github.com/ydb-platform/ydb-go-genproto/draft/Ydb_KeyValue_V1' + _KEYVALUESERVICE._serialized_start=82 + _KEYVALUESERVICE._serialized_end=1080 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/draft/ydb_keyvalue_v1_pb2.pyi b/ydb/_grpc/v5/draft/ydb_keyvalue_v1_pb2.pyi new file mode 100644 index 00000000..8780324b --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_keyvalue_v1_pb2.pyi @@ -0,0 +1,5 @@ +from draft.protos import ydb_keyvalue_pb2 as _ydb_keyvalue_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/draft/ydb_keyvalue_v1_pb2_grpc.py b/ydb/_grpc/v5/draft/ydb_keyvalue_v1_pb2_grpc.py new file mode 100644 index 00000000..0e96ae72 --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_keyvalue_v1_pb2_grpc.py @@ -0,0 +1,419 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.draft.protos import ydb_keyvalue_pb2 as draft_dot_protos_dot_ydb__keyvalue__pb2 + + +class KeyValueServiceStub(object): + """KeyValue tablets provide a simple key-value storage in a low-overhead and easy-to-shoot-your-leg manner. + To use KeyValue tablets in an efficient way one must be familiar with the design of both the KeyValue tablet + and the Distributed Storage underneath it. + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateVolume = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/CreateVolume', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeResponse.FromString, + ) + self.DropVolume = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/DropVolume', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeResponse.FromString, + ) + self.AlterVolume = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/AlterVolume', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeResponse.FromString, + ) + self.DescribeVolume = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/DescribeVolume', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeResponse.FromString, + ) + self.ListLocalPartitions = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/ListLocalPartitions', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsResponse.FromString, + ) + self.AcquireLock = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/AcquireLock', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockResponse.FromString, + ) + self.ExecuteTransaction = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/ExecuteTransaction', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionResponse.FromString, + ) + self.Read = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/Read', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadResponse.FromString, + ) + self.ReadRange = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/ReadRange', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeResponse.FromString, + ) + self.ListRange = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/ListRange', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeResponse.FromString, + ) + self.GetStorageChannelStatus = channel.unary_unary( + '/Ydb.KeyValue.V1.KeyValueService/GetStorageChannelStatus', + request_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusResponse.FromString, + ) + + +class KeyValueServiceServicer(object): + """KeyValue tablets provide a simple key-value storage in a low-overhead and easy-to-shoot-your-leg manner. + To use KeyValue tablets in an efficient way one must be familiar with the design of both the KeyValue tablet + and the Distributed Storage underneath it. + + """ + + def CreateVolume(self, request, context): + """Create a volume by path and partition count + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DropVolume(self, request, context): + """Drop the volume by path + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AlterVolume(self, request, context): + """Alter the volume by path + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeVolume(self, request, context): + """Describe the volume by path + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListLocalPartitions(self, request, context): + """List partitions of a volume at the local node. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AcquireLock(self, request, context): + """Acquire an exclusive lock for the partition. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ExecuteTransaction(self, request, context): + """Perform list of commands to modify the state of the partition as an atomic transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Read(self, request, context): + """Read the value stored in the item with the key specified. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReadRange(self, request, context): + """Read items with keys in the specified range. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListRange(self, request, context): + """List keys and metadata of items with keys in the specified range. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetStorageChannelStatus(self, request, context): + """Get storage channel status of the partition. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_KeyValueServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateVolume': grpc.unary_unary_rpc_method_handler( + servicer.CreateVolume, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeResponse.SerializeToString, + ), + 'DropVolume': grpc.unary_unary_rpc_method_handler( + servicer.DropVolume, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeResponse.SerializeToString, + ), + 'AlterVolume': grpc.unary_unary_rpc_method_handler( + servicer.AlterVolume, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeResponse.SerializeToString, + ), + 'DescribeVolume': grpc.unary_unary_rpc_method_handler( + servicer.DescribeVolume, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeResponse.SerializeToString, + ), + 'ListLocalPartitions': grpc.unary_unary_rpc_method_handler( + servicer.ListLocalPartitions, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsResponse.SerializeToString, + ), + 'AcquireLock': grpc.unary_unary_rpc_method_handler( + servicer.AcquireLock, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockResponse.SerializeToString, + ), + 'ExecuteTransaction': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteTransaction, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionResponse.SerializeToString, + ), + 'Read': grpc.unary_unary_rpc_method_handler( + servicer.Read, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadResponse.SerializeToString, + ), + 'ReadRange': grpc.unary_unary_rpc_method_handler( + servicer.ReadRange, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeResponse.SerializeToString, + ), + 'ListRange': grpc.unary_unary_rpc_method_handler( + servicer.ListRange, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeResponse.SerializeToString, + ), + 'GetStorageChannelStatus': grpc.unary_unary_rpc_method_handler( + servicer.GetStorageChannelStatus, + request_deserializer=draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.KeyValue.V1.KeyValueService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class KeyValueService(object): + """KeyValue tablets provide a simple key-value storage in a low-overhead and easy-to-shoot-your-leg manner. + To use KeyValue tablets in an efficient way one must be familiar with the design of both the KeyValue tablet + and the Distributed Storage underneath it. + + """ + + @staticmethod + def CreateVolume(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, '/Ydb.KeyValue.V1.KeyValueService/CreateVolume', + draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.CreateVolumeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DropVolume(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, '/Ydb.KeyValue.V1.KeyValueService/DropVolume', + draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.DropVolumeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AlterVolume(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, '/Ydb.KeyValue.V1.KeyValueService/AlterVolume', + draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.AlterVolumeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeVolume(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, '/Ydb.KeyValue.V1.KeyValueService/DescribeVolume', + draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.DescribeVolumeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListLocalPartitions(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, '/Ydb.KeyValue.V1.KeyValueService/ListLocalPartitions', + draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ListLocalPartitionsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AcquireLock(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, '/Ydb.KeyValue.V1.KeyValueService/AcquireLock', + draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.AcquireLockResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ExecuteTransaction(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, '/Ydb.KeyValue.V1.KeyValueService/ExecuteTransaction', + draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ExecuteTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Read(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, '/Ydb.KeyValue.V1.KeyValueService/Read', + draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ReadResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReadRange(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, '/Ydb.KeyValue.V1.KeyValueService/ReadRange', + draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ReadRangeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListRange(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, '/Ydb.KeyValue.V1.KeyValueService/ListRange', + draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.ListRangeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetStorageChannelStatus(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, '/Ydb.KeyValue.V1.KeyValueService/GetStorageChannelStatus', + draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusRequest.SerializeToString, + draft_dot_protos_dot_ydb__keyvalue__pb2.GetStorageChannelStatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/draft/ydb_maintenance_v1_pb2.py b/ydb/_grpc/v5/draft/ydb_maintenance_v1_pb2.py new file mode 100644 index 00000000..0e988f44 --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_maintenance_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/ydb_maintenance_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.draft.protos import ydb_maintenance_pb2 as draft_dot_protos_dot_ydb__maintenance__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x64raft/ydb_maintenance_v1.proto\x12\x12Ydb.Maintenance.V1\x1a\"draft/protos/ydb_maintenance.proto2\x9c\x06\n\x12MaintenanceService\x12g\n\x10ListClusterNodes\x12(.Ydb.Maintenance.ListClusterNodesRequest\x1a).Ydb.Maintenance.ListClusterNodesResponse\x12p\n\x15\x43reateMaintenanceTask\x12-.Ydb.Maintenance.CreateMaintenanceTaskRequest\x1a(.Ydb.Maintenance.MaintenanceTaskResponse\x12r\n\x16RefreshMaintenanceTask\x12..Ydb.Maintenance.RefreshMaintenanceTaskRequest\x1a(.Ydb.Maintenance.MaintenanceTaskResponse\x12m\n\x12GetMaintenanceTask\x12*.Ydb.Maintenance.GetMaintenanceTaskRequest\x1a+.Ydb.Maintenance.GetMaintenanceTaskResponse\x12s\n\x14ListMaintenanceTasks\x12,.Ydb.Maintenance.ListMaintenanceTasksRequest\x1a-.Ydb.Maintenance.ListMaintenanceTasksResponse\x12r\n\x13\x44ropMaintenanceTask\x12+.Ydb.Maintenance.DropMaintenanceTaskRequest\x1a..Ydb.Maintenance.ManageMaintenanceTaskResponse\x12_\n\x0e\x43ompleteAction\x12&.Ydb.Maintenance.CompleteActionRequest\x1a%.Ydb.Maintenance.ManageActionResponseBd\n tech.ydb.proto.draft.maintenanceZ@github.com/ydb-platform/ydb-go-genproto/draft/Ydb_Maintenance_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.ydb_maintenance_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n tech.ydb.proto.draft.maintenanceZ@github.com/ydb-platform/ydb-go-genproto/draft/Ydb_Maintenance_V1' + _MAINTENANCESERVICE._serialized_start=91 + _MAINTENANCESERVICE._serialized_end=887 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/draft/ydb_maintenance_v1_pb2.pyi b/ydb/_grpc/v5/draft/ydb_maintenance_v1_pb2.pyi new file mode 100644 index 00000000..33033d02 --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_maintenance_v1_pb2.pyi @@ -0,0 +1,5 @@ +from draft.protos import ydb_maintenance_pb2 as _ydb_maintenance_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/draft/ydb_maintenance_v1_pb2_grpc.py b/ydb/_grpc/v5/draft/ydb_maintenance_v1_pb2_grpc.py new file mode 100644 index 00000000..dbd2c12f --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_maintenance_v1_pb2_grpc.py @@ -0,0 +1,271 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.draft.protos import ydb_maintenance_pb2 as draft_dot_protos_dot_ydb__maintenance__pb2 + + +class MaintenanceServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ListClusterNodes = channel.unary_unary( + '/Ydb.Maintenance.V1.MaintenanceService/ListClusterNodes', + request_serializer=draft_dot_protos_dot_ydb__maintenance__pb2.ListClusterNodesRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__maintenance__pb2.ListClusterNodesResponse.FromString, + ) + self.CreateMaintenanceTask = channel.unary_unary( + '/Ydb.Maintenance.V1.MaintenanceService/CreateMaintenanceTask', + request_serializer=draft_dot_protos_dot_ydb__maintenance__pb2.CreateMaintenanceTaskRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__maintenance__pb2.MaintenanceTaskResponse.FromString, + ) + self.RefreshMaintenanceTask = channel.unary_unary( + '/Ydb.Maintenance.V1.MaintenanceService/RefreshMaintenanceTask', + request_serializer=draft_dot_protos_dot_ydb__maintenance__pb2.RefreshMaintenanceTaskRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__maintenance__pb2.MaintenanceTaskResponse.FromString, + ) + self.GetMaintenanceTask = channel.unary_unary( + '/Ydb.Maintenance.V1.MaintenanceService/GetMaintenanceTask', + request_serializer=draft_dot_protos_dot_ydb__maintenance__pb2.GetMaintenanceTaskRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__maintenance__pb2.GetMaintenanceTaskResponse.FromString, + ) + self.ListMaintenanceTasks = channel.unary_unary( + '/Ydb.Maintenance.V1.MaintenanceService/ListMaintenanceTasks', + request_serializer=draft_dot_protos_dot_ydb__maintenance__pb2.ListMaintenanceTasksRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__maintenance__pb2.ListMaintenanceTasksResponse.FromString, + ) + self.DropMaintenanceTask = channel.unary_unary( + '/Ydb.Maintenance.V1.MaintenanceService/DropMaintenanceTask', + request_serializer=draft_dot_protos_dot_ydb__maintenance__pb2.DropMaintenanceTaskRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__maintenance__pb2.ManageMaintenanceTaskResponse.FromString, + ) + self.CompleteAction = channel.unary_unary( + '/Ydb.Maintenance.V1.MaintenanceService/CompleteAction', + request_serializer=draft_dot_protos_dot_ydb__maintenance__pb2.CompleteActionRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__maintenance__pb2.ManageActionResponse.FromString, + ) + + +class MaintenanceServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def ListClusterNodes(self, request, context): + """List cluster nodes. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateMaintenanceTask(self, request, context): + """Create maintenance task. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RefreshMaintenanceTask(self, request, context): + """Try to perform maintenance task's actions (polling). + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetMaintenanceTask(self, request, context): + """Get detailed task information. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListMaintenanceTasks(self, request, context): + """List maintenance tasks. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DropMaintenanceTask(self, request, context): + """Drop maintenance task. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CompleteAction(self, request, context): + """Mark action as completed. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_MaintenanceServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ListClusterNodes': grpc.unary_unary_rpc_method_handler( + servicer.ListClusterNodes, + request_deserializer=draft_dot_protos_dot_ydb__maintenance__pb2.ListClusterNodesRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__maintenance__pb2.ListClusterNodesResponse.SerializeToString, + ), + 'CreateMaintenanceTask': grpc.unary_unary_rpc_method_handler( + servicer.CreateMaintenanceTask, + request_deserializer=draft_dot_protos_dot_ydb__maintenance__pb2.CreateMaintenanceTaskRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__maintenance__pb2.MaintenanceTaskResponse.SerializeToString, + ), + 'RefreshMaintenanceTask': grpc.unary_unary_rpc_method_handler( + servicer.RefreshMaintenanceTask, + request_deserializer=draft_dot_protos_dot_ydb__maintenance__pb2.RefreshMaintenanceTaskRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__maintenance__pb2.MaintenanceTaskResponse.SerializeToString, + ), + 'GetMaintenanceTask': grpc.unary_unary_rpc_method_handler( + servicer.GetMaintenanceTask, + request_deserializer=draft_dot_protos_dot_ydb__maintenance__pb2.GetMaintenanceTaskRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__maintenance__pb2.GetMaintenanceTaskResponse.SerializeToString, + ), + 'ListMaintenanceTasks': grpc.unary_unary_rpc_method_handler( + servicer.ListMaintenanceTasks, + request_deserializer=draft_dot_protos_dot_ydb__maintenance__pb2.ListMaintenanceTasksRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__maintenance__pb2.ListMaintenanceTasksResponse.SerializeToString, + ), + 'DropMaintenanceTask': grpc.unary_unary_rpc_method_handler( + servicer.DropMaintenanceTask, + request_deserializer=draft_dot_protos_dot_ydb__maintenance__pb2.DropMaintenanceTaskRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__maintenance__pb2.ManageMaintenanceTaskResponse.SerializeToString, + ), + 'CompleteAction': grpc.unary_unary_rpc_method_handler( + servicer.CompleteAction, + request_deserializer=draft_dot_protos_dot_ydb__maintenance__pb2.CompleteActionRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__maintenance__pb2.ManageActionResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.Maintenance.V1.MaintenanceService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class MaintenanceService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def ListClusterNodes(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, '/Ydb.Maintenance.V1.MaintenanceService/ListClusterNodes', + draft_dot_protos_dot_ydb__maintenance__pb2.ListClusterNodesRequest.SerializeToString, + draft_dot_protos_dot_ydb__maintenance__pb2.ListClusterNodesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateMaintenanceTask(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, '/Ydb.Maintenance.V1.MaintenanceService/CreateMaintenanceTask', + draft_dot_protos_dot_ydb__maintenance__pb2.CreateMaintenanceTaskRequest.SerializeToString, + draft_dot_protos_dot_ydb__maintenance__pb2.MaintenanceTaskResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RefreshMaintenanceTask(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, '/Ydb.Maintenance.V1.MaintenanceService/RefreshMaintenanceTask', + draft_dot_protos_dot_ydb__maintenance__pb2.RefreshMaintenanceTaskRequest.SerializeToString, + draft_dot_protos_dot_ydb__maintenance__pb2.MaintenanceTaskResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetMaintenanceTask(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, '/Ydb.Maintenance.V1.MaintenanceService/GetMaintenanceTask', + draft_dot_protos_dot_ydb__maintenance__pb2.GetMaintenanceTaskRequest.SerializeToString, + draft_dot_protos_dot_ydb__maintenance__pb2.GetMaintenanceTaskResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListMaintenanceTasks(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, '/Ydb.Maintenance.V1.MaintenanceService/ListMaintenanceTasks', + draft_dot_protos_dot_ydb__maintenance__pb2.ListMaintenanceTasksRequest.SerializeToString, + draft_dot_protos_dot_ydb__maintenance__pb2.ListMaintenanceTasksResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DropMaintenanceTask(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, '/Ydb.Maintenance.V1.MaintenanceService/DropMaintenanceTask', + draft_dot_protos_dot_ydb__maintenance__pb2.DropMaintenanceTaskRequest.SerializeToString, + draft_dot_protos_dot_ydb__maintenance__pb2.ManageMaintenanceTaskResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CompleteAction(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, '/Ydb.Maintenance.V1.MaintenanceService/CompleteAction', + draft_dot_protos_dot_ydb__maintenance__pb2.CompleteActionRequest.SerializeToString, + draft_dot_protos_dot_ydb__maintenance__pb2.ManageActionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/draft/ydb_object_storage_v1_pb2.py b/ydb/_grpc/v5/draft/ydb_object_storage_v1_pb2.py new file mode 100644 index 00000000..8d5159f6 --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_object_storage_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: draft/ydb_object_storage_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.draft.protos import ydb_object_storage_pb2 as draft_dot_protos_dot_ydb__object__storage__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!draft/ydb_object_storage_v1.proto\x12\x14Ydb.ObjectStorage.V1\x1a%draft/protos/ydb_object_storage.proto2e\n\x14ObjectStorageService\x12M\n\x04List\x12!.Ydb.ObjectStorage.ListingRequest\x1a\".Ydb.ObjectStorage.ListingResponseBl\n&tech.ydb.proto.draft.object_storage.v1ZBgithub.com/ydb-platform/ydb-go-genproto/draft/Ydb_ObjectStorage_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.ydb_object_storage_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n&tech.ydb.proto.draft.object_storage.v1ZBgithub.com/ydb-platform/ydb-go-genproto/draft/Ydb_ObjectStorage_V1' + _OBJECTSTORAGESERVICE._serialized_start=98 + _OBJECTSTORAGESERVICE._serialized_end=199 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/draft/ydb_object_storage_v1_pb2.pyi b/ydb/_grpc/v5/draft/ydb_object_storage_v1_pb2.pyi new file mode 100644 index 00000000..bfdf7662 --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_object_storage_v1_pb2.pyi @@ -0,0 +1,5 @@ +from draft.protos import ydb_object_storage_pb2 as _ydb_object_storage_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/draft/ydb_object_storage_v1_pb2_grpc.py b/ydb/_grpc/v5/draft/ydb_object_storage_v1_pb2_grpc.py new file mode 100644 index 00000000..ad096720 --- /dev/null +++ b/ydb/_grpc/v5/draft/ydb_object_storage_v1_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.draft.protos import ydb_object_storage_pb2 as draft_dot_protos_dot_ydb__object__storage__pb2 + + +class ObjectStorageServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.List = channel.unary_unary( + '/Ydb.ObjectStorage.V1.ObjectStorageService/List', + request_serializer=draft_dot_protos_dot_ydb__object__storage__pb2.ListingRequest.SerializeToString, + response_deserializer=draft_dot_protos_dot_ydb__object__storage__pb2.ListingResponse.FromString, + ) + + +class ObjectStorageServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ObjectStorageServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=draft_dot_protos_dot_ydb__object__storage__pb2.ListingRequest.FromString, + response_serializer=draft_dot_protos_dot_ydb__object__storage__pb2.ListingResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.ObjectStorage.V1.ObjectStorageService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ObjectStorageService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def List(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, '/Ydb.ObjectStorage.V1.ObjectStorageService/List', + draft_dot_protos_dot_ydb__object__storage__pb2.ListingRequest.SerializeToString, + draft_dot_protos_dot_ydb__object__storage__pb2.ListingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/protos/__init__.py b/ydb/_grpc/v5/protos/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ydb/_grpc/v5/protos/annotations/__init__.py b/ydb/_grpc/v5/protos/annotations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ydb/_grpc/v5/protos/annotations/sensitive_pb2.py b/ydb/_grpc/v5/protos/annotations/sensitive_pb2.py new file mode 100644 index 00000000..0662aca4 --- /dev/null +++ b/ydb/_grpc/v5/protos/annotations/sensitive_pb2.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/annotations/sensitive.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"protos/annotations/sensitive.proto\x12\x03Ydb\x1a google/protobuf/descriptor.proto:2\n\tsensitive\x12\x1d.google.protobuf.FieldOptions\x18\xe7\xac\x05 \x01(\x08\x42G\n\x0etech.ydb.protoZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.annotations.sensitive_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(sensitive) + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\016tech.ydb.protoZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\370\001\001' +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/annotations/sensitive_pb2.pyi b/ydb/_grpc/v5/protos/annotations/sensitive_pb2.pyi new file mode 100644 index 00000000..bc158001 --- /dev/null +++ b/ydb/_grpc/v5/protos/annotations/sensitive_pb2.pyi @@ -0,0 +1,7 @@ +from google.protobuf import descriptor_pb2 as _descriptor_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor +SENSITIVE_FIELD_NUMBER: _ClassVar[int] +sensitive: _descriptor.FieldDescriptor diff --git a/ydb/_grpc/v5/protos/annotations/sensitive_pb2_grpc.py b/ydb/_grpc/v5/protos/annotations/sensitive_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/annotations/sensitive_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/annotations/validation_pb2.py b/ydb/_grpc/v5/protos/annotations/validation_pb2.py new file mode 100644 index 00000000..830a04ae --- /dev/null +++ b/ydb/_grpc/v5/protos/annotations/validation_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/annotations/validation.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#protos/annotations/validation.proto\x12\x03Ydb\x1a google/protobuf/descriptor.proto\"\x9b\x01\n\x05Limit\x12!\n\x05range\x18\x01 \x01(\x0b\x32\x10.Ydb.Limit.RangeH\x00\x12\x0c\n\x02lt\x18\x02 \x01(\rH\x00\x12\x0c\n\x02le\x18\x03 \x01(\rH\x00\x12\x0c\n\x02\x65q\x18\x04 \x01(\rH\x00\x12\x0c\n\x02ge\x18\x05 \x01(\rH\x00\x12\x0c\n\x02gt\x18\x06 \x01(\rH\x00\x1a!\n\x05Range\x12\x0b\n\x03min\x18\x01 \x01(\r\x12\x0b\n\x03max\x18\x02 \x01(\rB\x06\n\x04kind\"3\n\x06MapKey\x12\x1a\n\x06length\x18\x01 \x01(\x0b\x32\n.Ydb.Limit\x12\r\n\x05value\x18\x02 \x01(\t:1\n\x08required\x12\x1d.google.protobuf.FieldOptions\x18\xe2\xac\x05 \x01(\x08:9\n\x04size\x12\x1d.google.protobuf.FieldOptions\x18\xe3\xac\x05 \x01(\x0b\x32\n.Ydb.Limit:;\n\x06length\x12\x1d.google.protobuf.FieldOptions\x18\xe4\xac\x05 \x01(\x0b\x32\n.Ydb.Limit:=\n\x07map_key\x12\x1d.google.protobuf.FieldOptions\x18\xe5\xac\x05 \x01(\x0b\x32\x0b.Ydb.MapKey:.\n\x05value\x12\x1d.google.protobuf.FieldOptions\x18\xe6\xac\x05 \x01(\tBG\n\x0etech.ydb.protoZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.annotations.validation_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(required) + google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(size) + google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(length) + google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(map_key) + google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(value) + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\016tech.ydb.protoZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\370\001\001' + _LIMIT._serialized_start=79 + _LIMIT._serialized_end=234 + _LIMIT_RANGE._serialized_start=193 + _LIMIT_RANGE._serialized_end=226 + _MAPKEY._serialized_start=236 + _MAPKEY._serialized_end=287 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/annotations/validation_pb2.pyi b/ydb/_grpc/v5/protos/annotations/validation_pb2.pyi new file mode 100644 index 00000000..56d6bd16 --- /dev/null +++ b/ydb/_grpc/v5/protos/annotations/validation_pb2.pyi @@ -0,0 +1,47 @@ +from google.protobuf import descriptor_pb2 as _descriptor_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor +LENGTH_FIELD_NUMBER: _ClassVar[int] +MAP_KEY_FIELD_NUMBER: _ClassVar[int] +REQUIRED_FIELD_NUMBER: _ClassVar[int] +SIZE_FIELD_NUMBER: _ClassVar[int] +VALUE_FIELD_NUMBER: _ClassVar[int] +length: _descriptor.FieldDescriptor +map_key: _descriptor.FieldDescriptor +required: _descriptor.FieldDescriptor +size: _descriptor.FieldDescriptor +value: _descriptor.FieldDescriptor + +class Limit(_message.Message): + __slots__ = ["eq", "ge", "gt", "le", "lt", "range"] + class Range(_message.Message): + __slots__ = ["max", "min"] + MAX_FIELD_NUMBER: _ClassVar[int] + MIN_FIELD_NUMBER: _ClassVar[int] + max: int + min: int + def __init__(self, min: _Optional[int] = ..., max: _Optional[int] = ...) -> None: ... + EQ_FIELD_NUMBER: _ClassVar[int] + GE_FIELD_NUMBER: _ClassVar[int] + GT_FIELD_NUMBER: _ClassVar[int] + LE_FIELD_NUMBER: _ClassVar[int] + LT_FIELD_NUMBER: _ClassVar[int] + RANGE_FIELD_NUMBER: _ClassVar[int] + eq: int + ge: int + gt: int + le: int + lt: int + range: Limit.Range + def __init__(self, range: _Optional[_Union[Limit.Range, _Mapping]] = ..., lt: _Optional[int] = ..., le: _Optional[int] = ..., eq: _Optional[int] = ..., ge: _Optional[int] = ..., gt: _Optional[int] = ...) -> None: ... + +class MapKey(_message.Message): + __slots__ = ["length", "value"] + LENGTH_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + length: Limit + value: str + def __init__(self, length: _Optional[_Union[Limit, _Mapping]] = ..., value: _Optional[str] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/annotations/validation_pb2_grpc.py b/ydb/_grpc/v5/protos/annotations/validation_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/annotations/validation_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_auth_pb2.py b/ydb/_grpc/v5/protos/ydb_auth_pb2.py new file mode 100644 index 00000000..2d3c5f43 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_auth_pb2.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_auth.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15protos/ydb_auth.proto\x12\x08Ydb.Auth\x1a\x1aprotos/ydb_operation.proto\"i\n\x0cLoginRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04user\x18\x02 \x01(\t\x12\x10\n\x08password\x18\x03 \x01(\t\"=\n\rLoginResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x1c\n\x0bLoginResult\x12\r\n\x05token\x18\x01 \x01(\tBQ\n\x13tech.ydb.proto.authZ7github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Auth\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_auth_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023tech.ydb.proto.authZ7github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Auth\370\001\001' + _LOGINREQUEST._serialized_start=63 + _LOGINREQUEST._serialized_end=168 + _LOGINRESPONSE._serialized_start=170 + _LOGINRESPONSE._serialized_end=231 + _LOGINRESULT._serialized_start=233 + _LOGINRESULT._serialized_end=261 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_auth_pb2.pyi b/ydb/_grpc/v5/protos/ydb_auth_pb2.pyi new file mode 100644 index 00000000..c90e8a4b --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_auth_pb2.pyi @@ -0,0 +1,28 @@ +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class LoginRequest(_message.Message): + __slots__ = ["operation_params", "password", "user"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + USER_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + password: str + user: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., user: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... + +class LoginResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class LoginResult(_message.Message): + __slots__ = ["token"] + TOKEN_FIELD_NUMBER: _ClassVar[int] + token: str + def __init__(self, token: _Optional[str] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_auth_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_auth_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_auth_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_cms_pb2.py b/ydb/_grpc/v5/protos/ydb_cms_pb2.py new file mode 100644 index 00000000..d99cceef --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_cms_pb2.py @@ -0,0 +1,102 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_cms.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14protos/ydb_cms.proto\x12\x07Ydb.Cms\x1a\x1aprotos/ydb_operation.proto\"0\n\x0cStorageUnits\x12\x11\n\tunit_kind\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x04\"Q\n\x12\x43omputationalUnits\x12\x11\n\tunit_kind\x18\x01 \x01(\t\x12\x19\n\x11\x61vailability_zone\x18\x02 \x01(\t\x12\r\n\x05\x63ount\x18\x03 \x01(\x04\"K\n\x1a\x41llocatedComputationalUnit\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x11\n\tunit_kind\x18\x03 \x01(\t\"s\n\tResources\x12,\n\rstorage_units\x18\x01 \x03(\x0b\x32\x15.Ydb.Cms.StorageUnits\x12\x38\n\x13\x63omputational_units\x18\x02 \x03(\x0b\x32\x1b.Ydb.Cms.ComputationalUnits\"3\n\x13ServerlessResources\x12\x1c\n\x14shared_database_path\x18\x01 \x01(\t\"j\n\x0f\x44\x61tabaseOptions\x12\x1a\n\x12\x64isable_tx_service\x18\x01 \x01(\x08\x12\"\n\x1a\x64isable_external_subdomain\x18\x02 \x01(\x08\x12\x17\n\x0fplan_resolution\x18\x03 \x01(\r\"\x9c\x01\n\x15SchemaOperationQuotas\x12G\n\x13leaky_bucket_quotas\x18\x01 \x03(\x0b\x32*.Ydb.Cms.SchemaOperationQuotas.LeakyBucket\x1a:\n\x0bLeakyBucket\x12\x13\n\x0b\x62ucket_size\x18\x01 \x01(\x01\x12\x16\n\x0e\x62ucket_seconds\x18\x02 \x01(\x04\"\xc0\x01\n\x0e\x44\x61tabaseQuotas\x12\x1c\n\x14\x64\x61ta_size_hard_quota\x18\x01 \x01(\x04\x12\x1c\n\x14\x64\x61ta_size_soft_quota\x18\x02 \x01(\x04\x12 \n\x18\x64\x61ta_stream_shards_quota\x18\x03 \x01(\x04\x12*\n\"data_stream_reserved_storage_quota\x18\x05 \x01(\x04\x12$\n\x1cttl_min_run_internal_seconds\x18\x04 \x01(\r\"\xb7\x04\n\x15\x43reateDatabaseRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\'\n\tresources\x18\x03 \x01(\x0b\x32\x12.Ydb.Cms.ResourcesH\x00\x12.\n\x10shared_resources\x18\x06 \x01(\x0b\x32\x12.Ydb.Cms.ResourcesH\x00\x12<\n\x14serverless_resources\x18\x07 \x01(\x0b\x32\x1c.Ydb.Cms.ServerlessResourcesH\x00\x12)\n\x07options\x18\x04 \x01(\x0b\x32\x18.Ydb.Cms.DatabaseOptions\x12\x42\n\nattributes\x18\x05 \x03(\x0b\x32..Ydb.Cms.CreateDatabaseRequest.AttributesEntry\x12?\n\x17schema_operation_quotas\x18\x08 \x01(\x0b\x32\x1e.Ydb.Cms.SchemaOperationQuotas\x12\x17\n\x0fidempotency_key\x18\t \x01(\t\x12\x30\n\x0f\x64\x61tabase_quotas\x18\n \x01(\x0b\x32\x17.Ydb.Cms.DatabaseQuotas\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0eresources_kind\"F\n\x16\x43reateDatabaseResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"c\n\x18GetDatabaseStatusRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x39\n\x10operation_params\x18\x02 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"I\n\x19GetDatabaseStatusResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x85\x05\n\x17GetDatabaseStatusResult\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x35\n\x05state\x18\x02 \x01(\x0e\x32&.Ydb.Cms.GetDatabaseStatusResult.State\x12\x30\n\x12required_resources\x18\x03 \x01(\x0b\x32\x12.Ydb.Cms.ResourcesH\x00\x12\x37\n\x19required_shared_resources\x18\x07 \x01(\x0b\x32\x12.Ydb.Cms.ResourcesH\x00\x12<\n\x14serverless_resources\x18\x08 \x01(\x0b\x32\x1c.Ydb.Cms.ServerlessResourcesH\x00\x12/\n\x13\x61llocated_resources\x18\x04 \x01(\x0b\x32\x12.Ydb.Cms.Resources\x12\x41\n\x14registered_resources\x18\x05 \x03(\x0b\x32#.Ydb.Cms.AllocatedComputationalUnit\x12\x12\n\ngeneration\x18\x06 \x01(\x04\x12?\n\x17schema_operation_quotas\x18\t \x01(\x0b\x32\x1e.Ydb.Cms.SchemaOperationQuotas\x12\x30\n\x0f\x64\x61tabase_quotas\x18\n \x01(\x0b\x32\x17.Ydb.Cms.DatabaseQuotas\"o\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0c\n\x08REMOVING\x10\x03\x12\x15\n\x11PENDING_RESOURCES\x10\x04\x12\x0f\n\x0b\x43ONFIGURING\x10\x05\x42\x10\n\x0eresources_kind\"\xdd\x05\n\x14\x41lterDatabaseRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12?\n\x1a\x63omputational_units_to_add\x18\x02 \x03(\x0b\x32\x1b.Ydb.Cms.ComputationalUnits\x12\x42\n\x1d\x63omputational_units_to_remove\x18\x03 \x03(\x0b\x32\x1b.Ydb.Cms.ComputationalUnits\x12\x33\n\x14storage_units_to_add\x18\x04 \x03(\x0b\x32\x15.Ydb.Cms.StorageUnits\x12L\n\x1f\x63omputational_units_to_register\x18\x05 \x03(\x0b\x32#.Ydb.Cms.AllocatedComputationalUnit\x12N\n!computational_units_to_deregister\x18\x06 \x03(\x0b\x32#.Ydb.Cms.AllocatedComputationalUnit\x12\x39\n\x10operation_params\x18\x07 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x12\n\ngeneration\x18\x08 \x01(\x04\x12?\n\x17schema_operation_quotas\x18\t \x01(\x0b\x32\x1e.Ydb.Cms.SchemaOperationQuotas\x12\x17\n\x0fidempotency_key\x18\n \x01(\t\x12\x30\n\x0f\x64\x61tabase_quotas\x18\x0b \x01(\x0b\x32\x17.Ydb.Cms.DatabaseQuotas\x12L\n\x10\x61lter_attributes\x18\x0c \x03(\x0b\x32\x32.Ydb.Cms.AlterDatabaseRequest.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"E\n\x15\x41lterDatabaseResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Q\n\x14ListDatabasesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"E\n\x15ListDatabasesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"$\n\x13ListDatabasesResult\x12\r\n\x05paths\x18\x01 \x03(\t\"`\n\x15RemoveDatabaseRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x39\n\x10operation_params\x18\x02 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"F\n\x16RemoveDatabaseResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x92\x01\n\x16StorageUnitDescription\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12;\n\x06labels\x18\x02 \x03(\x0b\x32+.Ydb.Cms.StorageUnitDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9c\x01\n\x1b\x41vailabilityZoneDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x06labels\x18\x02 \x03(\x0b\x32\x30.Ydb.Cms.AvailabilityZoneDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc2\x01\n\x1c\x43omputationalUnitDescription\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x41\n\x06labels\x18\x02 \x03(\x0b\x32\x31.Ydb.Cms.ComputationalUnitDescription.LabelsEntry\x12\"\n\x1a\x61llowed_availability_zones\x18\x03 \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"[\n\x1e\x44\x65scribeDatabaseOptionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"O\n\x1f\x44\x65scribeDatabaseOptionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xdd\x01\n\x1d\x44\x65scribeDatabaseOptionsResult\x12\x36\n\rstorage_units\x18\x01 \x03(\x0b\x32\x1f.Ydb.Cms.StorageUnitDescription\x12@\n\x12\x61vailability_zones\x18\x02 \x03(\x0b\x32$.Ydb.Cms.AvailabilityZoneDescription\x12\x42\n\x13\x63omputational_units\x18\x03 \x03(\x0b\x32%.Ydb.Cms.ComputationalUnitDescriptionBO\n\x12tech.ydb.proto.cmsZ6github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Cms\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_cms_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\022tech.ydb.proto.cmsZ6github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Cms\370\001\001' + _CREATEDATABASEREQUEST_ATTRIBUTESENTRY._options = None + _CREATEDATABASEREQUEST_ATTRIBUTESENTRY._serialized_options = b'8\001' + _ALTERDATABASEREQUEST_ALTERATTRIBUTESENTRY._options = None + _ALTERDATABASEREQUEST_ALTERATTRIBUTESENTRY._serialized_options = b'8\001' + _STORAGEUNITDESCRIPTION_LABELSENTRY._options = None + _STORAGEUNITDESCRIPTION_LABELSENTRY._serialized_options = b'8\001' + _AVAILABILITYZONEDESCRIPTION_LABELSENTRY._options = None + _AVAILABILITYZONEDESCRIPTION_LABELSENTRY._serialized_options = b'8\001' + _COMPUTATIONALUNITDESCRIPTION_LABELSENTRY._options = None + _COMPUTATIONALUNITDESCRIPTION_LABELSENTRY._serialized_options = b'8\001' + _STORAGEUNITS._serialized_start=61 + _STORAGEUNITS._serialized_end=109 + _COMPUTATIONALUNITS._serialized_start=111 + _COMPUTATIONALUNITS._serialized_end=192 + _ALLOCATEDCOMPUTATIONALUNIT._serialized_start=194 + _ALLOCATEDCOMPUTATIONALUNIT._serialized_end=269 + _RESOURCES._serialized_start=271 + _RESOURCES._serialized_end=386 + _SERVERLESSRESOURCES._serialized_start=388 + _SERVERLESSRESOURCES._serialized_end=439 + _DATABASEOPTIONS._serialized_start=441 + _DATABASEOPTIONS._serialized_end=547 + _SCHEMAOPERATIONQUOTAS._serialized_start=550 + _SCHEMAOPERATIONQUOTAS._serialized_end=706 + _SCHEMAOPERATIONQUOTAS_LEAKYBUCKET._serialized_start=648 + _SCHEMAOPERATIONQUOTAS_LEAKYBUCKET._serialized_end=706 + _DATABASEQUOTAS._serialized_start=709 + _DATABASEQUOTAS._serialized_end=901 + _CREATEDATABASEREQUEST._serialized_start=904 + _CREATEDATABASEREQUEST._serialized_end=1471 + _CREATEDATABASEREQUEST_ATTRIBUTESENTRY._serialized_start=1404 + _CREATEDATABASEREQUEST_ATTRIBUTESENTRY._serialized_end=1453 + _CREATEDATABASERESPONSE._serialized_start=1473 + _CREATEDATABASERESPONSE._serialized_end=1543 + _GETDATABASESTATUSREQUEST._serialized_start=1545 + _GETDATABASESTATUSREQUEST._serialized_end=1644 + _GETDATABASESTATUSRESPONSE._serialized_start=1646 + _GETDATABASESTATUSRESPONSE._serialized_end=1719 + _GETDATABASESTATUSRESULT._serialized_start=1722 + _GETDATABASESTATUSRESULT._serialized_end=2367 + _GETDATABASESTATUSRESULT_STATE._serialized_start=2238 + _GETDATABASESTATUSRESULT_STATE._serialized_end=2349 + _ALTERDATABASEREQUEST._serialized_start=2370 + _ALTERDATABASEREQUEST._serialized_end=3103 + _ALTERDATABASEREQUEST_ALTERATTRIBUTESENTRY._serialized_start=3049 + _ALTERDATABASEREQUEST_ALTERATTRIBUTESENTRY._serialized_end=3103 + _ALTERDATABASERESPONSE._serialized_start=3105 + _ALTERDATABASERESPONSE._serialized_end=3174 + _LISTDATABASESREQUEST._serialized_start=3176 + _LISTDATABASESREQUEST._serialized_end=3257 + _LISTDATABASESRESPONSE._serialized_start=3259 + _LISTDATABASESRESPONSE._serialized_end=3328 + _LISTDATABASESRESULT._serialized_start=3330 + _LISTDATABASESRESULT._serialized_end=3366 + _REMOVEDATABASEREQUEST._serialized_start=3368 + _REMOVEDATABASEREQUEST._serialized_end=3464 + _REMOVEDATABASERESPONSE._serialized_start=3466 + _REMOVEDATABASERESPONSE._serialized_end=3536 + _STORAGEUNITDESCRIPTION._serialized_start=3539 + _STORAGEUNITDESCRIPTION._serialized_end=3685 + _STORAGEUNITDESCRIPTION_LABELSENTRY._serialized_start=3640 + _STORAGEUNITDESCRIPTION_LABELSENTRY._serialized_end=3685 + _AVAILABILITYZONEDESCRIPTION._serialized_start=3688 + _AVAILABILITYZONEDESCRIPTION._serialized_end=3844 + _AVAILABILITYZONEDESCRIPTION_LABELSENTRY._serialized_start=3640 + _AVAILABILITYZONEDESCRIPTION_LABELSENTRY._serialized_end=3685 + _COMPUTATIONALUNITDESCRIPTION._serialized_start=3847 + _COMPUTATIONALUNITDESCRIPTION._serialized_end=4041 + _COMPUTATIONALUNITDESCRIPTION_LABELSENTRY._serialized_start=3640 + _COMPUTATIONALUNITDESCRIPTION_LABELSENTRY._serialized_end=3685 + _DESCRIBEDATABASEOPTIONSREQUEST._serialized_start=4043 + _DESCRIBEDATABASEOPTIONSREQUEST._serialized_end=4134 + _DESCRIBEDATABASEOPTIONSRESPONSE._serialized_start=4136 + _DESCRIBEDATABASEOPTIONSRESPONSE._serialized_end=4215 + _DESCRIBEDATABASEOPTIONSRESULT._serialized_start=4218 + _DESCRIBEDATABASEOPTIONSRESULT._serialized_end=4439 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_cms_pb2.pyi b/ydb/_grpc/v5/protos/ydb_cms_pb2.pyi new file mode 100644 index 00000000..f7a0aae1 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_cms_pb2.pyi @@ -0,0 +1,312 @@ +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class AllocatedComputationalUnit(_message.Message): + __slots__ = ["host", "port", "unit_kind"] + HOST_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + UNIT_KIND_FIELD_NUMBER: _ClassVar[int] + host: str + port: int + unit_kind: str + def __init__(self, host: _Optional[str] = ..., port: _Optional[int] = ..., unit_kind: _Optional[str] = ...) -> None: ... + +class AlterDatabaseRequest(_message.Message): + __slots__ = ["alter_attributes", "computational_units_to_add", "computational_units_to_deregister", "computational_units_to_register", "computational_units_to_remove", "database_quotas", "generation", "idempotency_key", "operation_params", "path", "schema_operation_quotas", "storage_units_to_add"] + class AlterAttributesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ALTER_ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] + COMPUTATIONAL_UNITS_TO_ADD_FIELD_NUMBER: _ClassVar[int] + COMPUTATIONAL_UNITS_TO_DEREGISTER_FIELD_NUMBER: _ClassVar[int] + COMPUTATIONAL_UNITS_TO_REGISTER_FIELD_NUMBER: _ClassVar[int] + COMPUTATIONAL_UNITS_TO_REMOVE_FIELD_NUMBER: _ClassVar[int] + DATABASE_QUOTAS_FIELD_NUMBER: _ClassVar[int] + GENERATION_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + SCHEMA_OPERATION_QUOTAS_FIELD_NUMBER: _ClassVar[int] + STORAGE_UNITS_TO_ADD_FIELD_NUMBER: _ClassVar[int] + alter_attributes: _containers.ScalarMap[str, str] + computational_units_to_add: _containers.RepeatedCompositeFieldContainer[ComputationalUnits] + computational_units_to_deregister: _containers.RepeatedCompositeFieldContainer[AllocatedComputationalUnit] + computational_units_to_register: _containers.RepeatedCompositeFieldContainer[AllocatedComputationalUnit] + computational_units_to_remove: _containers.RepeatedCompositeFieldContainer[ComputationalUnits] + database_quotas: DatabaseQuotas + generation: int + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + path: str + schema_operation_quotas: SchemaOperationQuotas + storage_units_to_add: _containers.RepeatedCompositeFieldContainer[StorageUnits] + def __init__(self, path: _Optional[str] = ..., computational_units_to_add: _Optional[_Iterable[_Union[ComputationalUnits, _Mapping]]] = ..., computational_units_to_remove: _Optional[_Iterable[_Union[ComputationalUnits, _Mapping]]] = ..., storage_units_to_add: _Optional[_Iterable[_Union[StorageUnits, _Mapping]]] = ..., computational_units_to_register: _Optional[_Iterable[_Union[AllocatedComputationalUnit, _Mapping]]] = ..., computational_units_to_deregister: _Optional[_Iterable[_Union[AllocatedComputationalUnit, _Mapping]]] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., generation: _Optional[int] = ..., schema_operation_quotas: _Optional[_Union[SchemaOperationQuotas, _Mapping]] = ..., idempotency_key: _Optional[str] = ..., database_quotas: _Optional[_Union[DatabaseQuotas, _Mapping]] = ..., alter_attributes: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class AlterDatabaseResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class AvailabilityZoneDescription(_message.Message): + __slots__ = ["labels", "name"] + class LabelsEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + LABELS_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + labels: _containers.ScalarMap[str, str] + name: str + def __init__(self, name: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class ComputationalUnitDescription(_message.Message): + __slots__ = ["allowed_availability_zones", "kind", "labels"] + class LabelsEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ALLOWED_AVAILABILITY_ZONES_FIELD_NUMBER: _ClassVar[int] + KIND_FIELD_NUMBER: _ClassVar[int] + LABELS_FIELD_NUMBER: _ClassVar[int] + allowed_availability_zones: _containers.RepeatedScalarFieldContainer[str] + kind: str + labels: _containers.ScalarMap[str, str] + def __init__(self, kind: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ..., allowed_availability_zones: _Optional[_Iterable[str]] = ...) -> None: ... + +class ComputationalUnits(_message.Message): + __slots__ = ["availability_zone", "count", "unit_kind"] + AVAILABILITY_ZONE_FIELD_NUMBER: _ClassVar[int] + COUNT_FIELD_NUMBER: _ClassVar[int] + UNIT_KIND_FIELD_NUMBER: _ClassVar[int] + availability_zone: str + count: int + unit_kind: str + def __init__(self, unit_kind: _Optional[str] = ..., availability_zone: _Optional[str] = ..., count: _Optional[int] = ...) -> None: ... + +class CreateDatabaseRequest(_message.Message): + __slots__ = ["attributes", "database_quotas", "idempotency_key", "operation_params", "options", "path", "resources", "schema_operation_quotas", "serverless_resources", "shared_resources"] + class AttributesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] + DATABASE_QUOTAS_FIELD_NUMBER: _ClassVar[int] + IDEMPOTENCY_KEY_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + OPTIONS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + RESOURCES_FIELD_NUMBER: _ClassVar[int] + SCHEMA_OPERATION_QUOTAS_FIELD_NUMBER: _ClassVar[int] + SERVERLESS_RESOURCES_FIELD_NUMBER: _ClassVar[int] + SHARED_RESOURCES_FIELD_NUMBER: _ClassVar[int] + attributes: _containers.ScalarMap[str, str] + database_quotas: DatabaseQuotas + idempotency_key: str + operation_params: _ydb_operation_pb2.OperationParams + options: DatabaseOptions + path: str + resources: Resources + schema_operation_quotas: SchemaOperationQuotas + serverless_resources: ServerlessResources + shared_resources: Resources + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., resources: _Optional[_Union[Resources, _Mapping]] = ..., shared_resources: _Optional[_Union[Resources, _Mapping]] = ..., serverless_resources: _Optional[_Union[ServerlessResources, _Mapping]] = ..., options: _Optional[_Union[DatabaseOptions, _Mapping]] = ..., attributes: _Optional[_Mapping[str, str]] = ..., schema_operation_quotas: _Optional[_Union[SchemaOperationQuotas, _Mapping]] = ..., idempotency_key: _Optional[str] = ..., database_quotas: _Optional[_Union[DatabaseQuotas, _Mapping]] = ...) -> None: ... + +class CreateDatabaseResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DatabaseOptions(_message.Message): + __slots__ = ["disable_external_subdomain", "disable_tx_service", "plan_resolution"] + DISABLE_EXTERNAL_SUBDOMAIN_FIELD_NUMBER: _ClassVar[int] + DISABLE_TX_SERVICE_FIELD_NUMBER: _ClassVar[int] + PLAN_RESOLUTION_FIELD_NUMBER: _ClassVar[int] + disable_external_subdomain: bool + disable_tx_service: bool + plan_resolution: int + def __init__(self, disable_tx_service: bool = ..., disable_external_subdomain: bool = ..., plan_resolution: _Optional[int] = ...) -> None: ... + +class DatabaseQuotas(_message.Message): + __slots__ = ["data_size_hard_quota", "data_size_soft_quota", "data_stream_reserved_storage_quota", "data_stream_shards_quota", "ttl_min_run_internal_seconds"] + DATA_SIZE_HARD_QUOTA_FIELD_NUMBER: _ClassVar[int] + DATA_SIZE_SOFT_QUOTA_FIELD_NUMBER: _ClassVar[int] + DATA_STREAM_RESERVED_STORAGE_QUOTA_FIELD_NUMBER: _ClassVar[int] + DATA_STREAM_SHARDS_QUOTA_FIELD_NUMBER: _ClassVar[int] + TTL_MIN_RUN_INTERNAL_SECONDS_FIELD_NUMBER: _ClassVar[int] + data_size_hard_quota: int + data_size_soft_quota: int + data_stream_reserved_storage_quota: int + data_stream_shards_quota: int + ttl_min_run_internal_seconds: int + def __init__(self, data_size_hard_quota: _Optional[int] = ..., data_size_soft_quota: _Optional[int] = ..., data_stream_shards_quota: _Optional[int] = ..., data_stream_reserved_storage_quota: _Optional[int] = ..., ttl_min_run_internal_seconds: _Optional[int] = ...) -> None: ... + +class DescribeDatabaseOptionsRequest(_message.Message): + __slots__ = ["operation_params"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class DescribeDatabaseOptionsResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeDatabaseOptionsResult(_message.Message): + __slots__ = ["availability_zones", "computational_units", "storage_units"] + AVAILABILITY_ZONES_FIELD_NUMBER: _ClassVar[int] + COMPUTATIONAL_UNITS_FIELD_NUMBER: _ClassVar[int] + STORAGE_UNITS_FIELD_NUMBER: _ClassVar[int] + availability_zones: _containers.RepeatedCompositeFieldContainer[AvailabilityZoneDescription] + computational_units: _containers.RepeatedCompositeFieldContainer[ComputationalUnitDescription] + storage_units: _containers.RepeatedCompositeFieldContainer[StorageUnitDescription] + def __init__(self, storage_units: _Optional[_Iterable[_Union[StorageUnitDescription, _Mapping]]] = ..., availability_zones: _Optional[_Iterable[_Union[AvailabilityZoneDescription, _Mapping]]] = ..., computational_units: _Optional[_Iterable[_Union[ComputationalUnitDescription, _Mapping]]] = ...) -> None: ... + +class GetDatabaseStatusRequest(_message.Message): + __slots__ = ["operation_params", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, path: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class GetDatabaseStatusResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class GetDatabaseStatusResult(_message.Message): + __slots__ = ["allocated_resources", "database_quotas", "generation", "path", "registered_resources", "required_resources", "required_shared_resources", "schema_operation_quotas", "serverless_resources", "state"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ALLOCATED_RESOURCES_FIELD_NUMBER: _ClassVar[int] + CONFIGURING: GetDatabaseStatusResult.State + CREATING: GetDatabaseStatusResult.State + DATABASE_QUOTAS_FIELD_NUMBER: _ClassVar[int] + GENERATION_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + PENDING_RESOURCES: GetDatabaseStatusResult.State + REGISTERED_RESOURCES_FIELD_NUMBER: _ClassVar[int] + REMOVING: GetDatabaseStatusResult.State + REQUIRED_RESOURCES_FIELD_NUMBER: _ClassVar[int] + REQUIRED_SHARED_RESOURCES_FIELD_NUMBER: _ClassVar[int] + RUNNING: GetDatabaseStatusResult.State + SCHEMA_OPERATION_QUOTAS_FIELD_NUMBER: _ClassVar[int] + SERVERLESS_RESOURCES_FIELD_NUMBER: _ClassVar[int] + STATE_FIELD_NUMBER: _ClassVar[int] + STATE_UNSPECIFIED: GetDatabaseStatusResult.State + allocated_resources: Resources + database_quotas: DatabaseQuotas + generation: int + path: str + registered_resources: _containers.RepeatedCompositeFieldContainer[AllocatedComputationalUnit] + required_resources: Resources + required_shared_resources: Resources + schema_operation_quotas: SchemaOperationQuotas + serverless_resources: ServerlessResources + state: GetDatabaseStatusResult.State + def __init__(self, path: _Optional[str] = ..., state: _Optional[_Union[GetDatabaseStatusResult.State, str]] = ..., required_resources: _Optional[_Union[Resources, _Mapping]] = ..., required_shared_resources: _Optional[_Union[Resources, _Mapping]] = ..., serverless_resources: _Optional[_Union[ServerlessResources, _Mapping]] = ..., allocated_resources: _Optional[_Union[Resources, _Mapping]] = ..., registered_resources: _Optional[_Iterable[_Union[AllocatedComputationalUnit, _Mapping]]] = ..., generation: _Optional[int] = ..., schema_operation_quotas: _Optional[_Union[SchemaOperationQuotas, _Mapping]] = ..., database_quotas: _Optional[_Union[DatabaseQuotas, _Mapping]] = ...) -> None: ... + +class ListDatabasesRequest(_message.Message): + __slots__ = ["operation_params"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class ListDatabasesResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListDatabasesResult(_message.Message): + __slots__ = ["paths"] + PATHS_FIELD_NUMBER: _ClassVar[int] + paths: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, paths: _Optional[_Iterable[str]] = ...) -> None: ... + +class RemoveDatabaseRequest(_message.Message): + __slots__ = ["operation_params", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, path: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class RemoveDatabaseResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class Resources(_message.Message): + __slots__ = ["computational_units", "storage_units"] + COMPUTATIONAL_UNITS_FIELD_NUMBER: _ClassVar[int] + STORAGE_UNITS_FIELD_NUMBER: _ClassVar[int] + computational_units: _containers.RepeatedCompositeFieldContainer[ComputationalUnits] + storage_units: _containers.RepeatedCompositeFieldContainer[StorageUnits] + def __init__(self, storage_units: _Optional[_Iterable[_Union[StorageUnits, _Mapping]]] = ..., computational_units: _Optional[_Iterable[_Union[ComputationalUnits, _Mapping]]] = ...) -> None: ... + +class SchemaOperationQuotas(_message.Message): + __slots__ = ["leaky_bucket_quotas"] + class LeakyBucket(_message.Message): + __slots__ = ["bucket_seconds", "bucket_size"] + BUCKET_SECONDS_FIELD_NUMBER: _ClassVar[int] + BUCKET_SIZE_FIELD_NUMBER: _ClassVar[int] + bucket_seconds: int + bucket_size: float + def __init__(self, bucket_size: _Optional[float] = ..., bucket_seconds: _Optional[int] = ...) -> None: ... + LEAKY_BUCKET_QUOTAS_FIELD_NUMBER: _ClassVar[int] + leaky_bucket_quotas: _containers.RepeatedCompositeFieldContainer[SchemaOperationQuotas.LeakyBucket] + def __init__(self, leaky_bucket_quotas: _Optional[_Iterable[_Union[SchemaOperationQuotas.LeakyBucket, _Mapping]]] = ...) -> None: ... + +class ServerlessResources(_message.Message): + __slots__ = ["shared_database_path"] + SHARED_DATABASE_PATH_FIELD_NUMBER: _ClassVar[int] + shared_database_path: str + def __init__(self, shared_database_path: _Optional[str] = ...) -> None: ... + +class StorageUnitDescription(_message.Message): + __slots__ = ["kind", "labels"] + class LabelsEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + KIND_FIELD_NUMBER: _ClassVar[int] + LABELS_FIELD_NUMBER: _ClassVar[int] + kind: str + labels: _containers.ScalarMap[str, str] + def __init__(self, kind: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class StorageUnits(_message.Message): + __slots__ = ["count", "unit_kind"] + COUNT_FIELD_NUMBER: _ClassVar[int] + UNIT_KIND_FIELD_NUMBER: _ClassVar[int] + count: int + unit_kind: str + def __init__(self, unit_kind: _Optional[str] = ..., count: _Optional[int] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_cms_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_cms_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_cms_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_common_pb2.py b/ydb/_grpc/v5/protos/ydb_common_pb2.py new file mode 100644 index 00000000..ed021e12 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_common_pb2.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_common.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_common.proto\x12\x03Ydb\"J\n\x0b\x46\x65\x61tureFlag\";\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"\"\n\x08\x43ostInfo\x12\x16\n\x0e\x63onsumed_units\x18\x01 \x01(\x01\"\x1d\n\rQuotaExceeded\x12\x0c\n\x04\x64isk\x18\x01 \x01(\x08\"4\n\x10VirtualTimestamp\x12\x11\n\tplan_step\x18\x01 \x01(\x04\x12\r\n\x05tx_id\x18\x02 \x01(\x04\x42\\\n\x15tech.ydb.proto.commonB\x0c\x43ommonProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_common_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\025tech.ydb.proto.commonB\014CommonProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\370\001\001' + _FEATUREFLAG._serialized_start=32 + _FEATUREFLAG._serialized_end=106 + _FEATUREFLAG_STATUS._serialized_start=47 + _FEATUREFLAG_STATUS._serialized_end=106 + _COSTINFO._serialized_start=108 + _COSTINFO._serialized_end=142 + _QUOTAEXCEEDED._serialized_start=144 + _QUOTAEXCEEDED._serialized_end=173 + _VIRTUALTIMESTAMP._serialized_start=175 + _VIRTUALTIMESTAMP._serialized_end=227 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_common_pb2.pyi b/ydb/_grpc/v5/protos/ydb_common_pb2.pyi new file mode 100644 index 00000000..72f31795 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_common_pb2.pyi @@ -0,0 +1,35 @@ +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class CostInfo(_message.Message): + __slots__ = ["consumed_units"] + CONSUMED_UNITS_FIELD_NUMBER: _ClassVar[int] + consumed_units: float + def __init__(self, consumed_units: _Optional[float] = ...) -> None: ... + +class FeatureFlag(_message.Message): + __slots__ = [] + class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + DISABLED: FeatureFlag.Status + ENABLED: FeatureFlag.Status + STATUS_UNSPECIFIED: FeatureFlag.Status + def __init__(self) -> None: ... + +class QuotaExceeded(_message.Message): + __slots__ = ["disk"] + DISK_FIELD_NUMBER: _ClassVar[int] + disk: bool + def __init__(self, disk: bool = ...) -> None: ... + +class VirtualTimestamp(_message.Message): + __slots__ = ["plan_step", "tx_id"] + PLAN_STEP_FIELD_NUMBER: _ClassVar[int] + TX_ID_FIELD_NUMBER: _ClassVar[int] + plan_step: int + tx_id: int + def __init__(self, plan_step: _Optional[int] = ..., tx_id: _Optional[int] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_common_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_common_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_common_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_coordination_pb2.py b/ydb/_grpc/v5/protos/ydb_coordination_pb2.py new file mode 100644 index 00000000..d561b470 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_coordination_pb2.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_coordination.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 +from ydb._grpc.v5.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 +from ydb._grpc.v5.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 +from ydb._grpc.v5.protos import ydb_scheme_pb2 as protos_dot_ydb__scheme__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dprotos/ydb_coordination.proto\x12\x10Ydb.Coordination\x1a\x1aprotos/ydb_operation.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x17protos/ydb_scheme.proto\"\r\n\x0bUnsupported\"\xb2\x02\n\x06\x43onfig\x12\x0c\n\x04path\x18\x01 \x01(\t\x12 \n\x18self_check_period_millis\x18\x02 \x01(\r\x12#\n\x1bsession_grace_period_millis\x18\x03 \x01(\r\x12@\n\x15read_consistency_mode\x18\x04 \x01(\x0e\x32!.Ydb.Coordination.ConsistencyMode\x12\x42\n\x17\x61ttach_consistency_mode\x18\x05 \x01(\x0e\x32!.Ydb.Coordination.ConsistencyMode\x12M\n\x1arate_limiter_counters_mode\x18\x06 \x01(\x0e\x32).Ydb.Coordination.RateLimiterCountersMode\"g\n\x12SessionDescription\x12\x12\n\nsession_id\x18\x01 \x01(\x04\x12\x16\n\x0etimeout_millis\x18\x02 \x01(\x04\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x10\n\x08\x61ttached\x18\x04 \x01(\x08\"m\n\x10SemaphoreSession\x12\x10\n\x08order_id\x18\x05 \x01(\x04\x12\x12\n\nsession_id\x18\x01 \x01(\x04\x12\x16\n\x0etimeout_millis\x18\x02 \x01(\x04\x12\r\n\x05\x63ount\x18\x03 \x01(\x04\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\"\xcc\x01\n\x14SemaphoreDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\r\n\x05\x63ount\x18\x07 \x01(\x04\x12\r\n\x05limit\x18\x03 \x01(\x04\x12\x11\n\tephemeral\x18\x04 \x01(\x08\x12\x32\n\x06owners\x18\x05 \x03(\x0b\x32\".Ydb.Coordination.SemaphoreSession\x12\x33\n\x07waiters\x18\x06 \x03(\x0b\x32\".Ydb.Coordination.SemaphoreSession\"\xd1\r\n\x0eSessionRequest\x12\x39\n\x04ping\x18\x01 \x01(\x0b\x32).Ydb.Coordination.SessionRequest.PingPongH\x00\x12\x39\n\x04pong\x18\x02 \x01(\x0b\x32).Ydb.Coordination.SessionRequest.PingPongH\x00\x12\x46\n\rsession_start\x18\x03 \x01(\x0b\x32-.Ydb.Coordination.SessionRequest.SessionStartH\x00\x12\x44\n\x0csession_stop\x18\x04 \x01(\x0b\x32,.Ydb.Coordination.SessionRequest.SessionStopH\x00\x12\x36\n\runsupported_5\x18\x05 \x01(\x0b\x32\x1d.Ydb.Coordination.UnsupportedH\x00\x12\x36\n\runsupported_6\x18\x06 \x01(\x0b\x32\x1d.Ydb.Coordination.UnsupportedH\x00\x12N\n\x11\x61\x63quire_semaphore\x18\x07 \x01(\x0b\x32\x31.Ydb.Coordination.SessionRequest.AcquireSemaphoreH\x00\x12N\n\x11release_semaphore\x18\x08 \x01(\x0b\x32\x31.Ydb.Coordination.SessionRequest.ReleaseSemaphoreH\x00\x12P\n\x12\x64\x65scribe_semaphore\x18\t \x01(\x0b\x32\x32.Ydb.Coordination.SessionRequest.DescribeSemaphoreH\x00\x12L\n\x10\x63reate_semaphore\x18\n \x01(\x0b\x32\x30.Ydb.Coordination.SessionRequest.CreateSemaphoreH\x00\x12L\n\x10update_semaphore\x18\x0b \x01(\x0b\x32\x30.Ydb.Coordination.SessionRequest.UpdateSemaphoreH\x00\x12L\n\x10\x64\x65lete_semaphore\x18\x0c \x01(\x0b\x32\x30.Ydb.Coordination.SessionRequest.DeleteSemaphoreH\x00\x12\x37\n\x0eunsupported_13\x18\r \x01(\x0b\x32\x1d.Ydb.Coordination.UnsupportedH\x00\x12\x37\n\x0eunsupported_14\x18\x0e \x01(\x0b\x32\x1d.Ydb.Coordination.UnsupportedH\x00\x12\x37\n\x0eunsupported_15\x18\x0f \x01(\x0b\x32\x1d.Ydb.Coordination.UnsupportedH\x00\x1a\x1a\n\x08PingPong\x12\x0e\n\x06opaque\x18\x01 \x01(\x04\x1a\x85\x01\n\x0cSessionStart\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x12\n\nsession_id\x18\x02 \x01(\x04\x12\x16\n\x0etimeout_millis\x18\x03 \x01(\x04\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x0e\n\x06seq_no\x18\x05 \x01(\x04\x12\x16\n\x0eprotection_key\x18\x06 \x01(\x0c\x1a\r\n\x0bSessionStop\x1ax\n\x10\x41\x63quireSemaphore\x12\x0e\n\x06req_id\x18\x01 \x01(\x04\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x16\n\x0etimeout_millis\x18\x03 \x01(\x04\x12\r\n\x05\x63ount\x18\x04 \x01(\x04\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x11\n\tephemeral\x18\x06 \x01(\x08\x1a\x30\n\x10ReleaseSemaphore\x12\x0e\n\x06req_id\x18\x01 \x01(\x04\x12\x0c\n\x04name\x18\x02 \x01(\t\x1a\x8c\x01\n\x11\x44\x65scribeSemaphore\x12\x0e\n\x06req_id\x18\x01 \x01(\x04\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x16\n\x0einclude_owners\x18\x03 \x01(\x08\x12\x17\n\x0finclude_waiters\x18\x04 \x01(\x08\x12\x12\n\nwatch_data\x18\x05 \x01(\x08\x12\x14\n\x0cwatch_owners\x18\x06 \x01(\x08\x1aL\n\x0f\x43reateSemaphore\x12\x0e\n\x06req_id\x18\x01 \x01(\x04\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\r\n\x05limit\x18\x03 \x01(\x04\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x1a=\n\x0fUpdateSemaphore\x12\x0e\n\x06req_id\x18\x01 \x01(\x04\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x1a>\n\x0f\x44\x65leteSemaphore\x12\x0e\n\x06req_id\x18\x01 \x01(\x04\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\x42\t\n\x07request\"\xd3\x14\n\x0fSessionResponse\x12:\n\x04ping\x18\x01 \x01(\x0b\x32*.Ydb.Coordination.SessionResponse.PingPongH\x00\x12:\n\x04pong\x18\x02 \x01(\x0b\x32*.Ydb.Coordination.SessionResponse.PingPongH\x00\x12<\n\x07\x66\x61ilure\x18\x03 \x01(\x0b\x32).Ydb.Coordination.SessionResponse.FailureH\x00\x12K\n\x0fsession_started\x18\x04 \x01(\x0b\x32\x30.Ydb.Coordination.SessionResponse.SessionStartedH\x00\x12K\n\x0fsession_stopped\x18\x05 \x01(\x0b\x32\x30.Ydb.Coordination.SessionResponse.SessionStoppedH\x00\x12\x36\n\runsupported_6\x18\x06 \x01(\x0b\x32\x1d.Ydb.Coordination.UnsupportedH\x00\x12\x36\n\runsupported_7\x18\x07 \x01(\x0b\x32\x1d.Ydb.Coordination.UnsupportedH\x00\x12^\n\x19\x61\x63quire_semaphore_pending\x18\x08 \x01(\x0b\x32\x39.Ydb.Coordination.SessionResponse.AcquireSemaphorePendingH\x00\x12\\\n\x18\x61\x63quire_semaphore_result\x18\t \x01(\x0b\x32\x38.Ydb.Coordination.SessionResponse.AcquireSemaphoreResultH\x00\x12\\\n\x18release_semaphore_result\x18\n \x01(\x0b\x32\x38.Ydb.Coordination.SessionResponse.ReleaseSemaphoreResultH\x00\x12^\n\x19\x64\x65scribe_semaphore_result\x18\x0b \x01(\x0b\x32\x39.Ydb.Coordination.SessionResponse.DescribeSemaphoreResultH\x00\x12`\n\x1a\x64\x65scribe_semaphore_changed\x18\x0c \x01(\x0b\x32:.Ydb.Coordination.SessionResponse.DescribeSemaphoreChangedH\x00\x12Z\n\x17\x63reate_semaphore_result\x18\r \x01(\x0b\x32\x37.Ydb.Coordination.SessionResponse.CreateSemaphoreResultH\x00\x12Z\n\x17update_semaphore_result\x18\x0e \x01(\x0b\x32\x37.Ydb.Coordination.SessionResponse.UpdateSemaphoreResultH\x00\x12Z\n\x17\x64\x65lete_semaphore_result\x18\x0f \x01(\x0b\x32\x37.Ydb.Coordination.SessionResponse.DeleteSemaphoreResultH\x00\x12\x37\n\x0eunsupported_16\x18\x10 \x01(\x0b\x32\x1d.Ydb.Coordination.UnsupportedH\x00\x12\x37\n\x0eunsupported_17\x18\x11 \x01(\x0b\x32\x1d.Ydb.Coordination.UnsupportedH\x00\x12\x37\n\x0eunsupported_18\x18\x12 \x01(\x0b\x32\x1d.Ydb.Coordination.UnsupportedH\x00\x1a\x1a\n\x08PingPong\x12\x0e\n\x06opaque\x18\x01 \x01(\x04\x1a]\n\x07\x46\x61ilure\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x1a<\n\x0eSessionStarted\x12\x12\n\nsession_id\x18\x01 \x01(\x04\x12\x16\n\x0etimeout_millis\x18\x02 \x01(\x04\x1a$\n\x0eSessionStopped\x12\x12\n\nsession_id\x18\x01 \x01(\x04\x1a)\n\x17\x41\x63quireSemaphorePending\x12\x0e\n\x06req_id\x18\x01 \x01(\x04\x1a\x8e\x01\n\x16\x41\x63quireSemaphoreResult\x12\x0e\n\x06req_id\x18\x01 \x01(\x04\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x03 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x10\n\x08\x61\x63quired\x18\x04 \x01(\x08\x1a\x8e\x01\n\x16ReleaseSemaphoreResult\x12\x0e\n\x06req_id\x18\x01 \x01(\x04\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x03 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x10\n\x08released\x18\x04 \x01(\x08\x1a\xd9\x01\n\x17\x44\x65scribeSemaphoreResult\x12\x0e\n\x06req_id\x18\x01 \x01(\x04\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x03 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x45\n\x15semaphore_description\x18\x04 \x01(\x0b\x32&.Ydb.Coordination.SemaphoreDescription\x12\x13\n\x0bwatch_added\x18\x05 \x01(\x08\x1aX\n\x18\x44\x65scribeSemaphoreChanged\x12\x0e\n\x06req_id\x18\x01 \x01(\x04\x12\x14\n\x0c\x64\x61ta_changed\x18\x02 \x01(\x08\x12\x16\n\x0eowners_changed\x18\x03 \x01(\x08\x1a{\n\x15\x43reateSemaphoreResult\x12\x0e\n\x06req_id\x18\x01 \x01(\x04\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x03 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x1a{\n\x15UpdateSemaphoreResult\x12\x0e\n\x06req_id\x18\x01 \x01(\x04\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x03 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x1a{\n\x15\x44\x65leteSemaphoreResult\x12\x0e\n\x06req_id\x18\x01 \x01(\x04\x12)\n\x06status\x18\x02 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x03 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessageB\n\n\x08response\"\x86\x01\n\x11\x43reateNodeRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12(\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x18.Ydb.Coordination.Config\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"B\n\x12\x43reateNodeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x85\x01\n\x10\x41lterNodeRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12(\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x18.Ydb.Coordination.Config\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"A\n\x11\x41lterNodeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Z\n\x0f\x44ropNodeRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x39\n\x10operation_params\x18\x02 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"@\n\x10\x44ropNodeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"^\n\x13\x44\x65scribeNodeRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x39\n\x10operation_params\x18\x02 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"D\n\x14\x44\x65scribeNodeResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x12\x44\x65scribeNodeResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12(\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x18.Ydb.Coordination.Config*h\n\x0f\x43onsistencyMode\x12\x1a\n\x16\x43ONSISTENCY_MODE_UNSET\x10\x00\x12\x1b\n\x17\x43ONSISTENCY_MODE_STRICT\x10\x01\x12\x1c\n\x18\x43ONSISTENCY_MODE_RELAXED\x10\x02*\x93\x01\n\x17RateLimiterCountersMode\x12$\n RATE_LIMITER_COUNTERS_MODE_UNSET\x10\x00\x12)\n%RATE_LIMITER_COUNTERS_MODE_AGGREGATED\x10\x01\x12\'\n#RATE_LIMITER_COUNTERS_MODE_DETAILED\x10\x02\x42w\n\x1btech.ydb.proto.coordinationB\x12\x43oordinationProtosP\x01Z?github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Coordination\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_coordination_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\033tech.ydb.proto.coordinationB\022CoordinationProtosP\001Z?github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Coordination\370\001\001' + _CONSISTENCYMODE._serialized_start=6137 + _CONSISTENCYMODE._serialized_end=6241 + _RATELIMITERCOUNTERSMODE._serialized_start=6244 + _RATELIMITERCOUNTERSMODE._serialized_end=6391 + _UNSUPPORTED._serialized_start=167 + _UNSUPPORTED._serialized_end=180 + _CONFIG._serialized_start=183 + _CONFIG._serialized_end=489 + _SESSIONDESCRIPTION._serialized_start=491 + _SESSIONDESCRIPTION._serialized_end=594 + _SEMAPHORESESSION._serialized_start=596 + _SEMAPHORESESSION._serialized_end=705 + _SEMAPHOREDESCRIPTION._serialized_start=708 + _SEMAPHOREDESCRIPTION._serialized_end=912 + _SESSIONREQUEST._serialized_start=915 + _SESSIONREQUEST._serialized_end=2660 + _SESSIONREQUEST_PINGPONG._serialized_start=1952 + _SESSIONREQUEST_PINGPONG._serialized_end=1978 + _SESSIONREQUEST_SESSIONSTART._serialized_start=1981 + _SESSIONREQUEST_SESSIONSTART._serialized_end=2114 + _SESSIONREQUEST_SESSIONSTOP._serialized_start=2116 + _SESSIONREQUEST_SESSIONSTOP._serialized_end=2129 + _SESSIONREQUEST_ACQUIRESEMAPHORE._serialized_start=2131 + _SESSIONREQUEST_ACQUIRESEMAPHORE._serialized_end=2251 + _SESSIONREQUEST_RELEASESEMAPHORE._serialized_start=2253 + _SESSIONREQUEST_RELEASESEMAPHORE._serialized_end=2301 + _SESSIONREQUEST_DESCRIBESEMAPHORE._serialized_start=2304 + _SESSIONREQUEST_DESCRIBESEMAPHORE._serialized_end=2444 + _SESSIONREQUEST_CREATESEMAPHORE._serialized_start=2446 + _SESSIONREQUEST_CREATESEMAPHORE._serialized_end=2522 + _SESSIONREQUEST_UPDATESEMAPHORE._serialized_start=2524 + _SESSIONREQUEST_UPDATESEMAPHORE._serialized_end=2585 + _SESSIONREQUEST_DELETESEMAPHORE._serialized_start=2587 + _SESSIONREQUEST_DELETESEMAPHORE._serialized_end=2649 + _SESSIONRESPONSE._serialized_start=2663 + _SESSIONRESPONSE._serialized_end=5306 + _SESSIONRESPONSE_PINGPONG._serialized_start=1952 + _SESSIONRESPONSE_PINGPONG._serialized_end=1978 + _SESSIONRESPONSE_FAILURE._serialized_start=4083 + _SESSIONRESPONSE_FAILURE._serialized_end=4176 + _SESSIONRESPONSE_SESSIONSTARTED._serialized_start=4178 + _SESSIONRESPONSE_SESSIONSTARTED._serialized_end=4238 + _SESSIONRESPONSE_SESSIONSTOPPED._serialized_start=4240 + _SESSIONRESPONSE_SESSIONSTOPPED._serialized_end=4276 + _SESSIONRESPONSE_ACQUIRESEMAPHOREPENDING._serialized_start=4278 + _SESSIONRESPONSE_ACQUIRESEMAPHOREPENDING._serialized_end=4319 + _SESSIONRESPONSE_ACQUIRESEMAPHORERESULT._serialized_start=4322 + _SESSIONRESPONSE_ACQUIRESEMAPHORERESULT._serialized_end=4464 + _SESSIONRESPONSE_RELEASESEMAPHORERESULT._serialized_start=4467 + _SESSIONRESPONSE_RELEASESEMAPHORERESULT._serialized_end=4609 + _SESSIONRESPONSE_DESCRIBESEMAPHORERESULT._serialized_start=4612 + _SESSIONRESPONSE_DESCRIBESEMAPHORERESULT._serialized_end=4829 + _SESSIONRESPONSE_DESCRIBESEMAPHORECHANGED._serialized_start=4831 + _SESSIONRESPONSE_DESCRIBESEMAPHORECHANGED._serialized_end=4919 + _SESSIONRESPONSE_CREATESEMAPHORERESULT._serialized_start=4921 + _SESSIONRESPONSE_CREATESEMAPHORERESULT._serialized_end=5044 + _SESSIONRESPONSE_UPDATESEMAPHORERESULT._serialized_start=5046 + _SESSIONRESPONSE_UPDATESEMAPHORERESULT._serialized_end=5169 + _SESSIONRESPONSE_DELETESEMAPHORERESULT._serialized_start=5171 + _SESSIONRESPONSE_DELETESEMAPHORERESULT._serialized_end=5294 + _CREATENODEREQUEST._serialized_start=5309 + _CREATENODEREQUEST._serialized_end=5443 + _CREATENODERESPONSE._serialized_start=5445 + _CREATENODERESPONSE._serialized_end=5511 + _ALTERNODEREQUEST._serialized_start=5514 + _ALTERNODEREQUEST._serialized_end=5647 + _ALTERNODERESPONSE._serialized_start=5649 + _ALTERNODERESPONSE._serialized_end=5714 + _DROPNODEREQUEST._serialized_start=5716 + _DROPNODEREQUEST._serialized_end=5806 + _DROPNODERESPONSE._serialized_start=5808 + _DROPNODERESPONSE._serialized_end=5872 + _DESCRIBENODEREQUEST._serialized_start=5874 + _DESCRIBENODEREQUEST._serialized_end=5968 + _DESCRIBENODERESPONSE._serialized_start=5970 + _DESCRIBENODERESPONSE._serialized_end=6038 + _DESCRIBENODERESULT._serialized_start=6040 + _DESCRIBENODERESULT._serialized_end=6135 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_coordination_pb2.pyi b/ydb/_grpc/v5/protos/ydb_coordination_pb2.pyi new file mode 100644 index 00000000..fd6ab71e --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_coordination_pb2.pyi @@ -0,0 +1,418 @@ +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from protos import ydb_status_codes_pb2 as _ydb_status_codes_pb2 +from protos import ydb_issue_message_pb2 as _ydb_issue_message_pb2 +from protos import ydb_scheme_pb2 as _ydb_scheme_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +CONSISTENCY_MODE_RELAXED: ConsistencyMode +CONSISTENCY_MODE_STRICT: ConsistencyMode +CONSISTENCY_MODE_UNSET: ConsistencyMode +DESCRIPTOR: _descriptor.FileDescriptor +RATE_LIMITER_COUNTERS_MODE_AGGREGATED: RateLimiterCountersMode +RATE_LIMITER_COUNTERS_MODE_DETAILED: RateLimiterCountersMode +RATE_LIMITER_COUNTERS_MODE_UNSET: RateLimiterCountersMode + +class AlterNodeRequest(_message.Message): + __slots__ = ["config", "operation_params", "path"] + CONFIG_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + config: Config + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, path: _Optional[str] = ..., config: _Optional[_Union[Config, _Mapping]] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class AlterNodeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class Config(_message.Message): + __slots__ = ["attach_consistency_mode", "path", "rate_limiter_counters_mode", "read_consistency_mode", "self_check_period_millis", "session_grace_period_millis"] + ATTACH_CONSISTENCY_MODE_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + RATE_LIMITER_COUNTERS_MODE_FIELD_NUMBER: _ClassVar[int] + READ_CONSISTENCY_MODE_FIELD_NUMBER: _ClassVar[int] + SELF_CHECK_PERIOD_MILLIS_FIELD_NUMBER: _ClassVar[int] + SESSION_GRACE_PERIOD_MILLIS_FIELD_NUMBER: _ClassVar[int] + attach_consistency_mode: ConsistencyMode + path: str + rate_limiter_counters_mode: RateLimiterCountersMode + read_consistency_mode: ConsistencyMode + self_check_period_millis: int + session_grace_period_millis: int + def __init__(self, path: _Optional[str] = ..., self_check_period_millis: _Optional[int] = ..., session_grace_period_millis: _Optional[int] = ..., read_consistency_mode: _Optional[_Union[ConsistencyMode, str]] = ..., attach_consistency_mode: _Optional[_Union[ConsistencyMode, str]] = ..., rate_limiter_counters_mode: _Optional[_Union[RateLimiterCountersMode, str]] = ...) -> None: ... + +class CreateNodeRequest(_message.Message): + __slots__ = ["config", "operation_params", "path"] + CONFIG_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + config: Config + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, path: _Optional[str] = ..., config: _Optional[_Union[Config, _Mapping]] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class CreateNodeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeNodeRequest(_message.Message): + __slots__ = ["operation_params", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, path: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class DescribeNodeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeNodeResult(_message.Message): + __slots__ = ["config", "self"] + CONFIG_FIELD_NUMBER: _ClassVar[int] + SELF_FIELD_NUMBER: _ClassVar[int] + config: Config + self: _ydb_scheme_pb2.Entry + def __init__(self, self_: _Optional[_Union[_ydb_scheme_pb2.Entry, _Mapping]] = ..., config: _Optional[_Union[Config, _Mapping]] = ...) -> None: ... + +class DropNodeRequest(_message.Message): + __slots__ = ["operation_params", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, path: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class DropNodeResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class SemaphoreDescription(_message.Message): + __slots__ = ["count", "data", "ephemeral", "limit", "name", "owners", "waiters"] + COUNT_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + EPHEMERAL_FIELD_NUMBER: _ClassVar[int] + LIMIT_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + OWNERS_FIELD_NUMBER: _ClassVar[int] + WAITERS_FIELD_NUMBER: _ClassVar[int] + count: int + data: bytes + ephemeral: bool + limit: int + name: str + owners: _containers.RepeatedCompositeFieldContainer[SemaphoreSession] + waiters: _containers.RepeatedCompositeFieldContainer[SemaphoreSession] + def __init__(self, name: _Optional[str] = ..., data: _Optional[bytes] = ..., count: _Optional[int] = ..., limit: _Optional[int] = ..., ephemeral: bool = ..., owners: _Optional[_Iterable[_Union[SemaphoreSession, _Mapping]]] = ..., waiters: _Optional[_Iterable[_Union[SemaphoreSession, _Mapping]]] = ...) -> None: ... + +class SemaphoreSession(_message.Message): + __slots__ = ["count", "data", "order_id", "session_id", "timeout_millis"] + COUNT_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + ORDER_ID_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TIMEOUT_MILLIS_FIELD_NUMBER: _ClassVar[int] + count: int + data: bytes + order_id: int + session_id: int + timeout_millis: int + def __init__(self, order_id: _Optional[int] = ..., session_id: _Optional[int] = ..., timeout_millis: _Optional[int] = ..., count: _Optional[int] = ..., data: _Optional[bytes] = ...) -> None: ... + +class SessionDescription(_message.Message): + __slots__ = ["attached", "description", "session_id", "timeout_millis"] + ATTACHED_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TIMEOUT_MILLIS_FIELD_NUMBER: _ClassVar[int] + attached: bool + description: str + session_id: int + timeout_millis: int + def __init__(self, session_id: _Optional[int] = ..., timeout_millis: _Optional[int] = ..., description: _Optional[str] = ..., attached: bool = ...) -> None: ... + +class SessionRequest(_message.Message): + __slots__ = ["acquire_semaphore", "create_semaphore", "delete_semaphore", "describe_semaphore", "ping", "pong", "release_semaphore", "session_start", "session_stop", "unsupported_13", "unsupported_14", "unsupported_15", "unsupported_5", "unsupported_6", "update_semaphore"] + class AcquireSemaphore(_message.Message): + __slots__ = ["count", "data", "ephemeral", "name", "req_id", "timeout_millis"] + COUNT_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + EPHEMERAL_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + REQ_ID_FIELD_NUMBER: _ClassVar[int] + TIMEOUT_MILLIS_FIELD_NUMBER: _ClassVar[int] + count: int + data: bytes + ephemeral: bool + name: str + req_id: int + timeout_millis: int + def __init__(self, req_id: _Optional[int] = ..., name: _Optional[str] = ..., timeout_millis: _Optional[int] = ..., count: _Optional[int] = ..., data: _Optional[bytes] = ..., ephemeral: bool = ...) -> None: ... + class CreateSemaphore(_message.Message): + __slots__ = ["data", "limit", "name", "req_id"] + DATA_FIELD_NUMBER: _ClassVar[int] + LIMIT_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + REQ_ID_FIELD_NUMBER: _ClassVar[int] + data: bytes + limit: int + name: str + req_id: int + def __init__(self, req_id: _Optional[int] = ..., name: _Optional[str] = ..., limit: _Optional[int] = ..., data: _Optional[bytes] = ...) -> None: ... + class DeleteSemaphore(_message.Message): + __slots__ = ["force", "name", "req_id"] + FORCE_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + REQ_ID_FIELD_NUMBER: _ClassVar[int] + force: bool + name: str + req_id: int + def __init__(self, req_id: _Optional[int] = ..., name: _Optional[str] = ..., force: bool = ...) -> None: ... + class DescribeSemaphore(_message.Message): + __slots__ = ["include_owners", "include_waiters", "name", "req_id", "watch_data", "watch_owners"] + INCLUDE_OWNERS_FIELD_NUMBER: _ClassVar[int] + INCLUDE_WAITERS_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + REQ_ID_FIELD_NUMBER: _ClassVar[int] + WATCH_DATA_FIELD_NUMBER: _ClassVar[int] + WATCH_OWNERS_FIELD_NUMBER: _ClassVar[int] + include_owners: bool + include_waiters: bool + name: str + req_id: int + watch_data: bool + watch_owners: bool + def __init__(self, req_id: _Optional[int] = ..., name: _Optional[str] = ..., include_owners: bool = ..., include_waiters: bool = ..., watch_data: bool = ..., watch_owners: bool = ...) -> None: ... + class PingPong(_message.Message): + __slots__ = ["opaque"] + OPAQUE_FIELD_NUMBER: _ClassVar[int] + opaque: int + def __init__(self, opaque: _Optional[int] = ...) -> None: ... + class ReleaseSemaphore(_message.Message): + __slots__ = ["name", "req_id"] + NAME_FIELD_NUMBER: _ClassVar[int] + REQ_ID_FIELD_NUMBER: _ClassVar[int] + name: str + req_id: int + def __init__(self, req_id: _Optional[int] = ..., name: _Optional[str] = ...) -> None: ... + class SessionStart(_message.Message): + __slots__ = ["description", "path", "protection_key", "seq_no", "session_id", "timeout_millis"] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + PROTECTION_KEY_FIELD_NUMBER: _ClassVar[int] + SEQ_NO_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TIMEOUT_MILLIS_FIELD_NUMBER: _ClassVar[int] + description: str + path: str + protection_key: bytes + seq_no: int + session_id: int + timeout_millis: int + def __init__(self, path: _Optional[str] = ..., session_id: _Optional[int] = ..., timeout_millis: _Optional[int] = ..., description: _Optional[str] = ..., seq_no: _Optional[int] = ..., protection_key: _Optional[bytes] = ...) -> None: ... + class SessionStop(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + class UpdateSemaphore(_message.Message): + __slots__ = ["data", "name", "req_id"] + DATA_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + REQ_ID_FIELD_NUMBER: _ClassVar[int] + data: bytes + name: str + req_id: int + def __init__(self, req_id: _Optional[int] = ..., name: _Optional[str] = ..., data: _Optional[bytes] = ...) -> None: ... + ACQUIRE_SEMAPHORE_FIELD_NUMBER: _ClassVar[int] + CREATE_SEMAPHORE_FIELD_NUMBER: _ClassVar[int] + DELETE_SEMAPHORE_FIELD_NUMBER: _ClassVar[int] + DESCRIBE_SEMAPHORE_FIELD_NUMBER: _ClassVar[int] + PING_FIELD_NUMBER: _ClassVar[int] + PONG_FIELD_NUMBER: _ClassVar[int] + RELEASE_SEMAPHORE_FIELD_NUMBER: _ClassVar[int] + SESSION_START_FIELD_NUMBER: _ClassVar[int] + SESSION_STOP_FIELD_NUMBER: _ClassVar[int] + UNSUPPORTED_13_FIELD_NUMBER: _ClassVar[int] + UNSUPPORTED_14_FIELD_NUMBER: _ClassVar[int] + UNSUPPORTED_15_FIELD_NUMBER: _ClassVar[int] + UNSUPPORTED_5_FIELD_NUMBER: _ClassVar[int] + UNSUPPORTED_6_FIELD_NUMBER: _ClassVar[int] + UPDATE_SEMAPHORE_FIELD_NUMBER: _ClassVar[int] + acquire_semaphore: SessionRequest.AcquireSemaphore + create_semaphore: SessionRequest.CreateSemaphore + delete_semaphore: SessionRequest.DeleteSemaphore + describe_semaphore: SessionRequest.DescribeSemaphore + ping: SessionRequest.PingPong + pong: SessionRequest.PingPong + release_semaphore: SessionRequest.ReleaseSemaphore + session_start: SessionRequest.SessionStart + session_stop: SessionRequest.SessionStop + unsupported_13: Unsupported + unsupported_14: Unsupported + unsupported_15: Unsupported + unsupported_5: Unsupported + unsupported_6: Unsupported + update_semaphore: SessionRequest.UpdateSemaphore + def __init__(self, ping: _Optional[_Union[SessionRequest.PingPong, _Mapping]] = ..., pong: _Optional[_Union[SessionRequest.PingPong, _Mapping]] = ..., session_start: _Optional[_Union[SessionRequest.SessionStart, _Mapping]] = ..., session_stop: _Optional[_Union[SessionRequest.SessionStop, _Mapping]] = ..., unsupported_5: _Optional[_Union[Unsupported, _Mapping]] = ..., unsupported_6: _Optional[_Union[Unsupported, _Mapping]] = ..., acquire_semaphore: _Optional[_Union[SessionRequest.AcquireSemaphore, _Mapping]] = ..., release_semaphore: _Optional[_Union[SessionRequest.ReleaseSemaphore, _Mapping]] = ..., describe_semaphore: _Optional[_Union[SessionRequest.DescribeSemaphore, _Mapping]] = ..., create_semaphore: _Optional[_Union[SessionRequest.CreateSemaphore, _Mapping]] = ..., update_semaphore: _Optional[_Union[SessionRequest.UpdateSemaphore, _Mapping]] = ..., delete_semaphore: _Optional[_Union[SessionRequest.DeleteSemaphore, _Mapping]] = ..., unsupported_13: _Optional[_Union[Unsupported, _Mapping]] = ..., unsupported_14: _Optional[_Union[Unsupported, _Mapping]] = ..., unsupported_15: _Optional[_Union[Unsupported, _Mapping]] = ...) -> None: ... + +class SessionResponse(_message.Message): + __slots__ = ["acquire_semaphore_pending", "acquire_semaphore_result", "create_semaphore_result", "delete_semaphore_result", "describe_semaphore_changed", "describe_semaphore_result", "failure", "ping", "pong", "release_semaphore_result", "session_started", "session_stopped", "unsupported_16", "unsupported_17", "unsupported_18", "unsupported_6", "unsupported_7", "update_semaphore_result"] + class AcquireSemaphorePending(_message.Message): + __slots__ = ["req_id"] + REQ_ID_FIELD_NUMBER: _ClassVar[int] + req_id: int + def __init__(self, req_id: _Optional[int] = ...) -> None: ... + class AcquireSemaphoreResult(_message.Message): + __slots__ = ["acquired", "issues", "req_id", "status"] + ACQUIRED_FIELD_NUMBER: _ClassVar[int] + ISSUES_FIELD_NUMBER: _ClassVar[int] + REQ_ID_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + acquired: bool + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + req_id: int + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, req_id: _Optional[int] = ..., status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., acquired: bool = ...) -> None: ... + class CreateSemaphoreResult(_message.Message): + __slots__ = ["issues", "req_id", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + REQ_ID_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + req_id: int + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, req_id: _Optional[int] = ..., status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ...) -> None: ... + class DeleteSemaphoreResult(_message.Message): + __slots__ = ["issues", "req_id", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + REQ_ID_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + req_id: int + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, req_id: _Optional[int] = ..., status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ...) -> None: ... + class DescribeSemaphoreChanged(_message.Message): + __slots__ = ["data_changed", "owners_changed", "req_id"] + DATA_CHANGED_FIELD_NUMBER: _ClassVar[int] + OWNERS_CHANGED_FIELD_NUMBER: _ClassVar[int] + REQ_ID_FIELD_NUMBER: _ClassVar[int] + data_changed: bool + owners_changed: bool + req_id: int + def __init__(self, req_id: _Optional[int] = ..., data_changed: bool = ..., owners_changed: bool = ...) -> None: ... + class DescribeSemaphoreResult(_message.Message): + __slots__ = ["issues", "req_id", "semaphore_description", "status", "watch_added"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + REQ_ID_FIELD_NUMBER: _ClassVar[int] + SEMAPHORE_DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + WATCH_ADDED_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + req_id: int + semaphore_description: SemaphoreDescription + status: _ydb_status_codes_pb2.StatusIds.StatusCode + watch_added: bool + def __init__(self, req_id: _Optional[int] = ..., status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., semaphore_description: _Optional[_Union[SemaphoreDescription, _Mapping]] = ..., watch_added: bool = ...) -> None: ... + class Failure(_message.Message): + __slots__ = ["issues", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ...) -> None: ... + class PingPong(_message.Message): + __slots__ = ["opaque"] + OPAQUE_FIELD_NUMBER: _ClassVar[int] + opaque: int + def __init__(self, opaque: _Optional[int] = ...) -> None: ... + class ReleaseSemaphoreResult(_message.Message): + __slots__ = ["issues", "released", "req_id", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + RELEASED_FIELD_NUMBER: _ClassVar[int] + REQ_ID_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + released: bool + req_id: int + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, req_id: _Optional[int] = ..., status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., released: bool = ...) -> None: ... + class SessionStarted(_message.Message): + __slots__ = ["session_id", "timeout_millis"] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TIMEOUT_MILLIS_FIELD_NUMBER: _ClassVar[int] + session_id: int + timeout_millis: int + def __init__(self, session_id: _Optional[int] = ..., timeout_millis: _Optional[int] = ...) -> None: ... + class SessionStopped(_message.Message): + __slots__ = ["session_id"] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + session_id: int + def __init__(self, session_id: _Optional[int] = ...) -> None: ... + class UpdateSemaphoreResult(_message.Message): + __slots__ = ["issues", "req_id", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + REQ_ID_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + req_id: int + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, req_id: _Optional[int] = ..., status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ...) -> None: ... + ACQUIRE_SEMAPHORE_PENDING_FIELD_NUMBER: _ClassVar[int] + ACQUIRE_SEMAPHORE_RESULT_FIELD_NUMBER: _ClassVar[int] + CREATE_SEMAPHORE_RESULT_FIELD_NUMBER: _ClassVar[int] + DELETE_SEMAPHORE_RESULT_FIELD_NUMBER: _ClassVar[int] + DESCRIBE_SEMAPHORE_CHANGED_FIELD_NUMBER: _ClassVar[int] + DESCRIBE_SEMAPHORE_RESULT_FIELD_NUMBER: _ClassVar[int] + FAILURE_FIELD_NUMBER: _ClassVar[int] + PING_FIELD_NUMBER: _ClassVar[int] + PONG_FIELD_NUMBER: _ClassVar[int] + RELEASE_SEMAPHORE_RESULT_FIELD_NUMBER: _ClassVar[int] + SESSION_STARTED_FIELD_NUMBER: _ClassVar[int] + SESSION_STOPPED_FIELD_NUMBER: _ClassVar[int] + UNSUPPORTED_16_FIELD_NUMBER: _ClassVar[int] + UNSUPPORTED_17_FIELD_NUMBER: _ClassVar[int] + UNSUPPORTED_18_FIELD_NUMBER: _ClassVar[int] + UNSUPPORTED_6_FIELD_NUMBER: _ClassVar[int] + UNSUPPORTED_7_FIELD_NUMBER: _ClassVar[int] + UPDATE_SEMAPHORE_RESULT_FIELD_NUMBER: _ClassVar[int] + acquire_semaphore_pending: SessionResponse.AcquireSemaphorePending + acquire_semaphore_result: SessionResponse.AcquireSemaphoreResult + create_semaphore_result: SessionResponse.CreateSemaphoreResult + delete_semaphore_result: SessionResponse.DeleteSemaphoreResult + describe_semaphore_changed: SessionResponse.DescribeSemaphoreChanged + describe_semaphore_result: SessionResponse.DescribeSemaphoreResult + failure: SessionResponse.Failure + ping: SessionResponse.PingPong + pong: SessionResponse.PingPong + release_semaphore_result: SessionResponse.ReleaseSemaphoreResult + session_started: SessionResponse.SessionStarted + session_stopped: SessionResponse.SessionStopped + unsupported_16: Unsupported + unsupported_17: Unsupported + unsupported_18: Unsupported + unsupported_6: Unsupported + unsupported_7: Unsupported + update_semaphore_result: SessionResponse.UpdateSemaphoreResult + def __init__(self, ping: _Optional[_Union[SessionResponse.PingPong, _Mapping]] = ..., pong: _Optional[_Union[SessionResponse.PingPong, _Mapping]] = ..., failure: _Optional[_Union[SessionResponse.Failure, _Mapping]] = ..., session_started: _Optional[_Union[SessionResponse.SessionStarted, _Mapping]] = ..., session_stopped: _Optional[_Union[SessionResponse.SessionStopped, _Mapping]] = ..., unsupported_6: _Optional[_Union[Unsupported, _Mapping]] = ..., unsupported_7: _Optional[_Union[Unsupported, _Mapping]] = ..., acquire_semaphore_pending: _Optional[_Union[SessionResponse.AcquireSemaphorePending, _Mapping]] = ..., acquire_semaphore_result: _Optional[_Union[SessionResponse.AcquireSemaphoreResult, _Mapping]] = ..., release_semaphore_result: _Optional[_Union[SessionResponse.ReleaseSemaphoreResult, _Mapping]] = ..., describe_semaphore_result: _Optional[_Union[SessionResponse.DescribeSemaphoreResult, _Mapping]] = ..., describe_semaphore_changed: _Optional[_Union[SessionResponse.DescribeSemaphoreChanged, _Mapping]] = ..., create_semaphore_result: _Optional[_Union[SessionResponse.CreateSemaphoreResult, _Mapping]] = ..., update_semaphore_result: _Optional[_Union[SessionResponse.UpdateSemaphoreResult, _Mapping]] = ..., delete_semaphore_result: _Optional[_Union[SessionResponse.DeleteSemaphoreResult, _Mapping]] = ..., unsupported_16: _Optional[_Union[Unsupported, _Mapping]] = ..., unsupported_17: _Optional[_Union[Unsupported, _Mapping]] = ..., unsupported_18: _Optional[_Union[Unsupported, _Mapping]] = ...) -> None: ... + +class Unsupported(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ConsistencyMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class RateLimiterCountersMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] diff --git a/ydb/_grpc/v5/protos/ydb_coordination_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_coordination_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_coordination_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_discovery_pb2.py b/ydb/_grpc/v5/protos/ydb_discovery_pb2.py new file mode 100644 index 00000000..aa3a6e80 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_discovery_pb2.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_discovery.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aprotos/ydb_discovery.proto\x12\rYdb.Discovery\x1a\x1aprotos/ydb_operation.proto\"9\n\x14ListEndpointsRequest\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x03(\t\"\xc3\x01\n\x0c\x45ndpointInfo\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x13\n\x0bload_factor\x18\x03 \x01(\x02\x12\x0b\n\x03ssl\x18\x04 \x01(\x08\x12\x0f\n\x07service\x18\x05 \x03(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x0f\n\x07node_id\x18\x07 \x01(\r\x12\r\n\x05ip_v4\x18\x08 \x03(\t\x12\r\n\x05ip_v6\x18\t \x03(\t\x12 \n\x18ssl_target_name_override\x18\n \x01(\t\"\\\n\x13ListEndpointsResult\x12.\n\tendpoints\x18\x01 \x03(\x0b\x32\x1b.Ydb.Discovery.EndpointInfo\x12\x15\n\rself_location\x18\x02 \x01(\t\"E\n\x15ListEndpointsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\'\n\rWhoAmIRequest\x12\x16\n\x0einclude_groups\x18\x01 \x01(\x08\",\n\x0cWhoAmIResult\x12\x0c\n\x04user\x18\x01 \x01(\t\x12\x0e\n\x06groups\x18\x02 \x03(\t\">\n\x0eWhoAmIResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xe0\x02\n\x0cNodeLocation\x12 \n\x0f\x64\x61ta_center_num\x18\x01 \x01(\rB\x02\x18\x01H\x00\x88\x01\x01\x12\x19\n\x08room_num\x18\x02 \x01(\rB\x02\x18\x01H\x01\x88\x01\x01\x12\x19\n\x08rack_num\x18\x03 \x01(\rB\x02\x18\x01H\x02\x88\x01\x01\x12\x19\n\x08\x62ody_num\x18\x04 \x01(\rB\x02\x18\x01H\x03\x88\x01\x01\x12\x17\n\x04\x62ody\x18\x94\x91\x06 \x01(\rB\x02\x18\x01H\x04\x88\x01\x01\x12\x18\n\x0b\x64\x61ta_center\x18\n \x01(\tH\x05\x88\x01\x01\x12\x13\n\x06module\x18\x14 \x01(\tH\x06\x88\x01\x01\x12\x11\n\x04rack\x18\x1e \x01(\tH\x07\x88\x01\x01\x12\x11\n\x04unit\x18( \x01(\tH\x08\x88\x01\x01\x42\x12\n\x10_data_center_numB\x0b\n\t_room_numB\x0b\n\t_rack_numB\x0b\n\t_body_numB\x07\n\x05_bodyB\x0e\n\x0c_data_centerB\t\n\x07_moduleB\x07\n\x05_rackB\x07\n\x05_unitBl\n\x18tech.ydb.proto.discoveryB\x0f\x44iscoveryProtosZ None: ... + +class ListEndpointsRequest(_message.Message): + __slots__ = ["database", "service"] + DATABASE_FIELD_NUMBER: _ClassVar[int] + SERVICE_FIELD_NUMBER: _ClassVar[int] + database: str + service: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, database: _Optional[str] = ..., service: _Optional[_Iterable[str]] = ...) -> None: ... + +class ListEndpointsResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListEndpointsResult(_message.Message): + __slots__ = ["endpoints", "self_location"] + ENDPOINTS_FIELD_NUMBER: _ClassVar[int] + SELF_LOCATION_FIELD_NUMBER: _ClassVar[int] + endpoints: _containers.RepeatedCompositeFieldContainer[EndpointInfo] + self_location: str + def __init__(self, endpoints: _Optional[_Iterable[_Union[EndpointInfo, _Mapping]]] = ..., self_location: _Optional[str] = ...) -> None: ... + +class NodeLocation(_message.Message): + __slots__ = ["body", "body_num", "data_center", "data_center_num", "module", "rack", "rack_num", "room_num", "unit"] + BODY_FIELD_NUMBER: _ClassVar[int] + BODY_NUM_FIELD_NUMBER: _ClassVar[int] + DATA_CENTER_FIELD_NUMBER: _ClassVar[int] + DATA_CENTER_NUM_FIELD_NUMBER: _ClassVar[int] + MODULE_FIELD_NUMBER: _ClassVar[int] + RACK_FIELD_NUMBER: _ClassVar[int] + RACK_NUM_FIELD_NUMBER: _ClassVar[int] + ROOM_NUM_FIELD_NUMBER: _ClassVar[int] + UNIT_FIELD_NUMBER: _ClassVar[int] + body: int + body_num: int + data_center: str + data_center_num: int + module: str + rack: str + rack_num: int + room_num: int + unit: str + def __init__(self, data_center_num: _Optional[int] = ..., room_num: _Optional[int] = ..., rack_num: _Optional[int] = ..., body_num: _Optional[int] = ..., body: _Optional[int] = ..., data_center: _Optional[str] = ..., module: _Optional[str] = ..., rack: _Optional[str] = ..., unit: _Optional[str] = ...) -> None: ... + +class WhoAmIRequest(_message.Message): + __slots__ = ["include_groups"] + INCLUDE_GROUPS_FIELD_NUMBER: _ClassVar[int] + include_groups: bool + def __init__(self, include_groups: bool = ...) -> None: ... + +class WhoAmIResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class WhoAmIResult(_message.Message): + __slots__ = ["groups", "user"] + GROUPS_FIELD_NUMBER: _ClassVar[int] + USER_FIELD_NUMBER: _ClassVar[int] + groups: _containers.RepeatedScalarFieldContainer[str] + user: str + def __init__(self, user: _Optional[str] = ..., groups: _Optional[_Iterable[str]] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_discovery_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_discovery_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_discovery_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_export_pb2.py b/ydb/_grpc/v5/protos/ydb_export_pb2.py new file mode 100644 index 00000000..8fe3163f --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_export_pb2.py @@ -0,0 +1,94 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_export.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_export.proto\x12\nYdb.Export\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x0e\x45xportProgress\"\x9e\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x11\n\rPROGRESS_DONE\x10\x03\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x04\x12\x16\n\x12PROGRESS_CANCELLED\x10\x05\"\xa0\x01\n\x12\x45xportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x98\x02\n\x12\x45xportToYtSettings\x12\x12\n\x04host\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x13\n\x05token\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x04 \x03(\x0b\x32#.Ydb.Export.ExportToYtSettings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x06 \x01(\r\x12\x13\n\x0buse_type_v3\x18\x07 \x01(\x08\x1a\x41\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\"\x12\n\x10\x45xportToYtResult\"\xb5\x01\n\x12\x45xportToYtMetadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToYtRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToYtResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xe1\x05\n\x12\x45xportToS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x35\n\x06scheme\x18\x02 \x01(\x0e\x32%.Ydb.Export.ExportToS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x06 \x03(\x0b\x32#.Ydb.Export.ExportToS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x42\n\rstorage_class\x18\t \x01(\x0e\x32+.Ydb.Export.ExportToS3Settings.StorageClass\x12\x13\n\x0b\x63ompression\x18\n \x01(\t\x12\x0e\n\x06region\x18\x0b \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\x0c \x01(\x08\x1a\x43\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12 \n\x12\x64\x65stination_prefix\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\xba\x01\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x16\n\x12REDUCED_REDUNDANCY\x10\x02\x12\x0f\n\x0bSTANDARD_IA\x10\x03\x12\x0e\n\nONEZONE_IA\x10\x04\x12\x17\n\x13INTELLIGENT_TIERING\x10\x05\x12\x0b\n\x07GLACIER\x10\x06\x12\x10\n\x0c\x44\x45\x45P_ARCHIVE\x10\x07\x12\x0c\n\x08OUTPOSTS\x10\x08\"\x12\n\x10\x45xportToS3Result\"\xb5\x01\n\x12\x45xportToS3Metadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3SettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBU\n\x15tech.ydb.proto.exportZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_export_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\025tech.ydb.proto.exportZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export\370\001\001' + _EXPORTTOYTSETTINGS_ITEM.fields_by_name['source_path']._options = None + _EXPORTTOYTSETTINGS_ITEM.fields_by_name['source_path']._serialized_options = b'\220\346*\001' + _EXPORTTOYTSETTINGS_ITEM.fields_by_name['destination_path']._options = None + _EXPORTTOYTSETTINGS_ITEM.fields_by_name['destination_path']._serialized_options = b'\220\346*\001' + _EXPORTTOYTSETTINGS.fields_by_name['host']._options = None + _EXPORTTOYTSETTINGS.fields_by_name['host']._serialized_options = b'\220\346*\001' + _EXPORTTOYTSETTINGS.fields_by_name['token']._options = None + _EXPORTTOYTSETTINGS.fields_by_name['token']._serialized_options = b'\220\346*\001' + _EXPORTTOYTSETTINGS.fields_by_name['items']._options = None + _EXPORTTOYTSETTINGS.fields_by_name['items']._serialized_options = b'\232\346*\002(\001' + _EXPORTTOYTSETTINGS.fields_by_name['description']._options = None + _EXPORTTOYTSETTINGS.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200\001' + _EXPORTTOYTREQUEST.fields_by_name['settings']._options = None + _EXPORTTOYTREQUEST.fields_by_name['settings']._serialized_options = b'\220\346*\001' + _EXPORTTOS3SETTINGS_ITEM.fields_by_name['source_path']._options = None + _EXPORTTOS3SETTINGS_ITEM.fields_by_name['source_path']._serialized_options = b'\220\346*\001' + _EXPORTTOS3SETTINGS_ITEM.fields_by_name['destination_prefix']._options = None + _EXPORTTOS3SETTINGS_ITEM.fields_by_name['destination_prefix']._serialized_options = b'\220\346*\001' + _EXPORTTOS3SETTINGS.fields_by_name['endpoint']._options = None + _EXPORTTOS3SETTINGS.fields_by_name['endpoint']._serialized_options = b'\220\346*\001' + _EXPORTTOS3SETTINGS.fields_by_name['bucket']._options = None + _EXPORTTOS3SETTINGS.fields_by_name['bucket']._serialized_options = b'\220\346*\001' + _EXPORTTOS3SETTINGS.fields_by_name['access_key']._options = None + _EXPORTTOS3SETTINGS.fields_by_name['access_key']._serialized_options = b'\220\346*\001' + _EXPORTTOS3SETTINGS.fields_by_name['secret_key']._options = None + _EXPORTTOS3SETTINGS.fields_by_name['secret_key']._serialized_options = b'\220\346*\001' + _EXPORTTOS3SETTINGS.fields_by_name['items']._options = None + _EXPORTTOS3SETTINGS.fields_by_name['items']._serialized_options = b'\232\346*\002(\001' + _EXPORTTOS3SETTINGS.fields_by_name['description']._options = None + _EXPORTTOS3SETTINGS.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200\001' + _EXPORTTOS3REQUEST.fields_by_name['settings']._options = None + _EXPORTTOS3REQUEST.fields_by_name['settings']._serialized_options = b'\220\346*\001' + _EXPORTPROGRESS._serialized_start=138 + _EXPORTPROGRESS._serialized_end=315 + _EXPORTPROGRESS_PROGRESS._serialized_start=157 + _EXPORTPROGRESS_PROGRESS._serialized_end=315 + _EXPORTITEMPROGRESS._serialized_start=318 + _EXPORTITEMPROGRESS._serialized_end=478 + _EXPORTTOYTSETTINGS._serialized_start=481 + _EXPORTTOYTSETTINGS._serialized_end=761 + _EXPORTTOYTSETTINGS_ITEM._serialized_start=696 + _EXPORTTOYTSETTINGS_ITEM._serialized_end=761 + _EXPORTTOYTRESULT._serialized_start=763 + _EXPORTTOYTRESULT._serialized_end=781 + _EXPORTTOYTMETADATA._serialized_start=784 + _EXPORTTOYTMETADATA._serialized_end=965 + _EXPORTTOYTREQUEST._serialized_start=968 + _EXPORTTOYTREQUEST._serialized_end=1102 + _EXPORTTOYTRESPONSE._serialized_start=1104 + _EXPORTTOYTRESPONSE._serialized_end=1170 + _EXPORTTOS3SETTINGS._serialized_start=1173 + _EXPORTTOS3SETTINGS._serialized_end=1910 + _EXPORTTOS3SETTINGS_ITEM._serialized_start=1606 + _EXPORTTOS3SETTINGS_ITEM._serialized_end=1673 + _EXPORTTOS3SETTINGS_SCHEME._serialized_start=1675 + _EXPORTTOS3SETTINGS_SCHEME._serialized_end=1721 + _EXPORTTOS3SETTINGS_STORAGECLASS._serialized_start=1724 + _EXPORTTOS3SETTINGS_STORAGECLASS._serialized_end=1910 + _EXPORTTOS3RESULT._serialized_start=1912 + _EXPORTTOS3RESULT._serialized_end=1930 + _EXPORTTOS3METADATA._serialized_start=1933 + _EXPORTTOS3METADATA._serialized_end=2114 + _EXPORTTOS3REQUEST._serialized_start=2117 + _EXPORTTOS3REQUEST._serialized_end=2251 + _EXPORTTOS3RESPONSE._serialized_start=2253 + _EXPORTTOS3RESPONSE._serialized_end=2319 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_export_pb2.pyi b/ydb/_grpc/v5/protos/ydb_export_pb2.pyi new file mode 100644 index 00000000..14af9169 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_export_pb2.pyi @@ -0,0 +1,166 @@ +from protos.annotations import validation_pb2 as _validation_pb2 +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ExportItemProgress(_message.Message): + __slots__ = ["end_time", "parts_completed", "parts_total", "start_time"] + END_TIME_FIELD_NUMBER: _ClassVar[int] + PARTS_COMPLETED_FIELD_NUMBER: _ClassVar[int] + PARTS_TOTAL_FIELD_NUMBER: _ClassVar[int] + START_TIME_FIELD_NUMBER: _ClassVar[int] + end_time: _timestamp_pb2.Timestamp + parts_completed: int + parts_total: int + start_time: _timestamp_pb2.Timestamp + def __init__(self, parts_total: _Optional[int] = ..., parts_completed: _Optional[int] = ..., start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class ExportProgress(_message.Message): + __slots__ = [] + class Progress(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + PROGRESS_CANCELLATION: ExportProgress.Progress + PROGRESS_CANCELLED: ExportProgress.Progress + PROGRESS_DONE: ExportProgress.Progress + PROGRESS_PREPARING: ExportProgress.Progress + PROGRESS_TRANSFER_DATA: ExportProgress.Progress + PROGRESS_UNSPECIFIED: ExportProgress.Progress + def __init__(self) -> None: ... + +class ExportToS3Metadata(_message.Message): + __slots__ = ["items_progress", "progress", "settings"] + ITEMS_PROGRESS_FIELD_NUMBER: _ClassVar[int] + PROGRESS_FIELD_NUMBER: _ClassVar[int] + SETTINGS_FIELD_NUMBER: _ClassVar[int] + items_progress: _containers.RepeatedCompositeFieldContainer[ExportItemProgress] + progress: ExportProgress.Progress + settings: ExportToS3Settings + def __init__(self, settings: _Optional[_Union[ExportToS3Settings, _Mapping]] = ..., progress: _Optional[_Union[ExportProgress.Progress, str]] = ..., items_progress: _Optional[_Iterable[_Union[ExportItemProgress, _Mapping]]] = ...) -> None: ... + +class ExportToS3Request(_message.Message): + __slots__ = ["operation_params", "settings"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SETTINGS_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + settings: ExportToS3Settings + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., settings: _Optional[_Union[ExportToS3Settings, _Mapping]] = ...) -> None: ... + +class ExportToS3Response(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ExportToS3Result(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ExportToS3Settings(_message.Message): + __slots__ = ["access_key", "bucket", "compression", "description", "disable_virtual_addressing", "endpoint", "items", "number_of_retries", "region", "scheme", "secret_key", "storage_class"] + class Scheme(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class StorageClass(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Item(_message.Message): + __slots__ = ["destination_prefix", "source_path"] + DESTINATION_PREFIX_FIELD_NUMBER: _ClassVar[int] + SOURCE_PATH_FIELD_NUMBER: _ClassVar[int] + destination_prefix: str + source_path: str + def __init__(self, source_path: _Optional[str] = ..., destination_prefix: _Optional[str] = ...) -> None: ... + ACCESS_KEY_FIELD_NUMBER: _ClassVar[int] + BUCKET_FIELD_NUMBER: _ClassVar[int] + COMPRESSION_FIELD_NUMBER: _ClassVar[int] + DEEP_ARCHIVE: ExportToS3Settings.StorageClass + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + DISABLE_VIRTUAL_ADDRESSING_FIELD_NUMBER: _ClassVar[int] + ENDPOINT_FIELD_NUMBER: _ClassVar[int] + GLACIER: ExportToS3Settings.StorageClass + HTTP: ExportToS3Settings.Scheme + HTTPS: ExportToS3Settings.Scheme + INTELLIGENT_TIERING: ExportToS3Settings.StorageClass + ITEMS_FIELD_NUMBER: _ClassVar[int] + NUMBER_OF_RETRIES_FIELD_NUMBER: _ClassVar[int] + ONEZONE_IA: ExportToS3Settings.StorageClass + OUTPOSTS: ExportToS3Settings.StorageClass + REDUCED_REDUNDANCY: ExportToS3Settings.StorageClass + REGION_FIELD_NUMBER: _ClassVar[int] + SCHEME_FIELD_NUMBER: _ClassVar[int] + SECRET_KEY_FIELD_NUMBER: _ClassVar[int] + STANDARD: ExportToS3Settings.StorageClass + STANDARD_IA: ExportToS3Settings.StorageClass + STORAGE_CLASS_FIELD_NUMBER: _ClassVar[int] + STORAGE_CLASS_UNSPECIFIED: ExportToS3Settings.StorageClass + UNSPECIFIED: ExportToS3Settings.Scheme + access_key: str + bucket: str + compression: str + description: str + disable_virtual_addressing: bool + endpoint: str + items: _containers.RepeatedCompositeFieldContainer[ExportToS3Settings.Item] + number_of_retries: int + region: str + scheme: ExportToS3Settings.Scheme + secret_key: str + storage_class: ExportToS3Settings.StorageClass + def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ExportToS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ExportToS3Settings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., storage_class: _Optional[_Union[ExportToS3Settings.StorageClass, str]] = ..., compression: _Optional[str] = ..., region: _Optional[str] = ..., disable_virtual_addressing: bool = ...) -> None: ... + +class ExportToYtMetadata(_message.Message): + __slots__ = ["items_progress", "progress", "settings"] + ITEMS_PROGRESS_FIELD_NUMBER: _ClassVar[int] + PROGRESS_FIELD_NUMBER: _ClassVar[int] + SETTINGS_FIELD_NUMBER: _ClassVar[int] + items_progress: _containers.RepeatedCompositeFieldContainer[ExportItemProgress] + progress: ExportProgress.Progress + settings: ExportToYtSettings + def __init__(self, settings: _Optional[_Union[ExportToYtSettings, _Mapping]] = ..., progress: _Optional[_Union[ExportProgress.Progress, str]] = ..., items_progress: _Optional[_Iterable[_Union[ExportItemProgress, _Mapping]]] = ...) -> None: ... + +class ExportToYtRequest(_message.Message): + __slots__ = ["operation_params", "settings"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SETTINGS_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + settings: ExportToYtSettings + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., settings: _Optional[_Union[ExportToYtSettings, _Mapping]] = ...) -> None: ... + +class ExportToYtResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ExportToYtResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ExportToYtSettings(_message.Message): + __slots__ = ["description", "host", "items", "number_of_retries", "port", "token", "use_type_v3"] + class Item(_message.Message): + __slots__ = ["destination_path", "source_path"] + DESTINATION_PATH_FIELD_NUMBER: _ClassVar[int] + SOURCE_PATH_FIELD_NUMBER: _ClassVar[int] + destination_path: str + source_path: str + def __init__(self, source_path: _Optional[str] = ..., destination_path: _Optional[str] = ...) -> None: ... + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + HOST_FIELD_NUMBER: _ClassVar[int] + ITEMS_FIELD_NUMBER: _ClassVar[int] + NUMBER_OF_RETRIES_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + TOKEN_FIELD_NUMBER: _ClassVar[int] + USE_TYPE_V3_FIELD_NUMBER: _ClassVar[int] + description: str + host: str + items: _containers.RepeatedCompositeFieldContainer[ExportToYtSettings.Item] + number_of_retries: int + port: int + token: str + use_type_v3: bool + def __init__(self, host: _Optional[str] = ..., port: _Optional[int] = ..., token: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ExportToYtSettings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., use_type_v3: bool = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_export_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_export_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_export_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_federation_discovery_pb2.py b/ydb/_grpc/v5/protos/ydb_federation_discovery_pb2.py new file mode 100644 index 00000000..b7adfa66 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_federation_discovery_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_federation_discovery.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%protos/ydb_federation_discovery.proto\x12\x17Ydb.FederationDiscovery\x1a\x1aprotos/ydb_operation.proto\"\xf9\x01\n\x0c\x44\x61tabaseInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\n\n\x02id\x18\x03 \x01(\t\x12\x10\n\x08\x65ndpoint\x18\x04 \x01(\t\x12\x10\n\x08location\x18\x05 \x01(\t\x12<\n\x06status\x18\x06 \x01(\x0e\x32,.Ydb.FederationDiscovery.DatabaseInfo.Status\x12\x0e\n\x06weight\x18\x07 \x01(\x03\"O\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\r\n\tAVAILABLE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x12\x0f\n\x0bUNAVAILABLE\x10\x03\" \n\x1eListFederationDatabasesRequest\"O\n\x1fListFederationDatabasesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x9b\x01\n\x1dListFederationDatabasesResult\x12\x1e\n\x16\x63ontrol_plane_endpoint\x18\x01 \x01(\t\x12\x43\n\x14\x66\x65\x64\x65ration_databases\x18\x02 \x03(\x0b\x32%.Ydb.FederationDiscovery.DatabaseInfo\x12\x15\n\rself_location\x18\x03 \x01(\tB\x8b\x01\n#tech.ydb.proto.federation.discoveryB\x19\x46\x65\x64\x65rationDiscoveryProtosZFgithub.com/ydb-platform/ydb-go-genproto/protos/Ydb_FederationDiscovery\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_federation_discovery_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n#tech.ydb.proto.federation.discoveryB\031FederationDiscoveryProtosZFgithub.com/ydb-platform/ydb-go-genproto/protos/Ydb_FederationDiscovery\370\001\001' + _DATABASEINFO._serialized_start=95 + _DATABASEINFO._serialized_end=344 + _DATABASEINFO_STATUS._serialized_start=265 + _DATABASEINFO_STATUS._serialized_end=344 + _LISTFEDERATIONDATABASESREQUEST._serialized_start=346 + _LISTFEDERATIONDATABASESREQUEST._serialized_end=378 + _LISTFEDERATIONDATABASESRESPONSE._serialized_start=380 + _LISTFEDERATIONDATABASESRESPONSE._serialized_end=459 + _LISTFEDERATIONDATABASESRESULT._serialized_start=462 + _LISTFEDERATIONDATABASESRESULT._serialized_end=617 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_federation_discovery_pb2.pyi b/ydb/_grpc/v5/protos/ydb_federation_discovery_pb2.pyi new file mode 100644 index 00000000..71a57dd9 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_federation_discovery_pb2.pyi @@ -0,0 +1,52 @@ +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class DatabaseInfo(_message.Message): + __slots__ = ["endpoint", "id", "location", "name", "path", "status", "weight"] + class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + AVAILABLE: DatabaseInfo.Status + ENDPOINT_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + LOCATION_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + READ_ONLY: DatabaseInfo.Status + STATUS_FIELD_NUMBER: _ClassVar[int] + STATUS_UNSPECIFIED: DatabaseInfo.Status + UNAVAILABLE: DatabaseInfo.Status + WEIGHT_FIELD_NUMBER: _ClassVar[int] + endpoint: str + id: str + location: str + name: str + path: str + status: DatabaseInfo.Status + weight: int + def __init__(self, name: _Optional[str] = ..., path: _Optional[str] = ..., id: _Optional[str] = ..., endpoint: _Optional[str] = ..., location: _Optional[str] = ..., status: _Optional[_Union[DatabaseInfo.Status, str]] = ..., weight: _Optional[int] = ...) -> None: ... + +class ListFederationDatabasesRequest(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ListFederationDatabasesResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListFederationDatabasesResult(_message.Message): + __slots__ = ["control_plane_endpoint", "federation_databases", "self_location"] + CONTROL_PLANE_ENDPOINT_FIELD_NUMBER: _ClassVar[int] + FEDERATION_DATABASES_FIELD_NUMBER: _ClassVar[int] + SELF_LOCATION_FIELD_NUMBER: _ClassVar[int] + control_plane_endpoint: str + federation_databases: _containers.RepeatedCompositeFieldContainer[DatabaseInfo] + self_location: str + def __init__(self, control_plane_endpoint: _Optional[str] = ..., federation_databases: _Optional[_Iterable[_Union[DatabaseInfo, _Mapping]]] = ..., self_location: _Optional[str] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_federation_discovery_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_federation_discovery_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_federation_discovery_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_formats_pb2.py b/ydb/_grpc/v5/protos/ydb_formats_pb2.py new file mode 100644 index 00000000..3a58d2be --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_formats_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_formats.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18protos/ydb_formats.proto\x12\x0bYdb.Formats\"$\n\x12\x41rrowBatchSettings\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\"\xda\x01\n\x0b\x43svSettings\x12\x11\n\tskip_rows\x18\x01 \x01(\r\x12\x11\n\tdelimiter\x18\x02 \x01(\x0c\x12\x12\n\nnull_value\x18\x03 \x01(\x0c\x12\x0e\n\x06header\x18\x04 \x01(\x08\x12\x31\n\x07quoting\x18\x05 \x01(\x0b\x32 .Ydb.Formats.CsvSettings.Quoting\x1aN\n\x07Quoting\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12\x12\n\nquote_char\x18\x02 \x01(\x0c\x12\x1d\n\x15\x64ouble_quote_disabled\x18\x03 \x01(\x08\x42W\n\x16tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_formats_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\026tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\370\001\001' + _ARROWBATCHSETTINGS._serialized_start=41 + _ARROWBATCHSETTINGS._serialized_end=77 + _CSVSETTINGS._serialized_start=80 + _CSVSETTINGS._serialized_end=298 + _CSVSETTINGS_QUOTING._serialized_start=220 + _CSVSETTINGS_QUOTING._serialized_end=298 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_formats_pb2.pyi b/ydb/_grpc/v5/protos/ydb_formats_pb2.pyi new file mode 100644 index 00000000..38682d14 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_formats_pb2.pyi @@ -0,0 +1,34 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ArrowBatchSettings(_message.Message): + __slots__ = ["schema"] + SCHEMA_FIELD_NUMBER: _ClassVar[int] + schema: bytes + def __init__(self, schema: _Optional[bytes] = ...) -> None: ... + +class CsvSettings(_message.Message): + __slots__ = ["delimiter", "header", "null_value", "quoting", "skip_rows"] + class Quoting(_message.Message): + __slots__ = ["disabled", "double_quote_disabled", "quote_char"] + DISABLED_FIELD_NUMBER: _ClassVar[int] + DOUBLE_QUOTE_DISABLED_FIELD_NUMBER: _ClassVar[int] + QUOTE_CHAR_FIELD_NUMBER: _ClassVar[int] + disabled: bool + double_quote_disabled: bool + quote_char: bytes + def __init__(self, disabled: bool = ..., quote_char: _Optional[bytes] = ..., double_quote_disabled: bool = ...) -> None: ... + DELIMITER_FIELD_NUMBER: _ClassVar[int] + HEADER_FIELD_NUMBER: _ClassVar[int] + NULL_VALUE_FIELD_NUMBER: _ClassVar[int] + QUOTING_FIELD_NUMBER: _ClassVar[int] + SKIP_ROWS_FIELD_NUMBER: _ClassVar[int] + delimiter: bytes + header: bool + null_value: bytes + quoting: CsvSettings.Quoting + skip_rows: int + def __init__(self, skip_rows: _Optional[int] = ..., delimiter: _Optional[bytes] = ..., null_value: _Optional[bytes] = ..., header: bool = ..., quoting: _Optional[_Union[CsvSettings.Quoting, _Mapping]] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_formats_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_formats_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_formats_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_import_pb2.py b/ydb/_grpc/v5/protos/ydb_import_pb2.py new file mode 100644 index 00000000..736e7ef5 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_import_pb2.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_import.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_import.proto\x12\nYdb.Import\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcd\x01\n\x0eImportProgress\"\xba\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x1a\n\x16PROGRESS_BUILD_INDEXES\x10\x03\x12\x11\n\rPROGRESS_DONE\x10\x04\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x05\x12\x16\n\x12PROGRESS_CANCELLED\x10\x06\"\xa0\x01\n\x12ImportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd1\x03\n\x14ImportFromS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x37\n\x06scheme\x18\x02 \x01(\x0e\x32\'.Ydb.Import.ImportFromS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12<\n\x05items\x18\x06 \x03(\x0b\x32%.Ydb.Import.ImportFromS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x0e\n\x06region\x18\t \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\n \x01(\x08\x1a\x43\n\x04Item\x12\x1b\n\rsource_prefix\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\x14\n\x12ImportFromS3Result\"\xb9\x01\n\x14ImportFromS3Metadata\x12\x32\n\x08settings\x18\x01 \x01(\x0b\x32 .Ydb.Import.ImportFromS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Import.ImportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Import.ImportItemProgress\"\x8a\x01\n\x13ImportFromS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x38\n\x08settings\x18\x02 \x01(\x0b\x32 .Ydb.Import.ImportFromS3SettingsB\x04\x90\xe6*\x01\"D\n\x14ImportFromS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\" \n\rYdbDumpFormat\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\"\x12\n\x10ImportDataResult\"\xae\x01\n\x11ImportDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x17\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x42\t\xa2\xe6*\x05\x18\x80\x80\x80\x04\x12-\n\x08ydb_dump\x18\x04 \x01(\x0b\x32\x19.Ydb.Import.YdbDumpFormatH\x00\x42\x08\n\x06\x66ormat\"B\n\x12ImportDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBV\n\x16tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_import_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\026tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\370\001\001' + _IMPORTFROMS3SETTINGS_ITEM.fields_by_name['source_prefix']._options = None + _IMPORTFROMS3SETTINGS_ITEM.fields_by_name['source_prefix']._serialized_options = b'\220\346*\001' + _IMPORTFROMS3SETTINGS_ITEM.fields_by_name['destination_path']._options = None + _IMPORTFROMS3SETTINGS_ITEM.fields_by_name['destination_path']._serialized_options = b'\220\346*\001' + _IMPORTFROMS3SETTINGS.fields_by_name['endpoint']._options = None + _IMPORTFROMS3SETTINGS.fields_by_name['endpoint']._serialized_options = b'\220\346*\001' + _IMPORTFROMS3SETTINGS.fields_by_name['bucket']._options = None + _IMPORTFROMS3SETTINGS.fields_by_name['bucket']._serialized_options = b'\220\346*\001' + _IMPORTFROMS3SETTINGS.fields_by_name['access_key']._options = None + _IMPORTFROMS3SETTINGS.fields_by_name['access_key']._serialized_options = b'\220\346*\001' + _IMPORTFROMS3SETTINGS.fields_by_name['secret_key']._options = None + _IMPORTFROMS3SETTINGS.fields_by_name['secret_key']._serialized_options = b'\220\346*\001' + _IMPORTFROMS3SETTINGS.fields_by_name['items']._options = None + _IMPORTFROMS3SETTINGS.fields_by_name['items']._serialized_options = b'\232\346*\002(\001' + _IMPORTFROMS3SETTINGS.fields_by_name['description']._options = None + _IMPORTFROMS3SETTINGS.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200\001' + _IMPORTFROMS3REQUEST.fields_by_name['settings']._options = None + _IMPORTFROMS3REQUEST.fields_by_name['settings']._serialized_options = b'\220\346*\001' + _IMPORTDATAREQUEST.fields_by_name['data']._options = None + _IMPORTDATAREQUEST.fields_by_name['data']._serialized_options = b'\242\346*\005\030\200\200\200\004' + _IMPORTPROGRESS._serialized_start=138 + _IMPORTPROGRESS._serialized_end=343 + _IMPORTPROGRESS_PROGRESS._serialized_start=157 + _IMPORTPROGRESS_PROGRESS._serialized_end=343 + _IMPORTITEMPROGRESS._serialized_start=346 + _IMPORTITEMPROGRESS._serialized_end=506 + _IMPORTFROMS3SETTINGS._serialized_start=509 + _IMPORTFROMS3SETTINGS._serialized_end=974 + _IMPORTFROMS3SETTINGS_ITEM._serialized_start=859 + _IMPORTFROMS3SETTINGS_ITEM._serialized_end=926 + _IMPORTFROMS3SETTINGS_SCHEME._serialized_start=928 + _IMPORTFROMS3SETTINGS_SCHEME._serialized_end=974 + _IMPORTFROMS3RESULT._serialized_start=976 + _IMPORTFROMS3RESULT._serialized_end=996 + _IMPORTFROMS3METADATA._serialized_start=999 + _IMPORTFROMS3METADATA._serialized_end=1184 + _IMPORTFROMS3REQUEST._serialized_start=1187 + _IMPORTFROMS3REQUEST._serialized_end=1325 + _IMPORTFROMS3RESPONSE._serialized_start=1327 + _IMPORTFROMS3RESPONSE._serialized_end=1395 + _YDBDUMPFORMAT._serialized_start=1397 + _YDBDUMPFORMAT._serialized_end=1429 + _IMPORTDATARESULT._serialized_start=1431 + _IMPORTDATARESULT._serialized_end=1449 + _IMPORTDATAREQUEST._serialized_start=1452 + _IMPORTDATAREQUEST._serialized_end=1626 + _IMPORTDATARESPONSE._serialized_start=1628 + _IMPORTDATARESPONSE._serialized_end=1694 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_import_pb2.pyi b/ydb/_grpc/v5/protos/ydb_import_pb2.pyi new file mode 100644 index 00000000..d3b394ab --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_import_pb2.pyi @@ -0,0 +1,127 @@ +from protos.annotations import validation_pb2 as _validation_pb2 +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ImportDataRequest(_message.Message): + __slots__ = ["data", "operation_params", "path", "ydb_dump"] + DATA_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + YDB_DUMP_FIELD_NUMBER: _ClassVar[int] + data: bytes + operation_params: _ydb_operation_pb2.OperationParams + path: str + ydb_dump: YdbDumpFormat + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., data: _Optional[bytes] = ..., ydb_dump: _Optional[_Union[YdbDumpFormat, _Mapping]] = ...) -> None: ... + +class ImportDataResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ImportDataResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ImportFromS3Metadata(_message.Message): + __slots__ = ["items_progress", "progress", "settings"] + ITEMS_PROGRESS_FIELD_NUMBER: _ClassVar[int] + PROGRESS_FIELD_NUMBER: _ClassVar[int] + SETTINGS_FIELD_NUMBER: _ClassVar[int] + items_progress: _containers.RepeatedCompositeFieldContainer[ImportItemProgress] + progress: ImportProgress.Progress + settings: ImportFromS3Settings + def __init__(self, settings: _Optional[_Union[ImportFromS3Settings, _Mapping]] = ..., progress: _Optional[_Union[ImportProgress.Progress, str]] = ..., items_progress: _Optional[_Iterable[_Union[ImportItemProgress, _Mapping]]] = ...) -> None: ... + +class ImportFromS3Request(_message.Message): + __slots__ = ["operation_params", "settings"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SETTINGS_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + settings: ImportFromS3Settings + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., settings: _Optional[_Union[ImportFromS3Settings, _Mapping]] = ...) -> None: ... + +class ImportFromS3Response(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ImportFromS3Result(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ImportFromS3Settings(_message.Message): + __slots__ = ["access_key", "bucket", "description", "disable_virtual_addressing", "endpoint", "items", "number_of_retries", "region", "scheme", "secret_key"] + class Scheme(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Item(_message.Message): + __slots__ = ["destination_path", "source_prefix"] + DESTINATION_PATH_FIELD_NUMBER: _ClassVar[int] + SOURCE_PREFIX_FIELD_NUMBER: _ClassVar[int] + destination_path: str + source_prefix: str + def __init__(self, source_prefix: _Optional[str] = ..., destination_path: _Optional[str] = ...) -> None: ... + ACCESS_KEY_FIELD_NUMBER: _ClassVar[int] + BUCKET_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + DISABLE_VIRTUAL_ADDRESSING_FIELD_NUMBER: _ClassVar[int] + ENDPOINT_FIELD_NUMBER: _ClassVar[int] + HTTP: ImportFromS3Settings.Scheme + HTTPS: ImportFromS3Settings.Scheme + ITEMS_FIELD_NUMBER: _ClassVar[int] + NUMBER_OF_RETRIES_FIELD_NUMBER: _ClassVar[int] + REGION_FIELD_NUMBER: _ClassVar[int] + SCHEME_FIELD_NUMBER: _ClassVar[int] + SECRET_KEY_FIELD_NUMBER: _ClassVar[int] + UNSPECIFIED: ImportFromS3Settings.Scheme + access_key: str + bucket: str + description: str + disable_virtual_addressing: bool + endpoint: str + items: _containers.RepeatedCompositeFieldContainer[ImportFromS3Settings.Item] + number_of_retries: int + region: str + scheme: ImportFromS3Settings.Scheme + secret_key: str + def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ImportFromS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ImportFromS3Settings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., region: _Optional[str] = ..., disable_virtual_addressing: bool = ...) -> None: ... + +class ImportItemProgress(_message.Message): + __slots__ = ["end_time", "parts_completed", "parts_total", "start_time"] + END_TIME_FIELD_NUMBER: _ClassVar[int] + PARTS_COMPLETED_FIELD_NUMBER: _ClassVar[int] + PARTS_TOTAL_FIELD_NUMBER: _ClassVar[int] + START_TIME_FIELD_NUMBER: _ClassVar[int] + end_time: _timestamp_pb2.Timestamp + parts_completed: int + parts_total: int + start_time: _timestamp_pb2.Timestamp + def __init__(self, parts_total: _Optional[int] = ..., parts_completed: _Optional[int] = ..., start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class ImportProgress(_message.Message): + __slots__ = [] + class Progress(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + PROGRESS_BUILD_INDEXES: ImportProgress.Progress + PROGRESS_CANCELLATION: ImportProgress.Progress + PROGRESS_CANCELLED: ImportProgress.Progress + PROGRESS_DONE: ImportProgress.Progress + PROGRESS_PREPARING: ImportProgress.Progress + PROGRESS_TRANSFER_DATA: ImportProgress.Progress + PROGRESS_UNSPECIFIED: ImportProgress.Progress + def __init__(self) -> None: ... + +class YdbDumpFormat(_message.Message): + __slots__ = ["columns"] + COLUMNS_FIELD_NUMBER: _ClassVar[int] + columns: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, columns: _Optional[_Iterable[str]] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_import_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_import_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_import_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_issue_message_pb2.py b/ydb/_grpc/v5/protos/ydb_issue_message_pb2.py new file mode 100644 index 00000000..17d967c2 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_issue_message_pb2.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_issue_message.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eprotos/ydb_issue_message.proto\x12\tYdb.Issue\"\x91\x02\n\x0cIssueMessage\x12\x32\n\x08position\x18\x01 \x01(\x0b\x32 .Ydb.Issue.IssueMessage.Position\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x36\n\x0c\x65nd_position\x18\x03 \x01(\x0b\x32 .Ydb.Issue.IssueMessage.Position\x12\x12\n\nissue_code\x18\x04 \x01(\r\x12\x10\n\x08severity\x18\x05 \x01(\r\x12\'\n\x06issues\x18\x06 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x1a\x35\n\x08Position\x12\x0b\n\x03row\x18\x01 \x01(\r\x12\x0e\n\x06\x63olumn\x18\x02 \x01(\r\x12\x0c\n\x04\x66ile\x18\x03 \x01(\tBM\n\x0etech.ydb.protoZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Issue\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_issue_message_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\016tech.ydb.protoZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Issue\370\001\001' + _ISSUEMESSAGE._serialized_start=46 + _ISSUEMESSAGE._serialized_end=319 + _ISSUEMESSAGE_POSITION._serialized_start=266 + _ISSUEMESSAGE_POSITION._serialized_end=319 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_issue_message_pb2.pyi b/ydb/_grpc/v5/protos/ydb_issue_message_pb2.pyi new file mode 100644 index 00000000..fc6c476e --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_issue_message_pb2.pyi @@ -0,0 +1,31 @@ +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class IssueMessage(_message.Message): + __slots__ = ["end_position", "issue_code", "issues", "message", "position", "severity"] + class Position(_message.Message): + __slots__ = ["column", "file", "row"] + COLUMN_FIELD_NUMBER: _ClassVar[int] + FILE_FIELD_NUMBER: _ClassVar[int] + ROW_FIELD_NUMBER: _ClassVar[int] + column: int + file: str + row: int + def __init__(self, row: _Optional[int] = ..., column: _Optional[int] = ..., file: _Optional[str] = ...) -> None: ... + END_POSITION_FIELD_NUMBER: _ClassVar[int] + ISSUES_FIELD_NUMBER: _ClassVar[int] + ISSUE_CODE_FIELD_NUMBER: _ClassVar[int] + MESSAGE_FIELD_NUMBER: _ClassVar[int] + POSITION_FIELD_NUMBER: _ClassVar[int] + SEVERITY_FIELD_NUMBER: _ClassVar[int] + end_position: IssueMessage.Position + issue_code: int + issues: _containers.RepeatedCompositeFieldContainer[IssueMessage] + message: str + position: IssueMessage.Position + severity: int + def __init__(self, position: _Optional[_Union[IssueMessage.Position, _Mapping]] = ..., message: _Optional[str] = ..., end_position: _Optional[_Union[IssueMessage.Position, _Mapping]] = ..., issue_code: _Optional[int] = ..., severity: _Optional[int] = ..., issues: _Optional[_Iterable[_Union[IssueMessage, _Mapping]]] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_issue_message_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_issue_message_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_issue_message_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_monitoring_pb2.py b/ydb/_grpc/v5/protos/ydb_monitoring_pb2.py new file mode 100644 index 00000000..915d60a3 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_monitoring_pb2.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_monitoring.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bprotos/ydb_monitoring.proto\x12\x0eYdb.Monitoring\x1a\x1aprotos/ydb_operation.proto\"g\n\nStatusFlag\"Y\n\x06Status\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04GREY\x10\x01\x12\t\n\x05GREEN\x10\x02\x12\x08\n\x04\x42LUE\x10\x03\x12\n\n\x06YELLOW\x10\x04\x12\n\n\x06ORANGE\x10\x05\x12\x07\n\x03RED\x10\x06\"\xbe\x01\n\x10SelfCheckRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x15return_verbose_status\x18\x02 \x01(\x08\x12\x39\n\x0eminimum_status\x18\x03 \x01(\x0e\x32!.Ydb.Monitoring.StatusFlag.Status\x12\x15\n\rmaximum_level\x18\x04 \x01(\r\"A\n\x11SelfCheckResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"M\n\x10NodeCheckRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"A\n\x11NodeCheckResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"g\n\tSelfCheck\"Z\n\x06Result\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04GOOD\x10\x01\x12\x0c\n\x08\x44\x45GRADED\x10\x02\x12\x18\n\x14MAINTENANCE_REQUIRED\x10\x03\x12\r\n\tEMERGENCY\x10\x04\"T\n\x12StoragePDiskStatus\x12\n\n\x02id\x18\x01 \x01(\t\x12\x32\n\x07overall\x18\x02 \x01(\x0e\x32!.Ydb.Monitoring.StatusFlag.Status\"\xc0\x01\n\x12StorageVDiskStatus\x12\n\n\x02id\x18\x01 \x01(\t\x12\x32\n\x07overall\x18\x02 \x01(\x0e\x32!.Ydb.Monitoring.StatusFlag.Status\x12\x37\n\x0cvdisk_status\x18\x03 \x01(\x0e\x32!.Ydb.Monitoring.StatusFlag.Status\x12\x31\n\x05pdisk\x18\x04 \x01(\x0b\x32\".Ydb.Monitoring.StoragePDiskStatus\"\x88\x01\n\x12StorageGroupStatus\x12\n\n\x02id\x18\x01 \x01(\t\x12\x32\n\x07overall\x18\x02 \x01(\x0e\x32!.Ydb.Monitoring.StatusFlag.Status\x12\x32\n\x06vdisks\x18\x03 \x03(\x0b\x32\".Ydb.Monitoring.StorageVDiskStatus\"\x87\x01\n\x11StoragePoolStatus\x12\n\n\x02id\x18\x01 \x01(\t\x12\x32\n\x07overall\x18\x02 \x01(\x0e\x32!.Ydb.Monitoring.StatusFlag.Status\x12\x32\n\x06groups\x18\x03 \x03(\x0b\x32\".Ydb.Monitoring.StorageGroupStatus\"u\n\rStorageStatus\x12\x32\n\x07overall\x18\x01 \x01(\x0e\x32!.Ydb.Monitoring.StatusFlag.Status\x12\x30\n\x05pools\x18\x02 \x03(\x0b\x32!.Ydb.Monitoring.StoragePoolStatus\"\x81\x01\n\x13\x43omputeTabletStatus\x12\x32\n\x07overall\x18\x01 \x01(\x0e\x32!.Ydb.Monitoring.StatusFlag.Status\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\r\n\x05state\x18\x03 \x01(\t\x12\r\n\x05\x63ount\x18\x04 \x01(\r\x12\n\n\x02id\x18\x05 \x03(\t\"c\n\x10ThreadPoolStatus\x12\x32\n\x07overall\x18\x01 \x01(\x0e\x32!.Ydb.Monitoring.StatusFlag.Status\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\r\n\x05usage\x18\x03 \x01(\x02\"d\n\x11LoadAverageStatus\x12\x32\n\x07overall\x18\x01 \x01(\x0e\x32!.Ydb.Monitoring.StatusFlag.Status\x12\x0c\n\x04load\x18\x02 \x01(\x02\x12\r\n\x05\x63ores\x18\x03 \x01(\r\"\xeb\x01\n\x11\x43omputeNodeStatus\x12\n\n\x02id\x18\x01 \x01(\t\x12\x32\n\x07overall\x18\x02 \x01(\x0e\x32!.Ydb.Monitoring.StatusFlag.Status\x12\x34\n\x07tablets\x18\x03 \x03(\x0b\x32#.Ydb.Monitoring.ComputeTabletStatus\x12/\n\x05pools\x18\x04 \x03(\x0b\x32 .Ydb.Monitoring.ThreadPoolStatus\x12/\n\x04load\x18\x05 \x01(\x0b\x32!.Ydb.Monitoring.LoadAverageStatus\"\xab\x01\n\rComputeStatus\x12\x32\n\x07overall\x18\x01 \x01(\x0e\x32!.Ydb.Monitoring.StatusFlag.Status\x12\x30\n\x05nodes\x18\x02 \x03(\x0b\x32!.Ydb.Monitoring.ComputeNodeStatus\x12\x34\n\x07tablets\x18\x03 \x03(\x0b\x32#.Ydb.Monitoring.ComputeTabletStatus\"6\n\x0cLocationNode\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\r\"0\n\x14LocationStoragePDisk\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\"W\n\x14LocationStorageVDisk\x12\n\n\x02id\x18\x01 \x03(\t\x12\x33\n\x05pdisk\x18\x02 \x03(\x0b\x32$.Ydb.Monitoring.LocationStoragePDisk\"W\n\x14LocationStorageGroup\x12\n\n\x02id\x18\x01 \x03(\t\x12\x33\n\x05vdisk\x18\x02 \x01(\x0b\x32$.Ydb.Monitoring.LocationStorageVDisk\"X\n\x13LocationStoragePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x33\n\x05group\x18\x02 \x01(\x0b\x32$.Ydb.Monitoring.LocationStorageGroup\"p\n\x0fLocationStorage\x12*\n\x04node\x18\x01 \x01(\x0b\x32\x1c.Ydb.Monitoring.LocationNode\x12\x31\n\x04pool\x18\x02 \x01(\x0b\x32#.Ydb.Monitoring.LocationStoragePool\"#\n\x13LocationComputePool\x12\x0c\n\x04name\x18\x01 \x01(\t\"@\n\x15LocationComputeTablet\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x03(\t\x12\r\n\x05\x63ount\x18\x03 \x01(\r\"\xa7\x01\n\x0fLocationCompute\x12*\n\x04node\x18\x01 \x01(\x0b\x32\x1c.Ydb.Monitoring.LocationNode\x12\x31\n\x04pool\x18\x02 \x01(\x0b\x32#.Ydb.Monitoring.LocationComputePool\x12\x35\n\x06tablet\x18\x03 \x01(\x0b\x32%.Ydb.Monitoring.LocationComputeTablet\" \n\x10LocationDatabase\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xa2\x01\n\x08Location\x12\x30\n\x07storage\x18\x01 \x01(\x0b\x32\x1f.Ydb.Monitoring.LocationStorage\x12\x30\n\x07\x63ompute\x18\x02 \x01(\x0b\x32\x1f.Ydb.Monitoring.LocationCompute\x12\x32\n\x08\x64\x61tabase\x18\x03 \x01(\x0b\x32 .Ydb.Monitoring.LocationDatabase\"\xd2\x01\n\x08IssueLog\x12\n\n\x02id\x18\x01 \x01(\t\x12\x31\n\x06status\x18\x02 \x01(\x0e\x32!.Ydb.Monitoring.StatusFlag.Status\x12\x0f\n\x07message\x18\x03 \x01(\t\x12*\n\x08location\x18\x04 \x01(\x0b\x32\x18.Ydb.Monitoring.Location\x12\x0e\n\x06reason\x18\x05 \x03(\t\x12\x0c\n\x04type\x18\x06 \x01(\t\x12\r\n\x05level\x18\x07 \x01(\r\x12\x0e\n\x06listed\x18\x08 \x01(\r\x12\r\n\x05\x63ount\x18\t \x01(\r\"\xb2\x01\n\x0e\x44\x61tabaseStatus\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x07overall\x18\x02 \x01(\x0e\x32!.Ydb.Monitoring.StatusFlag.Status\x12.\n\x07storage\x18\x03 \x01(\x0b\x32\x1d.Ydb.Monitoring.StorageStatus\x12.\n\x07\x63ompute\x18\x04 \x01(\x0b\x32\x1d.Ydb.Monitoring.ComputeStatus\"\xb4\x01\n\x0fSelfCheckResult\x12;\n\x11self_check_result\x18\x01 \x01(\x0e\x32 .Ydb.Monitoring.SelfCheck.Result\x12+\n\tissue_log\x18\x02 \x03(\x0b\x32\x18.Ydb.Monitoring.IssueLog\x12\x37\n\x0f\x64\x61tabase_status\x18\x03 \x03(\x0b\x32\x1e.Ydb.Monitoring.DatabaseStatusBo\n\x19tech.ydb.proto.monitoringB\x10MonitoringProtosZ=github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Monitoring\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_monitoring_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\031tech.ydb.proto.monitoringB\020MonitoringProtosZ=github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Monitoring\370\001\001' + _STATUSFLAG._serialized_start=75 + _STATUSFLAG._serialized_end=178 + _STATUSFLAG_STATUS._serialized_start=89 + _STATUSFLAG_STATUS._serialized_end=178 + _SELFCHECKREQUEST._serialized_start=181 + _SELFCHECKREQUEST._serialized_end=371 + _SELFCHECKRESPONSE._serialized_start=373 + _SELFCHECKRESPONSE._serialized_end=438 + _NODECHECKREQUEST._serialized_start=440 + _NODECHECKREQUEST._serialized_end=517 + _NODECHECKRESPONSE._serialized_start=519 + _NODECHECKRESPONSE._serialized_end=584 + _SELFCHECK._serialized_start=586 + _SELFCHECK._serialized_end=689 + _SELFCHECK_RESULT._serialized_start=599 + _SELFCHECK_RESULT._serialized_end=689 + _STORAGEPDISKSTATUS._serialized_start=691 + _STORAGEPDISKSTATUS._serialized_end=775 + _STORAGEVDISKSTATUS._serialized_start=778 + _STORAGEVDISKSTATUS._serialized_end=970 + _STORAGEGROUPSTATUS._serialized_start=973 + _STORAGEGROUPSTATUS._serialized_end=1109 + _STORAGEPOOLSTATUS._serialized_start=1112 + _STORAGEPOOLSTATUS._serialized_end=1247 + _STORAGESTATUS._serialized_start=1249 + _STORAGESTATUS._serialized_end=1366 + _COMPUTETABLETSTATUS._serialized_start=1369 + _COMPUTETABLETSTATUS._serialized_end=1498 + _THREADPOOLSTATUS._serialized_start=1500 + _THREADPOOLSTATUS._serialized_end=1599 + _LOADAVERAGESTATUS._serialized_start=1601 + _LOADAVERAGESTATUS._serialized_end=1701 + _COMPUTENODESTATUS._serialized_start=1704 + _COMPUTENODESTATUS._serialized_end=1939 + _COMPUTESTATUS._serialized_start=1942 + _COMPUTESTATUS._serialized_end=2113 + _LOCATIONNODE._serialized_start=2115 + _LOCATIONNODE._serialized_end=2169 + _LOCATIONSTORAGEPDISK._serialized_start=2171 + _LOCATIONSTORAGEPDISK._serialized_end=2219 + _LOCATIONSTORAGEVDISK._serialized_start=2221 + _LOCATIONSTORAGEVDISK._serialized_end=2308 + _LOCATIONSTORAGEGROUP._serialized_start=2310 + _LOCATIONSTORAGEGROUP._serialized_end=2397 + _LOCATIONSTORAGEPOOL._serialized_start=2399 + _LOCATIONSTORAGEPOOL._serialized_end=2487 + _LOCATIONSTORAGE._serialized_start=2489 + _LOCATIONSTORAGE._serialized_end=2601 + _LOCATIONCOMPUTEPOOL._serialized_start=2603 + _LOCATIONCOMPUTEPOOL._serialized_end=2638 + _LOCATIONCOMPUTETABLET._serialized_start=2640 + _LOCATIONCOMPUTETABLET._serialized_end=2704 + _LOCATIONCOMPUTE._serialized_start=2707 + _LOCATIONCOMPUTE._serialized_end=2874 + _LOCATIONDATABASE._serialized_start=2876 + _LOCATIONDATABASE._serialized_end=2908 + _LOCATION._serialized_start=2911 + _LOCATION._serialized_end=3073 + _ISSUELOG._serialized_start=3076 + _ISSUELOG._serialized_end=3286 + _DATABASESTATUS._serialized_start=3289 + _DATABASESTATUS._serialized_end=3467 + _SELFCHECKRESULT._serialized_start=3470 + _SELFCHECKRESULT._serialized_end=3650 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_monitoring_pb2.pyi b/ydb/_grpc/v5/protos/ydb_monitoring_pb2.pyi new file mode 100644 index 00000000..01ccd0b9 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_monitoring_pb2.pyi @@ -0,0 +1,304 @@ +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ComputeNodeStatus(_message.Message): + __slots__ = ["id", "load", "overall", "pools", "tablets"] + ID_FIELD_NUMBER: _ClassVar[int] + LOAD_FIELD_NUMBER: _ClassVar[int] + OVERALL_FIELD_NUMBER: _ClassVar[int] + POOLS_FIELD_NUMBER: _ClassVar[int] + TABLETS_FIELD_NUMBER: _ClassVar[int] + id: str + load: LoadAverageStatus + overall: StatusFlag.Status + pools: _containers.RepeatedCompositeFieldContainer[ThreadPoolStatus] + tablets: _containers.RepeatedCompositeFieldContainer[ComputeTabletStatus] + def __init__(self, id: _Optional[str] = ..., overall: _Optional[_Union[StatusFlag.Status, str]] = ..., tablets: _Optional[_Iterable[_Union[ComputeTabletStatus, _Mapping]]] = ..., pools: _Optional[_Iterable[_Union[ThreadPoolStatus, _Mapping]]] = ..., load: _Optional[_Union[LoadAverageStatus, _Mapping]] = ...) -> None: ... + +class ComputeStatus(_message.Message): + __slots__ = ["nodes", "overall", "tablets"] + NODES_FIELD_NUMBER: _ClassVar[int] + OVERALL_FIELD_NUMBER: _ClassVar[int] + TABLETS_FIELD_NUMBER: _ClassVar[int] + nodes: _containers.RepeatedCompositeFieldContainer[ComputeNodeStatus] + overall: StatusFlag.Status + tablets: _containers.RepeatedCompositeFieldContainer[ComputeTabletStatus] + def __init__(self, overall: _Optional[_Union[StatusFlag.Status, str]] = ..., nodes: _Optional[_Iterable[_Union[ComputeNodeStatus, _Mapping]]] = ..., tablets: _Optional[_Iterable[_Union[ComputeTabletStatus, _Mapping]]] = ...) -> None: ... + +class ComputeTabletStatus(_message.Message): + __slots__ = ["count", "id", "overall", "state", "type"] + COUNT_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + OVERALL_FIELD_NUMBER: _ClassVar[int] + STATE_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + count: int + id: _containers.RepeatedScalarFieldContainer[str] + overall: StatusFlag.Status + state: str + type: str + def __init__(self, overall: _Optional[_Union[StatusFlag.Status, str]] = ..., type: _Optional[str] = ..., state: _Optional[str] = ..., count: _Optional[int] = ..., id: _Optional[_Iterable[str]] = ...) -> None: ... + +class DatabaseStatus(_message.Message): + __slots__ = ["compute", "name", "overall", "storage"] + COMPUTE_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + OVERALL_FIELD_NUMBER: _ClassVar[int] + STORAGE_FIELD_NUMBER: _ClassVar[int] + compute: ComputeStatus + name: str + overall: StatusFlag.Status + storage: StorageStatus + def __init__(self, name: _Optional[str] = ..., overall: _Optional[_Union[StatusFlag.Status, str]] = ..., storage: _Optional[_Union[StorageStatus, _Mapping]] = ..., compute: _Optional[_Union[ComputeStatus, _Mapping]] = ...) -> None: ... + +class IssueLog(_message.Message): + __slots__ = ["count", "id", "level", "listed", "location", "message", "reason", "status", "type"] + COUNT_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + LEVEL_FIELD_NUMBER: _ClassVar[int] + LISTED_FIELD_NUMBER: _ClassVar[int] + LOCATION_FIELD_NUMBER: _ClassVar[int] + MESSAGE_FIELD_NUMBER: _ClassVar[int] + REASON_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + count: int + id: str + level: int + listed: int + location: Location + message: str + reason: _containers.RepeatedScalarFieldContainer[str] + status: StatusFlag.Status + type: str + def __init__(self, id: _Optional[str] = ..., status: _Optional[_Union[StatusFlag.Status, str]] = ..., message: _Optional[str] = ..., location: _Optional[_Union[Location, _Mapping]] = ..., reason: _Optional[_Iterable[str]] = ..., type: _Optional[str] = ..., level: _Optional[int] = ..., listed: _Optional[int] = ..., count: _Optional[int] = ...) -> None: ... + +class LoadAverageStatus(_message.Message): + __slots__ = ["cores", "load", "overall"] + CORES_FIELD_NUMBER: _ClassVar[int] + LOAD_FIELD_NUMBER: _ClassVar[int] + OVERALL_FIELD_NUMBER: _ClassVar[int] + cores: int + load: float + overall: StatusFlag.Status + def __init__(self, overall: _Optional[_Union[StatusFlag.Status, str]] = ..., load: _Optional[float] = ..., cores: _Optional[int] = ...) -> None: ... + +class Location(_message.Message): + __slots__ = ["compute", "database", "storage"] + COMPUTE_FIELD_NUMBER: _ClassVar[int] + DATABASE_FIELD_NUMBER: _ClassVar[int] + STORAGE_FIELD_NUMBER: _ClassVar[int] + compute: LocationCompute + database: LocationDatabase + storage: LocationStorage + def __init__(self, storage: _Optional[_Union[LocationStorage, _Mapping]] = ..., compute: _Optional[_Union[LocationCompute, _Mapping]] = ..., database: _Optional[_Union[LocationDatabase, _Mapping]] = ...) -> None: ... + +class LocationCompute(_message.Message): + __slots__ = ["node", "pool", "tablet"] + NODE_FIELD_NUMBER: _ClassVar[int] + POOL_FIELD_NUMBER: _ClassVar[int] + TABLET_FIELD_NUMBER: _ClassVar[int] + node: LocationNode + pool: LocationComputePool + tablet: LocationComputeTablet + def __init__(self, node: _Optional[_Union[LocationNode, _Mapping]] = ..., pool: _Optional[_Union[LocationComputePool, _Mapping]] = ..., tablet: _Optional[_Union[LocationComputeTablet, _Mapping]] = ...) -> None: ... + +class LocationComputePool(_message.Message): + __slots__ = ["name"] + NAME_FIELD_NUMBER: _ClassVar[int] + name: str + def __init__(self, name: _Optional[str] = ...) -> None: ... + +class LocationComputeTablet(_message.Message): + __slots__ = ["count", "id", "type"] + COUNT_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + count: int + id: _containers.RepeatedScalarFieldContainer[str] + type: str + def __init__(self, type: _Optional[str] = ..., id: _Optional[_Iterable[str]] = ..., count: _Optional[int] = ...) -> None: ... + +class LocationDatabase(_message.Message): + __slots__ = ["name"] + NAME_FIELD_NUMBER: _ClassVar[int] + name: str + def __init__(self, name: _Optional[str] = ...) -> None: ... + +class LocationNode(_message.Message): + __slots__ = ["host", "id", "port"] + HOST_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + host: str + id: int + port: int + def __init__(self, id: _Optional[int] = ..., host: _Optional[str] = ..., port: _Optional[int] = ...) -> None: ... + +class LocationStorage(_message.Message): + __slots__ = ["node", "pool"] + NODE_FIELD_NUMBER: _ClassVar[int] + POOL_FIELD_NUMBER: _ClassVar[int] + node: LocationNode + pool: LocationStoragePool + def __init__(self, node: _Optional[_Union[LocationNode, _Mapping]] = ..., pool: _Optional[_Union[LocationStoragePool, _Mapping]] = ...) -> None: ... + +class LocationStorageGroup(_message.Message): + __slots__ = ["id", "vdisk"] + ID_FIELD_NUMBER: _ClassVar[int] + VDISK_FIELD_NUMBER: _ClassVar[int] + id: _containers.RepeatedScalarFieldContainer[str] + vdisk: LocationStorageVDisk + def __init__(self, id: _Optional[_Iterable[str]] = ..., vdisk: _Optional[_Union[LocationStorageVDisk, _Mapping]] = ...) -> None: ... + +class LocationStoragePDisk(_message.Message): + __slots__ = ["id", "path"] + ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + id: str + path: str + def __init__(self, id: _Optional[str] = ..., path: _Optional[str] = ...) -> None: ... + +class LocationStoragePool(_message.Message): + __slots__ = ["group", "name"] + GROUP_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + group: LocationStorageGroup + name: str + def __init__(self, name: _Optional[str] = ..., group: _Optional[_Union[LocationStorageGroup, _Mapping]] = ...) -> None: ... + +class LocationStorageVDisk(_message.Message): + __slots__ = ["id", "pdisk"] + ID_FIELD_NUMBER: _ClassVar[int] + PDISK_FIELD_NUMBER: _ClassVar[int] + id: _containers.RepeatedScalarFieldContainer[str] + pdisk: _containers.RepeatedCompositeFieldContainer[LocationStoragePDisk] + def __init__(self, id: _Optional[_Iterable[str]] = ..., pdisk: _Optional[_Iterable[_Union[LocationStoragePDisk, _Mapping]]] = ...) -> None: ... + +class NodeCheckRequest(_message.Message): + __slots__ = ["operation_params"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class NodeCheckResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class SelfCheck(_message.Message): + __slots__ = [] + class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + DEGRADED: SelfCheck.Result + EMERGENCY: SelfCheck.Result + GOOD: SelfCheck.Result + MAINTENANCE_REQUIRED: SelfCheck.Result + UNSPECIFIED: SelfCheck.Result + def __init__(self) -> None: ... + +class SelfCheckRequest(_message.Message): + __slots__ = ["maximum_level", "minimum_status", "operation_params", "return_verbose_status"] + MAXIMUM_LEVEL_FIELD_NUMBER: _ClassVar[int] + MINIMUM_STATUS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + RETURN_VERBOSE_STATUS_FIELD_NUMBER: _ClassVar[int] + maximum_level: int + minimum_status: StatusFlag.Status + operation_params: _ydb_operation_pb2.OperationParams + return_verbose_status: bool + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., return_verbose_status: bool = ..., minimum_status: _Optional[_Union[StatusFlag.Status, str]] = ..., maximum_level: _Optional[int] = ...) -> None: ... + +class SelfCheckResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class SelfCheckResult(_message.Message): + __slots__ = ["database_status", "issue_log", "self_check_result"] + DATABASE_STATUS_FIELD_NUMBER: _ClassVar[int] + ISSUE_LOG_FIELD_NUMBER: _ClassVar[int] + SELF_CHECK_RESULT_FIELD_NUMBER: _ClassVar[int] + database_status: _containers.RepeatedCompositeFieldContainer[DatabaseStatus] + issue_log: _containers.RepeatedCompositeFieldContainer[IssueLog] + self_check_result: SelfCheck.Result + def __init__(self, self_check_result: _Optional[_Union[SelfCheck.Result, str]] = ..., issue_log: _Optional[_Iterable[_Union[IssueLog, _Mapping]]] = ..., database_status: _Optional[_Iterable[_Union[DatabaseStatus, _Mapping]]] = ...) -> None: ... + +class StatusFlag(_message.Message): + __slots__ = [] + class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + BLUE: StatusFlag.Status + GREEN: StatusFlag.Status + GREY: StatusFlag.Status + ORANGE: StatusFlag.Status + RED: StatusFlag.Status + UNSPECIFIED: StatusFlag.Status + YELLOW: StatusFlag.Status + def __init__(self) -> None: ... + +class StorageGroupStatus(_message.Message): + __slots__ = ["id", "overall", "vdisks"] + ID_FIELD_NUMBER: _ClassVar[int] + OVERALL_FIELD_NUMBER: _ClassVar[int] + VDISKS_FIELD_NUMBER: _ClassVar[int] + id: str + overall: StatusFlag.Status + vdisks: _containers.RepeatedCompositeFieldContainer[StorageVDiskStatus] + def __init__(self, id: _Optional[str] = ..., overall: _Optional[_Union[StatusFlag.Status, str]] = ..., vdisks: _Optional[_Iterable[_Union[StorageVDiskStatus, _Mapping]]] = ...) -> None: ... + +class StoragePDiskStatus(_message.Message): + __slots__ = ["id", "overall"] + ID_FIELD_NUMBER: _ClassVar[int] + OVERALL_FIELD_NUMBER: _ClassVar[int] + id: str + overall: StatusFlag.Status + def __init__(self, id: _Optional[str] = ..., overall: _Optional[_Union[StatusFlag.Status, str]] = ...) -> None: ... + +class StoragePoolStatus(_message.Message): + __slots__ = ["groups", "id", "overall"] + GROUPS_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + OVERALL_FIELD_NUMBER: _ClassVar[int] + groups: _containers.RepeatedCompositeFieldContainer[StorageGroupStatus] + id: str + overall: StatusFlag.Status + def __init__(self, id: _Optional[str] = ..., overall: _Optional[_Union[StatusFlag.Status, str]] = ..., groups: _Optional[_Iterable[_Union[StorageGroupStatus, _Mapping]]] = ...) -> None: ... + +class StorageStatus(_message.Message): + __slots__ = ["overall", "pools"] + OVERALL_FIELD_NUMBER: _ClassVar[int] + POOLS_FIELD_NUMBER: _ClassVar[int] + overall: StatusFlag.Status + pools: _containers.RepeatedCompositeFieldContainer[StoragePoolStatus] + def __init__(self, overall: _Optional[_Union[StatusFlag.Status, str]] = ..., pools: _Optional[_Iterable[_Union[StoragePoolStatus, _Mapping]]] = ...) -> None: ... + +class StorageVDiskStatus(_message.Message): + __slots__ = ["id", "overall", "pdisk", "vdisk_status"] + ID_FIELD_NUMBER: _ClassVar[int] + OVERALL_FIELD_NUMBER: _ClassVar[int] + PDISK_FIELD_NUMBER: _ClassVar[int] + VDISK_STATUS_FIELD_NUMBER: _ClassVar[int] + id: str + overall: StatusFlag.Status + pdisk: StoragePDiskStatus + vdisk_status: StatusFlag.Status + def __init__(self, id: _Optional[str] = ..., overall: _Optional[_Union[StatusFlag.Status, str]] = ..., vdisk_status: _Optional[_Union[StatusFlag.Status, str]] = ..., pdisk: _Optional[_Union[StoragePDiskStatus, _Mapping]] = ...) -> None: ... + +class ThreadPoolStatus(_message.Message): + __slots__ = ["name", "overall", "usage"] + NAME_FIELD_NUMBER: _ClassVar[int] + OVERALL_FIELD_NUMBER: _ClassVar[int] + USAGE_FIELD_NUMBER: _ClassVar[int] + name: str + overall: StatusFlag.Status + usage: float + def __init__(self, overall: _Optional[_Union[StatusFlag.Status, str]] = ..., name: _Optional[str] = ..., usage: _Optional[float] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_monitoring_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_monitoring_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_monitoring_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_operation_pb2.py b/ydb/_grpc/v5/protos/ydb_operation_pb2.py new file mode 100644 index 00000000..959b0026 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_operation_pb2.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_operation.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from ydb._grpc.v5.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 +from ydb._grpc.v5.protos import ydb_common_pb2 as protos_dot_ydb__common__pb2 +from ydb._grpc.v5.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 +from ydb._grpc.v5.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aprotos/ydb_operation.proto\x12\x0eYdb.Operations\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x17protos/ydb_common.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1dprotos/ydb_status_codes.proto\"\xb6\x03\n\x0fOperationParams\x12\x45\n\x0eoperation_mode\x18\x01 \x01(\x0e\x32-.Ydb.Operations.OperationParams.OperationMode\x12\x34\n\x11operation_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x0c\x63\x61ncel_after\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12M\n\x06labels\x18\x04 \x03(\x0b\x32+.Ydb.Operations.OperationParams.LabelsEntryB\x10\xaa\xe6*\x05\n\x03\x18\x80\x01\xa2\xe6*\x03\x18\x80\x01\x12\x31\n\x10report_cost_info\x18\x05 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"D\n\rOperationMode\x12\x1e\n\x1aOPERATION_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04SYNC\x10\x01\x12\t\n\x05\x41SYNC\x10\x02\"\'\n\x13GetOperationRequest\x12\x10\n\x02id\x18\x01 \x01(\tB\x04\x90\xe6*\x01\"D\n\x14GetOperationResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"*\n\x16\x43\x61ncelOperationRequest\x12\x10\n\x02id\x18\x01 \x01(\tB\x04\x90\xe6*\x01\"m\n\x17\x43\x61ncelOperationResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"*\n\x16\x46orgetOperationRequest\x12\x10\n\x02id\x18\x01 \x01(\tB\x04\x90\xe6*\x01\"m\n\x17\x46orgetOperationResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"R\n\x15ListOperationsRequest\x12\x12\n\x04kind\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x11\n\tpage_size\x18\x02 \x01(\x04\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xb4\x01\n\x16ListOperationsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12-\n\noperations\x18\x03 \x03(\x0b\x32\x19.Ydb.Operations.Operation\x12\x17\n\x0fnext_page_token\x18\x04 \x01(\t\"\xea\x01\n\tOperation\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05ready\x18\x02 \x01(\x08\x12)\n\x06status\x18\x03 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x04 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12$\n\x06result\x18\x05 \x01(\x0b\x32\x14.google.protobuf.Any\x12&\n\x08metadata\x18\x06 \x01(\x0b\x32\x14.google.protobuf.Any\x12 \n\tcost_info\x18\x07 \x01(\x0b\x32\r.Ydb.CostInfoBc\n\x0etech.ydb.protoB\x0fOperationProtosZ=github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Operations\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_operation_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\016tech.ydb.protoB\017OperationProtosZ=github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Operations\370\001\001' + _OPERATIONPARAMS_LABELSENTRY._options = None + _OPERATIONPARAMS_LABELSENTRY._serialized_options = b'8\001' + _OPERATIONPARAMS.fields_by_name['labels']._options = None + _OPERATIONPARAMS.fields_by_name['labels']._serialized_options = b'\252\346*\005\n\003\030\200\001\242\346*\003\030\200\001' + _GETOPERATIONREQUEST.fields_by_name['id']._options = None + _GETOPERATIONREQUEST.fields_by_name['id']._serialized_options = b'\220\346*\001' + _CANCELOPERATIONREQUEST.fields_by_name['id']._options = None + _CANCELOPERATIONREQUEST.fields_by_name['id']._serialized_options = b'\220\346*\001' + _FORGETOPERATIONREQUEST.fields_by_name['id']._options = None + _FORGETOPERATIONREQUEST.fields_by_name['id']._serialized_options = b'\220\346*\001' + _LISTOPERATIONSREQUEST.fields_by_name['kind']._options = None + _LISTOPERATIONSREQUEST.fields_by_name['kind']._serialized_options = b'\220\346*\001' + _OPERATIONPARAMS._serialized_start=231 + _OPERATIONPARAMS._serialized_end=669 + _OPERATIONPARAMS_LABELSENTRY._serialized_start=554 + _OPERATIONPARAMS_LABELSENTRY._serialized_end=599 + _OPERATIONPARAMS_OPERATIONMODE._serialized_start=601 + _OPERATIONPARAMS_OPERATIONMODE._serialized_end=669 + _GETOPERATIONREQUEST._serialized_start=671 + _GETOPERATIONREQUEST._serialized_end=710 + _GETOPERATIONRESPONSE._serialized_start=712 + _GETOPERATIONRESPONSE._serialized_end=780 + _CANCELOPERATIONREQUEST._serialized_start=782 + _CANCELOPERATIONREQUEST._serialized_end=824 + _CANCELOPERATIONRESPONSE._serialized_start=826 + _CANCELOPERATIONRESPONSE._serialized_end=935 + _FORGETOPERATIONREQUEST._serialized_start=937 + _FORGETOPERATIONREQUEST._serialized_end=979 + _FORGETOPERATIONRESPONSE._serialized_start=981 + _FORGETOPERATIONRESPONSE._serialized_end=1090 + _LISTOPERATIONSREQUEST._serialized_start=1092 + _LISTOPERATIONSREQUEST._serialized_end=1174 + _LISTOPERATIONSRESPONSE._serialized_start=1177 + _LISTOPERATIONSRESPONSE._serialized_end=1357 + _OPERATION._serialized_start=1360 + _OPERATION._serialized_end=1594 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_operation_pb2.pyi b/ydb/_grpc/v5/protos/ydb_operation_pb2.pyi new file mode 100644 index 00000000..bbff59c4 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_operation_pb2.pyi @@ -0,0 +1,119 @@ +from google.protobuf import any_pb2 as _any_pb2 +from google.protobuf import duration_pb2 as _duration_pb2 +from protos.annotations import validation_pb2 as _validation_pb2 +from protos import ydb_common_pb2 as _ydb_common_pb2 +from protos import ydb_issue_message_pb2 as _ydb_issue_message_pb2 +from protos import ydb_status_codes_pb2 as _ydb_status_codes_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CancelOperationRequest(_message.Message): + __slots__ = ["id"] + ID_FIELD_NUMBER: _ClassVar[int] + id: str + def __init__(self, id: _Optional[str] = ...) -> None: ... + +class CancelOperationResponse(_message.Message): + __slots__ = ["issues", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ...) -> None: ... + +class ForgetOperationRequest(_message.Message): + __slots__ = ["id"] + ID_FIELD_NUMBER: _ClassVar[int] + id: str + def __init__(self, id: _Optional[str] = ...) -> None: ... + +class ForgetOperationResponse(_message.Message): + __slots__ = ["issues", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ...) -> None: ... + +class GetOperationRequest(_message.Message): + __slots__ = ["id"] + ID_FIELD_NUMBER: _ClassVar[int] + id: str + def __init__(self, id: _Optional[str] = ...) -> None: ... + +class GetOperationResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: Operation + def __init__(self, operation: _Optional[_Union[Operation, _Mapping]] = ...) -> None: ... + +class ListOperationsRequest(_message.Message): + __slots__ = ["kind", "page_size", "page_token"] + KIND_FIELD_NUMBER: _ClassVar[int] + PAGE_SIZE_FIELD_NUMBER: _ClassVar[int] + PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + kind: str + page_size: int + page_token: str + def __init__(self, kind: _Optional[str] = ..., page_size: _Optional[int] = ..., page_token: _Optional[str] = ...) -> None: ... + +class ListOperationsResponse(_message.Message): + __slots__ = ["issues", "next_page_token", "operations", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + OPERATIONS_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + next_page_token: str + operations: _containers.RepeatedCompositeFieldContainer[Operation] + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., operations: _Optional[_Iterable[_Union[Operation, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ... + +class Operation(_message.Message): + __slots__ = ["cost_info", "id", "issues", "metadata", "ready", "result", "status"] + COST_INFO_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + ISSUES_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + READY_FIELD_NUMBER: _ClassVar[int] + RESULT_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + cost_info: _ydb_common_pb2.CostInfo + id: str + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + metadata: _any_pb2.Any + ready: bool + result: _any_pb2.Any + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, id: _Optional[str] = ..., ready: bool = ..., status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., result: _Optional[_Union[_any_pb2.Any, _Mapping]] = ..., metadata: _Optional[_Union[_any_pb2.Any, _Mapping]] = ..., cost_info: _Optional[_Union[_ydb_common_pb2.CostInfo, _Mapping]] = ...) -> None: ... + +class OperationParams(_message.Message): + __slots__ = ["cancel_after", "labels", "operation_mode", "operation_timeout", "report_cost_info"] + class OperationMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class LabelsEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ASYNC: OperationParams.OperationMode + CANCEL_AFTER_FIELD_NUMBER: _ClassVar[int] + LABELS_FIELD_NUMBER: _ClassVar[int] + OPERATION_MODE_FIELD_NUMBER: _ClassVar[int] + OPERATION_MODE_UNSPECIFIED: OperationParams.OperationMode + OPERATION_TIMEOUT_FIELD_NUMBER: _ClassVar[int] + REPORT_COST_INFO_FIELD_NUMBER: _ClassVar[int] + SYNC: OperationParams.OperationMode + cancel_after: _duration_pb2.Duration + labels: _containers.ScalarMap[str, str] + operation_mode: OperationParams.OperationMode + operation_timeout: _duration_pb2.Duration + report_cost_info: _ydb_common_pb2.FeatureFlag.Status + def __init__(self, operation_mode: _Optional[_Union[OperationParams.OperationMode, str]] = ..., operation_timeout: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., cancel_after: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., labels: _Optional[_Mapping[str, str]] = ..., report_cost_info: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_operation_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_operation_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_operation_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_query_pb2.py b/ydb/_grpc/v5/protos/ydb_query_pb2.py new file mode 100644 index 00000000..124341c3 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_query_pb2.py @@ -0,0 +1,144 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_query.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from ydb._grpc.v5.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 +from ydb._grpc.v5.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 +from ydb._grpc.v5.protos import ydb_query_stats_pb2 as protos_dot_ydb__query__stats__pb2 +from ydb._grpc.v5.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 +from ydb._grpc.v5.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\xe1\x03\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x12\x34\n\x19response_part_limit_bytes\x18\t \x01(\x03\x42\x11\xb2\xe6*\r[0; 33554432]\x12\x0f\n\x07pool_id\x18\n \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\x93\x02\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12+\n\x07tx_meta\x18\x06 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"\x9e\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07pool_id\x18\x07 \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_query_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\024tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\370\001\001' + _CREATESESSIONRESPONSE.fields_by_name['session_id']._options = None + _CREATESESSIONRESPONSE.fields_by_name['session_id']._serialized_options = b'\242\346*\003\030\200\010' + _CREATESESSIONRESPONSE.fields_by_name['node_id']._options = None + _CREATESESSIONRESPONSE.fields_by_name['node_id']._serialized_options = b'\262\346*\004>= 0' + _DELETESESSIONREQUEST.fields_by_name['session_id']._options = None + _DELETESESSIONREQUEST.fields_by_name['session_id']._serialized_options = b'\242\346*\003\030\200\010' + _ATTACHSESSIONREQUEST.fields_by_name['session_id']._options = None + _ATTACHSESSIONREQUEST.fields_by_name['session_id']._serialized_options = b'\242\346*\003\030\200\010' + _TRANSACTIONCONTROL.fields_by_name['tx_id']._options = None + _TRANSACTIONCONTROL.fields_by_name['tx_id']._serialized_options = b'\242\346*\003\030\200\010' + _BEGINTRANSACTIONREQUEST.fields_by_name['session_id']._options = None + _BEGINTRANSACTIONREQUEST.fields_by_name['session_id']._serialized_options = b'\242\346*\003\030\200\010' + _TRANSACTIONMETA.fields_by_name['id']._options = None + _TRANSACTIONMETA.fields_by_name['id']._serialized_options = b'\242\346*\003\030\200\010' + _COMMITTRANSACTIONREQUEST.fields_by_name['session_id']._options = None + _COMMITTRANSACTIONREQUEST.fields_by_name['session_id']._serialized_options = b'\242\346*\003\030\200\010' + _COMMITTRANSACTIONREQUEST.fields_by_name['tx_id']._options = None + _COMMITTRANSACTIONREQUEST.fields_by_name['tx_id']._serialized_options = b'\242\346*\003\030\200\010' + _ROLLBACKTRANSACTIONREQUEST.fields_by_name['session_id']._options = None + _ROLLBACKTRANSACTIONREQUEST.fields_by_name['session_id']._serialized_options = b'\242\346*\003\030\200\010' + _ROLLBACKTRANSACTIONREQUEST.fields_by_name['tx_id']._options = None + _ROLLBACKTRANSACTIONREQUEST.fields_by_name['tx_id']._serialized_options = b'\242\346*\003\030\200\010' + _EXECUTEQUERYREQUEST_PARAMETERSENTRY._options = None + _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_options = b'8\001' + _EXECUTEQUERYREQUEST.fields_by_name['session_id']._options = None + _EXECUTEQUERYREQUEST.fields_by_name['session_id']._serialized_options = b'\242\346*\003\030\200\010' + _EXECUTEQUERYREQUEST.fields_by_name['response_part_limit_bytes']._options = None + _EXECUTEQUERYREQUEST.fields_by_name['response_part_limit_bytes']._serialized_options = b'\262\346*\r[0; 33554432]' + _EXECUTEQUERYRESPONSEPART.fields_by_name['result_set_index']._options = None + _EXECUTEQUERYRESPONSEPART.fields_by_name['result_set_index']._serialized_options = b'\262\346*\004>= 0' + _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._options = None + _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_options = b'8\001' + _EXECUTESCRIPTMETADATA.fields_by_name['execution_id']._options = None + _EXECUTESCRIPTMETADATA.fields_by_name['execution_id']._serialized_options = b'\242\346*\003\030\200\010' + _FETCHSCRIPTRESULTSREQUEST.fields_by_name['operation_id']._options = None + _FETCHSCRIPTRESULTSREQUEST.fields_by_name['operation_id']._serialized_options = b'\242\346*\003\030\200\010' + _FETCHSCRIPTRESULTSREQUEST.fields_by_name['fetch_token']._options = None + _FETCHSCRIPTRESULTSREQUEST.fields_by_name['fetch_token']._serialized_options = b'\242\346*\003\030\200\010' + _FETCHSCRIPTRESULTSREQUEST.fields_by_name['rows_limit']._options = None + _FETCHSCRIPTRESULTSREQUEST.fields_by_name['rows_limit']._serialized_options = b'\262\346*\004>= 0' + _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['result_set_index']._options = None + _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['result_set_index']._serialized_options = b'\262\346*\004>= 0' + _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['next_fetch_token']._options = None + _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['next_fetch_token']._serialized_options = b'\242\346*\003\030\200\010' + _SYNTAX._serialized_start=4014 + _SYNTAX._serialized_end=4080 + _EXECMODE._serialized_start=4083 + _EXECMODE._serialized_end=4217 + _STATSMODE._serialized_start=4219 + _STATSMODE._serialized_end=4346 + _EXECSTATUS._serialized_start=4349 + _EXECSTATUS._serialized_end=4519 + _CREATESESSIONREQUEST._serialized_start=251 + _CREATESESSIONREQUEST._serialized_end=273 + _CREATESESSIONRESPONSE._serialized_start=276 + _CREATESESSIONRESPONSE._serialized_end=439 + _DELETESESSIONREQUEST._serialized_start=441 + _DELETESESSIONREQUEST._serialized_end=492 + _DELETESESSIONRESPONSE._serialized_start=494 + _DELETESESSIONRESPONSE._serialized_end=601 + _ATTACHSESSIONREQUEST._serialized_start=603 + _ATTACHSESSIONREQUEST._serialized_end=654 + _SESSIONSTATE._serialized_start=656 + _SESSIONSTATE._serialized_end=754 + _SERIALIZABLEMODESETTINGS._serialized_start=756 + _SERIALIZABLEMODESETTINGS._serialized_end=782 + _ONLINEMODESETTINGS._serialized_start=784 + _ONLINEMODESETTINGS._serialized_end=838 + _STALEMODESETTINGS._serialized_start=840 + _STALEMODESETTINGS._serialized_end=859 + _SNAPSHOTMODESETTINGS._serialized_start=861 + _SNAPSHOTMODESETTINGS._serialized_end=883 + _TRANSACTIONSETTINGS._serialized_start=886 + _TRANSACTIONSETTINGS._serialized_end=1169 + _TRANSACTIONCONTROL._serialized_start=1172 + _TRANSACTIONCONTROL._serialized_end=1304 + _BEGINTRANSACTIONREQUEST._serialized_start=1306 + _BEGINTRANSACTIONREQUEST._serialized_end=1413 + _TRANSACTIONMETA._serialized_start=1415 + _TRANSACTIONMETA._serialized_end=1453 + _BEGINTRANSACTIONRESPONSE._serialized_start=1456 + _BEGINTRANSACTIONRESPONSE._serialized_end=1611 + _COMMITTRANSACTIONREQUEST._serialized_start=1613 + _COMMITTRANSACTIONREQUEST._serialized_end=1692 + _COMMITTRANSACTIONRESPONSE._serialized_start=1694 + _COMMITTRANSACTIONRESPONSE._serialized_end=1805 + _ROLLBACKTRANSACTIONREQUEST._serialized_start=1807 + _ROLLBACKTRANSACTIONREQUEST._serialized_end=1888 + _ROLLBACKTRANSACTIONRESPONSE._serialized_start=1890 + _ROLLBACKTRANSACTIONRESPONSE._serialized_end=2003 + _QUERYCONTENT._serialized_start=2005 + _QUERYCONTENT._serialized_end=2068 + _EXECUTEQUERYREQUEST._serialized_start=2071 + _EXECUTEQUERYREQUEST._serialized_end=2552 + _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_start=2477 + _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_end=2543 + _RESULTSETMETA._serialized_start=2554 + _RESULTSETMETA._serialized_end=2599 + _EXECUTEQUERYRESPONSEPART._serialized_start=2602 + _EXECUTEQUERYRESPONSEPART._serialized_end=2877 + _EXECUTESCRIPTREQUEST._serialized_start=2880 + _EXECUTESCRIPTREQUEST._serialized_end=3294 + _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_start=2477 + _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_end=2543 + _EXECUTESCRIPTMETADATA._serialized_start=3297 + _EXECUTESCRIPTMETADATA._serialized_end=3584 + _FETCHSCRIPTRESULTSREQUEST._serialized_start=3587 + _FETCHSCRIPTRESULTSREQUEST._serialized_end=3731 + _FETCHSCRIPTRESULTSRESPONSE._serialized_start=3734 + _FETCHSCRIPTRESULTSRESPONSE._serialized_end=3953 + _SCRIPT._serialized_start=3955 + _SCRIPT._serialized_end=4012 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_query_pb2.pyi b/ydb/_grpc/v5/protos/ydb_query_pb2.pyi new file mode 100644 index 00000000..621827b2 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_query_pb2.pyi @@ -0,0 +1,317 @@ +from google.protobuf import duration_pb2 as _duration_pb2 +from protos.annotations import validation_pb2 as _validation_pb2 +from protos import ydb_issue_message_pb2 as _ydb_issue_message_pb2 +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from protos import ydb_query_stats_pb2 as _ydb_query_stats_pb2 +from protos import ydb_status_codes_pb2 as _ydb_status_codes_pb2 +from protos import ydb_value_pb2 as _ydb_value_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor +EXEC_MODE_EXECUTE: ExecMode +EXEC_MODE_EXPLAIN: ExecMode +EXEC_MODE_PARSE: ExecMode +EXEC_MODE_UNSPECIFIED: ExecMode +EXEC_MODE_VALIDATE: ExecMode +EXEC_STATUS_ABORTED: ExecStatus +EXEC_STATUS_CANCELLED: ExecStatus +EXEC_STATUS_COMPLETED: ExecStatus +EXEC_STATUS_FAILED: ExecStatus +EXEC_STATUS_STARTING: ExecStatus +EXEC_STATUS_UNSPECIFIED: ExecStatus +STATS_MODE_BASIC: StatsMode +STATS_MODE_FULL: StatsMode +STATS_MODE_NONE: StatsMode +STATS_MODE_PROFILE: StatsMode +STATS_MODE_UNSPECIFIED: StatsMode +SYNTAX_PG: Syntax +SYNTAX_UNSPECIFIED: Syntax +SYNTAX_YQL_V1: Syntax + +class AttachSessionRequest(_message.Message): + __slots__ = ["session_id"] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + session_id: str + def __init__(self, session_id: _Optional[str] = ...) -> None: ... + +class BeginTransactionRequest(_message.Message): + __slots__ = ["session_id", "tx_settings"] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TX_SETTINGS_FIELD_NUMBER: _ClassVar[int] + session_id: str + tx_settings: TransactionSettings + def __init__(self, session_id: _Optional[str] = ..., tx_settings: _Optional[_Union[TransactionSettings, _Mapping]] = ...) -> None: ... + +class BeginTransactionResponse(_message.Message): + __slots__ = ["issues", "status", "tx_meta"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + TX_META_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + status: _ydb_status_codes_pb2.StatusIds.StatusCode + tx_meta: TransactionMeta + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., tx_meta: _Optional[_Union[TransactionMeta, _Mapping]] = ...) -> None: ... + +class CommitTransactionRequest(_message.Message): + __slots__ = ["session_id", "tx_id"] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TX_ID_FIELD_NUMBER: _ClassVar[int] + session_id: str + tx_id: str + def __init__(self, session_id: _Optional[str] = ..., tx_id: _Optional[str] = ...) -> None: ... + +class CommitTransactionResponse(_message.Message): + __slots__ = ["issues", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ...) -> None: ... + +class CreateSessionRequest(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class CreateSessionResponse(_message.Message): + __slots__ = ["issues", "node_id", "session_id", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + node_id: int + session_id: str + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., session_id: _Optional[str] = ..., node_id: _Optional[int] = ...) -> None: ... + +class DeleteSessionRequest(_message.Message): + __slots__ = ["session_id"] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + session_id: str + def __init__(self, session_id: _Optional[str] = ...) -> None: ... + +class DeleteSessionResponse(_message.Message): + __slots__ = ["issues", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ...) -> None: ... + +class ExecuteQueryRequest(_message.Message): + __slots__ = ["concurrent_result_sets", "exec_mode", "parameters", "pool_id", "query_content", "response_part_limit_bytes", "session_id", "stats_mode", "tx_control"] + class ParametersEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: _ydb_value_pb2.TypedValue + def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... + CONCURRENT_RESULT_SETS_FIELD_NUMBER: _ClassVar[int] + EXEC_MODE_FIELD_NUMBER: _ClassVar[int] + PARAMETERS_FIELD_NUMBER: _ClassVar[int] + POOL_ID_FIELD_NUMBER: _ClassVar[int] + QUERY_CONTENT_FIELD_NUMBER: _ClassVar[int] + RESPONSE_PART_LIMIT_BYTES_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + STATS_MODE_FIELD_NUMBER: _ClassVar[int] + TX_CONTROL_FIELD_NUMBER: _ClassVar[int] + concurrent_result_sets: bool + exec_mode: ExecMode + parameters: _containers.MessageMap[str, _ydb_value_pb2.TypedValue] + pool_id: str + query_content: QueryContent + response_part_limit_bytes: int + session_id: str + stats_mode: StatsMode + tx_control: TransactionControl + def __init__(self, session_id: _Optional[str] = ..., exec_mode: _Optional[_Union[ExecMode, str]] = ..., tx_control: _Optional[_Union[TransactionControl, _Mapping]] = ..., query_content: _Optional[_Union[QueryContent, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., stats_mode: _Optional[_Union[StatsMode, str]] = ..., concurrent_result_sets: bool = ..., response_part_limit_bytes: _Optional[int] = ..., pool_id: _Optional[str] = ...) -> None: ... + +class ExecuteQueryResponsePart(_message.Message): + __slots__ = ["exec_stats", "issues", "result_set", "result_set_index", "status", "tx_meta"] + EXEC_STATS_FIELD_NUMBER: _ClassVar[int] + ISSUES_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_INDEX_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + TX_META_FIELD_NUMBER: _ClassVar[int] + exec_stats: _ydb_query_stats_pb2.QueryStats + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + result_set: _ydb_value_pb2.ResultSet + result_set_index: int + status: _ydb_status_codes_pb2.StatusIds.StatusCode + tx_meta: TransactionMeta + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., result_set_index: _Optional[int] = ..., result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ..., exec_stats: _Optional[_Union[_ydb_query_stats_pb2.QueryStats, _Mapping]] = ..., tx_meta: _Optional[_Union[TransactionMeta, _Mapping]] = ...) -> None: ... + +class ExecuteScriptMetadata(_message.Message): + __slots__ = ["exec_mode", "exec_stats", "exec_status", "execution_id", "result_sets_meta", "script_content"] + EXECUTION_ID_FIELD_NUMBER: _ClassVar[int] + EXEC_MODE_FIELD_NUMBER: _ClassVar[int] + EXEC_STATS_FIELD_NUMBER: _ClassVar[int] + EXEC_STATUS_FIELD_NUMBER: _ClassVar[int] + RESULT_SETS_META_FIELD_NUMBER: _ClassVar[int] + SCRIPT_CONTENT_FIELD_NUMBER: _ClassVar[int] + exec_mode: ExecMode + exec_stats: _ydb_query_stats_pb2.QueryStats + exec_status: ExecStatus + execution_id: str + result_sets_meta: _containers.RepeatedCompositeFieldContainer[ResultSetMeta] + script_content: QueryContent + def __init__(self, execution_id: _Optional[str] = ..., exec_status: _Optional[_Union[ExecStatus, str]] = ..., script_content: _Optional[_Union[QueryContent, _Mapping]] = ..., result_sets_meta: _Optional[_Iterable[_Union[ResultSetMeta, _Mapping]]] = ..., exec_mode: _Optional[_Union[ExecMode, str]] = ..., exec_stats: _Optional[_Union[_ydb_query_stats_pb2.QueryStats, _Mapping]] = ...) -> None: ... + +class ExecuteScriptRequest(_message.Message): + __slots__ = ["exec_mode", "operation_params", "parameters", "pool_id", "results_ttl", "script_content", "stats_mode"] + class ParametersEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: _ydb_value_pb2.TypedValue + def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... + EXEC_MODE_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARAMETERS_FIELD_NUMBER: _ClassVar[int] + POOL_ID_FIELD_NUMBER: _ClassVar[int] + RESULTS_TTL_FIELD_NUMBER: _ClassVar[int] + SCRIPT_CONTENT_FIELD_NUMBER: _ClassVar[int] + STATS_MODE_FIELD_NUMBER: _ClassVar[int] + exec_mode: ExecMode + operation_params: _ydb_operation_pb2.OperationParams + parameters: _containers.MessageMap[str, _ydb_value_pb2.TypedValue] + pool_id: str + results_ttl: _duration_pb2.Duration + script_content: QueryContent + stats_mode: StatsMode + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., exec_mode: _Optional[_Union[ExecMode, str]] = ..., script_content: _Optional[_Union[QueryContent, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., stats_mode: _Optional[_Union[StatsMode, str]] = ..., results_ttl: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., pool_id: _Optional[str] = ...) -> None: ... + +class FetchScriptResultsRequest(_message.Message): + __slots__ = ["fetch_token", "operation_id", "result_set_index", "rows_limit"] + FETCH_TOKEN_FIELD_NUMBER: _ClassVar[int] + OPERATION_ID_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_INDEX_FIELD_NUMBER: _ClassVar[int] + ROWS_LIMIT_FIELD_NUMBER: _ClassVar[int] + fetch_token: str + operation_id: str + result_set_index: int + rows_limit: int + def __init__(self, operation_id: _Optional[str] = ..., result_set_index: _Optional[int] = ..., fetch_token: _Optional[str] = ..., rows_limit: _Optional[int] = ...) -> None: ... + +class FetchScriptResultsResponse(_message.Message): + __slots__ = ["issues", "next_fetch_token", "result_set", "result_set_index", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + NEXT_FETCH_TOKEN_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_INDEX_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + next_fetch_token: str + result_set: _ydb_value_pb2.ResultSet + result_set_index: int + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., result_set_index: _Optional[int] = ..., result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ..., next_fetch_token: _Optional[str] = ...) -> None: ... + +class OnlineModeSettings(_message.Message): + __slots__ = ["allow_inconsistent_reads"] + ALLOW_INCONSISTENT_READS_FIELD_NUMBER: _ClassVar[int] + allow_inconsistent_reads: bool + def __init__(self, allow_inconsistent_reads: bool = ...) -> None: ... + +class QueryContent(_message.Message): + __slots__ = ["syntax", "text"] + SYNTAX_FIELD_NUMBER: _ClassVar[int] + TEXT_FIELD_NUMBER: _ClassVar[int] + syntax: Syntax + text: str + def __init__(self, syntax: _Optional[_Union[Syntax, str]] = ..., text: _Optional[str] = ...) -> None: ... + +class ResultSetMeta(_message.Message): + __slots__ = ["columns"] + COLUMNS_FIELD_NUMBER: _ClassVar[int] + columns: _containers.RepeatedCompositeFieldContainer[_ydb_value_pb2.Column] + def __init__(self, columns: _Optional[_Iterable[_Union[_ydb_value_pb2.Column, _Mapping]]] = ...) -> None: ... + +class RollbackTransactionRequest(_message.Message): + __slots__ = ["session_id", "tx_id"] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TX_ID_FIELD_NUMBER: _ClassVar[int] + session_id: str + tx_id: str + def __init__(self, session_id: _Optional[str] = ..., tx_id: _Optional[str] = ...) -> None: ... + +class RollbackTransactionResponse(_message.Message): + __slots__ = ["issues", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ...) -> None: ... + +class Script(_message.Message): + __slots__ = ["script_content"] + SCRIPT_CONTENT_FIELD_NUMBER: _ClassVar[int] + script_content: QueryContent + def __init__(self, script_content: _Optional[_Union[QueryContent, _Mapping]] = ...) -> None: ... + +class SerializableModeSettings(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class SessionState(_message.Message): + __slots__ = ["issues", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ...) -> None: ... + +class SnapshotModeSettings(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class StaleModeSettings(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class TransactionControl(_message.Message): + __slots__ = ["begin_tx", "commit_tx", "tx_id"] + BEGIN_TX_FIELD_NUMBER: _ClassVar[int] + COMMIT_TX_FIELD_NUMBER: _ClassVar[int] + TX_ID_FIELD_NUMBER: _ClassVar[int] + begin_tx: TransactionSettings + commit_tx: bool + tx_id: str + def __init__(self, tx_id: _Optional[str] = ..., begin_tx: _Optional[_Union[TransactionSettings, _Mapping]] = ..., commit_tx: bool = ...) -> None: ... + +class TransactionMeta(_message.Message): + __slots__ = ["id"] + ID_FIELD_NUMBER: _ClassVar[int] + id: str + def __init__(self, id: _Optional[str] = ...) -> None: ... + +class TransactionSettings(_message.Message): + __slots__ = ["online_read_only", "serializable_read_write", "snapshot_read_only", "stale_read_only"] + ONLINE_READ_ONLY_FIELD_NUMBER: _ClassVar[int] + SERIALIZABLE_READ_WRITE_FIELD_NUMBER: _ClassVar[int] + SNAPSHOT_READ_ONLY_FIELD_NUMBER: _ClassVar[int] + STALE_READ_ONLY_FIELD_NUMBER: _ClassVar[int] + online_read_only: OnlineModeSettings + serializable_read_write: SerializableModeSettings + snapshot_read_only: SnapshotModeSettings + stale_read_only: StaleModeSettings + def __init__(self, serializable_read_write: _Optional[_Union[SerializableModeSettings, _Mapping]] = ..., online_read_only: _Optional[_Union[OnlineModeSettings, _Mapping]] = ..., stale_read_only: _Optional[_Union[StaleModeSettings, _Mapping]] = ..., snapshot_read_only: _Optional[_Union[SnapshotModeSettings, _Mapping]] = ...) -> None: ... + +class Syntax(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class ExecMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class StatsMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class ExecStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] diff --git a/ydb/_grpc/v5/protos/ydb_query_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_query_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_query_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_query_stats_pb2.py b/ydb/_grpc/v5/protos/ydb_query_stats_pb2.py new file mode 100644 index 00000000..7ec98938 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_query_stats_pb2.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_query_stats.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cprotos/ydb_query_stats.proto\x12\x0eYdb.TableStats\"-\n\x0eOperationStats\x12\x0c\n\x04rows\x18\x01 \x01(\x04\x12\r\n\x05\x62ytes\x18\x02 \x01(\x04\"\xd1\x01\n\x10TableAccessStats\x12\x0c\n\x04name\x18\x01 \x01(\t\x12-\n\x05reads\x18\x03 \x01(\x0b\x32\x1e.Ydb.TableStats.OperationStats\x12/\n\x07updates\x18\x04 \x01(\x0b\x32\x1e.Ydb.TableStats.OperationStats\x12/\n\x07\x64\x65letes\x18\x05 \x01(\x0b\x32\x1e.Ydb.TableStats.OperationStats\x12\x18\n\x10partitions_count\x18\x06 \x01(\x04J\x04\x08\x02\x10\x03\"\xa3\x01\n\x0fQueryPhaseStats\x12\x13\n\x0b\x64uration_us\x18\x01 \x01(\x04\x12\x36\n\x0ctable_access\x18\x02 \x03(\x0b\x32 .Ydb.TableStats.TableAccessStats\x12\x13\n\x0b\x63pu_time_us\x18\x03 \x01(\x04\x12\x17\n\x0f\x61\x66\x66\x65\x63ted_shards\x18\x04 \x01(\x04\x12\x15\n\rliteral_phase\x18\x05 \x01(\x08\"P\n\x10\x43ompilationStats\x12\x12\n\nfrom_cache\x18\x01 \x01(\x08\x12\x13\n\x0b\x64uration_us\x18\x02 \x01(\x04\x12\x13\n\x0b\x63pu_time_us\x18\x03 \x01(\x04\"\xf4\x01\n\nQueryStats\x12\x35\n\x0cquery_phases\x18\x01 \x03(\x0b\x32\x1f.Ydb.TableStats.QueryPhaseStats\x12\x35\n\x0b\x63ompilation\x18\x02 \x01(\x0b\x32 .Ydb.TableStats.CompilationStats\x12\x1b\n\x13process_cpu_time_us\x18\x03 \x01(\x04\x12\x12\n\nquery_plan\x18\x04 \x01(\t\x12\x11\n\tquery_ast\x18\x05 \x01(\t\x12\x19\n\x11total_duration_us\x18\x06 \x01(\x04\x12\x19\n\x11total_cpu_time_us\x18\x07 \x01(\x04\x42R\n\x0etech.ydb.protoZ=github.com/ydb-platform/ydb-go-genproto/protos/Ydb_TableStats\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_query_stats_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\016tech.ydb.protoZ=github.com/ydb-platform/ydb-go-genproto/protos/Ydb_TableStats\370\001\001' + _OPERATIONSTATS._serialized_start=48 + _OPERATIONSTATS._serialized_end=93 + _TABLEACCESSSTATS._serialized_start=96 + _TABLEACCESSSTATS._serialized_end=305 + _QUERYPHASESTATS._serialized_start=308 + _QUERYPHASESTATS._serialized_end=471 + _COMPILATIONSTATS._serialized_start=473 + _COMPILATIONSTATS._serialized_end=553 + _QUERYSTATS._serialized_start=556 + _QUERYSTATS._serialized_end=800 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_query_stats_pb2.pyi b/ydb/_grpc/v5/protos/ydb_query_stats_pb2.pyi new file mode 100644 index 00000000..f6936cf4 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_query_stats_pb2.pyi @@ -0,0 +1,70 @@ +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CompilationStats(_message.Message): + __slots__ = ["cpu_time_us", "duration_us", "from_cache"] + CPU_TIME_US_FIELD_NUMBER: _ClassVar[int] + DURATION_US_FIELD_NUMBER: _ClassVar[int] + FROM_CACHE_FIELD_NUMBER: _ClassVar[int] + cpu_time_us: int + duration_us: int + from_cache: bool + def __init__(self, from_cache: bool = ..., duration_us: _Optional[int] = ..., cpu_time_us: _Optional[int] = ...) -> None: ... + +class OperationStats(_message.Message): + __slots__ = ["bytes", "rows"] + BYTES_FIELD_NUMBER: _ClassVar[int] + ROWS_FIELD_NUMBER: _ClassVar[int] + bytes: int + rows: int + def __init__(self, rows: _Optional[int] = ..., bytes: _Optional[int] = ...) -> None: ... + +class QueryPhaseStats(_message.Message): + __slots__ = ["affected_shards", "cpu_time_us", "duration_us", "literal_phase", "table_access"] + AFFECTED_SHARDS_FIELD_NUMBER: _ClassVar[int] + CPU_TIME_US_FIELD_NUMBER: _ClassVar[int] + DURATION_US_FIELD_NUMBER: _ClassVar[int] + LITERAL_PHASE_FIELD_NUMBER: _ClassVar[int] + TABLE_ACCESS_FIELD_NUMBER: _ClassVar[int] + affected_shards: int + cpu_time_us: int + duration_us: int + literal_phase: bool + table_access: _containers.RepeatedCompositeFieldContainer[TableAccessStats] + def __init__(self, duration_us: _Optional[int] = ..., table_access: _Optional[_Iterable[_Union[TableAccessStats, _Mapping]]] = ..., cpu_time_us: _Optional[int] = ..., affected_shards: _Optional[int] = ..., literal_phase: bool = ...) -> None: ... + +class QueryStats(_message.Message): + __slots__ = ["compilation", "process_cpu_time_us", "query_ast", "query_phases", "query_plan", "total_cpu_time_us", "total_duration_us"] + COMPILATION_FIELD_NUMBER: _ClassVar[int] + PROCESS_CPU_TIME_US_FIELD_NUMBER: _ClassVar[int] + QUERY_AST_FIELD_NUMBER: _ClassVar[int] + QUERY_PHASES_FIELD_NUMBER: _ClassVar[int] + QUERY_PLAN_FIELD_NUMBER: _ClassVar[int] + TOTAL_CPU_TIME_US_FIELD_NUMBER: _ClassVar[int] + TOTAL_DURATION_US_FIELD_NUMBER: _ClassVar[int] + compilation: CompilationStats + process_cpu_time_us: int + query_ast: str + query_phases: _containers.RepeatedCompositeFieldContainer[QueryPhaseStats] + query_plan: str + total_cpu_time_us: int + total_duration_us: int + def __init__(self, query_phases: _Optional[_Iterable[_Union[QueryPhaseStats, _Mapping]]] = ..., compilation: _Optional[_Union[CompilationStats, _Mapping]] = ..., process_cpu_time_us: _Optional[int] = ..., query_plan: _Optional[str] = ..., query_ast: _Optional[str] = ..., total_duration_us: _Optional[int] = ..., total_cpu_time_us: _Optional[int] = ...) -> None: ... + +class TableAccessStats(_message.Message): + __slots__ = ["deletes", "name", "partitions_count", "reads", "updates"] + DELETES_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + PARTITIONS_COUNT_FIELD_NUMBER: _ClassVar[int] + READS_FIELD_NUMBER: _ClassVar[int] + UPDATES_FIELD_NUMBER: _ClassVar[int] + deletes: OperationStats + name: str + partitions_count: int + reads: OperationStats + updates: OperationStats + def __init__(self, name: _Optional[str] = ..., reads: _Optional[_Union[OperationStats, _Mapping]] = ..., updates: _Optional[_Union[OperationStats, _Mapping]] = ..., deletes: _Optional[_Union[OperationStats, _Mapping]] = ..., partitions_count: _Optional[int] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_query_stats_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_query_stats_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_query_stats_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_rate_limiter_pb2.py b/ydb/_grpc/v5/protos/ydb_rate_limiter_pb2.py new file mode 100644 index 00000000..576ffc45 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_rate_limiter_pb2.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_rate_limiter.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dprotos/ydb_rate_limiter.proto\x12\x0fYdb.RateLimiter\x1a\x1aprotos/ydb_operation.proto\"\x95\x01\n\x17HierarchicalDrrSettings\x12\x1c\n\x14max_units_per_second\x18\x01 \x01(\x01\x12\"\n\x1amax_burst_size_coefficient\x18\x02 \x01(\x01\x12\x1c\n\x14prefetch_coefficient\x18\x03 \x01(\x01\x12\x1a\n\x12prefetch_watermark\x18\x04 \x01(\x01\"o\n\x08Resource\x12\x15\n\rresource_path\x18\x01 \x01(\t\x12\x44\n\x10hierarchical_drr\x18\x02 \x01(\x0b\x32(.Ydb.RateLimiter.HierarchicalDrrSettingsH\x00\x42\x06\n\x04type\"\x9f\x01\n\x15\x43reateResourceRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1e\n\x16\x63oordination_node_path\x18\x02 \x01(\t\x12+\n\x08resource\x18\x03 \x01(\x0b\x32\x19.Ydb.RateLimiter.Resource\"F\n\x16\x43reateResourceResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x16\n\x14\x43reateResourceResult\"\x9e\x01\n\x14\x41lterResourceRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1e\n\x16\x63oordination_node_path\x18\x02 \x01(\t\x12+\n\x08resource\x18\x03 \x01(\x0b\x32\x19.Ydb.RateLimiter.Resource\"E\n\x15\x41lterResourceResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13\x41lterResourceResult\"\x87\x01\n\x13\x44ropResourceRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1e\n\x16\x63oordination_node_path\x18\x02 \x01(\t\x12\x15\n\rresource_path\x18\x03 \x01(\t\"D\n\x14\x44ropResourceResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x44ropResourceResult\"\x9b\x01\n\x14ListResourcesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1e\n\x16\x63oordination_node_path\x18\x02 \x01(\t\x12\x15\n\rresource_path\x18\x03 \x01(\t\x12\x11\n\trecursive\x18\x04 \x01(\x08\"E\n\x15ListResourcesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"-\n\x13ListResourcesResult\x12\x16\n\x0eresource_paths\x18\x01 \x03(\t\"\x8b\x01\n\x17\x44\x65scribeResourceRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1e\n\x16\x63oordination_node_path\x18\x02 \x01(\t\x12\x15\n\rresource_path\x18\x03 \x01(\t\"H\n\x18\x44\x65scribeResourceResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"E\n\x16\x44\x65scribeResourceResult\x12+\n\x08resource\x18\x01 \x01(\x0b\x32\x19.Ydb.RateLimiter.Resource\"\xb7\x01\n\x16\x41\x63quireResourceRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1e\n\x16\x63oordination_node_path\x18\x02 \x01(\t\x12\x15\n\rresource_path\x18\x03 \x01(\t\x12\x12\n\x08required\x18\x04 \x01(\x04H\x00\x12\x0e\n\x04used\x18\x05 \x01(\x04H\x00\x42\x07\n\x05units\"G\n\x17\x41\x63quireResourceResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x17\n\x15\x41\x63quireResourceResultBu\n\x1btech.ydb.proto.rate_limiterB\x11RateLimiterProtosP\x01Z>github.com/ydb-platform/ydb-go-genproto/protos/Ydb_RateLimiter\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_rate_limiter_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\033tech.ydb.proto.rate_limiterB\021RateLimiterProtosP\001Z>github.com/ydb-platform/ydb-go-genproto/protos/Ydb_RateLimiter\370\001\001' + _HIERARCHICALDRRSETTINGS._serialized_start=79 + _HIERARCHICALDRRSETTINGS._serialized_end=228 + _RESOURCE._serialized_start=230 + _RESOURCE._serialized_end=341 + _CREATERESOURCEREQUEST._serialized_start=344 + _CREATERESOURCEREQUEST._serialized_end=503 + _CREATERESOURCERESPONSE._serialized_start=505 + _CREATERESOURCERESPONSE._serialized_end=575 + _CREATERESOURCERESULT._serialized_start=577 + _CREATERESOURCERESULT._serialized_end=599 + _ALTERRESOURCEREQUEST._serialized_start=602 + _ALTERRESOURCEREQUEST._serialized_end=760 + _ALTERRESOURCERESPONSE._serialized_start=762 + _ALTERRESOURCERESPONSE._serialized_end=831 + _ALTERRESOURCERESULT._serialized_start=833 + _ALTERRESOURCERESULT._serialized_end=854 + _DROPRESOURCEREQUEST._serialized_start=857 + _DROPRESOURCEREQUEST._serialized_end=992 + _DROPRESOURCERESPONSE._serialized_start=994 + _DROPRESOURCERESPONSE._serialized_end=1062 + _DROPRESOURCERESULT._serialized_start=1064 + _DROPRESOURCERESULT._serialized_end=1084 + _LISTRESOURCESREQUEST._serialized_start=1087 + _LISTRESOURCESREQUEST._serialized_end=1242 + _LISTRESOURCESRESPONSE._serialized_start=1244 + _LISTRESOURCESRESPONSE._serialized_end=1313 + _LISTRESOURCESRESULT._serialized_start=1315 + _LISTRESOURCESRESULT._serialized_end=1360 + _DESCRIBERESOURCEREQUEST._serialized_start=1363 + _DESCRIBERESOURCEREQUEST._serialized_end=1502 + _DESCRIBERESOURCERESPONSE._serialized_start=1504 + _DESCRIBERESOURCERESPONSE._serialized_end=1576 + _DESCRIBERESOURCERESULT._serialized_start=1578 + _DESCRIBERESOURCERESULT._serialized_end=1647 + _ACQUIRERESOURCEREQUEST._serialized_start=1650 + _ACQUIRERESOURCEREQUEST._serialized_end=1833 + _ACQUIRERESOURCERESPONSE._serialized_start=1835 + _ACQUIRERESOURCERESPONSE._serialized_end=1906 + _ACQUIRERESOURCERESULT._serialized_start=1908 + _ACQUIRERESOURCERESULT._serialized_end=1931 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_rate_limiter_pb2.pyi b/ydb/_grpc/v5/protos/ydb_rate_limiter_pb2.pyi new file mode 100644 index 00000000..de2db8d2 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_rate_limiter_pb2.pyi @@ -0,0 +1,157 @@ +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class AcquireResourceRequest(_message.Message): + __slots__ = ["coordination_node_path", "operation_params", "required", "resource_path", "used"] + COORDINATION_NODE_PATH_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + REQUIRED_FIELD_NUMBER: _ClassVar[int] + RESOURCE_PATH_FIELD_NUMBER: _ClassVar[int] + USED_FIELD_NUMBER: _ClassVar[int] + coordination_node_path: str + operation_params: _ydb_operation_pb2.OperationParams + required: int + resource_path: str + used: int + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., coordination_node_path: _Optional[str] = ..., resource_path: _Optional[str] = ..., required: _Optional[int] = ..., used: _Optional[int] = ...) -> None: ... + +class AcquireResourceResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class AcquireResourceResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class AlterResourceRequest(_message.Message): + __slots__ = ["coordination_node_path", "operation_params", "resource"] + COORDINATION_NODE_PATH_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + RESOURCE_FIELD_NUMBER: _ClassVar[int] + coordination_node_path: str + operation_params: _ydb_operation_pb2.OperationParams + resource: Resource + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., coordination_node_path: _Optional[str] = ..., resource: _Optional[_Union[Resource, _Mapping]] = ...) -> None: ... + +class AlterResourceResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class AlterResourceResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class CreateResourceRequest(_message.Message): + __slots__ = ["coordination_node_path", "operation_params", "resource"] + COORDINATION_NODE_PATH_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + RESOURCE_FIELD_NUMBER: _ClassVar[int] + coordination_node_path: str + operation_params: _ydb_operation_pb2.OperationParams + resource: Resource + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., coordination_node_path: _Optional[str] = ..., resource: _Optional[_Union[Resource, _Mapping]] = ...) -> None: ... + +class CreateResourceResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CreateResourceResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class DescribeResourceRequest(_message.Message): + __slots__ = ["coordination_node_path", "operation_params", "resource_path"] + COORDINATION_NODE_PATH_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + RESOURCE_PATH_FIELD_NUMBER: _ClassVar[int] + coordination_node_path: str + operation_params: _ydb_operation_pb2.OperationParams + resource_path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., coordination_node_path: _Optional[str] = ..., resource_path: _Optional[str] = ...) -> None: ... + +class DescribeResourceResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeResourceResult(_message.Message): + __slots__ = ["resource"] + RESOURCE_FIELD_NUMBER: _ClassVar[int] + resource: Resource + def __init__(self, resource: _Optional[_Union[Resource, _Mapping]] = ...) -> None: ... + +class DropResourceRequest(_message.Message): + __slots__ = ["coordination_node_path", "operation_params", "resource_path"] + COORDINATION_NODE_PATH_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + RESOURCE_PATH_FIELD_NUMBER: _ClassVar[int] + coordination_node_path: str + operation_params: _ydb_operation_pb2.OperationParams + resource_path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., coordination_node_path: _Optional[str] = ..., resource_path: _Optional[str] = ...) -> None: ... + +class DropResourceResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DropResourceResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class HierarchicalDrrSettings(_message.Message): + __slots__ = ["max_burst_size_coefficient", "max_units_per_second", "prefetch_coefficient", "prefetch_watermark"] + MAX_BURST_SIZE_COEFFICIENT_FIELD_NUMBER: _ClassVar[int] + MAX_UNITS_PER_SECOND_FIELD_NUMBER: _ClassVar[int] + PREFETCH_COEFFICIENT_FIELD_NUMBER: _ClassVar[int] + PREFETCH_WATERMARK_FIELD_NUMBER: _ClassVar[int] + max_burst_size_coefficient: float + max_units_per_second: float + prefetch_coefficient: float + prefetch_watermark: float + def __init__(self, max_units_per_second: _Optional[float] = ..., max_burst_size_coefficient: _Optional[float] = ..., prefetch_coefficient: _Optional[float] = ..., prefetch_watermark: _Optional[float] = ...) -> None: ... + +class ListResourcesRequest(_message.Message): + __slots__ = ["coordination_node_path", "operation_params", "recursive", "resource_path"] + COORDINATION_NODE_PATH_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + RECURSIVE_FIELD_NUMBER: _ClassVar[int] + RESOURCE_PATH_FIELD_NUMBER: _ClassVar[int] + coordination_node_path: str + operation_params: _ydb_operation_pb2.OperationParams + recursive: bool + resource_path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., coordination_node_path: _Optional[str] = ..., resource_path: _Optional[str] = ..., recursive: bool = ...) -> None: ... + +class ListResourcesResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListResourcesResult(_message.Message): + __slots__ = ["resource_paths"] + RESOURCE_PATHS_FIELD_NUMBER: _ClassVar[int] + resource_paths: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, resource_paths: _Optional[_Iterable[str]] = ...) -> None: ... + +class Resource(_message.Message): + __slots__ = ["hierarchical_drr", "resource_path"] + HIERARCHICAL_DRR_FIELD_NUMBER: _ClassVar[int] + RESOURCE_PATH_FIELD_NUMBER: _ClassVar[int] + hierarchical_drr: HierarchicalDrrSettings + resource_path: str + def __init__(self, resource_path: _Optional[str] = ..., hierarchical_drr: _Optional[_Union[HierarchicalDrrSettings, _Mapping]] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_rate_limiter_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_rate_limiter_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_rate_limiter_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_scheme_pb2.py b/ydb/_grpc/v5/protos/ydb_scheme_pb2.py new file mode 100644 index 00000000..39bd3a79 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_scheme_pb2.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_scheme.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_common_pb2 as protos_dot_ydb__common__pb2 +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_scheme.proto\x12\nYdb.Scheme\x1a\x17protos/ydb_common.proto\x1a\x1aprotos/ydb_operation.proto\"_\n\x14MakeDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"E\n\x15MakeDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"a\n\x16RemoveDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"G\n\x17RemoveDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x14ListDirectoryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"E\n\x15ListDirectoryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"8\n\x0bPermissions\x12\x0f\n\x07subject\x18\x01 \x01(\t\x12\x18\n\x10permission_names\x18\x02 \x03(\t\"\x92\x04\n\x05\x45ntry\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05owner\x18\x02 \x01(\t\x12$\n\x04type\x18\x05 \x01(\x0e\x32\x16.Ydb.Scheme.Entry.Type\x12\x36\n\x15\x65\x66\x66\x65\x63tive_permissions\x18\x06 \x03(\x0b\x32\x17.Ydb.Scheme.Permissions\x12,\n\x0bpermissions\x18\x07 \x03(\x0b\x32\x17.Ydb.Scheme.Permissions\x12\x12\n\nsize_bytes\x18\x08 \x01(\x04\x12)\n\ncreated_at\x18\t \x01(\x0b\x32\x15.Ydb.VirtualTimestamp\"\xa0\x02\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tDIRECTORY\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x14\n\x10PERS_QUEUE_GROUP\x10\x03\x12\x0c\n\x08\x44\x41TABASE\x10\x04\x12\x0f\n\x0bRTMR_VOLUME\x10\x05\x12\x16\n\x12\x42LOCK_STORE_VOLUME\x10\x06\x12\x15\n\x11\x43OORDINATION_NODE\x10\x07\x12\x10\n\x0c\x43OLUMN_STORE\x10\x0c\x12\x10\n\x0c\x43OLUMN_TABLE\x10\r\x12\x0c\n\x08SEQUENCE\x10\x0f\x12\x0f\n\x0bREPLICATION\x10\x10\x12\t\n\x05TOPIC\x10\x11\x12\x12\n\x0e\x45XTERNAL_TABLE\x10\x12\x12\x18\n\x14\x45XTERNAL_DATA_SOURCE\x10\x13\x12\x08\n\x04VIEW\x10\x14\"[\n\x13ListDirectoryResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12#\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x11.Ydb.Scheme.Entry\"^\n\x13\x44\x65scribePathRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"D\n\x14\x44\x65scribePathResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"5\n\x12\x44\x65scribePathResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\"\xb2\x01\n\x11PermissionsAction\x12(\n\x05grant\x18\x01 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12)\n\x06revoke\x18\x02 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12&\n\x03set\x18\x03 \x01(\x0b\x32\x17.Ydb.Scheme.PermissionsH\x00\x12\x16\n\x0c\x63hange_owner\x18\x04 \x01(\tH\x00\x42\x08\n\x06\x61\x63tion\"\xde\x01\n\x18ModifyPermissionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12.\n\x07\x61\x63tions\x18\x03 \x03(\x0b\x32\x1d.Ydb.Scheme.PermissionsAction\x12\x19\n\x11\x63lear_permissions\x18\x04 \x01(\x08\x12\x1f\n\x15interrupt_inheritance\x18\x05 \x01(\x08H\x00\x42\r\n\x0binheritance\"I\n\x19ModifyPermissionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBl\n\x15tech.ydb.proto.schemeB\x15SchemeOperationProtosZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Scheme\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_scheme_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\025tech.ydb.proto.schemeB\025SchemeOperationProtosZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Scheme\370\001\001' + _MAKEDIRECTORYREQUEST._serialized_start=92 + _MAKEDIRECTORYREQUEST._serialized_end=187 + _MAKEDIRECTORYRESPONSE._serialized_start=189 + _MAKEDIRECTORYRESPONSE._serialized_end=258 + _REMOVEDIRECTORYREQUEST._serialized_start=260 + _REMOVEDIRECTORYREQUEST._serialized_end=357 + _REMOVEDIRECTORYRESPONSE._serialized_start=359 + _REMOVEDIRECTORYRESPONSE._serialized_end=430 + _LISTDIRECTORYREQUEST._serialized_start=432 + _LISTDIRECTORYREQUEST._serialized_end=527 + _LISTDIRECTORYRESPONSE._serialized_start=529 + _LISTDIRECTORYRESPONSE._serialized_end=598 + _PERMISSIONS._serialized_start=600 + _PERMISSIONS._serialized_end=656 + _ENTRY._serialized_start=659 + _ENTRY._serialized_end=1189 + _ENTRY_TYPE._serialized_start=901 + _ENTRY_TYPE._serialized_end=1189 + _LISTDIRECTORYRESULT._serialized_start=1191 + _LISTDIRECTORYRESULT._serialized_end=1282 + _DESCRIBEPATHREQUEST._serialized_start=1284 + _DESCRIBEPATHREQUEST._serialized_end=1378 + _DESCRIBEPATHRESPONSE._serialized_start=1380 + _DESCRIBEPATHRESPONSE._serialized_end=1448 + _DESCRIBEPATHRESULT._serialized_start=1450 + _DESCRIBEPATHRESULT._serialized_end=1503 + _PERMISSIONSACTION._serialized_start=1506 + _PERMISSIONSACTION._serialized_end=1684 + _MODIFYPERMISSIONSREQUEST._serialized_start=1687 + _MODIFYPERMISSIONSREQUEST._serialized_end=1909 + _MODIFYPERMISSIONSRESPONSE._serialized_start=1911 + _MODIFYPERMISSIONSRESPONSE._serialized_end=1984 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_scheme_pb2.pyi b/ydb/_grpc/v5/protos/ydb_scheme_pb2.pyi new file mode 100644 index 00000000..178a74e4 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_scheme_pb2.pyi @@ -0,0 +1,155 @@ +from protos import ydb_common_pb2 as _ydb_common_pb2 +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class DescribePathRequest(_message.Message): + __slots__ = ["operation_params", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ...) -> None: ... + +class DescribePathResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribePathResult(_message.Message): + __slots__ = ["self"] + SELF_FIELD_NUMBER: _ClassVar[int] + self: Entry + def __init__(self, self_: _Optional[_Union[Entry, _Mapping]] = ...) -> None: ... + +class Entry(_message.Message): + __slots__ = ["created_at", "effective_permissions", "name", "owner", "permissions", "size_bytes", "type"] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + BLOCK_STORE_VOLUME: Entry.Type + COLUMN_STORE: Entry.Type + COLUMN_TABLE: Entry.Type + COORDINATION_NODE: Entry.Type + CREATED_AT_FIELD_NUMBER: _ClassVar[int] + DATABASE: Entry.Type + DIRECTORY: Entry.Type + EFFECTIVE_PERMISSIONS_FIELD_NUMBER: _ClassVar[int] + EXTERNAL_DATA_SOURCE: Entry.Type + EXTERNAL_TABLE: Entry.Type + NAME_FIELD_NUMBER: _ClassVar[int] + OWNER_FIELD_NUMBER: _ClassVar[int] + PERMISSIONS_FIELD_NUMBER: _ClassVar[int] + PERS_QUEUE_GROUP: Entry.Type + REPLICATION: Entry.Type + RTMR_VOLUME: Entry.Type + SEQUENCE: Entry.Type + SIZE_BYTES_FIELD_NUMBER: _ClassVar[int] + TABLE: Entry.Type + TOPIC: Entry.Type + TYPE_FIELD_NUMBER: _ClassVar[int] + TYPE_UNSPECIFIED: Entry.Type + VIEW: Entry.Type + created_at: _ydb_common_pb2.VirtualTimestamp + effective_permissions: _containers.RepeatedCompositeFieldContainer[Permissions] + name: str + owner: str + permissions: _containers.RepeatedCompositeFieldContainer[Permissions] + size_bytes: int + type: Entry.Type + def __init__(self, name: _Optional[str] = ..., owner: _Optional[str] = ..., type: _Optional[_Union[Entry.Type, str]] = ..., effective_permissions: _Optional[_Iterable[_Union[Permissions, _Mapping]]] = ..., permissions: _Optional[_Iterable[_Union[Permissions, _Mapping]]] = ..., size_bytes: _Optional[int] = ..., created_at: _Optional[_Union[_ydb_common_pb2.VirtualTimestamp, _Mapping]] = ...) -> None: ... + +class ListDirectoryRequest(_message.Message): + __slots__ = ["operation_params", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ...) -> None: ... + +class ListDirectoryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListDirectoryResult(_message.Message): + __slots__ = ["children", "self"] + CHILDREN_FIELD_NUMBER: _ClassVar[int] + SELF_FIELD_NUMBER: _ClassVar[int] + children: _containers.RepeatedCompositeFieldContainer[Entry] + self: Entry + def __init__(self, self_: _Optional[_Union[Entry, _Mapping]] = ..., children: _Optional[_Iterable[_Union[Entry, _Mapping]]] = ...) -> None: ... + +class MakeDirectoryRequest(_message.Message): + __slots__ = ["operation_params", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ...) -> None: ... + +class MakeDirectoryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ModifyPermissionsRequest(_message.Message): + __slots__ = ["actions", "clear_permissions", "interrupt_inheritance", "operation_params", "path"] + ACTIONS_FIELD_NUMBER: _ClassVar[int] + CLEAR_PERMISSIONS_FIELD_NUMBER: _ClassVar[int] + INTERRUPT_INHERITANCE_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + actions: _containers.RepeatedCompositeFieldContainer[PermissionsAction] + clear_permissions: bool + interrupt_inheritance: bool + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., actions: _Optional[_Iterable[_Union[PermissionsAction, _Mapping]]] = ..., clear_permissions: bool = ..., interrupt_inheritance: bool = ...) -> None: ... + +class ModifyPermissionsResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class Permissions(_message.Message): + __slots__ = ["permission_names", "subject"] + PERMISSION_NAMES_FIELD_NUMBER: _ClassVar[int] + SUBJECT_FIELD_NUMBER: _ClassVar[int] + permission_names: _containers.RepeatedScalarFieldContainer[str] + subject: str + def __init__(self, subject: _Optional[str] = ..., permission_names: _Optional[_Iterable[str]] = ...) -> None: ... + +class PermissionsAction(_message.Message): + __slots__ = ["change_owner", "grant", "revoke", "set"] + CHANGE_OWNER_FIELD_NUMBER: _ClassVar[int] + GRANT_FIELD_NUMBER: _ClassVar[int] + REVOKE_FIELD_NUMBER: _ClassVar[int] + SET_FIELD_NUMBER: _ClassVar[int] + change_owner: str + grant: Permissions + revoke: Permissions + set: Permissions + def __init__(self, grant: _Optional[_Union[Permissions, _Mapping]] = ..., revoke: _Optional[_Union[Permissions, _Mapping]] = ..., set: _Optional[_Union[Permissions, _Mapping]] = ..., change_owner: _Optional[str] = ...) -> None: ... + +class RemoveDirectoryRequest(_message.Message): + __slots__ = ["operation_params", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ...) -> None: ... + +class RemoveDirectoryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_scheme_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_scheme_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_scheme_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_scripting_pb2.py b/ydb/_grpc/v5/protos/ydb_scripting_pb2.py new file mode 100644 index 00000000..76a960dc --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_scripting_pb2.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_scripting.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 +from ydb._grpc.v5.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 +from ydb._grpc.v5.protos import ydb_table_pb2 as protos_dot_ydb__table__pb2 +from ydb._grpc.v5.protos import ydb_query_stats_pb2 as protos_dot_ydb__query__stats__pb2 +from ydb._grpc.v5.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 +from ydb._grpc.v5.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aprotos/ydb_scripting.proto\x12\rYdb.Scripting\x1a\x1aprotos/ydb_operation.proto\x1a\x16protos/ydb_value.proto\x1a\x16protos/ydb_table.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1dprotos/ydb_status_codes.proto\"\xa5\x02\n\x11\x45xecuteYqlRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0e\n\x06script\x18\x02 \x01(\t\x12\x44\n\nparameters\x18\x03 \x03(\x0b\x32\x30.Ydb.Scripting.ExecuteYqlRequest.ParametersEntry\x12;\n\rcollect_stats\x18\x04 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"B\n\x12\x45xecuteYqlResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"h\n\x10\x45xecuteYqlResult\x12#\n\x0bresult_sets\x18\x01 \x03(\x0b\x32\x0e.Ydb.ResultSet\x12/\n\x0bquery_stats\x18\x02 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\xa7\x01\n\x19\x45xecuteYqlPartialResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x36\n\x06result\x18\x03 \x01(\x0b\x32&.Ydb.Scripting.ExecuteYqlPartialResult\"\x88\x01\n\x17\x45xecuteYqlPartialResult\x12\x18\n\x10result_set_index\x18\x01 \x01(\r\x12\"\n\nresult_set\x18\x02 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12/\n\x0bquery_stats\x18\x03 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\xc9\x01\n\x11\x45xplainYqlRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0e\n\x06script\x18\x02 \x01(\t\x12\x33\n\x04mode\x18\x03 \x01(\x0e\x32%.Ydb.Scripting.ExplainYqlRequest.Mode\"4\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08VALIDATE\x10\x02\x12\x08\n\x04PLAN\x10\x03\"B\n\x12\x45xplainYqlResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xb3\x01\n\x10\x45xplainYqlResult\x12N\n\x10parameters_types\x18\x01 \x03(\x0b\x32\x34.Ydb.Scripting.ExplainYqlResult.ParametersTypesEntry\x12\x0c\n\x04plan\x18\x02 \x01(\t\x1a\x41\n\x14ParametersTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x18\n\x05value\x18\x02 \x01(\x0b\x32\t.Ydb.Type:\x02\x38\x01\x42l\n\x18tech.ydb.proto.scriptingB\x0fScriptingProtosZ None: ... + +class ExecuteYqlPartialResult(_message.Message): + __slots__ = ["query_stats", "result_set", "result_set_index"] + QUERY_STATS_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_INDEX_FIELD_NUMBER: _ClassVar[int] + query_stats: _ydb_query_stats_pb2.QueryStats + result_set: _ydb_value_pb2.ResultSet + result_set_index: int + def __init__(self, result_set_index: _Optional[int] = ..., result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ..., query_stats: _Optional[_Union[_ydb_query_stats_pb2.QueryStats, _Mapping]] = ...) -> None: ... + +class ExecuteYqlRequest(_message.Message): + __slots__ = ["collect_stats", "operation_params", "parameters", "script"] + class ParametersEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: _ydb_value_pb2.TypedValue + def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... + COLLECT_STATS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARAMETERS_FIELD_NUMBER: _ClassVar[int] + SCRIPT_FIELD_NUMBER: _ClassVar[int] + collect_stats: _ydb_table_pb2.QueryStatsCollection.Mode + operation_params: _ydb_operation_pb2.OperationParams + parameters: _containers.MessageMap[str, _ydb_value_pb2.TypedValue] + script: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., script: _Optional[str] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., collect_stats: _Optional[_Union[_ydb_table_pb2.QueryStatsCollection.Mode, str]] = ...) -> None: ... + +class ExecuteYqlResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ExecuteYqlResult(_message.Message): + __slots__ = ["query_stats", "result_sets"] + QUERY_STATS_FIELD_NUMBER: _ClassVar[int] + RESULT_SETS_FIELD_NUMBER: _ClassVar[int] + query_stats: _ydb_query_stats_pb2.QueryStats + result_sets: _containers.RepeatedCompositeFieldContainer[_ydb_value_pb2.ResultSet] + def __init__(self, result_sets: _Optional[_Iterable[_Union[_ydb_value_pb2.ResultSet, _Mapping]]] = ..., query_stats: _Optional[_Union[_ydb_query_stats_pb2.QueryStats, _Mapping]] = ...) -> None: ... + +class ExplainYqlRequest(_message.Message): + __slots__ = ["mode", "operation_params", "script"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + MODE_FIELD_NUMBER: _ClassVar[int] + MODE_UNSPECIFIED: ExplainYqlRequest.Mode + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PLAN: ExplainYqlRequest.Mode + SCRIPT_FIELD_NUMBER: _ClassVar[int] + VALIDATE: ExplainYqlRequest.Mode + mode: ExplainYqlRequest.Mode + operation_params: _ydb_operation_pb2.OperationParams + script: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., script: _Optional[str] = ..., mode: _Optional[_Union[ExplainYqlRequest.Mode, str]] = ...) -> None: ... + +class ExplainYqlResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ExplainYqlResult(_message.Message): + __slots__ = ["parameters_types", "plan"] + class ParametersTypesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: _ydb_value_pb2.Type + def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.Type, _Mapping]] = ...) -> None: ... + PARAMETERS_TYPES_FIELD_NUMBER: _ClassVar[int] + PLAN_FIELD_NUMBER: _ClassVar[int] + parameters_types: _containers.MessageMap[str, _ydb_value_pb2.Type] + plan: str + def __init__(self, parameters_types: _Optional[_Mapping[str, _ydb_value_pb2.Type]] = ..., plan: _Optional[str] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_scripting_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_scripting_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_scripting_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_status_codes_pb2.py b/ydb/_grpc/v5/protos/ydb_status_codes_pb2.py new file mode 100644 index 00000000..651a7f50 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_status_codes_pb2.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_status_codes.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dprotos/ydb_status_codes.proto\x12\x03Ydb\"\xbd\x03\n\tStatusIds\"\xaf\x03\n\nStatusCode\x12\x1b\n\x17STATUS_CODE_UNSPECIFIED\x10\x00\x12\r\n\x07SUCCESS\x10\x80\xb5\x18\x12\x11\n\x0b\x42\x41\x44_REQUEST\x10\x8a\xb5\x18\x12\x12\n\x0cUNAUTHORIZED\x10\x94\xb5\x18\x12\x14\n\x0eINTERNAL_ERROR\x10\x9e\xb5\x18\x12\r\n\x07\x41\x42ORTED\x10\xa8\xb5\x18\x12\x11\n\x0bUNAVAILABLE\x10\xb2\xb5\x18\x12\x10\n\nOVERLOADED\x10\xbc\xb5\x18\x12\x12\n\x0cSCHEME_ERROR\x10\xc6\xb5\x18\x12\x13\n\rGENERIC_ERROR\x10\xd0\xb5\x18\x12\r\n\x07TIMEOUT\x10\xda\xb5\x18\x12\x11\n\x0b\x42\x41\x44_SESSION\x10\xe4\xb5\x18\x12\x19\n\x13PRECONDITION_FAILED\x10\xf8\xb5\x18\x12\x14\n\x0e\x41LREADY_EXISTS\x10\x82\xb6\x18\x12\x0f\n\tNOT_FOUND\x10\x8c\xb6\x18\x12\x15\n\x0fSESSION_EXPIRED\x10\x96\xb6\x18\x12\x0f\n\tCANCELLED\x10\xa0\xb6\x18\x12\x12\n\x0cUNDETERMINED\x10\xaa\xb6\x18\x12\x11\n\x0bUNSUPPORTED\x10\xb4\xb6\x18\x12\x12\n\x0cSESSION_BUSY\x10\xbe\xb6\x18\x12\x14\n\x0e\x45XTERNAL_ERROR\x10\xc8\xb6\x18\x42W\n\x0etech.ydb.protoB\x11StatusCodesProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydbb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_status_codes_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\016tech.ydb.protoB\021StatusCodesProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb' + _STATUSIDS._serialized_start=39 + _STATUSIDS._serialized_end=484 + _STATUSIDS_STATUSCODE._serialized_start=53 + _STATUSIDS_STATUSCODE._serialized_end=484 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_status_codes_pb2.pyi b/ydb/_grpc/v5/protos/ydb_status_codes_pb2.pyi new file mode 100644 index 00000000..02a9c0fd --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_status_codes_pb2.pyi @@ -0,0 +1,33 @@ +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor + +class StatusIds(_message.Message): + __slots__ = [] + class StatusCode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ABORTED: StatusIds.StatusCode + ALREADY_EXISTS: StatusIds.StatusCode + BAD_REQUEST: StatusIds.StatusCode + BAD_SESSION: StatusIds.StatusCode + CANCELLED: StatusIds.StatusCode + EXTERNAL_ERROR: StatusIds.StatusCode + GENERIC_ERROR: StatusIds.StatusCode + INTERNAL_ERROR: StatusIds.StatusCode + NOT_FOUND: StatusIds.StatusCode + OVERLOADED: StatusIds.StatusCode + PRECONDITION_FAILED: StatusIds.StatusCode + SCHEME_ERROR: StatusIds.StatusCode + SESSION_BUSY: StatusIds.StatusCode + SESSION_EXPIRED: StatusIds.StatusCode + STATUS_CODE_UNSPECIFIED: StatusIds.StatusCode + SUCCESS: StatusIds.StatusCode + TIMEOUT: StatusIds.StatusCode + UNAUTHORIZED: StatusIds.StatusCode + UNAVAILABLE: StatusIds.StatusCode + UNDETERMINED: StatusIds.StatusCode + UNSUPPORTED: StatusIds.StatusCode + def __init__(self) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_status_codes_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_status_codes_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_status_codes_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_table_pb2.py b/ydb/_grpc/v5/protos/ydb_table_pb2.py new file mode 100644 index 00000000..e78830f9 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_table_pb2.py @@ -0,0 +1,364 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_table.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 +from ydb._grpc.v5.protos import ydb_common_pb2 as protos_dot_ydb__common__pb2 +from ydb._grpc.v5.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 +from ydb._grpc.v5.protos import ydb_query_stats_pb2 as protos_dot_ydb__query__stats__pb2 +from ydb._grpc.v5.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 +from ydb._grpc.v5.protos import ydb_scheme_pb2 as protos_dot_ydb__scheme__pb2 +from ydb._grpc.v5.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 +from ydb._grpc.v5.protos import ydb_topic_pb2 as protos_dot_ydb__topic__pb2 +from ydb._grpc.v5.protos import ydb_formats_pb2 as protos_dot_ydb__formats__pb2 +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_table.proto\x12\tYdb.Table\x1a#protos/annotations/validation.proto\x1a\x17protos/ydb_common.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x16protos/ydb_value.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_topic.proto\x1a\x18protos/ydb_formats.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"Q\n\x14\x43reateSessionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"E\n\x15\x43reateSessionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\")\n\x13\x43reateSessionResult\x12\x12\n\nsession_id\x18\x01 \x01(\t\"e\n\x14\x44\x65leteSessionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x39\n\x10operation_params\x18\x02 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"E\n\x15\x44\x65leteSessionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\r\n\x0bGlobalIndex\"\x12\n\x10GlobalAsyncIndex\"\x13\n\x11GlobalUniqueIndex\"\xf7\x01\n\nTableIndex\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rindex_columns\x18\x02 \x03(\t\x12.\n\x0cglobal_index\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.GlobalIndexH\x00\x12\x39\n\x12global_async_index\x18\x04 \x01(\x0b\x32\x1b.Ydb.Table.GlobalAsyncIndexH\x00\x12;\n\x13global_unique_index\x18\x06 \x01(\x0b\x32\x1c.Ydb.Table.GlobalUniqueIndexH\x00\x12\x14\n\x0c\x64\x61ta_columns\x18\x05 \x03(\tB\x06\n\x04type\"\x98\x03\n\x15TableIndexDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rindex_columns\x18\x02 \x03(\t\x12.\n\x0cglobal_index\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.GlobalIndexH\x00\x12\x39\n\x12global_async_index\x18\x05 \x01(\x0b\x32\x1b.Ydb.Table.GlobalAsyncIndexH\x00\x12;\n\x13global_unique_index\x18\x08 \x01(\x0b\x32\x1c.Ydb.Table.GlobalUniqueIndexH\x00\x12\x37\n\x06status\x18\x04 \x01(\x0e\x32\'.Ydb.Table.TableIndexDescription.Status\x12\x14\n\x0c\x64\x61ta_columns\x18\x06 \x03(\t\x12\x12\n\nsize_bytes\x18\x07 \x01(\x04\"G\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cSTATUS_READY\x10\x01\x12\x13\n\x0fSTATUS_BUILDING\x10\x02\x42\x06\n\x04type\"\xdd\x01\n\x0fIndexBuildState\"\xc9\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATE_PREPARING\x10\x01\x12\x1a\n\x16STATE_TRANSFERING_DATA\x10\x02\x12\x12\n\x0eSTATE_APPLYING\x10\x03\x12\x0e\n\nSTATE_DONE\x10\x04\x12\x16\n\x12STATE_CANCELLATION\x10\x05\x12\x13\n\x0fSTATE_CANCELLED\x10\x06\x12\x13\n\x0fSTATE_REJECTION\x10\x07\x12\x12\n\x0eSTATE_REJECTED\x10\x08\"K\n\x15IndexBuildDescription\x12\x0c\n\x04path\x18\x01 \x01(\t\x12$\n\x05index\x18\x02 \x01(\x0b\x32\x15.Ydb.Table.TableIndex\"\x8e\x01\n\x12IndexBuildMetadata\x12\x35\n\x0b\x64\x65scription\x18\x01 \x01(\x0b\x32 .Ydb.Table.IndexBuildDescription\x12/\n\x05state\x18\x02 \x01(\x0e\x32 .Ydb.Table.IndexBuildState.State\x12\x10\n\x08progress\x18\x03 \x01(\x02\"\x9a\x01\n\x0e\x43hangefeedMode\"\x87\x01\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0eMODE_KEYS_ONLY\x10\x01\x12\x10\n\x0cMODE_UPDATES\x10\x02\x12\x12\n\x0eMODE_NEW_IMAGE\x10\x03\x12\x12\n\x0eMODE_OLD_IMAGE\x10\x04\x12\x1b\n\x17MODE_NEW_AND_OLD_IMAGES\x10\x05\"\x81\x01\n\x10\x43hangefeedFormat\"m\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x46ORMAT_JSON\x10\x01\x12 \n\x1c\x46ORMAT_DYNAMODB_STREAMS_JSON\x10\x02\x12\x18\n\x14\x46ORMAT_DEBEZIUM_JSON\x10\x03\"\x8e\x04\n\nChangefeed\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x04mode\x18\x02 \x01(\x0e\x32\x1e.Ydb.Table.ChangefeedMode.Mode\x12\x32\n\x06\x66ormat\x18\x03 \x01(\x0e\x32\".Ydb.Table.ChangefeedFormat.Format\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12virtual_timestamps\x18\x05 \x01(\x08\x12\x14\n\x0cinitial_scan\x18\x06 \x01(\x08\x12R\n\nattributes\x18\x07 \x03(\x0b\x32%.Ydb.Table.Changefeed.AttributesEntryB\x17\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x07\n\x05\x08\x01\x10\x80 \x12\x1b\n\naws_region\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12?\n\x1cresolved_timestamps_interval\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x44\n\x1btopic_partitioning_settings\x18\n \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x87\x04\n\x15\x43hangefeedDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x04mode\x18\x02 \x01(\x0e\x32\x1e.Ydb.Table.ChangefeedMode.Mode\x12\x32\n\x06\x66ormat\x18\x03 \x01(\x0e\x32\".Ydb.Table.ChangefeedFormat.Format\x12\x35\n\x05state\x18\x04 \x01(\x0e\x32&.Ydb.Table.ChangefeedDescription.State\x12\x1a\n\x12virtual_timestamps\x18\x05 \x01(\x08\x12\x44\n\nattributes\x18\x06 \x03(\x0b\x32\x30.Ydb.Table.ChangefeedDescription.AttributesEntry\x12\x12\n\naws_region\x18\x07 \x01(\t\x12?\n\x1cresolved_timestamps_interval\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"]\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n\rSTATE_ENABLED\x10\x01\x12\x12\n\x0eSTATE_DISABLED\x10\x02\x12\x16\n\x12STATE_INITIAL_SCAN\x10\x03\"\x1c\n\x0bStoragePool\x12\r\n\x05media\x18\x01 \x01(\t\"\xaa\x02\n\rStoragePolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12&\n\x06syslog\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12#\n\x03log\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12$\n\x04\x64\x61ta\x18\x04 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x05 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12/\n\x0ekeep_in_memory\x18\x06 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x36\n\x0f\x63olumn_families\x18\x07 \x03(\x0b\x32\x1d.Ydb.Table.ColumnFamilyPolicy\"\xb1\x02\n\x12\x43olumnFamilyPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x03 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12/\n\x0ekeep_in_memory\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12>\n\x0b\x63ompression\x18\x05 \x01(\x0e\x32).Ydb.Table.ColumnFamilyPolicy.Compression\"L\n\x0b\x43ompression\x12\x1b\n\x17\x43OMPRESSION_UNSPECIFIED\x10\x00\x12\x10\n\x0cUNCOMPRESSED\x10\x01\x12\x0e\n\nCOMPRESSED\x10\x02\"\'\n\x10\x43ompactionPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\";\n\x12\x45xplicitPartitions\x12%\n\x0csplit_points\x18\x01 \x03(\x0b\x32\x0f.Ydb.TypedValue\"S\n\x0ePartitionStats\x12\x15\n\rrows_estimate\x18\x01 \x01(\x04\x12\x12\n\nstore_size\x18\x02 \x01(\x04\x12\x16\n\x0eleader_node_id\x18\x03 \x01(\r\"\xe9\x01\n\nTableStats\x12\x32\n\x0fpartition_stats\x18\x01 \x03(\x0b\x32\x19.Ydb.Table.PartitionStats\x12\x15\n\rrows_estimate\x18\x02 \x01(\x04\x12\x12\n\nstore_size\x18\x03 \x01(\x04\x12\x12\n\npartitions\x18\x04 \x01(\x04\x12\x31\n\rcreation_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11modification_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xdc\x02\n\x12PartitioningPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12O\n\x11\x61uto_partitioning\x18\x02 \x01(\x0e\x32\x34.Ydb.Table.PartitioningPolicy.AutoPartitioningPolicy\x12\x1c\n\x12uniform_partitions\x18\x03 \x01(\x04H\x00\x12<\n\x13\x65xplicit_partitions\x18\x04 \x01(\x0b\x32\x1d.Ydb.Table.ExplicitPartitionsH\x00\"v\n\x16\x41utoPartitioningPolicy\x12(\n$AUTO_PARTITIONING_POLICY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0e\n\nAUTO_SPLIT\x10\x02\x12\x14\n\x10\x41UTO_SPLIT_MERGE\x10\x03\x42\x0c\n\npartitions\"&\n\x0f\x45xecutionPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\"\xb1\x01\n\x11ReplicationPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12\x16\n\x0ereplicas_count\x18\x02 \x01(\r\x12=\n\x1c\x63reate_per_availability_zone\x18\x03 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x30\n\x0f\x61llow_promotion\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"$\n\rCachingPolicy\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\"\xeb\x02\n\x0cTableProfile\x12\x13\n\x0bpreset_name\x18\x01 \x01(\t\x12\x30\n\x0estorage_policy\x18\x02 \x01(\x0b\x32\x18.Ydb.Table.StoragePolicy\x12\x36\n\x11\x63ompaction_policy\x18\x03 \x01(\x0b\x32\x1b.Ydb.Table.CompactionPolicy\x12:\n\x13partitioning_policy\x18\x04 \x01(\x0b\x32\x1d.Ydb.Table.PartitioningPolicy\x12\x34\n\x10\x65xecution_policy\x18\x05 \x01(\x0b\x32\x1a.Ydb.Table.ExecutionPolicy\x12\x38\n\x12replication_policy\x18\x06 \x01(\x0b\x32\x1c.Ydb.Table.ReplicationPolicy\x12\x30\n\x0e\x63\x61\x63hing_policy\x18\x07 \x01(\x0b\x32\x18.Ydb.Table.CachingPolicy\"\xaa\x03\n\x13SequenceDescription\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tmin_value\x18\x02 \x01(\x12H\x01\x88\x01\x01\x12\x16\n\tmax_value\x18\x03 \x01(\x12H\x02\x88\x01\x01\x12\x18\n\x0bstart_value\x18\x04 \x01(\x12H\x03\x88\x01\x01\x12\x12\n\x05\x63\x61\x63he\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x16\n\tincrement\x18\x06 \x01(\x12H\x05\x88\x01\x01\x12\x12\n\x05\x63ycle\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12;\n\x07set_val\x18\x08 \x01(\x0b\x32%.Ydb.Table.SequenceDescription.SetValH\x07\x88\x01\x01\x1aV\n\x06SetVal\x12\x17\n\nnext_value\x18\x01 \x01(\x12H\x00\x88\x01\x01\x12\x16\n\tnext_used\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\r\n\x0b_next_valueB\x0c\n\n_next_usedB\x07\n\x05_nameB\x0c\n\n_min_valueB\x0c\n\n_max_valueB\x0e\n\x0c_start_valueB\x08\n\x06_cacheB\x0c\n\n_incrementB\x08\n\x06_cycleB\n\n\x08_set_val\"\xda\x01\n\nColumnMeta\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\x12\x0e\n\x06\x66\x61mily\x18\x03 \x01(\t\x12\x15\n\x08not_null\x18\x04 \x01(\x08H\x01\x88\x01\x01\x12\'\n\x0c\x66rom_literal\x18\x05 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x00\x12\x37\n\rfrom_sequence\x18\x06 \x01(\x0b\x32\x1e.Ydb.Table.SequenceDescriptionH\x00\x42\x0f\n\rdefault_valueB\x0b\n\t_not_null\"O\n\x1a\x44\x61teTypeColumnModeSettings\x12\x13\n\x0b\x63olumn_name\x18\x01 \x01(\t\x12\x1c\n\x14\x65xpire_after_seconds\x18\x02 \x01(\r\"\x8e\x02\n\x1fValueSinceUnixEpochModeSettings\x12\x13\n\x0b\x63olumn_name\x18\x01 \x01(\t\x12\x44\n\x0b\x63olumn_unit\x18\x02 \x01(\x0e\x32/.Ydb.Table.ValueSinceUnixEpochModeSettings.Unit\x12\x1c\n\x14\x65xpire_after_seconds\x18\x03 \x01(\r\"r\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\x10\n\x0cUNIT_SECONDS\x10\x01\x12\x15\n\x11UNIT_MILLISECONDS\x10\x02\x12\x15\n\x11UNIT_MICROSECONDS\x10\x03\x12\x14\n\x10UNIT_NANOSECONDS\x10\x04\"\xc4\x01\n\x0bTtlSettings\x12\x41\n\x10\x64\x61te_type_column\x18\x01 \x01(\x0b\x32%.Ydb.Table.DateTypeColumnModeSettingsH\x00\x12L\n\x16value_since_unix_epoch\x18\x02 \x01(\x0b\x32*.Ydb.Table.ValueSinceUnixEpochModeSettingsH\x00\x12\x1c\n\x14run_interval_seconds\x18\x03 \x01(\rB\x06\n\x04mode\"\xda\x01\n\x0fStorageSettings\x12\x32\n\x12tablet_commit_log0\x18\x01 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x32\n\x12tablet_commit_log1\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12(\n\x08\x65xternal\x18\x04 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x35\n\x14store_external_blobs\x18\x05 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"\x84\x02\n\x0c\x43olumnFamily\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.Ydb.Table.StoragePool\x12\x38\n\x0b\x63ompression\x18\x03 \x01(\x0e\x32#.Ydb.Table.ColumnFamily.Compression\x12/\n\x0ekeep_in_memory\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"U\n\x0b\x43ompression\x12\x1b\n\x17\x43OMPRESSION_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43OMPRESSION_NONE\x10\x01\x12\x13\n\x0f\x43OMPRESSION_LZ4\x10\x02\"\xf7\x01\n\x14PartitioningSettings\x12\x14\n\x0cpartition_by\x18\x01 \x03(\t\x12\x35\n\x14partitioning_by_size\x18\x02 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x19\n\x11partition_size_mb\x18\x03 \x01(\x04\x12\x35\n\x14partitioning_by_load\x18\x04 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x1c\n\x14min_partitions_count\x18\x06 \x01(\x04\x12\x1c\n\x14max_partitions_count\x18\x07 \x01(\x04J\x04\x08\x05\x10\x06\"C\n\x16\x41zReadReplicasSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x13read_replicas_count\x18\x02 \x01(\x04\"_\n\x17\x43lusterReplicasSettings\x12\x44\n\x19\x61z_read_replicas_settings\x18\x02 \x03(\x0b\x32!.Ydb.Table.AzReadReplicasSettings\"t\n\x14ReadReplicasSettings\x12$\n\x1aper_az_read_replicas_count\x18\x01 \x01(\x04H\x00\x12$\n\x1a\x61ny_az_read_replicas_count\x18\x02 \x01(\x04H\x00\x42\n\n\x08settingsJ\x04\x08\x03\x10\x04\"\xaa\x07\n\x12\x43reateTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12&\n\x07\x63olumns\x18\x03 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x13\n\x0bprimary_key\x18\x04 \x03(\t\x12(\n\x07profile\x18\x05 \x01(\x0b\x32\x17.Ydb.Table.TableProfile\x12\x39\n\x10operation_params\x18\x06 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\x07indexes\x18\x07 \x03(\x0b\x32\x15.Ydb.Table.TableIndex\x12,\n\x0cttl_settings\x18\x08 \x01(\x0b\x32\x16.Ydb.Table.TtlSettings\x12\x34\n\x10storage_settings\x18\t \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x30\n\x0f\x63olumn_families\x18\n \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12Z\n\nattributes\x18\x0b \x03(\x0b\x32-.Ydb.Table.CreateTableRequest.AttributesEntryB\x17\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x07\n\x05\x08\x01\x10\x80 \x12\x19\n\x11\x63ompaction_policy\x18\x0c \x01(\t\x12\x1c\n\x12uniform_partitions\x18\r \x01(\x04H\x00\x12:\n\x11partition_at_keys\x18\x0e \x01(\x0b\x32\x1d.Ydb.Table.ExplicitPartitionsH\x00\x12>\n\x15partitioning_settings\x18\x0f \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x31\n\x10key_bloom_filter\x18\x10 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12?\n\x16read_replicas_settings\x18\x11 \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12\x0f\n\x07tiering\x18\x12 \x01(\t\x12\x11\n\ttemporary\x18\x13 \x01(\x08\x12(\n\nstore_type\x18\x14 \x01(\x0e\x32\x14.Ydb.Table.StoreType\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\npartitions\"C\n\x13\x43reateTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"u\n\x10\x44ropTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParamsJ\x04\x08\x03\x10\x04\"A\n\x11\x44ropTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"]\n\x0fRenameIndexItem\x12\x13\n\x0bsource_name\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_name\x18\x02 \x01(\t\x12\x1b\n\x13replace_destination\x18\x03 \x01(\x08\"\x95\t\n\x11\x41lterTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12*\n\x0b\x61\x64\x64_columns\x18\x03 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x14\n\x0c\x64rop_columns\x18\x04 \x03(\t\x12\x39\n\x10operation_params\x18\x05 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12,\n\ralter_columns\x18\x06 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x32\n\x10set_ttl_settings\x18\x07 \x01(\x0b\x32\x16.Ydb.Table.TtlSettingsH\x00\x12\x33\n\x11\x64rop_ttl_settings\x18\x08 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12*\n\x0b\x61\x64\x64_indexes\x18\t \x03(\x0b\x32\x15.Ydb.Table.TableIndex\x12\x14\n\x0c\x64rop_indexes\x18\n \x03(\t\x12:\n\x16\x61lter_storage_settings\x18\x0b \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x34\n\x13\x61\x64\x64_column_families\x18\x0c \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12\x36\n\x15\x61lter_column_families\x18\r \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12`\n\x10\x61lter_attributes\x18\x0e \x03(\x0b\x32\x31.Ydb.Table.AlterTableRequest.AlterAttributesEntryB\x13\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x03\x18\x80 \x12\x1d\n\x15set_compaction_policy\x18\x0f \x01(\t\x12\x44\n\x1b\x61lter_partitioning_settings\x18\x10 \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x35\n\x14set_key_bloom_filter\x18\x11 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x43\n\x1aset_read_replicas_settings\x18\x12 \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12.\n\x0f\x61\x64\x64_changefeeds\x18\x13 \x03(\x0b\x32\x15.Ydb.Table.Changefeed\x12\x18\n\x10\x64rop_changefeeds\x18\x14 \x03(\t\x12\x32\n\x0erename_indexes\x18\x15 \x03(\x0b\x32\x1a.Ydb.Table.RenameIndexItem\x12\x15\n\x0bset_tiering\x18\x16 \x01(\tH\x01\x12.\n\x0c\x64rop_tiering\x18\x17 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x01\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\nttl_actionB\x10\n\x0etiering_action\"B\n\x12\x41lterTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x90\x01\n\x10\x43opyTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x13\n\x0bsource_path\x18\x02 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x03 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"A\n\x11\x43opyTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"T\n\rCopyTableItem\x12\x13\n\x0bsource_path\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x02 \x01(\t\x12\x14\n\x0comit_indexes\x18\x03 \x01(\x08\"\x8c\x01\n\x11\x43opyTablesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12(\n\x06tables\x18\x03 \x03(\x0b\x32\x18.Ydb.Table.CopyTableItem\"B\n\x12\x43opyTablesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"]\n\x0fRenameTableItem\x12\x13\n\x0bsource_path\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x02 \x01(\t\x12\x1b\n\x13replace_destination\x18\x03 \x01(\x08\"\x90\x01\n\x13RenameTablesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12*\n\x06tables\x18\x03 \x03(\x0b\x32\x1a.Ydb.Table.RenameTableItem\"D\n\x14RenameTablesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xf5\x01\n\x14\x44\x65scribeTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x04 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12 \n\x18include_shard_key_bounds\x18\x05 \x01(\x08\x12\x1b\n\x13include_table_stats\x18\x06 \x01(\x08\x12\x1f\n\x17include_partition_stats\x18\x07 \x01(\x08\x12 \n\x18include_shard_nodes_info\x18\t \x01(\x08\"E\n\x15\x44\x65scribeTableResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xc9\x06\n\x13\x44\x65scribeTableResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12&\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x15.Ydb.Table.ColumnMeta\x12\x13\n\x0bprimary_key\x18\x03 \x03(\t\x12)\n\x10shard_key_bounds\x18\x04 \x03(\x0b\x32\x0f.Ydb.TypedValue\x12\x31\n\x07indexes\x18\x05 \x03(\x0b\x32 .Ydb.Table.TableIndexDescription\x12*\n\x0btable_stats\x18\x06 \x01(\x0b\x32\x15.Ydb.Table.TableStats\x12,\n\x0cttl_settings\x18\x07 \x01(\x0b\x32\x16.Ydb.Table.TtlSettings\x12\x34\n\x10storage_settings\x18\x08 \x01(\x0b\x32\x1a.Ydb.Table.StorageSettings\x12\x30\n\x0f\x63olumn_families\x18\t \x03(\x0b\x32\x17.Ydb.Table.ColumnFamily\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Table.DescribeTableResult.AttributesEntry\x12>\n\x15partitioning_settings\x18\x0c \x01(\x0b\x32\x1f.Ydb.Table.PartitioningSettings\x12\x31\n\x10key_bloom_filter\x18\r \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12?\n\x16read_replicas_settings\x18\x0e \x01(\x0b\x32\x1f.Ydb.Table.ReadReplicasSettings\x12\x35\n\x0b\x63hangefeeds\x18\x0f \x03(\x0b\x32 .Ydb.Table.ChangefeedDescription\x12\x0f\n\x07tiering\x18\x10 \x01(\t\x12\x11\n\ttemporary\x18\x11 \x01(\x08\x12(\n\nstore_type\x18\x12 \x01(\x0e\x32\x14.Ydb.Table.StoreType\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x0b\x10\x0c\"2\n\x05Query\x12\x12\n\x08yql_text\x18\x01 \x01(\tH\x00\x12\x0c\n\x02id\x18\x02 \x01(\tH\x00\x42\x07\n\x05query\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Table.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Table.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Table.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Table.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"{\n\x12TransactionControl\x12\x0f\n\x05tx_id\x18\x01 \x01(\tH\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Table.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\")\n\x10QueryCachePolicy\x12\x15\n\rkeep_in_cache\x18\x01 \x01(\x08\"\xb1\x01\n\x14QueryStatsCollection\"\x98\x01\n\x04Mode\x12 \n\x1cSTATS_COLLECTION_UNSPECIFIED\x10\x00\x12\x19\n\x15STATS_COLLECTION_NONE\x10\x01\x12\x1a\n\x16STATS_COLLECTION_BASIC\x10\x02\x12\x19\n\x15STATS_COLLECTION_FULL\x10\x03\x12\x1c\n\x18STATS_COLLECTION_PROFILE\x10\x04\"\xbe\x03\n\x17\x45xecuteDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x31\n\ntx_control\x18\x02 \x01(\x0b\x32\x1d.Ydb.Table.TransactionControl\x12\x1f\n\x05query\x18\x03 \x01(\x0b\x32\x10.Ydb.Table.Query\x12\x46\n\nparameters\x18\x04 \x03(\x0b\x32\x32.Ydb.Table.ExecuteDataQueryRequest.ParametersEntry\x12\x37\n\x12query_cache_policy\x18\x05 \x01(\x0b\x32\x1b.Ydb.Table.QueryCachePolicy\x12\x39\n\x10operation_params\x18\x06 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12;\n\rcollect_stats\x18\x07 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"H\n\x18\x45xecuteDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"|\n\x19\x45xecuteSchemeQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"J\n\x1a\x45xecuteSchemeQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x1d\n\x0fTransactionMeta\x12\n\n\x02id\x18\x01 \x01(\t\"\x9f\x01\n\tQueryMeta\x12\n\n\x02id\x18\x01 \x01(\t\x12\x43\n\x10parameters_types\x18\x02 \x03(\x0b\x32).Ydb.Table.QueryMeta.ParametersTypesEntry\x1a\x41\n\x14ParametersTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x18\n\x05value\x18\x02 \x01(\x0b\x32\t.Ydb.Type:\x02\x38\x01\"\xc1\x01\n\x12\x45xecuteQueryResult\x12#\n\x0bresult_sets\x18\x01 \x03(\x0b\x32\x0e.Ydb.ResultSet\x12+\n\x07tx_meta\x18\x02 \x01(\x0b\x32\x1a.Ydb.Table.TransactionMeta\x12(\n\nquery_meta\x18\x03 \x01(\x0b\x32\x14.Ydb.Table.QueryMeta\x12/\n\x0bquery_stats\x18\x04 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x9c\x01\n\x17\x45xplainDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12 \n\x18\x63ollect_full_diagnostics\x18\x04 \x01(\x08\"H\n\x18\x45xplainDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"[\n\x12\x45xplainQueryResult\x12\x11\n\tquery_ast\x18\x01 \x01(\t\x12\x12\n\nquery_plan\x18\x02 \x01(\t\x12\x1e\n\x16query_full_diagnostics\x18\x03 \x01(\t\"z\n\x17PrepareDataQueryRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x10\n\x08yql_text\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"H\n\x18PrepareDataQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xb7\x01\n\x12PrepareQueryResult\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12L\n\x10parameters_types\x18\x02 \x03(\x0b\x32\x32.Ydb.Table.PrepareQueryResult.ParametersTypesEntry\x1a\x41\n\x14ParametersTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x18\n\x05value\x18\x02 \x01(\x0b\x32\t.Ydb.Type:\x02\x38\x01\"a\n\x10KeepAliveRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x39\n\x10operation_params\x18\x02 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"A\n\x11KeepAliveResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xb7\x01\n\x0fKeepAliveResult\x12@\n\x0esession_status\x18\x01 \x01(\x0e\x32(.Ydb.Table.KeepAliveResult.SessionStatus\"b\n\rSessionStatus\x12\x1e\n\x1aSESSION_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14SESSION_STATUS_READY\x10\x01\x12\x17\n\x13SESSION_STATUS_BUSY\x10\x02\"\x9d\x01\n\x17\x42\x65ginTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Table.TransactionSettings\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"H\n\x18\x42\x65ginTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"E\n\x16\x42\x65ginTransactionResult\x12+\n\x07tx_meta\x18\x01 \x01(\x0b\x32\x1a.Ydb.Table.TransactionMeta\"\xb5\x01\n\x18\x43ommitTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\r\n\x05tx_id\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12;\n\rcollect_stats\x18\x04 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\"I\n\x19\x43ommitTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"J\n\x17\x43ommitTransactionResult\x12/\n\x0bquery_stats\x18\x01 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"z\n\x1aRollbackTransactionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\r\n\x05tx_id\x18\x02 \x01(\t\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"K\n\x1bRollbackTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x98\x01\n\x18StoragePolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x06labels\x18\x02 \x03(\x0b\x32/.Ydb.Table.StoragePolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9e\x01\n\x1b\x43ompactionPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x42\n\x06labels\x18\x02 \x03(\x0b\x32\x32.Ydb.Table.CompactionPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa2\x01\n\x1dPartitioningPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x44\n\x06labels\x18\x02 \x03(\x0b\x32\x34.Ydb.Table.PartitioningPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9c\x01\n\x1a\x45xecutionPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x41\n\x06labels\x18\x02 \x03(\x0b\x32\x31.Ydb.Table.ExecutionPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa0\x01\n\x1cReplicationPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x43\n\x06labels\x18\x02 \x03(\x0b\x32\x33.Ydb.Table.ReplicationPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x98\x01\n\x18\x43\x61\x63hingPolicyDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x06labels\x18\x02 \x03(\x0b\x32/.Ydb.Table.CachingPolicyDescription.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbe\x04\n\x17TableProfileDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x06labels\x18\x02 \x03(\x0b\x32..Ydb.Table.TableProfileDescription.LabelsEntry\x12\x1e\n\x16\x64\x65\x66\x61ult_storage_policy\x18\x03 \x01(\t\x12 \n\x18\x61llowed_storage_policies\x18\x04 \x03(\t\x12!\n\x19\x64\x65\x66\x61ult_compaction_policy\x18\x05 \x01(\t\x12#\n\x1b\x61llowed_compaction_policies\x18\x06 \x03(\t\x12#\n\x1b\x64\x65\x66\x61ult_partitioning_policy\x18\x07 \x01(\t\x12%\n\x1d\x61llowed_partitioning_policies\x18\x08 \x03(\t\x12 \n\x18\x64\x65\x66\x61ult_execution_policy\x18\t \x01(\t\x12\"\n\x1a\x61llowed_execution_policies\x18\n \x03(\t\x12\"\n\x1a\x64\x65\x66\x61ult_replication_policy\x18\x0b \x01(\t\x12$\n\x1c\x61llowed_replication_policies\x18\x0c \x03(\t\x12\x1e\n\x16\x64\x65\x66\x61ult_caching_policy\x18\r \x01(\t\x12 \n\x18\x61llowed_caching_policies\x18\x0e \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"X\n\x1b\x44\x65scribeTableOptionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\"L\n\x1c\x44\x65scribeTableOptionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x99\x04\n\x1a\x44\x65scribeTableOptionsResult\x12\x41\n\x15table_profile_presets\x18\x01 \x03(\x0b\x32\".Ydb.Table.TableProfileDescription\x12\x43\n\x16storage_policy_presets\x18\x02 \x03(\x0b\x32#.Ydb.Table.StoragePolicyDescription\x12I\n\x19\x63ompaction_policy_presets\x18\x03 \x03(\x0b\x32&.Ydb.Table.CompactionPolicyDescription\x12M\n\x1bpartitioning_policy_presets\x18\x04 \x03(\x0b\x32(.Ydb.Table.PartitioningPolicyDescription\x12G\n\x18\x65xecution_policy_presets\x18\x05 \x03(\x0b\x32%.Ydb.Table.ExecutionPolicyDescription\x12K\n\x1areplication_policy_presets\x18\x06 \x03(\x0b\x32\'.Ydb.Table.ReplicationPolicyDescription\x12\x43\n\x16\x63\x61\x63hing_policy_presets\x18\x07 \x03(\x0b\x32#.Ydb.Table.CachingPolicyDescription\"\xc0\x01\n\x08KeyRange\x12\"\n\x07greater\x18\x01 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x00\x12+\n\x10greater_or_equal\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x00\x12\x1f\n\x04less\x18\x03 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x01\x12(\n\rless_or_equal\x18\x04 \x01(\x0b\x32\x0f.Ydb.TypedValueH\x01\x42\x0c\n\nfrom_boundB\n\n\x08to_bound\"\xb8\x02\n\x10ReadTableRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12&\n\tkey_range\x18\x03 \x01(\x0b\x32\x13.Ydb.Table.KeyRange\x12\x0f\n\x07\x63olumns\x18\x04 \x03(\t\x12\x0f\n\x07ordered\x18\x05 \x01(\x08\x12\x11\n\trow_limit\x18\x06 \x01(\x04\x12-\n\x0cuse_snapshot\x18\x07 \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\x12\x19\n\x11\x62\x61tch_limit_bytes\x18\x08 \x01(\x04\x12\x18\n\x10\x62\x61tch_limit_rows\x18\t \x01(\x04\x12\x41\n return_not_null_data_as_optional\x18\n \x01(\x0e\x32\x17.Ydb.FeatureFlag.Status\"\xbc\x01\n\x11ReadTableResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\'\n\x08snapshot\x18\x04 \x01(\x0b\x32\x15.Ydb.VirtualTimestamp\x12*\n\x06result\x18\x03 \x01(\x0b\x32\x1a.Ydb.Table.ReadTableResult\"5\n\x0fReadTableResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\"c\n\x0fReadRowsRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x1d\n\x04keys\x18\x03 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x0f\n\x07\x63olumns\x18\x04 \x03(\t\"\x8a\x01\n\x10ReadRowsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\nresult_set\x18\x03 \x01(\x0b\x32\x0e.Ydb.ResultSet\"\x8d\x02\n\x11\x42ulkUpsertRequest\x12\r\n\x05table\x18\x01 \x01(\t\x12\x1d\n\x04rows\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue\x12\x39\n\x10operation_params\x18\x03 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12?\n\x14\x61rrow_batch_settings\x18\x07 \x01(\x0b\x32\x1f.Ydb.Formats.ArrowBatchSettingsH\x00\x12\x30\n\x0c\x63sv_settings\x18\x08 \x01(\x0b\x32\x18.Ydb.Formats.CsvSettingsH\x00\x12\r\n\x04\x64\x61ta\x18\xe8\x07 \x01(\x0c\x42\r\n\x0b\x64\x61ta_format\"B\n\x12\x42ulkUpsertResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x42ulkUpsertResult\"\xb3\x03\n\x17\x45xecuteScanQueryRequest\x12\x1f\n\x05query\x18\x03 \x01(\x0b\x32\x10.Ydb.Table.Query\x12\x46\n\nparameters\x18\x04 \x03(\x0b\x32\x32.Ydb.Table.ExecuteScanQueryRequest.ParametersEntry\x12\x35\n\x04mode\x18\x06 \x01(\x0e\x32\'.Ydb.Table.ExecuteScanQueryRequest.Mode\x12;\n\rcollect_stats\x18\x08 \x01(\x0e\x32$.Ydb.Table.QueryStatsCollection.Mode\x12 \n\x18\x63ollect_full_diagnostics\x18\t \x01(\x08\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"=\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMODE_EXPLAIN\x10\x01\x12\r\n\tMODE_EXEC\x10\x03J\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06J\x04\x08\x07\x10\x08\"\xaf\x01\n\x1f\x45xecuteScanQueryPartialResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x38\n\x06result\x18\x03 \x01(\x0b\x32(.Ydb.Table.ExecuteScanQueryPartialResult\"\xac\x01\n\x1d\x45xecuteScanQueryPartialResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12/\n\x0bquery_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12\x1e\n\x16query_full_diagnostics\x18\x07 \x01(\tJ\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06*R\n\tStoreType\x12\x1a\n\x16STORE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTORE_TYPE_ROW\x10\x01\x12\x15\n\x11STORE_TYPE_COLUMN\x10\x02\x42S\n\x14tech.ydb.proto.tableZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Table\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_table_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\024tech.ydb.proto.tableZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Table\370\001\001' + _CHANGEFEED_ATTRIBUTESENTRY._options = None + _CHANGEFEED_ATTRIBUTESENTRY._serialized_options = b'8\001' + _CHANGEFEED.fields_by_name['attributes']._options = None + _CHANGEFEED.fields_by_name['attributes']._serialized_options = b'\252\346*\010\n\006\n\004\010\001\020d\242\346*\007\n\005\010\001\020\200 ' + _CHANGEFEED.fields_by_name['aws_region']._options = None + _CHANGEFEED.fields_by_name['aws_region']._serialized_options = b'\242\346*\003\030\200\001' + _CHANGEFEEDDESCRIPTION_ATTRIBUTESENTRY._options = None + _CHANGEFEEDDESCRIPTION_ATTRIBUTESENTRY._serialized_options = b'8\001' + _CREATETABLEREQUEST_ATTRIBUTESENTRY._options = None + _CREATETABLEREQUEST_ATTRIBUTESENTRY._serialized_options = b'8\001' + _CREATETABLEREQUEST.fields_by_name['attributes']._options = None + _CREATETABLEREQUEST.fields_by_name['attributes']._serialized_options = b'\252\346*\010\n\006\n\004\010\001\020d\242\346*\007\n\005\010\001\020\200 ' + _ALTERTABLEREQUEST_ALTERATTRIBUTESENTRY._options = None + _ALTERTABLEREQUEST_ALTERATTRIBUTESENTRY._serialized_options = b'8\001' + _ALTERTABLEREQUEST.fields_by_name['alter_attributes']._options = None + _ALTERTABLEREQUEST.fields_by_name['alter_attributes']._serialized_options = b'\252\346*\010\n\006\n\004\010\001\020d\242\346*\003\030\200 ' + _DESCRIBETABLERESULT_ATTRIBUTESENTRY._options = None + _DESCRIBETABLERESULT_ATTRIBUTESENTRY._serialized_options = b'8\001' + _EXECUTEDATAQUERYREQUEST_PARAMETERSENTRY._options = None + _EXECUTEDATAQUERYREQUEST_PARAMETERSENTRY._serialized_options = b'8\001' + _QUERYMETA_PARAMETERSTYPESENTRY._options = None + _QUERYMETA_PARAMETERSTYPESENTRY._serialized_options = b'8\001' + _PREPAREQUERYRESULT_PARAMETERSTYPESENTRY._options = None + _PREPAREQUERYRESULT_PARAMETERSTYPESENTRY._serialized_options = b'8\001' + _STORAGEPOLICYDESCRIPTION_LABELSENTRY._options = None + _STORAGEPOLICYDESCRIPTION_LABELSENTRY._serialized_options = b'8\001' + _COMPACTIONPOLICYDESCRIPTION_LABELSENTRY._options = None + _COMPACTIONPOLICYDESCRIPTION_LABELSENTRY._serialized_options = b'8\001' + _PARTITIONINGPOLICYDESCRIPTION_LABELSENTRY._options = None + _PARTITIONINGPOLICYDESCRIPTION_LABELSENTRY._serialized_options = b'8\001' + _EXECUTIONPOLICYDESCRIPTION_LABELSENTRY._options = None + _EXECUTIONPOLICYDESCRIPTION_LABELSENTRY._serialized_options = b'8\001' + _REPLICATIONPOLICYDESCRIPTION_LABELSENTRY._options = None + _REPLICATIONPOLICYDESCRIPTION_LABELSENTRY._serialized_options = b'8\001' + _CACHINGPOLICYDESCRIPTION_LABELSENTRY._options = None + _CACHINGPOLICYDESCRIPTION_LABELSENTRY._serialized_options = b'8\001' + _TABLEPROFILEDESCRIPTION_LABELSENTRY._options = None + _TABLEPROFILEDESCRIPTION_LABELSENTRY._serialized_options = b'8\001' + _EXECUTESCANQUERYREQUEST_PARAMETERSENTRY._options = None + _EXECUTESCANQUERYREQUEST_PARAMETERSENTRY._serialized_options = b'8\001' + _STORETYPE._serialized_start=20290 + _STORETYPE._serialized_end=20372 + _CREATESESSIONREQUEST._serialized_start=413 + _CREATESESSIONREQUEST._serialized_end=494 + _CREATESESSIONRESPONSE._serialized_start=496 + _CREATESESSIONRESPONSE._serialized_end=565 + _CREATESESSIONRESULT._serialized_start=567 + _CREATESESSIONRESULT._serialized_end=608 + _DELETESESSIONREQUEST._serialized_start=610 + _DELETESESSIONREQUEST._serialized_end=711 + _DELETESESSIONRESPONSE._serialized_start=713 + _DELETESESSIONRESPONSE._serialized_end=782 + _GLOBALINDEX._serialized_start=784 + _GLOBALINDEX._serialized_end=797 + _GLOBALASYNCINDEX._serialized_start=799 + _GLOBALASYNCINDEX._serialized_end=817 + _GLOBALUNIQUEINDEX._serialized_start=819 + _GLOBALUNIQUEINDEX._serialized_end=838 + _TABLEINDEX._serialized_start=841 + _TABLEINDEX._serialized_end=1088 + _TABLEINDEXDESCRIPTION._serialized_start=1091 + _TABLEINDEXDESCRIPTION._serialized_end=1499 + _TABLEINDEXDESCRIPTION_STATUS._serialized_start=1420 + _TABLEINDEXDESCRIPTION_STATUS._serialized_end=1491 + _INDEXBUILDSTATE._serialized_start=1502 + _INDEXBUILDSTATE._serialized_end=1723 + _INDEXBUILDSTATE_STATE._serialized_start=1522 + _INDEXBUILDSTATE_STATE._serialized_end=1723 + _INDEXBUILDDESCRIPTION._serialized_start=1725 + _INDEXBUILDDESCRIPTION._serialized_end=1800 + _INDEXBUILDMETADATA._serialized_start=1803 + _INDEXBUILDMETADATA._serialized_end=1945 + _CHANGEFEEDMODE._serialized_start=1948 + _CHANGEFEEDMODE._serialized_end=2102 + _CHANGEFEEDMODE_MODE._serialized_start=1967 + _CHANGEFEEDMODE_MODE._serialized_end=2102 + _CHANGEFEEDFORMAT._serialized_start=2105 + _CHANGEFEEDFORMAT._serialized_end=2234 + _CHANGEFEEDFORMAT_FORMAT._serialized_start=2125 + _CHANGEFEEDFORMAT_FORMAT._serialized_end=2234 + _CHANGEFEED._serialized_start=2237 + _CHANGEFEED._serialized_end=2763 + _CHANGEFEED_ATTRIBUTESENTRY._serialized_start=2714 + _CHANGEFEED_ATTRIBUTESENTRY._serialized_end=2763 + _CHANGEFEEDDESCRIPTION._serialized_start=2766 + _CHANGEFEEDDESCRIPTION._serialized_end=3285 + _CHANGEFEEDDESCRIPTION_ATTRIBUTESENTRY._serialized_start=2714 + _CHANGEFEEDDESCRIPTION_ATTRIBUTESENTRY._serialized_end=2763 + _CHANGEFEEDDESCRIPTION_STATE._serialized_start=3192 + _CHANGEFEEDDESCRIPTION_STATE._serialized_end=3285 + _STORAGEPOOL._serialized_start=3287 + _STORAGEPOOL._serialized_end=3315 + _STORAGEPOLICY._serialized_start=3318 + _STORAGEPOLICY._serialized_end=3616 + _COLUMNFAMILYPOLICY._serialized_start=3619 + _COLUMNFAMILYPOLICY._serialized_end=3924 + _COLUMNFAMILYPOLICY_COMPRESSION._serialized_start=3848 + _COLUMNFAMILYPOLICY_COMPRESSION._serialized_end=3924 + _COMPACTIONPOLICY._serialized_start=3926 + _COMPACTIONPOLICY._serialized_end=3965 + _EXPLICITPARTITIONS._serialized_start=3967 + _EXPLICITPARTITIONS._serialized_end=4026 + _PARTITIONSTATS._serialized_start=4028 + _PARTITIONSTATS._serialized_end=4111 + _TABLESTATS._serialized_start=4114 + _TABLESTATS._serialized_end=4347 + _PARTITIONINGPOLICY._serialized_start=4350 + _PARTITIONINGPOLICY._serialized_end=4698 + _PARTITIONINGPOLICY_AUTOPARTITIONINGPOLICY._serialized_start=4566 + _PARTITIONINGPOLICY_AUTOPARTITIONINGPOLICY._serialized_end=4684 + _EXECUTIONPOLICY._serialized_start=4700 + _EXECUTIONPOLICY._serialized_end=4738 + _REPLICATIONPOLICY._serialized_start=4741 + _REPLICATIONPOLICY._serialized_end=4918 + _CACHINGPOLICY._serialized_start=4920 + _CACHINGPOLICY._serialized_end=4956 + _TABLEPROFILE._serialized_start=4959 + _TABLEPROFILE._serialized_end=5322 + _SEQUENCEDESCRIPTION._serialized_start=5325 + _SEQUENCEDESCRIPTION._serialized_end=5751 + _SEQUENCEDESCRIPTION_SETVAL._serialized_start=5566 + _SEQUENCEDESCRIPTION_SETVAL._serialized_end=5652 + _COLUMNMETA._serialized_start=5754 + _COLUMNMETA._serialized_end=5972 + _DATETYPECOLUMNMODESETTINGS._serialized_start=5974 + _DATETYPECOLUMNMODESETTINGS._serialized_end=6053 + _VALUESINCEUNIXEPOCHMODESETTINGS._serialized_start=6056 + _VALUESINCEUNIXEPOCHMODESETTINGS._serialized_end=6326 + _VALUESINCEUNIXEPOCHMODESETTINGS_UNIT._serialized_start=6212 + _VALUESINCEUNIXEPOCHMODESETTINGS_UNIT._serialized_end=6326 + _TTLSETTINGS._serialized_start=6329 + _TTLSETTINGS._serialized_end=6525 + _STORAGESETTINGS._serialized_start=6528 + _STORAGESETTINGS._serialized_end=6746 + _COLUMNFAMILY._serialized_start=6749 + _COLUMNFAMILY._serialized_end=7009 + _COLUMNFAMILY_COMPRESSION._serialized_start=6924 + _COLUMNFAMILY_COMPRESSION._serialized_end=7009 + _PARTITIONINGSETTINGS._serialized_start=7012 + _PARTITIONINGSETTINGS._serialized_end=7259 + _AZREADREPLICASSETTINGS._serialized_start=7261 + _AZREADREPLICASSETTINGS._serialized_end=7328 + _CLUSTERREPLICASSETTINGS._serialized_start=7330 + _CLUSTERREPLICASSETTINGS._serialized_end=7425 + _READREPLICASSETTINGS._serialized_start=7427 + _READREPLICASSETTINGS._serialized_end=7543 + _CREATETABLEREQUEST._serialized_start=7546 + _CREATETABLEREQUEST._serialized_end=8484 + _CREATETABLEREQUEST_ATTRIBUTESENTRY._serialized_start=2714 + _CREATETABLEREQUEST_ATTRIBUTESENTRY._serialized_end=2763 + _CREATETABLERESPONSE._serialized_start=8486 + _CREATETABLERESPONSE._serialized_end=8553 + _DROPTABLEREQUEST._serialized_start=8555 + _DROPTABLEREQUEST._serialized_end=8672 + _DROPTABLERESPONSE._serialized_start=8674 + _DROPTABLERESPONSE._serialized_end=8739 + _RENAMEINDEXITEM._serialized_start=8741 + _RENAMEINDEXITEM._serialized_end=8834 + _ALTERTABLEREQUEST._serialized_start=8837 + _ALTERTABLEREQUEST._serialized_end=10010 + _ALTERTABLEREQUEST_ALTERATTRIBUTESENTRY._serialized_start=9924 + _ALTERTABLEREQUEST_ALTERATTRIBUTESENTRY._serialized_end=9978 + _ALTERTABLERESPONSE._serialized_start=10012 + _ALTERTABLERESPONSE._serialized_end=10078 + _COPYTABLEREQUEST._serialized_start=10081 + _COPYTABLEREQUEST._serialized_end=10225 + _COPYTABLERESPONSE._serialized_start=10227 + _COPYTABLERESPONSE._serialized_end=10292 + _COPYTABLEITEM._serialized_start=10294 + _COPYTABLEITEM._serialized_end=10378 + _COPYTABLESREQUEST._serialized_start=10381 + _COPYTABLESREQUEST._serialized_end=10521 + _COPYTABLESRESPONSE._serialized_start=10523 + _COPYTABLESRESPONSE._serialized_end=10589 + _RENAMETABLEITEM._serialized_start=10591 + _RENAMETABLEITEM._serialized_end=10684 + _RENAMETABLESREQUEST._serialized_start=10687 + _RENAMETABLESREQUEST._serialized_end=10831 + _RENAMETABLESRESPONSE._serialized_start=10833 + _RENAMETABLESRESPONSE._serialized_end=10901 + _DESCRIBETABLEREQUEST._serialized_start=10904 + _DESCRIBETABLEREQUEST._serialized_end=11149 + _DESCRIBETABLERESPONSE._serialized_start=11151 + _DESCRIBETABLERESPONSE._serialized_end=11220 + _DESCRIBETABLERESULT._serialized_start=11223 + _DESCRIBETABLERESULT._serialized_end=12064 + _DESCRIBETABLERESULT_ATTRIBUTESENTRY._serialized_start=2714 + _DESCRIBETABLERESULT_ATTRIBUTESENTRY._serialized_end=2763 + _QUERY._serialized_start=12066 + _QUERY._serialized_end=12116 + _SERIALIZABLEMODESETTINGS._serialized_start=12118 + _SERIALIZABLEMODESETTINGS._serialized_end=12144 + _ONLINEMODESETTINGS._serialized_start=12146 + _ONLINEMODESETTINGS._serialized_end=12200 + _STALEMODESETTINGS._serialized_start=12202 + _STALEMODESETTINGS._serialized_end=12221 + _SNAPSHOTMODESETTINGS._serialized_start=12223 + _SNAPSHOTMODESETTINGS._serialized_end=12245 + _TRANSACTIONSETTINGS._serialized_start=12248 + _TRANSACTIONSETTINGS._serialized_end=12531 + _TRANSACTIONCONTROL._serialized_start=12533 + _TRANSACTIONCONTROL._serialized_end=12656 + _QUERYCACHEPOLICY._serialized_start=12658 + _QUERYCACHEPOLICY._serialized_end=12699 + _QUERYSTATSCOLLECTION._serialized_start=12702 + _QUERYSTATSCOLLECTION._serialized_end=12879 + _QUERYSTATSCOLLECTION_MODE._serialized_start=12727 + _QUERYSTATSCOLLECTION_MODE._serialized_end=12879 + _EXECUTEDATAQUERYREQUEST._serialized_start=12882 + _EXECUTEDATAQUERYREQUEST._serialized_end=13328 + _EXECUTEDATAQUERYREQUEST_PARAMETERSENTRY._serialized_start=13262 + _EXECUTEDATAQUERYREQUEST_PARAMETERSENTRY._serialized_end=13328 + _EXECUTEDATAQUERYRESPONSE._serialized_start=13330 + _EXECUTEDATAQUERYRESPONSE._serialized_end=13402 + _EXECUTESCHEMEQUERYREQUEST._serialized_start=13404 + _EXECUTESCHEMEQUERYREQUEST._serialized_end=13528 + _EXECUTESCHEMEQUERYRESPONSE._serialized_start=13530 + _EXECUTESCHEMEQUERYRESPONSE._serialized_end=13604 + _TRANSACTIONMETA._serialized_start=13606 + _TRANSACTIONMETA._serialized_end=13635 + _QUERYMETA._serialized_start=13638 + _QUERYMETA._serialized_end=13797 + _QUERYMETA_PARAMETERSTYPESENTRY._serialized_start=13732 + _QUERYMETA_PARAMETERSTYPESENTRY._serialized_end=13797 + _EXECUTEQUERYRESULT._serialized_start=13800 + _EXECUTEQUERYRESULT._serialized_end=13993 + _EXPLAINDATAQUERYREQUEST._serialized_start=13996 + _EXPLAINDATAQUERYREQUEST._serialized_end=14152 + _EXPLAINDATAQUERYRESPONSE._serialized_start=14154 + _EXPLAINDATAQUERYRESPONSE._serialized_end=14226 + _EXPLAINQUERYRESULT._serialized_start=14228 + _EXPLAINQUERYRESULT._serialized_end=14319 + _PREPAREDATAQUERYREQUEST._serialized_start=14321 + _PREPAREDATAQUERYREQUEST._serialized_end=14443 + _PREPAREDATAQUERYRESPONSE._serialized_start=14445 + _PREPAREDATAQUERYRESPONSE._serialized_end=14517 + _PREPAREQUERYRESULT._serialized_start=14520 + _PREPAREQUERYRESULT._serialized_end=14703 + _PREPAREQUERYRESULT_PARAMETERSTYPESENTRY._serialized_start=13732 + _PREPAREQUERYRESULT_PARAMETERSTYPESENTRY._serialized_end=13797 + _KEEPALIVEREQUEST._serialized_start=14705 + _KEEPALIVEREQUEST._serialized_end=14802 + _KEEPALIVERESPONSE._serialized_start=14804 + _KEEPALIVERESPONSE._serialized_end=14869 + _KEEPALIVERESULT._serialized_start=14872 + _KEEPALIVERESULT._serialized_end=15055 + _KEEPALIVERESULT_SESSIONSTATUS._serialized_start=14957 + _KEEPALIVERESULT_SESSIONSTATUS._serialized_end=15055 + _BEGINTRANSACTIONREQUEST._serialized_start=15058 + _BEGINTRANSACTIONREQUEST._serialized_end=15215 + _BEGINTRANSACTIONRESPONSE._serialized_start=15217 + _BEGINTRANSACTIONRESPONSE._serialized_end=15289 + _BEGINTRANSACTIONRESULT._serialized_start=15291 + _BEGINTRANSACTIONRESULT._serialized_end=15360 + _COMMITTRANSACTIONREQUEST._serialized_start=15363 + _COMMITTRANSACTIONREQUEST._serialized_end=15544 + _COMMITTRANSACTIONRESPONSE._serialized_start=15546 + _COMMITTRANSACTIONRESPONSE._serialized_end=15619 + _COMMITTRANSACTIONRESULT._serialized_start=15621 + _COMMITTRANSACTIONRESULT._serialized_end=15695 + _ROLLBACKTRANSACTIONREQUEST._serialized_start=15697 + _ROLLBACKTRANSACTIONREQUEST._serialized_end=15819 + _ROLLBACKTRANSACTIONRESPONSE._serialized_start=15821 + _ROLLBACKTRANSACTIONRESPONSE._serialized_end=15896 + _STORAGEPOLICYDESCRIPTION._serialized_start=15899 + _STORAGEPOLICYDESCRIPTION._serialized_end=16051 + _STORAGEPOLICYDESCRIPTION_LABELSENTRY._serialized_start=16006 + _STORAGEPOLICYDESCRIPTION_LABELSENTRY._serialized_end=16051 + _COMPACTIONPOLICYDESCRIPTION._serialized_start=16054 + _COMPACTIONPOLICYDESCRIPTION._serialized_end=16212 + _COMPACTIONPOLICYDESCRIPTION_LABELSENTRY._serialized_start=16006 + _COMPACTIONPOLICYDESCRIPTION_LABELSENTRY._serialized_end=16051 + _PARTITIONINGPOLICYDESCRIPTION._serialized_start=16215 + _PARTITIONINGPOLICYDESCRIPTION._serialized_end=16377 + _PARTITIONINGPOLICYDESCRIPTION_LABELSENTRY._serialized_start=16006 + _PARTITIONINGPOLICYDESCRIPTION_LABELSENTRY._serialized_end=16051 + _EXECUTIONPOLICYDESCRIPTION._serialized_start=16380 + _EXECUTIONPOLICYDESCRIPTION._serialized_end=16536 + _EXECUTIONPOLICYDESCRIPTION_LABELSENTRY._serialized_start=16006 + _EXECUTIONPOLICYDESCRIPTION_LABELSENTRY._serialized_end=16051 + _REPLICATIONPOLICYDESCRIPTION._serialized_start=16539 + _REPLICATIONPOLICYDESCRIPTION._serialized_end=16699 + _REPLICATIONPOLICYDESCRIPTION_LABELSENTRY._serialized_start=16006 + _REPLICATIONPOLICYDESCRIPTION_LABELSENTRY._serialized_end=16051 + _CACHINGPOLICYDESCRIPTION._serialized_start=16702 + _CACHINGPOLICYDESCRIPTION._serialized_end=16854 + _CACHINGPOLICYDESCRIPTION_LABELSENTRY._serialized_start=16006 + _CACHINGPOLICYDESCRIPTION_LABELSENTRY._serialized_end=16051 + _TABLEPROFILEDESCRIPTION._serialized_start=16857 + _TABLEPROFILEDESCRIPTION._serialized_end=17431 + _TABLEPROFILEDESCRIPTION_LABELSENTRY._serialized_start=16006 + _TABLEPROFILEDESCRIPTION_LABELSENTRY._serialized_end=16051 + _DESCRIBETABLEOPTIONSREQUEST._serialized_start=17433 + _DESCRIBETABLEOPTIONSREQUEST._serialized_end=17521 + _DESCRIBETABLEOPTIONSRESPONSE._serialized_start=17523 + _DESCRIBETABLEOPTIONSRESPONSE._serialized_end=17599 + _DESCRIBETABLEOPTIONSRESULT._serialized_start=17602 + _DESCRIBETABLEOPTIONSRESULT._serialized_end=18139 + _KEYRANGE._serialized_start=18142 + _KEYRANGE._serialized_end=18334 + _READTABLEREQUEST._serialized_start=18337 + _READTABLEREQUEST._serialized_end=18649 + _READTABLERESPONSE._serialized_start=18652 + _READTABLERESPONSE._serialized_end=18840 + _READTABLERESULT._serialized_start=18842 + _READTABLERESULT._serialized_end=18895 + _READROWSREQUEST._serialized_start=18897 + _READROWSREQUEST._serialized_end=18996 + _READROWSRESPONSE._serialized_start=18999 + _READROWSRESPONSE._serialized_end=19137 + _BULKUPSERTREQUEST._serialized_start=19140 + _BULKUPSERTREQUEST._serialized_end=19409 + _BULKUPSERTRESPONSE._serialized_start=19411 + _BULKUPSERTRESPONSE._serialized_end=19477 + _BULKUPSERTRESULT._serialized_start=19479 + _BULKUPSERTRESULT._serialized_end=19497 + _EXECUTESCANQUERYREQUEST._serialized_start=19500 + _EXECUTESCANQUERYREQUEST._serialized_end=19935 + _EXECUTESCANQUERYREQUEST_PARAMETERSENTRY._serialized_start=13262 + _EXECUTESCANQUERYREQUEST_PARAMETERSENTRY._serialized_end=13328 + _EXECUTESCANQUERYREQUEST_MODE._serialized_start=19850 + _EXECUTESCANQUERYREQUEST_MODE._serialized_end=19911 + _EXECUTESCANQUERYPARTIALRESPONSE._serialized_start=19938 + _EXECUTESCANQUERYPARTIALRESPONSE._serialized_end=20113 + _EXECUTESCANQUERYPARTIALRESULT._serialized_start=20116 + _EXECUTESCANQUERYPARTIALRESULT._serialized_end=20288 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_table_pb2.pyi b/ydb/_grpc/v5/protos/ydb_table_pb2.pyi new file mode 100644 index 00000000..19da81a5 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_table_pb2.pyi @@ -0,0 +1,1399 @@ +from protos.annotations import validation_pb2 as _validation_pb2 +from protos import ydb_common_pb2 as _ydb_common_pb2 +from protos import ydb_issue_message_pb2 as _ydb_issue_message_pb2 +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from protos import ydb_query_stats_pb2 as _ydb_query_stats_pb2 +from protos import ydb_value_pb2 as _ydb_value_pb2 +from protos import ydb_scheme_pb2 as _ydb_scheme_pb2 +from protos import ydb_status_codes_pb2 as _ydb_status_codes_pb2 +from protos import ydb_topic_pb2 as _ydb_topic_pb2 +from protos import ydb_formats_pb2 as _ydb_formats_pb2 +from google.protobuf import empty_pb2 as _empty_pb2 +from google.protobuf import duration_pb2 as _duration_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor +STORE_TYPE_COLUMN: StoreType +STORE_TYPE_ROW: StoreType +STORE_TYPE_UNSPECIFIED: StoreType + +class AlterTableRequest(_message.Message): + __slots__ = ["add_changefeeds", "add_column_families", "add_columns", "add_indexes", "alter_attributes", "alter_column_families", "alter_columns", "alter_partitioning_settings", "alter_storage_settings", "drop_changefeeds", "drop_columns", "drop_indexes", "drop_tiering", "drop_ttl_settings", "operation_params", "path", "rename_indexes", "session_id", "set_compaction_policy", "set_key_bloom_filter", "set_read_replicas_settings", "set_tiering", "set_ttl_settings"] + class AlterAttributesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ADD_CHANGEFEEDS_FIELD_NUMBER: _ClassVar[int] + ADD_COLUMNS_FIELD_NUMBER: _ClassVar[int] + ADD_COLUMN_FAMILIES_FIELD_NUMBER: _ClassVar[int] + ADD_INDEXES_FIELD_NUMBER: _ClassVar[int] + ALTER_ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] + ALTER_COLUMNS_FIELD_NUMBER: _ClassVar[int] + ALTER_COLUMN_FAMILIES_FIELD_NUMBER: _ClassVar[int] + ALTER_PARTITIONING_SETTINGS_FIELD_NUMBER: _ClassVar[int] + ALTER_STORAGE_SETTINGS_FIELD_NUMBER: _ClassVar[int] + DROP_CHANGEFEEDS_FIELD_NUMBER: _ClassVar[int] + DROP_COLUMNS_FIELD_NUMBER: _ClassVar[int] + DROP_INDEXES_FIELD_NUMBER: _ClassVar[int] + DROP_TIERING_FIELD_NUMBER: _ClassVar[int] + DROP_TTL_SETTINGS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + RENAME_INDEXES_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + SET_COMPACTION_POLICY_FIELD_NUMBER: _ClassVar[int] + SET_KEY_BLOOM_FILTER_FIELD_NUMBER: _ClassVar[int] + SET_READ_REPLICAS_SETTINGS_FIELD_NUMBER: _ClassVar[int] + SET_TIERING_FIELD_NUMBER: _ClassVar[int] + SET_TTL_SETTINGS_FIELD_NUMBER: _ClassVar[int] + add_changefeeds: _containers.RepeatedCompositeFieldContainer[Changefeed] + add_column_families: _containers.RepeatedCompositeFieldContainer[ColumnFamily] + add_columns: _containers.RepeatedCompositeFieldContainer[ColumnMeta] + add_indexes: _containers.RepeatedCompositeFieldContainer[TableIndex] + alter_attributes: _containers.ScalarMap[str, str] + alter_column_families: _containers.RepeatedCompositeFieldContainer[ColumnFamily] + alter_columns: _containers.RepeatedCompositeFieldContainer[ColumnMeta] + alter_partitioning_settings: PartitioningSettings + alter_storage_settings: StorageSettings + drop_changefeeds: _containers.RepeatedScalarFieldContainer[str] + drop_columns: _containers.RepeatedScalarFieldContainer[str] + drop_indexes: _containers.RepeatedScalarFieldContainer[str] + drop_tiering: _empty_pb2.Empty + drop_ttl_settings: _empty_pb2.Empty + operation_params: _ydb_operation_pb2.OperationParams + path: str + rename_indexes: _containers.RepeatedCompositeFieldContainer[RenameIndexItem] + session_id: str + set_compaction_policy: str + set_key_bloom_filter: _ydb_common_pb2.FeatureFlag.Status + set_read_replicas_settings: ReadReplicasSettings + set_tiering: str + set_ttl_settings: TtlSettings + def __init__(self, session_id: _Optional[str] = ..., path: _Optional[str] = ..., add_columns: _Optional[_Iterable[_Union[ColumnMeta, _Mapping]]] = ..., drop_columns: _Optional[_Iterable[str]] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., alter_columns: _Optional[_Iterable[_Union[ColumnMeta, _Mapping]]] = ..., set_ttl_settings: _Optional[_Union[TtlSettings, _Mapping]] = ..., drop_ttl_settings: _Optional[_Union[_empty_pb2.Empty, _Mapping]] = ..., add_indexes: _Optional[_Iterable[_Union[TableIndex, _Mapping]]] = ..., drop_indexes: _Optional[_Iterable[str]] = ..., alter_storage_settings: _Optional[_Union[StorageSettings, _Mapping]] = ..., add_column_families: _Optional[_Iterable[_Union[ColumnFamily, _Mapping]]] = ..., alter_column_families: _Optional[_Iterable[_Union[ColumnFamily, _Mapping]]] = ..., alter_attributes: _Optional[_Mapping[str, str]] = ..., set_compaction_policy: _Optional[str] = ..., alter_partitioning_settings: _Optional[_Union[PartitioningSettings, _Mapping]] = ..., set_key_bloom_filter: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., set_read_replicas_settings: _Optional[_Union[ReadReplicasSettings, _Mapping]] = ..., add_changefeeds: _Optional[_Iterable[_Union[Changefeed, _Mapping]]] = ..., drop_changefeeds: _Optional[_Iterable[str]] = ..., rename_indexes: _Optional[_Iterable[_Union[RenameIndexItem, _Mapping]]] = ..., set_tiering: _Optional[str] = ..., drop_tiering: _Optional[_Union[_empty_pb2.Empty, _Mapping]] = ...) -> None: ... + +class AlterTableResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class AzReadReplicasSettings(_message.Message): + __slots__ = ["name", "read_replicas_count"] + NAME_FIELD_NUMBER: _ClassVar[int] + READ_REPLICAS_COUNT_FIELD_NUMBER: _ClassVar[int] + name: str + read_replicas_count: int + def __init__(self, name: _Optional[str] = ..., read_replicas_count: _Optional[int] = ...) -> None: ... + +class BeginTransactionRequest(_message.Message): + __slots__ = ["operation_params", "session_id", "tx_settings"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TX_SETTINGS_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + session_id: str + tx_settings: TransactionSettings + def __init__(self, session_id: _Optional[str] = ..., tx_settings: _Optional[_Union[TransactionSettings, _Mapping]] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class BeginTransactionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class BeginTransactionResult(_message.Message): + __slots__ = ["tx_meta"] + TX_META_FIELD_NUMBER: _ClassVar[int] + tx_meta: TransactionMeta + def __init__(self, tx_meta: _Optional[_Union[TransactionMeta, _Mapping]] = ...) -> None: ... + +class BulkUpsertRequest(_message.Message): + __slots__ = ["arrow_batch_settings", "csv_settings", "data", "operation_params", "rows", "table"] + ARROW_BATCH_SETTINGS_FIELD_NUMBER: _ClassVar[int] + CSV_SETTINGS_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + ROWS_FIELD_NUMBER: _ClassVar[int] + TABLE_FIELD_NUMBER: _ClassVar[int] + arrow_batch_settings: _ydb_formats_pb2.ArrowBatchSettings + csv_settings: _ydb_formats_pb2.CsvSettings + data: bytes + operation_params: _ydb_operation_pb2.OperationParams + rows: _ydb_value_pb2.TypedValue + table: str + def __init__(self, table: _Optional[str] = ..., rows: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., arrow_batch_settings: _Optional[_Union[_ydb_formats_pb2.ArrowBatchSettings, _Mapping]] = ..., csv_settings: _Optional[_Union[_ydb_formats_pb2.CsvSettings, _Mapping]] = ..., data: _Optional[bytes] = ...) -> None: ... + +class BulkUpsertResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class BulkUpsertResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class CachingPolicy(_message.Message): + __slots__ = ["preset_name"] + PRESET_NAME_FIELD_NUMBER: _ClassVar[int] + preset_name: str + def __init__(self, preset_name: _Optional[str] = ...) -> None: ... + +class CachingPolicyDescription(_message.Message): + __slots__ = ["labels", "name"] + class LabelsEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + LABELS_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + labels: _containers.ScalarMap[str, str] + name: str + def __init__(self, name: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class Changefeed(_message.Message): + __slots__ = ["attributes", "aws_region", "format", "initial_scan", "mode", "name", "resolved_timestamps_interval", "retention_period", "topic_partitioning_settings", "virtual_timestamps"] + class AttributesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] + AWS_REGION_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + INITIAL_SCAN_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + RESOLVED_TIMESTAMPS_INTERVAL_FIELD_NUMBER: _ClassVar[int] + RETENTION_PERIOD_FIELD_NUMBER: _ClassVar[int] + TOPIC_PARTITIONING_SETTINGS_FIELD_NUMBER: _ClassVar[int] + VIRTUAL_TIMESTAMPS_FIELD_NUMBER: _ClassVar[int] + attributes: _containers.ScalarMap[str, str] + aws_region: str + format: ChangefeedFormat.Format + initial_scan: bool + mode: ChangefeedMode.Mode + name: str + resolved_timestamps_interval: _duration_pb2.Duration + retention_period: _duration_pb2.Duration + topic_partitioning_settings: _ydb_topic_pb2.PartitioningSettings + virtual_timestamps: bool + def __init__(self, name: _Optional[str] = ..., mode: _Optional[_Union[ChangefeedMode.Mode, str]] = ..., format: _Optional[_Union[ChangefeedFormat.Format, str]] = ..., retention_period: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., virtual_timestamps: bool = ..., initial_scan: bool = ..., attributes: _Optional[_Mapping[str, str]] = ..., aws_region: _Optional[str] = ..., resolved_timestamps_interval: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., topic_partitioning_settings: _Optional[_Union[_ydb_topic_pb2.PartitioningSettings, _Mapping]] = ...) -> None: ... + +class ChangefeedDescription(_message.Message): + __slots__ = ["attributes", "aws_region", "format", "mode", "name", "resolved_timestamps_interval", "state", "virtual_timestamps"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class AttributesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] + AWS_REGION_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + RESOLVED_TIMESTAMPS_INTERVAL_FIELD_NUMBER: _ClassVar[int] + STATE_DISABLED: ChangefeedDescription.State + STATE_ENABLED: ChangefeedDescription.State + STATE_FIELD_NUMBER: _ClassVar[int] + STATE_INITIAL_SCAN: ChangefeedDescription.State + STATE_UNSPECIFIED: ChangefeedDescription.State + VIRTUAL_TIMESTAMPS_FIELD_NUMBER: _ClassVar[int] + attributes: _containers.ScalarMap[str, str] + aws_region: str + format: ChangefeedFormat.Format + mode: ChangefeedMode.Mode + name: str + resolved_timestamps_interval: _duration_pb2.Duration + state: ChangefeedDescription.State + virtual_timestamps: bool + def __init__(self, name: _Optional[str] = ..., mode: _Optional[_Union[ChangefeedMode.Mode, str]] = ..., format: _Optional[_Union[ChangefeedFormat.Format, str]] = ..., state: _Optional[_Union[ChangefeedDescription.State, str]] = ..., virtual_timestamps: bool = ..., attributes: _Optional[_Mapping[str, str]] = ..., aws_region: _Optional[str] = ..., resolved_timestamps_interval: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...) -> None: ... + +class ChangefeedFormat(_message.Message): + __slots__ = [] + class Format(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + FORMAT_DEBEZIUM_JSON: ChangefeedFormat.Format + FORMAT_DYNAMODB_STREAMS_JSON: ChangefeedFormat.Format + FORMAT_JSON: ChangefeedFormat.Format + FORMAT_UNSPECIFIED: ChangefeedFormat.Format + def __init__(self) -> None: ... + +class ChangefeedMode(_message.Message): + __slots__ = [] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + MODE_KEYS_ONLY: ChangefeedMode.Mode + MODE_NEW_AND_OLD_IMAGES: ChangefeedMode.Mode + MODE_NEW_IMAGE: ChangefeedMode.Mode + MODE_OLD_IMAGE: ChangefeedMode.Mode + MODE_UNSPECIFIED: ChangefeedMode.Mode + MODE_UPDATES: ChangefeedMode.Mode + def __init__(self) -> None: ... + +class ClusterReplicasSettings(_message.Message): + __slots__ = ["az_read_replicas_settings"] + AZ_READ_REPLICAS_SETTINGS_FIELD_NUMBER: _ClassVar[int] + az_read_replicas_settings: _containers.RepeatedCompositeFieldContainer[AzReadReplicasSettings] + def __init__(self, az_read_replicas_settings: _Optional[_Iterable[_Union[AzReadReplicasSettings, _Mapping]]] = ...) -> None: ... + +class ColumnFamily(_message.Message): + __slots__ = ["compression", "data", "keep_in_memory", "name"] + class Compression(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + COMPRESSION_FIELD_NUMBER: _ClassVar[int] + COMPRESSION_LZ4: ColumnFamily.Compression + COMPRESSION_NONE: ColumnFamily.Compression + COMPRESSION_UNSPECIFIED: ColumnFamily.Compression + DATA_FIELD_NUMBER: _ClassVar[int] + KEEP_IN_MEMORY_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + compression: ColumnFamily.Compression + data: StoragePool + keep_in_memory: _ydb_common_pb2.FeatureFlag.Status + name: str + def __init__(self, name: _Optional[str] = ..., data: _Optional[_Union[StoragePool, _Mapping]] = ..., compression: _Optional[_Union[ColumnFamily.Compression, str]] = ..., keep_in_memory: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ...) -> None: ... + +class ColumnFamilyPolicy(_message.Message): + __slots__ = ["compression", "data", "external", "keep_in_memory", "name"] + class Compression(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + COMPRESSED: ColumnFamilyPolicy.Compression + COMPRESSION_FIELD_NUMBER: _ClassVar[int] + COMPRESSION_UNSPECIFIED: ColumnFamilyPolicy.Compression + DATA_FIELD_NUMBER: _ClassVar[int] + EXTERNAL_FIELD_NUMBER: _ClassVar[int] + KEEP_IN_MEMORY_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + UNCOMPRESSED: ColumnFamilyPolicy.Compression + compression: ColumnFamilyPolicy.Compression + data: StoragePool + external: StoragePool + keep_in_memory: _ydb_common_pb2.FeatureFlag.Status + name: str + def __init__(self, name: _Optional[str] = ..., data: _Optional[_Union[StoragePool, _Mapping]] = ..., external: _Optional[_Union[StoragePool, _Mapping]] = ..., keep_in_memory: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., compression: _Optional[_Union[ColumnFamilyPolicy.Compression, str]] = ...) -> None: ... + +class ColumnMeta(_message.Message): + __slots__ = ["family", "from_literal", "from_sequence", "name", "not_null", "type"] + FAMILY_FIELD_NUMBER: _ClassVar[int] + FROM_LITERAL_FIELD_NUMBER: _ClassVar[int] + FROM_SEQUENCE_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + NOT_NULL_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + family: str + from_literal: _ydb_value_pb2.TypedValue + from_sequence: SequenceDescription + name: str + not_null: bool + type: _ydb_value_pb2.Type + def __init__(self, name: _Optional[str] = ..., type: _Optional[_Union[_ydb_value_pb2.Type, _Mapping]] = ..., family: _Optional[str] = ..., not_null: bool = ..., from_literal: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ..., from_sequence: _Optional[_Union[SequenceDescription, _Mapping]] = ...) -> None: ... + +class CommitTransactionRequest(_message.Message): + __slots__ = ["collect_stats", "operation_params", "session_id", "tx_id"] + COLLECT_STATS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TX_ID_FIELD_NUMBER: _ClassVar[int] + collect_stats: QueryStatsCollection.Mode + operation_params: _ydb_operation_pb2.OperationParams + session_id: str + tx_id: str + def __init__(self, session_id: _Optional[str] = ..., tx_id: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., collect_stats: _Optional[_Union[QueryStatsCollection.Mode, str]] = ...) -> None: ... + +class CommitTransactionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CommitTransactionResult(_message.Message): + __slots__ = ["query_stats"] + QUERY_STATS_FIELD_NUMBER: _ClassVar[int] + query_stats: _ydb_query_stats_pb2.QueryStats + def __init__(self, query_stats: _Optional[_Union[_ydb_query_stats_pb2.QueryStats, _Mapping]] = ...) -> None: ... + +class CompactionPolicy(_message.Message): + __slots__ = ["preset_name"] + PRESET_NAME_FIELD_NUMBER: _ClassVar[int] + preset_name: str + def __init__(self, preset_name: _Optional[str] = ...) -> None: ... + +class CompactionPolicyDescription(_message.Message): + __slots__ = ["labels", "name"] + class LabelsEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + LABELS_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + labels: _containers.ScalarMap[str, str] + name: str + def __init__(self, name: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class CopyTableItem(_message.Message): + __slots__ = ["destination_path", "omit_indexes", "source_path"] + DESTINATION_PATH_FIELD_NUMBER: _ClassVar[int] + OMIT_INDEXES_FIELD_NUMBER: _ClassVar[int] + SOURCE_PATH_FIELD_NUMBER: _ClassVar[int] + destination_path: str + omit_indexes: bool + source_path: str + def __init__(self, source_path: _Optional[str] = ..., destination_path: _Optional[str] = ..., omit_indexes: bool = ...) -> None: ... + +class CopyTableRequest(_message.Message): + __slots__ = ["destination_path", "operation_params", "session_id", "source_path"] + DESTINATION_PATH_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + SOURCE_PATH_FIELD_NUMBER: _ClassVar[int] + destination_path: str + operation_params: _ydb_operation_pb2.OperationParams + session_id: str + source_path: str + def __init__(self, session_id: _Optional[str] = ..., source_path: _Optional[str] = ..., destination_path: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class CopyTableResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CopyTablesRequest(_message.Message): + __slots__ = ["operation_params", "session_id", "tables"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TABLES_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + session_id: str + tables: _containers.RepeatedCompositeFieldContainer[CopyTableItem] + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., session_id: _Optional[str] = ..., tables: _Optional[_Iterable[_Union[CopyTableItem, _Mapping]]] = ...) -> None: ... + +class CopyTablesResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CreateSessionRequest(_message.Message): + __slots__ = ["operation_params"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class CreateSessionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CreateSessionResult(_message.Message): + __slots__ = ["session_id"] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + session_id: str + def __init__(self, session_id: _Optional[str] = ...) -> None: ... + +class CreateTableRequest(_message.Message): + __slots__ = ["attributes", "column_families", "columns", "compaction_policy", "indexes", "key_bloom_filter", "operation_params", "partition_at_keys", "partitioning_settings", "path", "primary_key", "profile", "read_replicas_settings", "session_id", "storage_settings", "store_type", "temporary", "tiering", "ttl_settings", "uniform_partitions"] + class AttributesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] + COLUMNS_FIELD_NUMBER: _ClassVar[int] + COLUMN_FAMILIES_FIELD_NUMBER: _ClassVar[int] + COMPACTION_POLICY_FIELD_NUMBER: _ClassVar[int] + INDEXES_FIELD_NUMBER: _ClassVar[int] + KEY_BLOOM_FILTER_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITIONING_SETTINGS_FIELD_NUMBER: _ClassVar[int] + PARTITION_AT_KEYS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + PRIMARY_KEY_FIELD_NUMBER: _ClassVar[int] + PROFILE_FIELD_NUMBER: _ClassVar[int] + READ_REPLICAS_SETTINGS_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + STORAGE_SETTINGS_FIELD_NUMBER: _ClassVar[int] + STORE_TYPE_FIELD_NUMBER: _ClassVar[int] + TEMPORARY_FIELD_NUMBER: _ClassVar[int] + TIERING_FIELD_NUMBER: _ClassVar[int] + TTL_SETTINGS_FIELD_NUMBER: _ClassVar[int] + UNIFORM_PARTITIONS_FIELD_NUMBER: _ClassVar[int] + attributes: _containers.ScalarMap[str, str] + column_families: _containers.RepeatedCompositeFieldContainer[ColumnFamily] + columns: _containers.RepeatedCompositeFieldContainer[ColumnMeta] + compaction_policy: str + indexes: _containers.RepeatedCompositeFieldContainer[TableIndex] + key_bloom_filter: _ydb_common_pb2.FeatureFlag.Status + operation_params: _ydb_operation_pb2.OperationParams + partition_at_keys: ExplicitPartitions + partitioning_settings: PartitioningSettings + path: str + primary_key: _containers.RepeatedScalarFieldContainer[str] + profile: TableProfile + read_replicas_settings: ReadReplicasSettings + session_id: str + storage_settings: StorageSettings + store_type: StoreType + temporary: bool + tiering: str + ttl_settings: TtlSettings + uniform_partitions: int + def __init__(self, session_id: _Optional[str] = ..., path: _Optional[str] = ..., columns: _Optional[_Iterable[_Union[ColumnMeta, _Mapping]]] = ..., primary_key: _Optional[_Iterable[str]] = ..., profile: _Optional[_Union[TableProfile, _Mapping]] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., indexes: _Optional[_Iterable[_Union[TableIndex, _Mapping]]] = ..., ttl_settings: _Optional[_Union[TtlSettings, _Mapping]] = ..., storage_settings: _Optional[_Union[StorageSettings, _Mapping]] = ..., column_families: _Optional[_Iterable[_Union[ColumnFamily, _Mapping]]] = ..., attributes: _Optional[_Mapping[str, str]] = ..., compaction_policy: _Optional[str] = ..., uniform_partitions: _Optional[int] = ..., partition_at_keys: _Optional[_Union[ExplicitPartitions, _Mapping]] = ..., partitioning_settings: _Optional[_Union[PartitioningSettings, _Mapping]] = ..., key_bloom_filter: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., read_replicas_settings: _Optional[_Union[ReadReplicasSettings, _Mapping]] = ..., tiering: _Optional[str] = ..., temporary: bool = ..., store_type: _Optional[_Union[StoreType, str]] = ...) -> None: ... + +class CreateTableResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DateTypeColumnModeSettings(_message.Message): + __slots__ = ["column_name", "expire_after_seconds"] + COLUMN_NAME_FIELD_NUMBER: _ClassVar[int] + EXPIRE_AFTER_SECONDS_FIELD_NUMBER: _ClassVar[int] + column_name: str + expire_after_seconds: int + def __init__(self, column_name: _Optional[str] = ..., expire_after_seconds: _Optional[int] = ...) -> None: ... + +class DeleteSessionRequest(_message.Message): + __slots__ = ["operation_params", "session_id"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + session_id: str + def __init__(self, session_id: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class DeleteSessionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeTableOptionsRequest(_message.Message): + __slots__ = ["operation_params"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class DescribeTableOptionsResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeTableOptionsResult(_message.Message): + __slots__ = ["caching_policy_presets", "compaction_policy_presets", "execution_policy_presets", "partitioning_policy_presets", "replication_policy_presets", "storage_policy_presets", "table_profile_presets"] + CACHING_POLICY_PRESETS_FIELD_NUMBER: _ClassVar[int] + COMPACTION_POLICY_PRESETS_FIELD_NUMBER: _ClassVar[int] + EXECUTION_POLICY_PRESETS_FIELD_NUMBER: _ClassVar[int] + PARTITIONING_POLICY_PRESETS_FIELD_NUMBER: _ClassVar[int] + REPLICATION_POLICY_PRESETS_FIELD_NUMBER: _ClassVar[int] + STORAGE_POLICY_PRESETS_FIELD_NUMBER: _ClassVar[int] + TABLE_PROFILE_PRESETS_FIELD_NUMBER: _ClassVar[int] + caching_policy_presets: _containers.RepeatedCompositeFieldContainer[CachingPolicyDescription] + compaction_policy_presets: _containers.RepeatedCompositeFieldContainer[CompactionPolicyDescription] + execution_policy_presets: _containers.RepeatedCompositeFieldContainer[ExecutionPolicyDescription] + partitioning_policy_presets: _containers.RepeatedCompositeFieldContainer[PartitioningPolicyDescription] + replication_policy_presets: _containers.RepeatedCompositeFieldContainer[ReplicationPolicyDescription] + storage_policy_presets: _containers.RepeatedCompositeFieldContainer[StoragePolicyDescription] + table_profile_presets: _containers.RepeatedCompositeFieldContainer[TableProfileDescription] + def __init__(self, table_profile_presets: _Optional[_Iterable[_Union[TableProfileDescription, _Mapping]]] = ..., storage_policy_presets: _Optional[_Iterable[_Union[StoragePolicyDescription, _Mapping]]] = ..., compaction_policy_presets: _Optional[_Iterable[_Union[CompactionPolicyDescription, _Mapping]]] = ..., partitioning_policy_presets: _Optional[_Iterable[_Union[PartitioningPolicyDescription, _Mapping]]] = ..., execution_policy_presets: _Optional[_Iterable[_Union[ExecutionPolicyDescription, _Mapping]]] = ..., replication_policy_presets: _Optional[_Iterable[_Union[ReplicationPolicyDescription, _Mapping]]] = ..., caching_policy_presets: _Optional[_Iterable[_Union[CachingPolicyDescription, _Mapping]]] = ...) -> None: ... + +class DescribeTableRequest(_message.Message): + __slots__ = ["include_partition_stats", "include_shard_key_bounds", "include_shard_nodes_info", "include_table_stats", "operation_params", "path", "session_id"] + INCLUDE_PARTITION_STATS_FIELD_NUMBER: _ClassVar[int] + INCLUDE_SHARD_KEY_BOUNDS_FIELD_NUMBER: _ClassVar[int] + INCLUDE_SHARD_NODES_INFO_FIELD_NUMBER: _ClassVar[int] + INCLUDE_TABLE_STATS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + include_partition_stats: bool + include_shard_key_bounds: bool + include_shard_nodes_info: bool + include_table_stats: bool + operation_params: _ydb_operation_pb2.OperationParams + path: str + session_id: str + def __init__(self, session_id: _Optional[str] = ..., path: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., include_shard_key_bounds: bool = ..., include_table_stats: bool = ..., include_partition_stats: bool = ..., include_shard_nodes_info: bool = ...) -> None: ... + +class DescribeTableResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeTableResult(_message.Message): + __slots__ = ["attributes", "changefeeds", "column_families", "columns", "indexes", "key_bloom_filter", "partitioning_settings", "primary_key", "read_replicas_settings", "self", "shard_key_bounds", "storage_settings", "store_type", "table_stats", "temporary", "tiering", "ttl_settings"] + class AttributesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] + CHANGEFEEDS_FIELD_NUMBER: _ClassVar[int] + COLUMNS_FIELD_NUMBER: _ClassVar[int] + COLUMN_FAMILIES_FIELD_NUMBER: _ClassVar[int] + INDEXES_FIELD_NUMBER: _ClassVar[int] + KEY_BLOOM_FILTER_FIELD_NUMBER: _ClassVar[int] + PARTITIONING_SETTINGS_FIELD_NUMBER: _ClassVar[int] + PRIMARY_KEY_FIELD_NUMBER: _ClassVar[int] + READ_REPLICAS_SETTINGS_FIELD_NUMBER: _ClassVar[int] + SELF_FIELD_NUMBER: _ClassVar[int] + SHARD_KEY_BOUNDS_FIELD_NUMBER: _ClassVar[int] + STORAGE_SETTINGS_FIELD_NUMBER: _ClassVar[int] + STORE_TYPE_FIELD_NUMBER: _ClassVar[int] + TABLE_STATS_FIELD_NUMBER: _ClassVar[int] + TEMPORARY_FIELD_NUMBER: _ClassVar[int] + TIERING_FIELD_NUMBER: _ClassVar[int] + TTL_SETTINGS_FIELD_NUMBER: _ClassVar[int] + attributes: _containers.ScalarMap[str, str] + changefeeds: _containers.RepeatedCompositeFieldContainer[ChangefeedDescription] + column_families: _containers.RepeatedCompositeFieldContainer[ColumnFamily] + columns: _containers.RepeatedCompositeFieldContainer[ColumnMeta] + indexes: _containers.RepeatedCompositeFieldContainer[TableIndexDescription] + key_bloom_filter: _ydb_common_pb2.FeatureFlag.Status + partitioning_settings: PartitioningSettings + primary_key: _containers.RepeatedScalarFieldContainer[str] + read_replicas_settings: ReadReplicasSettings + self: _ydb_scheme_pb2.Entry + shard_key_bounds: _containers.RepeatedCompositeFieldContainer[_ydb_value_pb2.TypedValue] + storage_settings: StorageSettings + store_type: StoreType + table_stats: TableStats + temporary: bool + tiering: str + ttl_settings: TtlSettings + def __init__(self, self_: _Optional[_Union[_ydb_scheme_pb2.Entry, _Mapping]] = ..., columns: _Optional[_Iterable[_Union[ColumnMeta, _Mapping]]] = ..., primary_key: _Optional[_Iterable[str]] = ..., shard_key_bounds: _Optional[_Iterable[_Union[_ydb_value_pb2.TypedValue, _Mapping]]] = ..., indexes: _Optional[_Iterable[_Union[TableIndexDescription, _Mapping]]] = ..., table_stats: _Optional[_Union[TableStats, _Mapping]] = ..., ttl_settings: _Optional[_Union[TtlSettings, _Mapping]] = ..., storage_settings: _Optional[_Union[StorageSettings, _Mapping]] = ..., column_families: _Optional[_Iterable[_Union[ColumnFamily, _Mapping]]] = ..., attributes: _Optional[_Mapping[str, str]] = ..., partitioning_settings: _Optional[_Union[PartitioningSettings, _Mapping]] = ..., key_bloom_filter: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., read_replicas_settings: _Optional[_Union[ReadReplicasSettings, _Mapping]] = ..., changefeeds: _Optional[_Iterable[_Union[ChangefeedDescription, _Mapping]]] = ..., tiering: _Optional[str] = ..., temporary: bool = ..., store_type: _Optional[_Union[StoreType, str]] = ...) -> None: ... + +class DropTableRequest(_message.Message): + __slots__ = ["operation_params", "path", "session_id"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + path: str + session_id: str + def __init__(self, session_id: _Optional[str] = ..., path: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class DropTableResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ExecuteDataQueryRequest(_message.Message): + __slots__ = ["collect_stats", "operation_params", "parameters", "query", "query_cache_policy", "session_id", "tx_control"] + class ParametersEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: _ydb_value_pb2.TypedValue + def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... + COLLECT_STATS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARAMETERS_FIELD_NUMBER: _ClassVar[int] + QUERY_CACHE_POLICY_FIELD_NUMBER: _ClassVar[int] + QUERY_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TX_CONTROL_FIELD_NUMBER: _ClassVar[int] + collect_stats: QueryStatsCollection.Mode + operation_params: _ydb_operation_pb2.OperationParams + parameters: _containers.MessageMap[str, _ydb_value_pb2.TypedValue] + query: Query + query_cache_policy: QueryCachePolicy + session_id: str + tx_control: TransactionControl + def __init__(self, session_id: _Optional[str] = ..., tx_control: _Optional[_Union[TransactionControl, _Mapping]] = ..., query: _Optional[_Union[Query, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., query_cache_policy: _Optional[_Union[QueryCachePolicy, _Mapping]] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., collect_stats: _Optional[_Union[QueryStatsCollection.Mode, str]] = ...) -> None: ... + +class ExecuteDataQueryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ExecuteQueryResult(_message.Message): + __slots__ = ["query_meta", "query_stats", "result_sets", "tx_meta"] + QUERY_META_FIELD_NUMBER: _ClassVar[int] + QUERY_STATS_FIELD_NUMBER: _ClassVar[int] + RESULT_SETS_FIELD_NUMBER: _ClassVar[int] + TX_META_FIELD_NUMBER: _ClassVar[int] + query_meta: QueryMeta + query_stats: _ydb_query_stats_pb2.QueryStats + result_sets: _containers.RepeatedCompositeFieldContainer[_ydb_value_pb2.ResultSet] + tx_meta: TransactionMeta + def __init__(self, result_sets: _Optional[_Iterable[_Union[_ydb_value_pb2.ResultSet, _Mapping]]] = ..., tx_meta: _Optional[_Union[TransactionMeta, _Mapping]] = ..., query_meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., query_stats: _Optional[_Union[_ydb_query_stats_pb2.QueryStats, _Mapping]] = ...) -> None: ... + +class ExecuteScanQueryPartialResponse(_message.Message): + __slots__ = ["issues", "result", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + RESULT_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + result: ExecuteScanQueryPartialResult + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., result: _Optional[_Union[ExecuteScanQueryPartialResult, _Mapping]] = ...) -> None: ... + +class ExecuteScanQueryPartialResult(_message.Message): + __slots__ = ["query_full_diagnostics", "query_stats", "result_set"] + QUERY_FULL_DIAGNOSTICS_FIELD_NUMBER: _ClassVar[int] + QUERY_STATS_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_FIELD_NUMBER: _ClassVar[int] + query_full_diagnostics: str + query_stats: _ydb_query_stats_pb2.QueryStats + result_set: _ydb_value_pb2.ResultSet + def __init__(self, result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ..., query_stats: _Optional[_Union[_ydb_query_stats_pb2.QueryStats, _Mapping]] = ..., query_full_diagnostics: _Optional[str] = ...) -> None: ... + +class ExecuteScanQueryRequest(_message.Message): + __slots__ = ["collect_full_diagnostics", "collect_stats", "mode", "parameters", "query"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class ParametersEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: _ydb_value_pb2.TypedValue + def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... + COLLECT_FULL_DIAGNOSTICS_FIELD_NUMBER: _ClassVar[int] + COLLECT_STATS_FIELD_NUMBER: _ClassVar[int] + MODE_EXEC: ExecuteScanQueryRequest.Mode + MODE_EXPLAIN: ExecuteScanQueryRequest.Mode + MODE_FIELD_NUMBER: _ClassVar[int] + MODE_UNSPECIFIED: ExecuteScanQueryRequest.Mode + PARAMETERS_FIELD_NUMBER: _ClassVar[int] + QUERY_FIELD_NUMBER: _ClassVar[int] + collect_full_diagnostics: bool + collect_stats: QueryStatsCollection.Mode + mode: ExecuteScanQueryRequest.Mode + parameters: _containers.MessageMap[str, _ydb_value_pb2.TypedValue] + query: Query + def __init__(self, query: _Optional[_Union[Query, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., mode: _Optional[_Union[ExecuteScanQueryRequest.Mode, str]] = ..., collect_stats: _Optional[_Union[QueryStatsCollection.Mode, str]] = ..., collect_full_diagnostics: bool = ...) -> None: ... + +class ExecuteSchemeQueryRequest(_message.Message): + __slots__ = ["operation_params", "session_id", "yql_text"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + YQL_TEXT_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + session_id: str + yql_text: str + def __init__(self, session_id: _Optional[str] = ..., yql_text: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class ExecuteSchemeQueryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ExecutionPolicy(_message.Message): + __slots__ = ["preset_name"] + PRESET_NAME_FIELD_NUMBER: _ClassVar[int] + preset_name: str + def __init__(self, preset_name: _Optional[str] = ...) -> None: ... + +class ExecutionPolicyDescription(_message.Message): + __slots__ = ["labels", "name"] + class LabelsEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + LABELS_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + labels: _containers.ScalarMap[str, str] + name: str + def __init__(self, name: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class ExplainDataQueryRequest(_message.Message): + __slots__ = ["collect_full_diagnostics", "operation_params", "session_id", "yql_text"] + COLLECT_FULL_DIAGNOSTICS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + YQL_TEXT_FIELD_NUMBER: _ClassVar[int] + collect_full_diagnostics: bool + operation_params: _ydb_operation_pb2.OperationParams + session_id: str + yql_text: str + def __init__(self, session_id: _Optional[str] = ..., yql_text: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., collect_full_diagnostics: bool = ...) -> None: ... + +class ExplainDataQueryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ExplainQueryResult(_message.Message): + __slots__ = ["query_ast", "query_full_diagnostics", "query_plan"] + QUERY_AST_FIELD_NUMBER: _ClassVar[int] + QUERY_FULL_DIAGNOSTICS_FIELD_NUMBER: _ClassVar[int] + QUERY_PLAN_FIELD_NUMBER: _ClassVar[int] + query_ast: str + query_full_diagnostics: str + query_plan: str + def __init__(self, query_ast: _Optional[str] = ..., query_plan: _Optional[str] = ..., query_full_diagnostics: _Optional[str] = ...) -> None: ... + +class ExplicitPartitions(_message.Message): + __slots__ = ["split_points"] + SPLIT_POINTS_FIELD_NUMBER: _ClassVar[int] + split_points: _containers.RepeatedCompositeFieldContainer[_ydb_value_pb2.TypedValue] + def __init__(self, split_points: _Optional[_Iterable[_Union[_ydb_value_pb2.TypedValue, _Mapping]]] = ...) -> None: ... + +class GlobalAsyncIndex(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class GlobalIndex(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class GlobalUniqueIndex(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class IndexBuildDescription(_message.Message): + __slots__ = ["index", "path"] + INDEX_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + index: TableIndex + path: str + def __init__(self, path: _Optional[str] = ..., index: _Optional[_Union[TableIndex, _Mapping]] = ...) -> None: ... + +class IndexBuildMetadata(_message.Message): + __slots__ = ["description", "progress", "state"] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + PROGRESS_FIELD_NUMBER: _ClassVar[int] + STATE_FIELD_NUMBER: _ClassVar[int] + description: IndexBuildDescription + progress: float + state: IndexBuildState.State + def __init__(self, description: _Optional[_Union[IndexBuildDescription, _Mapping]] = ..., state: _Optional[_Union[IndexBuildState.State, str]] = ..., progress: _Optional[float] = ...) -> None: ... + +class IndexBuildState(_message.Message): + __slots__ = [] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + STATE_APPLYING: IndexBuildState.State + STATE_CANCELLATION: IndexBuildState.State + STATE_CANCELLED: IndexBuildState.State + STATE_DONE: IndexBuildState.State + STATE_PREPARING: IndexBuildState.State + STATE_REJECTED: IndexBuildState.State + STATE_REJECTION: IndexBuildState.State + STATE_TRANSFERING_DATA: IndexBuildState.State + STATE_UNSPECIFIED: IndexBuildState.State + def __init__(self) -> None: ... + +class KeepAliveRequest(_message.Message): + __slots__ = ["operation_params", "session_id"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + session_id: str + def __init__(self, session_id: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class KeepAliveResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class KeepAliveResult(_message.Message): + __slots__ = ["session_status"] + class SessionStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + SESSION_STATUS_BUSY: KeepAliveResult.SessionStatus + SESSION_STATUS_FIELD_NUMBER: _ClassVar[int] + SESSION_STATUS_READY: KeepAliveResult.SessionStatus + SESSION_STATUS_UNSPECIFIED: KeepAliveResult.SessionStatus + session_status: KeepAliveResult.SessionStatus + def __init__(self, session_status: _Optional[_Union[KeepAliveResult.SessionStatus, str]] = ...) -> None: ... + +class KeyRange(_message.Message): + __slots__ = ["greater", "greater_or_equal", "less", "less_or_equal"] + GREATER_FIELD_NUMBER: _ClassVar[int] + GREATER_OR_EQUAL_FIELD_NUMBER: _ClassVar[int] + LESS_FIELD_NUMBER: _ClassVar[int] + LESS_OR_EQUAL_FIELD_NUMBER: _ClassVar[int] + greater: _ydb_value_pb2.TypedValue + greater_or_equal: _ydb_value_pb2.TypedValue + less: _ydb_value_pb2.TypedValue + less_or_equal: _ydb_value_pb2.TypedValue + def __init__(self, greater: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ..., greater_or_equal: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ..., less: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ..., less_or_equal: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... + +class OnlineModeSettings(_message.Message): + __slots__ = ["allow_inconsistent_reads"] + ALLOW_INCONSISTENT_READS_FIELD_NUMBER: _ClassVar[int] + allow_inconsistent_reads: bool + def __init__(self, allow_inconsistent_reads: bool = ...) -> None: ... + +class PartitionStats(_message.Message): + __slots__ = ["leader_node_id", "rows_estimate", "store_size"] + LEADER_NODE_ID_FIELD_NUMBER: _ClassVar[int] + ROWS_ESTIMATE_FIELD_NUMBER: _ClassVar[int] + STORE_SIZE_FIELD_NUMBER: _ClassVar[int] + leader_node_id: int + rows_estimate: int + store_size: int + def __init__(self, rows_estimate: _Optional[int] = ..., store_size: _Optional[int] = ..., leader_node_id: _Optional[int] = ...) -> None: ... + +class PartitioningPolicy(_message.Message): + __slots__ = ["auto_partitioning", "explicit_partitions", "preset_name", "uniform_partitions"] + class AutoPartitioningPolicy(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + AUTO_PARTITIONING_FIELD_NUMBER: _ClassVar[int] + AUTO_PARTITIONING_POLICY_UNSPECIFIED: PartitioningPolicy.AutoPartitioningPolicy + AUTO_SPLIT: PartitioningPolicy.AutoPartitioningPolicy + AUTO_SPLIT_MERGE: PartitioningPolicy.AutoPartitioningPolicy + DISABLED: PartitioningPolicy.AutoPartitioningPolicy + EXPLICIT_PARTITIONS_FIELD_NUMBER: _ClassVar[int] + PRESET_NAME_FIELD_NUMBER: _ClassVar[int] + UNIFORM_PARTITIONS_FIELD_NUMBER: _ClassVar[int] + auto_partitioning: PartitioningPolicy.AutoPartitioningPolicy + explicit_partitions: ExplicitPartitions + preset_name: str + uniform_partitions: int + def __init__(self, preset_name: _Optional[str] = ..., auto_partitioning: _Optional[_Union[PartitioningPolicy.AutoPartitioningPolicy, str]] = ..., uniform_partitions: _Optional[int] = ..., explicit_partitions: _Optional[_Union[ExplicitPartitions, _Mapping]] = ...) -> None: ... + +class PartitioningPolicyDescription(_message.Message): + __slots__ = ["labels", "name"] + class LabelsEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + LABELS_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + labels: _containers.ScalarMap[str, str] + name: str + def __init__(self, name: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class PartitioningSettings(_message.Message): + __slots__ = ["max_partitions_count", "min_partitions_count", "partition_by", "partition_size_mb", "partitioning_by_load", "partitioning_by_size"] + MAX_PARTITIONS_COUNT_FIELD_NUMBER: _ClassVar[int] + MIN_PARTITIONS_COUNT_FIELD_NUMBER: _ClassVar[int] + PARTITIONING_BY_LOAD_FIELD_NUMBER: _ClassVar[int] + PARTITIONING_BY_SIZE_FIELD_NUMBER: _ClassVar[int] + PARTITION_BY_FIELD_NUMBER: _ClassVar[int] + PARTITION_SIZE_MB_FIELD_NUMBER: _ClassVar[int] + max_partitions_count: int + min_partitions_count: int + partition_by: _containers.RepeatedScalarFieldContainer[str] + partition_size_mb: int + partitioning_by_load: _ydb_common_pb2.FeatureFlag.Status + partitioning_by_size: _ydb_common_pb2.FeatureFlag.Status + def __init__(self, partition_by: _Optional[_Iterable[str]] = ..., partitioning_by_size: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., partition_size_mb: _Optional[int] = ..., partitioning_by_load: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., min_partitions_count: _Optional[int] = ..., max_partitions_count: _Optional[int] = ...) -> None: ... + +class PrepareDataQueryRequest(_message.Message): + __slots__ = ["operation_params", "session_id", "yql_text"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + YQL_TEXT_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + session_id: str + yql_text: str + def __init__(self, session_id: _Optional[str] = ..., yql_text: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class PrepareDataQueryResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class PrepareQueryResult(_message.Message): + __slots__ = ["parameters_types", "query_id"] + class ParametersTypesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: _ydb_value_pb2.Type + def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.Type, _Mapping]] = ...) -> None: ... + PARAMETERS_TYPES_FIELD_NUMBER: _ClassVar[int] + QUERY_ID_FIELD_NUMBER: _ClassVar[int] + parameters_types: _containers.MessageMap[str, _ydb_value_pb2.Type] + query_id: str + def __init__(self, query_id: _Optional[str] = ..., parameters_types: _Optional[_Mapping[str, _ydb_value_pb2.Type]] = ...) -> None: ... + +class Query(_message.Message): + __slots__ = ["id", "yql_text"] + ID_FIELD_NUMBER: _ClassVar[int] + YQL_TEXT_FIELD_NUMBER: _ClassVar[int] + id: str + yql_text: str + def __init__(self, yql_text: _Optional[str] = ..., id: _Optional[str] = ...) -> None: ... + +class QueryCachePolicy(_message.Message): + __slots__ = ["keep_in_cache"] + KEEP_IN_CACHE_FIELD_NUMBER: _ClassVar[int] + keep_in_cache: bool + def __init__(self, keep_in_cache: bool = ...) -> None: ... + +class QueryMeta(_message.Message): + __slots__ = ["id", "parameters_types"] + class ParametersTypesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: _ydb_value_pb2.Type + def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.Type, _Mapping]] = ...) -> None: ... + ID_FIELD_NUMBER: _ClassVar[int] + PARAMETERS_TYPES_FIELD_NUMBER: _ClassVar[int] + id: str + parameters_types: _containers.MessageMap[str, _ydb_value_pb2.Type] + def __init__(self, id: _Optional[str] = ..., parameters_types: _Optional[_Mapping[str, _ydb_value_pb2.Type]] = ...) -> None: ... + +class QueryStatsCollection(_message.Message): + __slots__ = [] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + STATS_COLLECTION_BASIC: QueryStatsCollection.Mode + STATS_COLLECTION_FULL: QueryStatsCollection.Mode + STATS_COLLECTION_NONE: QueryStatsCollection.Mode + STATS_COLLECTION_PROFILE: QueryStatsCollection.Mode + STATS_COLLECTION_UNSPECIFIED: QueryStatsCollection.Mode + def __init__(self) -> None: ... + +class ReadReplicasSettings(_message.Message): + __slots__ = ["any_az_read_replicas_count", "per_az_read_replicas_count"] + ANY_AZ_READ_REPLICAS_COUNT_FIELD_NUMBER: _ClassVar[int] + PER_AZ_READ_REPLICAS_COUNT_FIELD_NUMBER: _ClassVar[int] + any_az_read_replicas_count: int + per_az_read_replicas_count: int + def __init__(self, per_az_read_replicas_count: _Optional[int] = ..., any_az_read_replicas_count: _Optional[int] = ...) -> None: ... + +class ReadRowsRequest(_message.Message): + __slots__ = ["columns", "keys", "path", "session_id"] + COLUMNS_FIELD_NUMBER: _ClassVar[int] + KEYS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + columns: _containers.RepeatedScalarFieldContainer[str] + keys: _ydb_value_pb2.TypedValue + path: str + session_id: str + def __init__(self, session_id: _Optional[str] = ..., path: _Optional[str] = ..., keys: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ..., columns: _Optional[_Iterable[str]] = ...) -> None: ... + +class ReadRowsResponse(_message.Message): + __slots__ = ["issues", "result_set", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + result_set: _ydb_value_pb2.ResultSet + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ...) -> None: ... + +class ReadTableRequest(_message.Message): + __slots__ = ["batch_limit_bytes", "batch_limit_rows", "columns", "key_range", "ordered", "path", "return_not_null_data_as_optional", "row_limit", "session_id", "use_snapshot"] + BATCH_LIMIT_BYTES_FIELD_NUMBER: _ClassVar[int] + BATCH_LIMIT_ROWS_FIELD_NUMBER: _ClassVar[int] + COLUMNS_FIELD_NUMBER: _ClassVar[int] + KEY_RANGE_FIELD_NUMBER: _ClassVar[int] + ORDERED_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + RETURN_NOT_NULL_DATA_AS_OPTIONAL_FIELD_NUMBER: _ClassVar[int] + ROW_LIMIT_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + USE_SNAPSHOT_FIELD_NUMBER: _ClassVar[int] + batch_limit_bytes: int + batch_limit_rows: int + columns: _containers.RepeatedScalarFieldContainer[str] + key_range: KeyRange + ordered: bool + path: str + return_not_null_data_as_optional: _ydb_common_pb2.FeatureFlag.Status + row_limit: int + session_id: str + use_snapshot: _ydb_common_pb2.FeatureFlag.Status + def __init__(self, session_id: _Optional[str] = ..., path: _Optional[str] = ..., key_range: _Optional[_Union[KeyRange, _Mapping]] = ..., columns: _Optional[_Iterable[str]] = ..., ordered: bool = ..., row_limit: _Optional[int] = ..., use_snapshot: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., batch_limit_bytes: _Optional[int] = ..., batch_limit_rows: _Optional[int] = ..., return_not_null_data_as_optional: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ...) -> None: ... + +class ReadTableResponse(_message.Message): + __slots__ = ["issues", "result", "snapshot", "status"] + ISSUES_FIELD_NUMBER: _ClassVar[int] + RESULT_FIELD_NUMBER: _ClassVar[int] + SNAPSHOT_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + result: ReadTableResult + snapshot: _ydb_common_pb2.VirtualTimestamp + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., snapshot: _Optional[_Union[_ydb_common_pb2.VirtualTimestamp, _Mapping]] = ..., result: _Optional[_Union[ReadTableResult, _Mapping]] = ...) -> None: ... + +class ReadTableResult(_message.Message): + __slots__ = ["result_set"] + RESULT_SET_FIELD_NUMBER: _ClassVar[int] + result_set: _ydb_value_pb2.ResultSet + def __init__(self, result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ...) -> None: ... + +class RenameIndexItem(_message.Message): + __slots__ = ["destination_name", "replace_destination", "source_name"] + DESTINATION_NAME_FIELD_NUMBER: _ClassVar[int] + REPLACE_DESTINATION_FIELD_NUMBER: _ClassVar[int] + SOURCE_NAME_FIELD_NUMBER: _ClassVar[int] + destination_name: str + replace_destination: bool + source_name: str + def __init__(self, source_name: _Optional[str] = ..., destination_name: _Optional[str] = ..., replace_destination: bool = ...) -> None: ... + +class RenameTableItem(_message.Message): + __slots__ = ["destination_path", "replace_destination", "source_path"] + DESTINATION_PATH_FIELD_NUMBER: _ClassVar[int] + REPLACE_DESTINATION_FIELD_NUMBER: _ClassVar[int] + SOURCE_PATH_FIELD_NUMBER: _ClassVar[int] + destination_path: str + replace_destination: bool + source_path: str + def __init__(self, source_path: _Optional[str] = ..., destination_path: _Optional[str] = ..., replace_destination: bool = ...) -> None: ... + +class RenameTablesRequest(_message.Message): + __slots__ = ["operation_params", "session_id", "tables"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TABLES_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + session_id: str + tables: _containers.RepeatedCompositeFieldContainer[RenameTableItem] + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., session_id: _Optional[str] = ..., tables: _Optional[_Iterable[_Union[RenameTableItem, _Mapping]]] = ...) -> None: ... + +class RenameTablesResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ReplicationPolicy(_message.Message): + __slots__ = ["allow_promotion", "create_per_availability_zone", "preset_name", "replicas_count"] + ALLOW_PROMOTION_FIELD_NUMBER: _ClassVar[int] + CREATE_PER_AVAILABILITY_ZONE_FIELD_NUMBER: _ClassVar[int] + PRESET_NAME_FIELD_NUMBER: _ClassVar[int] + REPLICAS_COUNT_FIELD_NUMBER: _ClassVar[int] + allow_promotion: _ydb_common_pb2.FeatureFlag.Status + create_per_availability_zone: _ydb_common_pb2.FeatureFlag.Status + preset_name: str + replicas_count: int + def __init__(self, preset_name: _Optional[str] = ..., replicas_count: _Optional[int] = ..., create_per_availability_zone: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., allow_promotion: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ...) -> None: ... + +class ReplicationPolicyDescription(_message.Message): + __slots__ = ["labels", "name"] + class LabelsEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + LABELS_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + labels: _containers.ScalarMap[str, str] + name: str + def __init__(self, name: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class RollbackTransactionRequest(_message.Message): + __slots__ = ["operation_params", "session_id", "tx_id"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TX_ID_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + session_id: str + tx_id: str + def __init__(self, session_id: _Optional[str] = ..., tx_id: _Optional[str] = ..., operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ...) -> None: ... + +class RollbackTransactionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class SequenceDescription(_message.Message): + __slots__ = ["cache", "cycle", "increment", "max_value", "min_value", "name", "set_val", "start_value"] + class SetVal(_message.Message): + __slots__ = ["next_used", "next_value"] + NEXT_USED_FIELD_NUMBER: _ClassVar[int] + NEXT_VALUE_FIELD_NUMBER: _ClassVar[int] + next_used: bool + next_value: int + def __init__(self, next_value: _Optional[int] = ..., next_used: bool = ...) -> None: ... + CACHE_FIELD_NUMBER: _ClassVar[int] + CYCLE_FIELD_NUMBER: _ClassVar[int] + INCREMENT_FIELD_NUMBER: _ClassVar[int] + MAX_VALUE_FIELD_NUMBER: _ClassVar[int] + MIN_VALUE_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + SET_VAL_FIELD_NUMBER: _ClassVar[int] + START_VALUE_FIELD_NUMBER: _ClassVar[int] + cache: int + cycle: bool + increment: int + max_value: int + min_value: int + name: str + set_val: SequenceDescription.SetVal + start_value: int + def __init__(self, name: _Optional[str] = ..., min_value: _Optional[int] = ..., max_value: _Optional[int] = ..., start_value: _Optional[int] = ..., cache: _Optional[int] = ..., increment: _Optional[int] = ..., cycle: bool = ..., set_val: _Optional[_Union[SequenceDescription.SetVal, _Mapping]] = ...) -> None: ... + +class SerializableModeSettings(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class SnapshotModeSettings(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class StaleModeSettings(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class StoragePolicy(_message.Message): + __slots__ = ["column_families", "data", "external", "keep_in_memory", "log", "preset_name", "syslog"] + COLUMN_FAMILIES_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + EXTERNAL_FIELD_NUMBER: _ClassVar[int] + KEEP_IN_MEMORY_FIELD_NUMBER: _ClassVar[int] + LOG_FIELD_NUMBER: _ClassVar[int] + PRESET_NAME_FIELD_NUMBER: _ClassVar[int] + SYSLOG_FIELD_NUMBER: _ClassVar[int] + column_families: _containers.RepeatedCompositeFieldContainer[ColumnFamilyPolicy] + data: StoragePool + external: StoragePool + keep_in_memory: _ydb_common_pb2.FeatureFlag.Status + log: StoragePool + preset_name: str + syslog: StoragePool + def __init__(self, preset_name: _Optional[str] = ..., syslog: _Optional[_Union[StoragePool, _Mapping]] = ..., log: _Optional[_Union[StoragePool, _Mapping]] = ..., data: _Optional[_Union[StoragePool, _Mapping]] = ..., external: _Optional[_Union[StoragePool, _Mapping]] = ..., keep_in_memory: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ..., column_families: _Optional[_Iterable[_Union[ColumnFamilyPolicy, _Mapping]]] = ...) -> None: ... + +class StoragePolicyDescription(_message.Message): + __slots__ = ["labels", "name"] + class LabelsEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + LABELS_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + labels: _containers.ScalarMap[str, str] + name: str + def __init__(self, name: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class StoragePool(_message.Message): + __slots__ = ["media"] + MEDIA_FIELD_NUMBER: _ClassVar[int] + media: str + def __init__(self, media: _Optional[str] = ...) -> None: ... + +class StorageSettings(_message.Message): + __slots__ = ["external", "store_external_blobs", "tablet_commit_log0", "tablet_commit_log1"] + EXTERNAL_FIELD_NUMBER: _ClassVar[int] + STORE_EXTERNAL_BLOBS_FIELD_NUMBER: _ClassVar[int] + TABLET_COMMIT_LOG0_FIELD_NUMBER: _ClassVar[int] + TABLET_COMMIT_LOG1_FIELD_NUMBER: _ClassVar[int] + external: StoragePool + store_external_blobs: _ydb_common_pb2.FeatureFlag.Status + tablet_commit_log0: StoragePool + tablet_commit_log1: StoragePool + def __init__(self, tablet_commit_log0: _Optional[_Union[StoragePool, _Mapping]] = ..., tablet_commit_log1: _Optional[_Union[StoragePool, _Mapping]] = ..., external: _Optional[_Union[StoragePool, _Mapping]] = ..., store_external_blobs: _Optional[_Union[_ydb_common_pb2.FeatureFlag.Status, str]] = ...) -> None: ... + +class TableIndex(_message.Message): + __slots__ = ["data_columns", "global_async_index", "global_index", "global_unique_index", "index_columns", "name"] + DATA_COLUMNS_FIELD_NUMBER: _ClassVar[int] + GLOBAL_ASYNC_INDEX_FIELD_NUMBER: _ClassVar[int] + GLOBAL_INDEX_FIELD_NUMBER: _ClassVar[int] + GLOBAL_UNIQUE_INDEX_FIELD_NUMBER: _ClassVar[int] + INDEX_COLUMNS_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + data_columns: _containers.RepeatedScalarFieldContainer[str] + global_async_index: GlobalAsyncIndex + global_index: GlobalIndex + global_unique_index: GlobalUniqueIndex + index_columns: _containers.RepeatedScalarFieldContainer[str] + name: str + def __init__(self, name: _Optional[str] = ..., index_columns: _Optional[_Iterable[str]] = ..., global_index: _Optional[_Union[GlobalIndex, _Mapping]] = ..., global_async_index: _Optional[_Union[GlobalAsyncIndex, _Mapping]] = ..., global_unique_index: _Optional[_Union[GlobalUniqueIndex, _Mapping]] = ..., data_columns: _Optional[_Iterable[str]] = ...) -> None: ... + +class TableIndexDescription(_message.Message): + __slots__ = ["data_columns", "global_async_index", "global_index", "global_unique_index", "index_columns", "name", "size_bytes", "status"] + class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + DATA_COLUMNS_FIELD_NUMBER: _ClassVar[int] + GLOBAL_ASYNC_INDEX_FIELD_NUMBER: _ClassVar[int] + GLOBAL_INDEX_FIELD_NUMBER: _ClassVar[int] + GLOBAL_UNIQUE_INDEX_FIELD_NUMBER: _ClassVar[int] + INDEX_COLUMNS_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + SIZE_BYTES_FIELD_NUMBER: _ClassVar[int] + STATUS_BUILDING: TableIndexDescription.Status + STATUS_FIELD_NUMBER: _ClassVar[int] + STATUS_READY: TableIndexDescription.Status + STATUS_UNSPECIFIED: TableIndexDescription.Status + data_columns: _containers.RepeatedScalarFieldContainer[str] + global_async_index: GlobalAsyncIndex + global_index: GlobalIndex + global_unique_index: GlobalUniqueIndex + index_columns: _containers.RepeatedScalarFieldContainer[str] + name: str + size_bytes: int + status: TableIndexDescription.Status + def __init__(self, name: _Optional[str] = ..., index_columns: _Optional[_Iterable[str]] = ..., global_index: _Optional[_Union[GlobalIndex, _Mapping]] = ..., global_async_index: _Optional[_Union[GlobalAsyncIndex, _Mapping]] = ..., global_unique_index: _Optional[_Union[GlobalUniqueIndex, _Mapping]] = ..., status: _Optional[_Union[TableIndexDescription.Status, str]] = ..., data_columns: _Optional[_Iterable[str]] = ..., size_bytes: _Optional[int] = ...) -> None: ... + +class TableProfile(_message.Message): + __slots__ = ["caching_policy", "compaction_policy", "execution_policy", "partitioning_policy", "preset_name", "replication_policy", "storage_policy"] + CACHING_POLICY_FIELD_NUMBER: _ClassVar[int] + COMPACTION_POLICY_FIELD_NUMBER: _ClassVar[int] + EXECUTION_POLICY_FIELD_NUMBER: _ClassVar[int] + PARTITIONING_POLICY_FIELD_NUMBER: _ClassVar[int] + PRESET_NAME_FIELD_NUMBER: _ClassVar[int] + REPLICATION_POLICY_FIELD_NUMBER: _ClassVar[int] + STORAGE_POLICY_FIELD_NUMBER: _ClassVar[int] + caching_policy: CachingPolicy + compaction_policy: CompactionPolicy + execution_policy: ExecutionPolicy + partitioning_policy: PartitioningPolicy + preset_name: str + replication_policy: ReplicationPolicy + storage_policy: StoragePolicy + def __init__(self, preset_name: _Optional[str] = ..., storage_policy: _Optional[_Union[StoragePolicy, _Mapping]] = ..., compaction_policy: _Optional[_Union[CompactionPolicy, _Mapping]] = ..., partitioning_policy: _Optional[_Union[PartitioningPolicy, _Mapping]] = ..., execution_policy: _Optional[_Union[ExecutionPolicy, _Mapping]] = ..., replication_policy: _Optional[_Union[ReplicationPolicy, _Mapping]] = ..., caching_policy: _Optional[_Union[CachingPolicy, _Mapping]] = ...) -> None: ... + +class TableProfileDescription(_message.Message): + __slots__ = ["allowed_caching_policies", "allowed_compaction_policies", "allowed_execution_policies", "allowed_partitioning_policies", "allowed_replication_policies", "allowed_storage_policies", "default_caching_policy", "default_compaction_policy", "default_execution_policy", "default_partitioning_policy", "default_replication_policy", "default_storage_policy", "labels", "name"] + class LabelsEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ALLOWED_CACHING_POLICIES_FIELD_NUMBER: _ClassVar[int] + ALLOWED_COMPACTION_POLICIES_FIELD_NUMBER: _ClassVar[int] + ALLOWED_EXECUTION_POLICIES_FIELD_NUMBER: _ClassVar[int] + ALLOWED_PARTITIONING_POLICIES_FIELD_NUMBER: _ClassVar[int] + ALLOWED_REPLICATION_POLICIES_FIELD_NUMBER: _ClassVar[int] + ALLOWED_STORAGE_POLICIES_FIELD_NUMBER: _ClassVar[int] + DEFAULT_CACHING_POLICY_FIELD_NUMBER: _ClassVar[int] + DEFAULT_COMPACTION_POLICY_FIELD_NUMBER: _ClassVar[int] + DEFAULT_EXECUTION_POLICY_FIELD_NUMBER: _ClassVar[int] + DEFAULT_PARTITIONING_POLICY_FIELD_NUMBER: _ClassVar[int] + DEFAULT_REPLICATION_POLICY_FIELD_NUMBER: _ClassVar[int] + DEFAULT_STORAGE_POLICY_FIELD_NUMBER: _ClassVar[int] + LABELS_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + allowed_caching_policies: _containers.RepeatedScalarFieldContainer[str] + allowed_compaction_policies: _containers.RepeatedScalarFieldContainer[str] + allowed_execution_policies: _containers.RepeatedScalarFieldContainer[str] + allowed_partitioning_policies: _containers.RepeatedScalarFieldContainer[str] + allowed_replication_policies: _containers.RepeatedScalarFieldContainer[str] + allowed_storage_policies: _containers.RepeatedScalarFieldContainer[str] + default_caching_policy: str + default_compaction_policy: str + default_execution_policy: str + default_partitioning_policy: str + default_replication_policy: str + default_storage_policy: str + labels: _containers.ScalarMap[str, str] + name: str + def __init__(self, name: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ..., default_storage_policy: _Optional[str] = ..., allowed_storage_policies: _Optional[_Iterable[str]] = ..., default_compaction_policy: _Optional[str] = ..., allowed_compaction_policies: _Optional[_Iterable[str]] = ..., default_partitioning_policy: _Optional[str] = ..., allowed_partitioning_policies: _Optional[_Iterable[str]] = ..., default_execution_policy: _Optional[str] = ..., allowed_execution_policies: _Optional[_Iterable[str]] = ..., default_replication_policy: _Optional[str] = ..., allowed_replication_policies: _Optional[_Iterable[str]] = ..., default_caching_policy: _Optional[str] = ..., allowed_caching_policies: _Optional[_Iterable[str]] = ...) -> None: ... + +class TableStats(_message.Message): + __slots__ = ["creation_time", "modification_time", "partition_stats", "partitions", "rows_estimate", "store_size"] + CREATION_TIME_FIELD_NUMBER: _ClassVar[int] + MODIFICATION_TIME_FIELD_NUMBER: _ClassVar[int] + PARTITIONS_FIELD_NUMBER: _ClassVar[int] + PARTITION_STATS_FIELD_NUMBER: _ClassVar[int] + ROWS_ESTIMATE_FIELD_NUMBER: _ClassVar[int] + STORE_SIZE_FIELD_NUMBER: _ClassVar[int] + creation_time: _timestamp_pb2.Timestamp + modification_time: _timestamp_pb2.Timestamp + partition_stats: _containers.RepeatedCompositeFieldContainer[PartitionStats] + partitions: int + rows_estimate: int + store_size: int + def __init__(self, partition_stats: _Optional[_Iterable[_Union[PartitionStats, _Mapping]]] = ..., rows_estimate: _Optional[int] = ..., store_size: _Optional[int] = ..., partitions: _Optional[int] = ..., creation_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., modification_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class TransactionControl(_message.Message): + __slots__ = ["begin_tx", "commit_tx", "tx_id"] + BEGIN_TX_FIELD_NUMBER: _ClassVar[int] + COMMIT_TX_FIELD_NUMBER: _ClassVar[int] + TX_ID_FIELD_NUMBER: _ClassVar[int] + begin_tx: TransactionSettings + commit_tx: bool + tx_id: str + def __init__(self, tx_id: _Optional[str] = ..., begin_tx: _Optional[_Union[TransactionSettings, _Mapping]] = ..., commit_tx: bool = ...) -> None: ... + +class TransactionMeta(_message.Message): + __slots__ = ["id"] + ID_FIELD_NUMBER: _ClassVar[int] + id: str + def __init__(self, id: _Optional[str] = ...) -> None: ... + +class TransactionSettings(_message.Message): + __slots__ = ["online_read_only", "serializable_read_write", "snapshot_read_only", "stale_read_only"] + ONLINE_READ_ONLY_FIELD_NUMBER: _ClassVar[int] + SERIALIZABLE_READ_WRITE_FIELD_NUMBER: _ClassVar[int] + SNAPSHOT_READ_ONLY_FIELD_NUMBER: _ClassVar[int] + STALE_READ_ONLY_FIELD_NUMBER: _ClassVar[int] + online_read_only: OnlineModeSettings + serializable_read_write: SerializableModeSettings + snapshot_read_only: SnapshotModeSettings + stale_read_only: StaleModeSettings + def __init__(self, serializable_read_write: _Optional[_Union[SerializableModeSettings, _Mapping]] = ..., online_read_only: _Optional[_Union[OnlineModeSettings, _Mapping]] = ..., stale_read_only: _Optional[_Union[StaleModeSettings, _Mapping]] = ..., snapshot_read_only: _Optional[_Union[SnapshotModeSettings, _Mapping]] = ...) -> None: ... + +class TtlSettings(_message.Message): + __slots__ = ["date_type_column", "run_interval_seconds", "value_since_unix_epoch"] + DATE_TYPE_COLUMN_FIELD_NUMBER: _ClassVar[int] + RUN_INTERVAL_SECONDS_FIELD_NUMBER: _ClassVar[int] + VALUE_SINCE_UNIX_EPOCH_FIELD_NUMBER: _ClassVar[int] + date_type_column: DateTypeColumnModeSettings + run_interval_seconds: int + value_since_unix_epoch: ValueSinceUnixEpochModeSettings + def __init__(self, date_type_column: _Optional[_Union[DateTypeColumnModeSettings, _Mapping]] = ..., value_since_unix_epoch: _Optional[_Union[ValueSinceUnixEpochModeSettings, _Mapping]] = ..., run_interval_seconds: _Optional[int] = ...) -> None: ... + +class ValueSinceUnixEpochModeSettings(_message.Message): + __slots__ = ["column_name", "column_unit", "expire_after_seconds"] + class Unit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + COLUMN_NAME_FIELD_NUMBER: _ClassVar[int] + COLUMN_UNIT_FIELD_NUMBER: _ClassVar[int] + EXPIRE_AFTER_SECONDS_FIELD_NUMBER: _ClassVar[int] + UNIT_MICROSECONDS: ValueSinceUnixEpochModeSettings.Unit + UNIT_MILLISECONDS: ValueSinceUnixEpochModeSettings.Unit + UNIT_NANOSECONDS: ValueSinceUnixEpochModeSettings.Unit + UNIT_SECONDS: ValueSinceUnixEpochModeSettings.Unit + UNIT_UNSPECIFIED: ValueSinceUnixEpochModeSettings.Unit + column_name: str + column_unit: ValueSinceUnixEpochModeSettings.Unit + expire_after_seconds: int + def __init__(self, column_name: _Optional[str] = ..., column_unit: _Optional[_Union[ValueSinceUnixEpochModeSettings.Unit, str]] = ..., expire_after_seconds: _Optional[int] = ...) -> None: ... + +class StoreType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] diff --git a/ydb/_grpc/v5/protos/ydb_table_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_table_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_table_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_topic_pb2.py b/ydb/_grpc/v5/protos/ydb_topic_pb2.py new file mode 100644 index 00000000..4a79b510 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_topic_pb2.py @@ -0,0 +1,323 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_topic.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 +from ydb._grpc.v5.protos import ydb_scheme_pb2 as protos_dot_ydb__scheme__pb2 +from ydb._grpc.v5.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 +from ydb._grpc.v5.protos import ydb_issue_message_pb2 as protos_dot_ydb__issue__message__pb2 +from ydb._grpc.v5.protos.annotations import sensitive_pb2 as protos_dot_annotations_dot_sensitive__pb2 +from ydb._grpc.v5.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\")\n\x12UpdateTokenRequest\x12\x13\n\x05token\x18\x01 \x01(\tB\x04\xb8\xe6*\x01\"\x15\n\x13UpdateTokenResponse\"C\n\x17PartitionWithGeneration\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x9e\x14\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xfe\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12#\n\x10message_group_id\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x07 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\xe8\x03\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x12/\n\x02tx\x18\x03 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentityH\x00\x88\x01\x01\x1a\xc6\x02\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12#\n\x10message_group_id\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x08 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioningB\x05\n\x03_tx\x1a\xeb\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\xf8\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x12Y\n\rwritten_in_tx\x18\x04 \x01(\x0b\x32@.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenInTxH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x1a\r\n\x0bWrittenInTxB\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x9c#\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xb1\x05\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x45\n\x0f\x64irect_read_ack\x18\x08 \x01(\x0b\x32*.Ydb.Topic.StreamReadMessage.DirectReadAckH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xf0\x06\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x12W\n\x18update_partition_session\x18\n \x01(\x0b\x32\x33.Ydb.Topic.StreamReadMessage.UpdatePartitionSessionH\x00\x12Q\n\x15\x65nd_partition_session\x18\x0b \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.EndPartitionSessionH\x00\x42\x10\n\x0eserver_message\x1a\xdc\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64irect_read\x18\x04 \x01(\x08\x12!\n\x19\x61uto_partitioning_support\x18\x05 \x01(\x08\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\x91\x06\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xda\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12!\n\x10message_group_id\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xcd\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xf0\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x38\n\x12partition_location\x18\x04 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1a\x84\x01\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x04 \x01(\x03\x1aN\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x1ap\n\x16UpdatePartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x38\n\x12partition_location\x18\x02 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x45\n\rDirectReadAck\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x1ap\n\x13\x45ndPartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1e\n\x16\x61\x64jacent_partition_ids\x18\x02 \x03(\x03\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\"\xf7\x0c\n\x17StreamDirectReadMessage\x1a\xa8\x02\n\nFromClient\x12\x46\n\x0cinit_request\x18\x01 \x01(\x0b\x32..Ydb.Topic.StreamDirectReadMessage.InitRequestH\x00\x12\x80\x01\n+start_direct_read_partition_session_request\x18\x02 \x01(\x0b\x32I.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xca\x04\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12H\n\rinit_response\x18\x06 \x01(\x0b\x32/.Ydb.Topic.StreamDirectReadMessage.InitResponseH\x00\x12\x82\x01\n,start_direct_read_partition_session_response\x18\x07 \x01(\x0b\x32J.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionResponseH\x00\x12o\n\"stop_direct_read_partition_session\x18\x03 \x01(\x0b\x32\x41.Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSessionH\x00\x12U\n\x14\x64irect_read_response\x18\x04 \x01(\x0b\x32\x35.Ydb.Topic.StreamDirectReadMessage.DirectReadResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xb6\x01\n\x0bInitRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12^\n\x14topics_read_settings\x18\x02 \x03(\x0b\x32@.Ydb.Topic.StreamDirectReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x1a!\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x1a\x0e\n\x0cInitResponse\x1aw\n&StartDirectReadPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x02 \x01(\x03\x12\x12\n\ngeneration\x18\x03 \x01(\x03\x1a[\n\'StartDirectReadPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\x1a\xa6\x01\n\x1eStopDirectReadPartitionSession\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1c\n\x14partition_session_id\x18\x03 \x01(\x03\x12\x12\n\ngeneration\x18\x04 \x01(\x03\x1a\x9b\x01\n\x12\x44irectReadResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x12O\n\x0epartition_data\x18\x03 \x01(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\"2\n\x13TransactionIdentity\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07session\x18\x02 \x01(\t\"\xc4\x03\n!UpdateOffsetsInTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12*\n\x02tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentity\x12I\n\x06topics\x18\x03 \x03(\x0b\x32\x39.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x1a\xda\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12^\n\npartitions\x18\x02 \x03(\x0b\x32J.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"R\n\"UpdateOffsetsInTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\"\n UpdateOffsetsInTransactionResult\"\x96\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xb3\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf3\x01\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"\xdc\x01\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12)\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0\x12G\n\x1a\x61uto_partitioning_settings\x18\x04 \x01(\x0b\x32#.Ydb.Topic.AutoPartitioningSettings\"\x9f\x01\n\x18\x41utoPartitioningSettings\x12\x35\n\x08strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategy\x12L\n\x15partition_write_speed\x18\x02 \x01(\x0b\x32-.Ydb.Topic.AutoPartitioningWriteSpeedStrategy\"\xb3\x01\n\"AutoPartitioningWriteSpeedStrategy\x12\x37\n\x14stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n\x16up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12*\n\x18\x64own_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\"\x8b\x03\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x32\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12W\n alter_auto_partitioning_settings\x18\x04 \x01(\x0b\x32(.Ydb.Topic.AlterAutoPartitioningSettingsH\x03\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_max_active_partitionsB\x1c\n\x1a_set_partition_count_limitB#\n!_alter_auto_partitioning_settings\"\xea\x01\n\x1d\x41lterAutoPartitioningSettings\x12>\n\x0cset_strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategyH\x00\x88\x01\x01\x12Z\n\x19set_partition_write_speed\x18\x02 \x01(\x0b\x32\x32.Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategyH\x01\x88\x01\x01\x42\x0f\n\r_set_strategyB\x1c\n\x1a_set_partition_write_speed\"\xb0\x02\n\'AlterAutoPartitioningWriteSpeedStrategy\x12@\n\x18set_stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x12\x31\n\x1aset_up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x33\n\x1cset_down_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x42\x1b\n\x19_set_stabilization_windowB\x1d\n\x1b_set_up_utilization_percentB\x1f\n\x1d_set_down_utilization_percent\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"8\n\x11PartitionLocation\x12\x0f\n\x07node_id\x18\x01 \x01(\x05\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"\x90\x01\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\x12\x18\n\x10include_location\x18\x04 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x11PartitionKeyRange\x12\x17\n\nfrom_bound\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x15\n\x08to_bound\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_from_boundB\x0b\n\t_to_bound\"\xfa\t\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12\x33\n+partition_total_read_speed_bytes_per_second\x18\x0e \x01(\x03\x12\x36\n.partition_consumer_read_speed_bytes_per_second\x18\x0f \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x8f\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12\x38\n\x12partition_location\x18\x06 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x12/\n\tkey_range\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionKeyRange\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\xaa\x01\n\x18\x44\x65scribePartitionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"I\n\x19\x44\x65scribePartitionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Z\n\x17\x44\x65scribePartitionResult\x12?\n\tpartition\x18\x01 \x01(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\"\xa5\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x98\x07\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\xba\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x12\x38\n\x12partition_location\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\xb3\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\xa0\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x1d\n\x11partition_node_id\x18\x08 \x01(\x05\x42\x02\x18\x01\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*\xf1\x01\n\x18\x41utoPartitioningStrategy\x12*\n&AUTO_PARTITIONING_STRATEGY_UNSPECIFIED\x10\x00\x12\'\n#AUTO_PARTITIONING_STRATEGY_DISABLED\x10\x01\x12\'\n#AUTO_PARTITIONING_STRATEGY_SCALE_UP\x10\x02\x12\x30\n,AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN\x10\x03\x12%\n!AUTO_PARTITIONING_STRATEGY_PAUSED\x10\x04*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_topic_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\024tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\370\001\001' + _SUPPORTEDCODECS.fields_by_name['codecs']._options = None + _SUPPORTEDCODECS.fields_by_name['codecs']._serialized_options = b'\262\346*\n[1; 19999]\232\346*\002\030d' + _UPDATETOKENREQUEST.fields_by_name['token']._options = None + _UPDATETOKENREQUEST.fields_by_name['token']._serialized_options = b'\270\346*\001' + _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._options = None + _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._serialized_options = b'8\001' + _STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['producer_id']._options = None + _STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['producer_id']._serialized_options = b'\242\346*\003\030\200\020' + _STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['message_group_id']._options = None + _STREAMWRITEMESSAGE_INITREQUEST.fields_by_name['message_group_id']._serialized_options = b'\242\346*\003\030\200\020' + _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['message_group_id']._options = None + _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['message_group_id']._serialized_options = b'\242\346*\003\030\200\020' + _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['metadata_items']._options = None + _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA.fields_by_name['metadata_items']._serialized_options = b'\232\346*\003\030\350\007' + _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA.fields_by_name['message_group_id']._options = None + _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA.fields_by_name['message_group_id']._serialized_options = b'\242\346*\003\030\200\020' + _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._options = None + _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._serialized_options = b'8\001' + _STREAMREADMESSAGE_READRESPONSE_BATCH.fields_by_name['producer_id']._options = None + _STREAMREADMESSAGE_READRESPONSE_BATCH.fields_by_name['producer_id']._serialized_options = b'\242\346*\003\030\200\020' + _CONSUMER_ATTRIBUTESENTRY._options = None + _CONSUMER_ATTRIBUTESENTRY._serialized_options = b'8\001' + _ALTERCONSUMER_ALTERATTRIBUTESENTRY._options = None + _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_options = b'8\001' + _PARTITIONINGSETTINGS.fields_by_name['min_active_partitions']._options = None + _PARTITIONINGSETTINGS.fields_by_name['min_active_partitions']._serialized_options = b'\262\346*\004>= 0' + _PARTITIONINGSETTINGS.fields_by_name['max_active_partitions']._options = None + _PARTITIONINGSETTINGS.fields_by_name['max_active_partitions']._serialized_options = b'\262\346*\004>= 0' + _PARTITIONINGSETTINGS.fields_by_name['partition_count_limit']._options = None + _PARTITIONINGSETTINGS.fields_by_name['partition_count_limit']._serialized_options = b'\030\001\262\346*\004>= 0' + _AUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['up_utilization_percent']._options = None + _AUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['up_utilization_percent']._serialized_options = b'\262\346*\004>= 0' + _AUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['down_utilization_percent']._options = None + _AUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['down_utilization_percent']._serialized_options = b'\262\346*\004>= 0' + _ALTERPARTITIONINGSETTINGS.fields_by_name['set_min_active_partitions']._options = None + _ALTERPARTITIONINGSETTINGS.fields_by_name['set_min_active_partitions']._serialized_options = b'\262\346*\004>= 0' + _ALTERPARTITIONINGSETTINGS.fields_by_name['set_max_active_partitions']._options = None + _ALTERPARTITIONINGSETTINGS.fields_by_name['set_max_active_partitions']._serialized_options = b'\262\346*\004>= 0' + _ALTERPARTITIONINGSETTINGS.fields_by_name['set_partition_count_limit']._options = None + _ALTERPARTITIONINGSETTINGS.fields_by_name['set_partition_count_limit']._serialized_options = b'\030\001\262\346*\004>= 0' + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_up_utilization_percent']._options = None + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_up_utilization_percent']._serialized_options = b'\262\346*\004>= 0' + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_down_utilization_percent']._options = None + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY.fields_by_name['set_down_utilization_percent']._serialized_options = b'\262\346*\004>= 0' + _CREATETOPICREQUEST_ATTRIBUTESENTRY._options = None + _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_options = b'8\001' + _CREATETOPICREQUEST.fields_by_name['retention_storage_mb']._options = None + _CREATETOPICREQUEST.fields_by_name['retention_storage_mb']._serialized_options = b'\262\346*\004>= 0' + _CREATETOPICREQUEST.fields_by_name['partition_write_speed_bytes_per_second']._options = None + _CREATETOPICREQUEST.fields_by_name['partition_write_speed_bytes_per_second']._serialized_options = b'\262\346*\004>= 0' + _CREATETOPICREQUEST.fields_by_name['partition_write_burst_bytes']._options = None + _CREATETOPICREQUEST.fields_by_name['partition_write_burst_bytes']._serialized_options = b'\262\346*\004>= 0' + _CREATETOPICREQUEST.fields_by_name['consumers']._options = None + _CREATETOPICREQUEST.fields_by_name['consumers']._serialized_options = b'\232\346*\003\030\270\027' + _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._options = None + _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_options = b'8\001' + _PARTITIONSTATS.fields_by_name['partition_node_id']._options = None + _PARTITIONSTATS.fields_by_name['partition_node_id']._serialized_options = b'\030\001' + _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._options = None + _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_options = b'8\001' + _ALTERTOPICREQUEST.fields_by_name['set_retention_storage_mb']._options = None + _ALTERTOPICREQUEST.fields_by_name['set_retention_storage_mb']._serialized_options = b'\262\346*\004>= 0' + _ALTERTOPICREQUEST.fields_by_name['set_partition_write_speed_bytes_per_second']._options = None + _ALTERTOPICREQUEST.fields_by_name['set_partition_write_speed_bytes_per_second']._serialized_options = b'\262\346*\004>= 0' + _ALTERTOPICREQUEST.fields_by_name['set_partition_write_burst_bytes']._options = None + _ALTERTOPICREQUEST.fields_by_name['set_partition_write_burst_bytes']._serialized_options = b'\262\346*\004>= 0' + _ALTERTOPICREQUEST.fields_by_name['add_consumers']._options = None + _ALTERTOPICREQUEST.fields_by_name['add_consumers']._serialized_options = b'\232\346*\003\030\270\027' + _ALTERTOPICREQUEST.fields_by_name['drop_consumers']._options = None + _ALTERTOPICREQUEST.fields_by_name['drop_consumers']._serialized_options = b'\232\346*\003\030\270\027' + _ALTERTOPICREQUEST.fields_by_name['alter_consumers']._options = None + _ALTERTOPICREQUEST.fields_by_name['alter_consumers']._serialized_options = b'\232\346*\003\030\270\027' + _CODEC._serialized_start=18023 + _CODEC._serialized_end=18154 + _AUTOPARTITIONINGSTRATEGY._serialized_start=18157 + _AUTOPARTITIONINGSTRATEGY._serialized_end=18398 + _METERINGMODE._serialized_start=18400 + _METERINGMODE._serialized_end=18515 + _SUPPORTEDCODECS._serialized_start=291 + _SUPPORTEDCODECS._serialized_end=346 + _OFFSETSRANGE._serialized_start=348 + _OFFSETSRANGE._serialized_end=390 + _UPDATETOKENREQUEST._serialized_start=392 + _UPDATETOKENREQUEST._serialized_end=433 + _UPDATETOKENRESPONSE._serialized_start=435 + _UPDATETOKENRESPONSE._serialized_end=456 + _PARTITIONWITHGENERATION._serialized_start=458 + _PARTITIONWITHGENERATION._serialized_end=525 + _METADATAITEM._serialized_start=527 + _METADATAITEM._serialized_end=569 + _STREAMWRITEMESSAGE._serialized_start=572 + _STREAMWRITEMESSAGE._serialized_end=3162 + _STREAMWRITEMESSAGE_FROMCLIENT._serialized_start=595 + _STREAMWRITEMESSAGE_FROMCLIENT._serialized_end=824 + _STREAMWRITEMESSAGE_FROMSERVER._serialized_start=827 + _STREAMWRITEMESSAGE_FROMSERVER._serialized_end=1146 + _STREAMWRITEMESSAGE_INITREQUEST._serialized_start=1149 + _STREAMWRITEMESSAGE_INITREQUEST._serialized_end=1531 + _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._serialized_start=1460 + _STREAMWRITEMESSAGE_INITREQUEST_WRITESESSIONMETAENTRY._serialized_end=1515 + _STREAMWRITEMESSAGE_INITRESPONSE._serialized_start=1534 + _STREAMWRITEMESSAGE_INITRESPONSE._serialized_end=1665 + _STREAMWRITEMESSAGE_WRITEREQUEST._serialized_start=1668 + _STREAMWRITEMESSAGE_WRITEREQUEST._serialized_end=2156 + _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA._serialized_start=1823 + _STREAMWRITEMESSAGE_WRITEREQUEST_MESSAGEDATA._serialized_end=2149 + _STREAMWRITEMESSAGE_WRITERESPONSE._serialized_start=2159 + _STREAMWRITEMESSAGE_WRITERESPONSE._serialized_end=3162 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK._serialized_start=2354 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK._serialized_end=2858 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN._serialized_start=2635 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTEN._serialized_end=2660 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED._serialized_start=2663 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED._serialized_end=2819 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON._serialized_start=2759 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_SKIPPED_REASON._serialized_end=2819 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTENINTX._serialized_start=2821 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITEACK_WRITTENINTX._serialized_end=2834 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS._serialized_start=2861 + _STREAMWRITEMESSAGE_WRITERESPONSE_WRITESTATISTICS._serialized_end=3162 + _STREAMREADMESSAGE._serialized_start=3165 + _STREAMREADMESSAGE._serialized_end=7673 + _STREAMREADMESSAGE_PARTITIONSESSION._serialized_start=3186 + _STREAMREADMESSAGE_PARTITIONSESSION._serialized_end=3270 + _STREAMREADMESSAGE_FROMCLIENT._serialized_start=3273 + _STREAMREADMESSAGE_FROMCLIENT._serialized_end=3962 + _STREAMREADMESSAGE_FROMSERVER._serialized_start=3965 + _STREAMREADMESSAGE_FROMSERVER._serialized_end=4845 + _STREAMREADMESSAGE_INITREQUEST._serialized_start=4848 + _STREAMREADMESSAGE_INITREQUEST._serialized_end=5196 + _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS._serialized_start=5049 + _STREAMREADMESSAGE_INITREQUEST_TOPICREADSETTINGS._serialized_end=5196 + _STREAMREADMESSAGE_INITRESPONSE._serialized_start=5198 + _STREAMREADMESSAGE_INITRESPONSE._serialized_end=5232 + _STREAMREADMESSAGE_READREQUEST._serialized_start=5234 + _STREAMREADMESSAGE_READREQUEST._serialized_end=5267 + _STREAMREADMESSAGE_READRESPONSE._serialized_start=5270 + _STREAMREADMESSAGE_READRESPONSE._serialized_end=6055 + _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA._serialized_start=5388 + _STREAMREADMESSAGE_READRESPONSE_MESSAGEDATA._serialized_end=5606 + _STREAMREADMESSAGE_READRESPONSE_BATCH._serialized_start=5609 + _STREAMREADMESSAGE_READRESPONSE_BATCH._serialized_end=5942 + _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._serialized_start=1460 + _STREAMREADMESSAGE_READRESPONSE_BATCH_WRITESESSIONMETAENTRY._serialized_end=1515 + _STREAMREADMESSAGE_READRESPONSE_PARTITIONDATA._serialized_start=5944 + _STREAMREADMESSAGE_READRESPONSE_PARTITIONDATA._serialized_end=6055 + _STREAMREADMESSAGE_COMMITOFFSETREQUEST._serialized_start=6058 + _STREAMREADMESSAGE_COMMITOFFSETREQUEST._serialized_end=6272 + _STREAMREADMESSAGE_COMMITOFFSETREQUEST_PARTITIONCOMMITOFFSET._serialized_start=6177 + _STREAMREADMESSAGE_COMMITOFFSETREQUEST_PARTITIONCOMMITOFFSET._serialized_end=6272 + _STREAMREADMESSAGE_COMMITOFFSETRESPONSE._serialized_start=6275 + _STREAMREADMESSAGE_COMMITOFFSETRESPONSE._serialized_end=6495 + _STREAMREADMESSAGE_COMMITOFFSETRESPONSE_PARTITIONCOMMITTEDOFFSET._serialized_start=6413 + _STREAMREADMESSAGE_COMMITOFFSETRESPONSE_PARTITIONCOMMITTEDOFFSET._serialized_end=6495 + _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST._serialized_start=6497 + _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSREQUEST._serialized_end=6558 + _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE._serialized_start=6561 + _STREAMREADMESSAGE_PARTITIONSESSIONSTATUSRESPONSE._serialized_end=6764 + _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST._serialized_start=6767 + _STREAMREADMESSAGE_STARTPARTITIONSESSIONREQUEST._serialized_end=7007 + _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE._serialized_start=7010 + _STREAMREADMESSAGE_STARTPARTITIONSESSIONRESPONSE._serialized_end=7159 + _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST._serialized_start=7162 + _STREAMREADMESSAGE_STOPPARTITIONSESSIONREQUEST._serialized_end=7294 + _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE._serialized_start=7296 + _STREAMREADMESSAGE_STOPPARTITIONSESSIONRESPONSE._serialized_end=7374 + _STREAMREADMESSAGE_UPDATEPARTITIONSESSION._serialized_start=7376 + _STREAMREADMESSAGE_UPDATEPARTITIONSESSION._serialized_end=7488 + _STREAMREADMESSAGE_DIRECTREADACK._serialized_start=7490 + _STREAMREADMESSAGE_DIRECTREADACK._serialized_end=7559 + _STREAMREADMESSAGE_ENDPARTITIONSESSION._serialized_start=7561 + _STREAMREADMESSAGE_ENDPARTITIONSESSION._serialized_end=7673 + _STREAMDIRECTREADMESSAGE._serialized_start=7676 + _STREAMDIRECTREADMESSAGE._serialized_end=9331 + _STREAMDIRECTREADMESSAGE_FROMCLIENT._serialized_start=7704 + _STREAMDIRECTREADMESSAGE_FROMCLIENT._serialized_end=8000 + _STREAMDIRECTREADMESSAGE_FROMSERVER._serialized_start=8003 + _STREAMDIRECTREADMESSAGE_FROMSERVER._serialized_end=8589 + _STREAMDIRECTREADMESSAGE_INITREQUEST._serialized_start=8592 + _STREAMDIRECTREADMESSAGE_INITREQUEST._serialized_end=8774 + _STREAMDIRECTREADMESSAGE_INITREQUEST_TOPICREADSETTINGS._serialized_start=5049 + _STREAMDIRECTREADMESSAGE_INITREQUEST_TOPICREADSETTINGS._serialized_end=5082 + _STREAMDIRECTREADMESSAGE_INITRESPONSE._serialized_start=1534 + _STREAMDIRECTREADMESSAGE_INITRESPONSE._serialized_end=1548 + _STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONREQUEST._serialized_start=8792 + _STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONREQUEST._serialized_end=8911 + _STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONRESPONSE._serialized_start=8913 + _STREAMDIRECTREADMESSAGE_STARTDIRECTREADPARTITIONSESSIONRESPONSE._serialized_end=9004 + _STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION._serialized_start=9007 + _STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION._serialized_end=9173 + _STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE._serialized_start=9176 + _STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE._serialized_end=9331 + _TRANSACTIONIDENTITY._serialized_start=9333 + _TRANSACTIONIDENTITY._serialized_end=9383 + _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_start=9386 + _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_end=9838 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_start=9620 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_end=9838 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_start=9746 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_end=9838 + _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_start=9840 + _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_end=9922 + _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_start=9924 + _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_end=9958 + _COMMITOFFSETREQUEST._serialized_start=9961 + _COMMITOFFSETREQUEST._serialized_end=10111 + _COMMITOFFSETRESPONSE._serialized_start=10113 + _COMMITOFFSETRESPONSE._serialized_end=10181 + _COMMITOFFSETRESULT._serialized_start=10183 + _COMMITOFFSETRESULT._serialized_end=10203 + _MULTIPLEWINDOWSSTAT._serialized_start=10205 + _MULTIPLEWINDOWSSTAT._serialized_end=10281 + _CONSUMER._serialized_start=10284 + _CONSUMER._serialized_end=10847 + _CONSUMER_ATTRIBUTESENTRY._serialized_start=10546 + _CONSUMER_ATTRIBUTESENTRY._serialized_end=10595 + _CONSUMER_CONSUMERSTATS._serialized_start=10598 + _CONSUMER_CONSUMERSTATS._serialized_end=10841 + _ALTERCONSUMER._serialized_start=10850 + _ALTERCONSUMER._serialized_end=11169 + _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_start=11091 + _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_end=11145 + _PARTITIONINGSETTINGS._serialized_start=11172 + _PARTITIONINGSETTINGS._serialized_end=11392 + _AUTOPARTITIONINGSETTINGS._serialized_start=11395 + _AUTOPARTITIONINGSETTINGS._serialized_end=11554 + _AUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_start=11557 + _AUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_end=11736 + _ALTERPARTITIONINGSETTINGS._serialized_start=11739 + _ALTERPARTITIONINGSETTINGS._serialized_end=12134 + _ALTERAUTOPARTITIONINGSETTINGS._serialized_start=12137 + _ALTERAUTOPARTITIONINGSETTINGS._serialized_end=12371 + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_start=12374 + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_end=12678 + _CREATETOPICREQUEST._serialized_start=12681 + _CREATETOPICREQUEST._serialized_end=13311 + _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_start=10546 + _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_end=10595 + _CREATETOPICRESPONSE._serialized_start=13313 + _CREATETOPICRESPONSE._serialized_end=13380 + _CREATETOPICRESULT._serialized_start=13382 + _CREATETOPICRESULT._serialized_end=13401 + _PARTITIONLOCATION._serialized_start=13403 + _PARTITIONLOCATION._serialized_end=13459 + _DESCRIBETOPICREQUEST._serialized_start=13462 + _DESCRIBETOPICREQUEST._serialized_end=13606 + _DESCRIBETOPICRESPONSE._serialized_start=13608 + _DESCRIBETOPICRESPONSE._serialized_end=13677 + _PARTITIONKEYRANGE._serialized_start=13679 + _PARTITIONKEYRANGE._serialized_end=13774 + _DESCRIBETOPICRESULT._serialized_start=13777 + _DESCRIBETOPICRESULT._serialized_end=15051 + _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_start=10546 + _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_end=10595 + _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_start=14566 + _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_end=14837 + _DESCRIBETOPICRESULT_TOPICSTATS._serialized_start=14840 + _DESCRIBETOPICRESULT_TOPICSTATS._serialized_end=15045 + _DESCRIBEPARTITIONREQUEST._serialized_start=15054 + _DESCRIBEPARTITIONREQUEST._serialized_end=15224 + _DESCRIBEPARTITIONRESPONSE._serialized_start=15226 + _DESCRIBEPARTITIONRESPONSE._serialized_end=15299 + _DESCRIBEPARTITIONRESULT._serialized_start=15301 + _DESCRIBEPARTITIONRESULT._serialized_end=15391 + _DESCRIBECONSUMERREQUEST._serialized_start=15394 + _DESCRIBECONSUMERREQUEST._serialized_end=15559 + _DESCRIBECONSUMERRESPONSE._serialized_start=15561 + _DESCRIBECONSUMERRESPONSE._serialized_end=15633 + _DESCRIBECONSUMERRESULT._serialized_start=15636 + _DESCRIBECONSUMERRESULT._serialized_end=16556 + _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_start=15804 + _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_end=16118 + _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_start=16121 + _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_end=16556 + _PARTITIONSTATS._serialized_start=16559 + _PARTITIONSTATS._serialized_end=16847 + _ALTERTOPICREQUEST._serialized_start=16850 + _ALTERTOPICREQUEST._serialized_end=17753 + _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_start=11091 + _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_end=11145 + _ALTERTOPICRESPONSE._serialized_start=17755 + _ALTERTOPICRESPONSE._serialized_end=17821 + _ALTERTOPICRESULT._serialized_start=17823 + _ALTERTOPICRESULT._serialized_end=17841 + _DROPTOPICREQUEST._serialized_start=17843 + _DROPTOPICREQUEST._serialized_end=17934 + _DROPTOPICRESPONSE._serialized_start=17936 + _DROPTOPICRESPONSE._serialized_end=18001 + _DROPTOPICRESULT._serialized_start=18003 + _DROPTOPICRESULT._serialized_end=18020 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_topic_pb2.pyi b/ydb/_grpc/v5/protos/ydb_topic_pb2.pyi new file mode 100644 index 00000000..58e2156e --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_topic_pb2.pyi @@ -0,0 +1,1057 @@ +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from protos import ydb_scheme_pb2 as _ydb_scheme_pb2 +from protos import ydb_status_codes_pb2 as _ydb_status_codes_pb2 +from protos import ydb_issue_message_pb2 as _ydb_issue_message_pb2 +from protos.annotations import sensitive_pb2 as _sensitive_pb2 +from protos.annotations import validation_pb2 as _validation_pb2 +from google.protobuf import duration_pb2 as _duration_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +AUTO_PARTITIONING_STRATEGY_DISABLED: AutoPartitioningStrategy +AUTO_PARTITIONING_STRATEGY_PAUSED: AutoPartitioningStrategy +AUTO_PARTITIONING_STRATEGY_SCALE_UP: AutoPartitioningStrategy +AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN: AutoPartitioningStrategy +AUTO_PARTITIONING_STRATEGY_UNSPECIFIED: AutoPartitioningStrategy +CODEC_CUSTOM: Codec +CODEC_GZIP: Codec +CODEC_LZOP: Codec +CODEC_RAW: Codec +CODEC_UNSPECIFIED: Codec +CODEC_ZSTD: Codec +DESCRIPTOR: _descriptor.FileDescriptor +METERING_MODE_REQUEST_UNITS: MeteringMode +METERING_MODE_RESERVED_CAPACITY: MeteringMode +METERING_MODE_UNSPECIFIED: MeteringMode + +class AlterAutoPartitioningSettings(_message.Message): + __slots__ = ["set_partition_write_speed", "set_strategy"] + SET_PARTITION_WRITE_SPEED_FIELD_NUMBER: _ClassVar[int] + SET_STRATEGY_FIELD_NUMBER: _ClassVar[int] + set_partition_write_speed: AlterAutoPartitioningWriteSpeedStrategy + set_strategy: AutoPartitioningStrategy + def __init__(self, set_strategy: _Optional[_Union[AutoPartitioningStrategy, str]] = ..., set_partition_write_speed: _Optional[_Union[AlterAutoPartitioningWriteSpeedStrategy, _Mapping]] = ...) -> None: ... + +class AlterAutoPartitioningWriteSpeedStrategy(_message.Message): + __slots__ = ["set_down_utilization_percent", "set_stabilization_window", "set_up_utilization_percent"] + SET_DOWN_UTILIZATION_PERCENT_FIELD_NUMBER: _ClassVar[int] + SET_STABILIZATION_WINDOW_FIELD_NUMBER: _ClassVar[int] + SET_UP_UTILIZATION_PERCENT_FIELD_NUMBER: _ClassVar[int] + set_down_utilization_percent: int + set_stabilization_window: _duration_pb2.Duration + set_up_utilization_percent: int + def __init__(self, set_stabilization_window: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., set_up_utilization_percent: _Optional[int] = ..., set_down_utilization_percent: _Optional[int] = ...) -> None: ... + +class AlterConsumer(_message.Message): + __slots__ = ["alter_attributes", "name", "set_important", "set_read_from", "set_supported_codecs"] + class AlterAttributesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ALTER_ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + SET_IMPORTANT_FIELD_NUMBER: _ClassVar[int] + SET_READ_FROM_FIELD_NUMBER: _ClassVar[int] + SET_SUPPORTED_CODECS_FIELD_NUMBER: _ClassVar[int] + alter_attributes: _containers.ScalarMap[str, str] + name: str + set_important: bool + set_read_from: _timestamp_pb2.Timestamp + set_supported_codecs: SupportedCodecs + def __init__(self, name: _Optional[str] = ..., set_important: bool = ..., set_read_from: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., set_supported_codecs: _Optional[_Union[SupportedCodecs, _Mapping]] = ..., alter_attributes: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class AlterPartitioningSettings(_message.Message): + __slots__ = ["alter_auto_partitioning_settings", "set_max_active_partitions", "set_min_active_partitions", "set_partition_count_limit"] + ALTER_AUTO_PARTITIONING_SETTINGS_FIELD_NUMBER: _ClassVar[int] + SET_MAX_ACTIVE_PARTITIONS_FIELD_NUMBER: _ClassVar[int] + SET_MIN_ACTIVE_PARTITIONS_FIELD_NUMBER: _ClassVar[int] + SET_PARTITION_COUNT_LIMIT_FIELD_NUMBER: _ClassVar[int] + alter_auto_partitioning_settings: AlterAutoPartitioningSettings + set_max_active_partitions: int + set_min_active_partitions: int + set_partition_count_limit: int + def __init__(self, set_min_active_partitions: _Optional[int] = ..., set_max_active_partitions: _Optional[int] = ..., set_partition_count_limit: _Optional[int] = ..., alter_auto_partitioning_settings: _Optional[_Union[AlterAutoPartitioningSettings, _Mapping]] = ...) -> None: ... + +class AlterTopicRequest(_message.Message): + __slots__ = ["add_consumers", "alter_attributes", "alter_consumers", "alter_partitioning_settings", "drop_consumers", "operation_params", "path", "set_metering_mode", "set_partition_write_burst_bytes", "set_partition_write_speed_bytes_per_second", "set_retention_period", "set_retention_storage_mb", "set_supported_codecs"] + class AlterAttributesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ADD_CONSUMERS_FIELD_NUMBER: _ClassVar[int] + ALTER_ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] + ALTER_CONSUMERS_FIELD_NUMBER: _ClassVar[int] + ALTER_PARTITIONING_SETTINGS_FIELD_NUMBER: _ClassVar[int] + DROP_CONSUMERS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + SET_METERING_MODE_FIELD_NUMBER: _ClassVar[int] + SET_PARTITION_WRITE_BURST_BYTES_FIELD_NUMBER: _ClassVar[int] + SET_PARTITION_WRITE_SPEED_BYTES_PER_SECOND_FIELD_NUMBER: _ClassVar[int] + SET_RETENTION_PERIOD_FIELD_NUMBER: _ClassVar[int] + SET_RETENTION_STORAGE_MB_FIELD_NUMBER: _ClassVar[int] + SET_SUPPORTED_CODECS_FIELD_NUMBER: _ClassVar[int] + add_consumers: _containers.RepeatedCompositeFieldContainer[Consumer] + alter_attributes: _containers.ScalarMap[str, str] + alter_consumers: _containers.RepeatedCompositeFieldContainer[AlterConsumer] + alter_partitioning_settings: AlterPartitioningSettings + drop_consumers: _containers.RepeatedScalarFieldContainer[str] + operation_params: _ydb_operation_pb2.OperationParams + path: str + set_metering_mode: MeteringMode + set_partition_write_burst_bytes: int + set_partition_write_speed_bytes_per_second: int + set_retention_period: _duration_pb2.Duration + set_retention_storage_mb: int + set_supported_codecs: SupportedCodecs + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., alter_partitioning_settings: _Optional[_Union[AlterPartitioningSettings, _Mapping]] = ..., set_retention_period: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., set_retention_storage_mb: _Optional[int] = ..., set_supported_codecs: _Optional[_Union[SupportedCodecs, _Mapping]] = ..., set_partition_write_speed_bytes_per_second: _Optional[int] = ..., set_partition_write_burst_bytes: _Optional[int] = ..., alter_attributes: _Optional[_Mapping[str, str]] = ..., add_consumers: _Optional[_Iterable[_Union[Consumer, _Mapping]]] = ..., drop_consumers: _Optional[_Iterable[str]] = ..., alter_consumers: _Optional[_Iterable[_Union[AlterConsumer, _Mapping]]] = ..., set_metering_mode: _Optional[_Union[MeteringMode, str]] = ...) -> None: ... + +class AlterTopicResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class AlterTopicResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class AutoPartitioningSettings(_message.Message): + __slots__ = ["partition_write_speed", "strategy"] + PARTITION_WRITE_SPEED_FIELD_NUMBER: _ClassVar[int] + STRATEGY_FIELD_NUMBER: _ClassVar[int] + partition_write_speed: AutoPartitioningWriteSpeedStrategy + strategy: AutoPartitioningStrategy + def __init__(self, strategy: _Optional[_Union[AutoPartitioningStrategy, str]] = ..., partition_write_speed: _Optional[_Union[AutoPartitioningWriteSpeedStrategy, _Mapping]] = ...) -> None: ... + +class AutoPartitioningWriteSpeedStrategy(_message.Message): + __slots__ = ["down_utilization_percent", "stabilization_window", "up_utilization_percent"] + DOWN_UTILIZATION_PERCENT_FIELD_NUMBER: _ClassVar[int] + STABILIZATION_WINDOW_FIELD_NUMBER: _ClassVar[int] + UP_UTILIZATION_PERCENT_FIELD_NUMBER: _ClassVar[int] + down_utilization_percent: int + stabilization_window: _duration_pb2.Duration + up_utilization_percent: int + def __init__(self, stabilization_window: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., up_utilization_percent: _Optional[int] = ..., down_utilization_percent: _Optional[int] = ...) -> None: ... + +class CommitOffsetRequest(_message.Message): + __slots__ = ["consumer", "offset", "operation_params", "partition_id", "path"] + CONSUMER_FIELD_NUMBER: _ClassVar[int] + OFFSET_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + consumer: str + offset: int + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., consumer: _Optional[str] = ..., offset: _Optional[int] = ...) -> None: ... + +class CommitOffsetResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CommitOffsetResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class Consumer(_message.Message): + __slots__ = ["attributes", "consumer_stats", "important", "name", "read_from", "supported_codecs"] + class AttributesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + class ConsumerStats(_message.Message): + __slots__ = ["bytes_read", "max_read_time_lag", "max_write_time_lag", "min_partitions_last_read_time"] + BYTES_READ_FIELD_NUMBER: _ClassVar[int] + MAX_READ_TIME_LAG_FIELD_NUMBER: _ClassVar[int] + MAX_WRITE_TIME_LAG_FIELD_NUMBER: _ClassVar[int] + MIN_PARTITIONS_LAST_READ_TIME_FIELD_NUMBER: _ClassVar[int] + bytes_read: MultipleWindowsStat + max_read_time_lag: _duration_pb2.Duration + max_write_time_lag: _duration_pb2.Duration + min_partitions_last_read_time: _timestamp_pb2.Timestamp + def __init__(self, min_partitions_last_read_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., max_read_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_write_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., bytes_read: _Optional[_Union[MultipleWindowsStat, _Mapping]] = ...) -> None: ... + ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] + CONSUMER_STATS_FIELD_NUMBER: _ClassVar[int] + IMPORTANT_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + READ_FROM_FIELD_NUMBER: _ClassVar[int] + SUPPORTED_CODECS_FIELD_NUMBER: _ClassVar[int] + attributes: _containers.ScalarMap[str, str] + consumer_stats: Consumer.ConsumerStats + important: bool + name: str + read_from: _timestamp_pb2.Timestamp + supported_codecs: SupportedCodecs + def __init__(self, name: _Optional[str] = ..., important: bool = ..., read_from: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., supported_codecs: _Optional[_Union[SupportedCodecs, _Mapping]] = ..., attributes: _Optional[_Mapping[str, str]] = ..., consumer_stats: _Optional[_Union[Consumer.ConsumerStats, _Mapping]] = ...) -> None: ... + +class CreateTopicRequest(_message.Message): + __slots__ = ["attributes", "consumers", "metering_mode", "operation_params", "partition_write_burst_bytes", "partition_write_speed_bytes_per_second", "partitioning_settings", "path", "retention_period", "retention_storage_mb", "supported_codecs"] + class AttributesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] + CONSUMERS_FIELD_NUMBER: _ClassVar[int] + METERING_MODE_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITIONING_SETTINGS_FIELD_NUMBER: _ClassVar[int] + PARTITION_WRITE_BURST_BYTES_FIELD_NUMBER: _ClassVar[int] + PARTITION_WRITE_SPEED_BYTES_PER_SECOND_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + RETENTION_PERIOD_FIELD_NUMBER: _ClassVar[int] + RETENTION_STORAGE_MB_FIELD_NUMBER: _ClassVar[int] + SUPPORTED_CODECS_FIELD_NUMBER: _ClassVar[int] + attributes: _containers.ScalarMap[str, str] + consumers: _containers.RepeatedCompositeFieldContainer[Consumer] + metering_mode: MeteringMode + operation_params: _ydb_operation_pb2.OperationParams + partition_write_burst_bytes: int + partition_write_speed_bytes_per_second: int + partitioning_settings: PartitioningSettings + path: str + retention_period: _duration_pb2.Duration + retention_storage_mb: int + supported_codecs: SupportedCodecs + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partitioning_settings: _Optional[_Union[PartitioningSettings, _Mapping]] = ..., retention_period: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., retention_storage_mb: _Optional[int] = ..., supported_codecs: _Optional[_Union[SupportedCodecs, _Mapping]] = ..., partition_write_speed_bytes_per_second: _Optional[int] = ..., partition_write_burst_bytes: _Optional[int] = ..., attributes: _Optional[_Mapping[str, str]] = ..., consumers: _Optional[_Iterable[_Union[Consumer, _Mapping]]] = ..., metering_mode: _Optional[_Union[MeteringMode, str]] = ...) -> None: ... + +class CreateTopicResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class CreateTopicResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class DescribeConsumerRequest(_message.Message): + __slots__ = ["consumer", "include_location", "include_stats", "operation_params", "path"] + CONSUMER_FIELD_NUMBER: _ClassVar[int] + INCLUDE_LOCATION_FIELD_NUMBER: _ClassVar[int] + INCLUDE_STATS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + consumer: str + include_location: bool + include_stats: bool + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., consumer: _Optional[str] = ..., include_stats: bool = ..., include_location: bool = ...) -> None: ... + +class DescribeConsumerResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeConsumerResult(_message.Message): + __slots__ = ["consumer", "partitions", "self"] + class PartitionConsumerStats(_message.Message): + __slots__ = ["bytes_read", "committed_offset", "connection_node_id", "last_read_offset", "last_read_time", "max_read_time_lag", "max_write_time_lag", "partition_read_session_create_time", "read_session_id", "reader_name"] + BYTES_READ_FIELD_NUMBER: _ClassVar[int] + COMMITTED_OFFSET_FIELD_NUMBER: _ClassVar[int] + CONNECTION_NODE_ID_FIELD_NUMBER: _ClassVar[int] + LAST_READ_OFFSET_FIELD_NUMBER: _ClassVar[int] + LAST_READ_TIME_FIELD_NUMBER: _ClassVar[int] + MAX_READ_TIME_LAG_FIELD_NUMBER: _ClassVar[int] + MAX_WRITE_TIME_LAG_FIELD_NUMBER: _ClassVar[int] + PARTITION_READ_SESSION_CREATE_TIME_FIELD_NUMBER: _ClassVar[int] + READER_NAME_FIELD_NUMBER: _ClassVar[int] + READ_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + bytes_read: MultipleWindowsStat + committed_offset: int + connection_node_id: int + last_read_offset: int + last_read_time: _timestamp_pb2.Timestamp + max_read_time_lag: _duration_pb2.Duration + max_write_time_lag: _duration_pb2.Duration + partition_read_session_create_time: _timestamp_pb2.Timestamp + read_session_id: str + reader_name: str + def __init__(self, last_read_offset: _Optional[int] = ..., committed_offset: _Optional[int] = ..., read_session_id: _Optional[str] = ..., partition_read_session_create_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., last_read_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., max_read_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_write_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., bytes_read: _Optional[_Union[MultipleWindowsStat, _Mapping]] = ..., reader_name: _Optional[str] = ..., connection_node_id: _Optional[int] = ...) -> None: ... + class PartitionInfo(_message.Message): + __slots__ = ["active", "child_partition_ids", "parent_partition_ids", "partition_consumer_stats", "partition_id", "partition_location", "partition_stats"] + ACTIVE_FIELD_NUMBER: _ClassVar[int] + CHILD_PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] + PARENT_PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] + PARTITION_CONSUMER_STATS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_LOCATION_FIELD_NUMBER: _ClassVar[int] + PARTITION_STATS_FIELD_NUMBER: _ClassVar[int] + active: bool + child_partition_ids: _containers.RepeatedScalarFieldContainer[int] + parent_partition_ids: _containers.RepeatedScalarFieldContainer[int] + partition_consumer_stats: DescribeConsumerResult.PartitionConsumerStats + partition_id: int + partition_location: PartitionLocation + partition_stats: PartitionStats + def __init__(self, partition_id: _Optional[int] = ..., active: bool = ..., child_partition_ids: _Optional[_Iterable[int]] = ..., parent_partition_ids: _Optional[_Iterable[int]] = ..., partition_stats: _Optional[_Union[PartitionStats, _Mapping]] = ..., partition_consumer_stats: _Optional[_Union[DescribeConsumerResult.PartitionConsumerStats, _Mapping]] = ..., partition_location: _Optional[_Union[PartitionLocation, _Mapping]] = ...) -> None: ... + CONSUMER_FIELD_NUMBER: _ClassVar[int] + PARTITIONS_FIELD_NUMBER: _ClassVar[int] + SELF_FIELD_NUMBER: _ClassVar[int] + consumer: Consumer + partitions: _containers.RepeatedCompositeFieldContainer[DescribeConsumerResult.PartitionInfo] + self: _ydb_scheme_pb2.Entry + def __init__(self, self_: _Optional[_Union[_ydb_scheme_pb2.Entry, _Mapping]] = ..., consumer: _Optional[_Union[Consumer, _Mapping]] = ..., partitions: _Optional[_Iterable[_Union[DescribeConsumerResult.PartitionInfo, _Mapping]]] = ...) -> None: ... + +class DescribePartitionRequest(_message.Message): + __slots__ = ["include_location", "include_stats", "operation_params", "partition_id", "path"] + INCLUDE_LOCATION_FIELD_NUMBER: _ClassVar[int] + INCLUDE_STATS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + include_location: bool + include_stats: bool + operation_params: _ydb_operation_pb2.OperationParams + partition_id: int + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., include_stats: bool = ..., include_location: bool = ...) -> None: ... + +class DescribePartitionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribePartitionResult(_message.Message): + __slots__ = ["partition"] + PARTITION_FIELD_NUMBER: _ClassVar[int] + partition: DescribeTopicResult.PartitionInfo + def __init__(self, partition: _Optional[_Union[DescribeTopicResult.PartitionInfo, _Mapping]] = ...) -> None: ... + +class DescribeTopicRequest(_message.Message): + __slots__ = ["include_location", "include_stats", "operation_params", "path"] + INCLUDE_LOCATION_FIELD_NUMBER: _ClassVar[int] + INCLUDE_STATS_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + include_location: bool + include_stats: bool + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., include_stats: bool = ..., include_location: bool = ...) -> None: ... + +class DescribeTopicResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DescribeTopicResult(_message.Message): + __slots__ = ["attributes", "consumers", "metering_mode", "partition_consumer_read_speed_bytes_per_second", "partition_total_read_speed_bytes_per_second", "partition_write_burst_bytes", "partition_write_speed_bytes_per_second", "partitioning_settings", "partitions", "retention_period", "retention_storage_mb", "self", "supported_codecs", "topic_stats"] + class AttributesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + class PartitionInfo(_message.Message): + __slots__ = ["active", "child_partition_ids", "key_range", "parent_partition_ids", "partition_id", "partition_location", "partition_stats"] + ACTIVE_FIELD_NUMBER: _ClassVar[int] + CHILD_PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] + KEY_RANGE_FIELD_NUMBER: _ClassVar[int] + PARENT_PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_LOCATION_FIELD_NUMBER: _ClassVar[int] + PARTITION_STATS_FIELD_NUMBER: _ClassVar[int] + active: bool + child_partition_ids: _containers.RepeatedScalarFieldContainer[int] + key_range: PartitionKeyRange + parent_partition_ids: _containers.RepeatedScalarFieldContainer[int] + partition_id: int + partition_location: PartitionLocation + partition_stats: PartitionStats + def __init__(self, partition_id: _Optional[int] = ..., active: bool = ..., child_partition_ids: _Optional[_Iterable[int]] = ..., parent_partition_ids: _Optional[_Iterable[int]] = ..., partition_stats: _Optional[_Union[PartitionStats, _Mapping]] = ..., partition_location: _Optional[_Union[PartitionLocation, _Mapping]] = ..., key_range: _Optional[_Union[PartitionKeyRange, _Mapping]] = ...) -> None: ... + class TopicStats(_message.Message): + __slots__ = ["bytes_written", "max_write_time_lag", "min_last_write_time", "store_size_bytes"] + BYTES_WRITTEN_FIELD_NUMBER: _ClassVar[int] + MAX_WRITE_TIME_LAG_FIELD_NUMBER: _ClassVar[int] + MIN_LAST_WRITE_TIME_FIELD_NUMBER: _ClassVar[int] + STORE_SIZE_BYTES_FIELD_NUMBER: _ClassVar[int] + bytes_written: MultipleWindowsStat + max_write_time_lag: _duration_pb2.Duration + min_last_write_time: _timestamp_pb2.Timestamp + store_size_bytes: int + def __init__(self, store_size_bytes: _Optional[int] = ..., min_last_write_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., max_write_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., bytes_written: _Optional[_Union[MultipleWindowsStat, _Mapping]] = ...) -> None: ... + ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] + CONSUMERS_FIELD_NUMBER: _ClassVar[int] + METERING_MODE_FIELD_NUMBER: _ClassVar[int] + PARTITIONING_SETTINGS_FIELD_NUMBER: _ClassVar[int] + PARTITIONS_FIELD_NUMBER: _ClassVar[int] + PARTITION_CONSUMER_READ_SPEED_BYTES_PER_SECOND_FIELD_NUMBER: _ClassVar[int] + PARTITION_TOTAL_READ_SPEED_BYTES_PER_SECOND_FIELD_NUMBER: _ClassVar[int] + PARTITION_WRITE_BURST_BYTES_FIELD_NUMBER: _ClassVar[int] + PARTITION_WRITE_SPEED_BYTES_PER_SECOND_FIELD_NUMBER: _ClassVar[int] + RETENTION_PERIOD_FIELD_NUMBER: _ClassVar[int] + RETENTION_STORAGE_MB_FIELD_NUMBER: _ClassVar[int] + SELF_FIELD_NUMBER: _ClassVar[int] + SUPPORTED_CODECS_FIELD_NUMBER: _ClassVar[int] + TOPIC_STATS_FIELD_NUMBER: _ClassVar[int] + attributes: _containers.ScalarMap[str, str] + consumers: _containers.RepeatedCompositeFieldContainer[Consumer] + metering_mode: MeteringMode + partition_consumer_read_speed_bytes_per_second: int + partition_total_read_speed_bytes_per_second: int + partition_write_burst_bytes: int + partition_write_speed_bytes_per_second: int + partitioning_settings: PartitioningSettings + partitions: _containers.RepeatedCompositeFieldContainer[DescribeTopicResult.PartitionInfo] + retention_period: _duration_pb2.Duration + retention_storage_mb: int + self: _ydb_scheme_pb2.Entry + supported_codecs: SupportedCodecs + topic_stats: DescribeTopicResult.TopicStats + def __init__(self, self_: _Optional[_Union[_ydb_scheme_pb2.Entry, _Mapping]] = ..., partitioning_settings: _Optional[_Union[PartitioningSettings, _Mapping]] = ..., partitions: _Optional[_Iterable[_Union[DescribeTopicResult.PartitionInfo, _Mapping]]] = ..., retention_period: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., retention_storage_mb: _Optional[int] = ..., supported_codecs: _Optional[_Union[SupportedCodecs, _Mapping]] = ..., partition_write_speed_bytes_per_second: _Optional[int] = ..., partition_total_read_speed_bytes_per_second: _Optional[int] = ..., partition_consumer_read_speed_bytes_per_second: _Optional[int] = ..., partition_write_burst_bytes: _Optional[int] = ..., attributes: _Optional[_Mapping[str, str]] = ..., consumers: _Optional[_Iterable[_Union[Consumer, _Mapping]]] = ..., metering_mode: _Optional[_Union[MeteringMode, str]] = ..., topic_stats: _Optional[_Union[DescribeTopicResult.TopicStats, _Mapping]] = ...) -> None: ... + +class DropTopicRequest(_message.Message): + __slots__ = ["operation_params", "path"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + path: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ...) -> None: ... + +class DropTopicResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class DropTopicResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class MetadataItem(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: bytes + def __init__(self, key: _Optional[str] = ..., value: _Optional[bytes] = ...) -> None: ... + +class MultipleWindowsStat(_message.Message): + __slots__ = ["per_day", "per_hour", "per_minute"] + PER_DAY_FIELD_NUMBER: _ClassVar[int] + PER_HOUR_FIELD_NUMBER: _ClassVar[int] + PER_MINUTE_FIELD_NUMBER: _ClassVar[int] + per_day: int + per_hour: int + per_minute: int + def __init__(self, per_minute: _Optional[int] = ..., per_hour: _Optional[int] = ..., per_day: _Optional[int] = ...) -> None: ... + +class OffsetsRange(_message.Message): + __slots__ = ["end", "start"] + END_FIELD_NUMBER: _ClassVar[int] + START_FIELD_NUMBER: _ClassVar[int] + end: int + start: int + def __init__(self, start: _Optional[int] = ..., end: _Optional[int] = ...) -> None: ... + +class PartitionKeyRange(_message.Message): + __slots__ = ["from_bound", "to_bound"] + FROM_BOUND_FIELD_NUMBER: _ClassVar[int] + TO_BOUND_FIELD_NUMBER: _ClassVar[int] + from_bound: bytes + to_bound: bytes + def __init__(self, from_bound: _Optional[bytes] = ..., to_bound: _Optional[bytes] = ...) -> None: ... + +class PartitionLocation(_message.Message): + __slots__ = ["generation", "node_id"] + GENERATION_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + generation: int + node_id: int + def __init__(self, node_id: _Optional[int] = ..., generation: _Optional[int] = ...) -> None: ... + +class PartitionStats(_message.Message): + __slots__ = ["bytes_written", "last_write_time", "max_write_time_lag", "partition_node_id", "partition_offsets", "store_size_bytes"] + BYTES_WRITTEN_FIELD_NUMBER: _ClassVar[int] + LAST_WRITE_TIME_FIELD_NUMBER: _ClassVar[int] + MAX_WRITE_TIME_LAG_FIELD_NUMBER: _ClassVar[int] + PARTITION_NODE_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_OFFSETS_FIELD_NUMBER: _ClassVar[int] + STORE_SIZE_BYTES_FIELD_NUMBER: _ClassVar[int] + bytes_written: MultipleWindowsStat + last_write_time: _timestamp_pb2.Timestamp + max_write_time_lag: _duration_pb2.Duration + partition_node_id: int + partition_offsets: OffsetsRange + store_size_bytes: int + def __init__(self, partition_offsets: _Optional[_Union[OffsetsRange, _Mapping]] = ..., store_size_bytes: _Optional[int] = ..., last_write_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., max_write_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., bytes_written: _Optional[_Union[MultipleWindowsStat, _Mapping]] = ..., partition_node_id: _Optional[int] = ...) -> None: ... + +class PartitionWithGeneration(_message.Message): + __slots__ = ["generation", "partition_id"] + GENERATION_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + generation: int + partition_id: int + def __init__(self, partition_id: _Optional[int] = ..., generation: _Optional[int] = ...) -> None: ... + +class PartitioningSettings(_message.Message): + __slots__ = ["auto_partitioning_settings", "max_active_partitions", "min_active_partitions", "partition_count_limit"] + AUTO_PARTITIONING_SETTINGS_FIELD_NUMBER: _ClassVar[int] + MAX_ACTIVE_PARTITIONS_FIELD_NUMBER: _ClassVar[int] + MIN_ACTIVE_PARTITIONS_FIELD_NUMBER: _ClassVar[int] + PARTITION_COUNT_LIMIT_FIELD_NUMBER: _ClassVar[int] + auto_partitioning_settings: AutoPartitioningSettings + max_active_partitions: int + min_active_partitions: int + partition_count_limit: int + def __init__(self, min_active_partitions: _Optional[int] = ..., max_active_partitions: _Optional[int] = ..., partition_count_limit: _Optional[int] = ..., auto_partitioning_settings: _Optional[_Union[AutoPartitioningSettings, _Mapping]] = ...) -> None: ... + +class StreamDirectReadMessage(_message.Message): + __slots__ = [] + class DirectReadResponse(_message.Message): + __slots__ = ["direct_read_id", "partition_data", "partition_session_id"] + DIRECT_READ_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_DATA_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + direct_read_id: int + partition_data: StreamReadMessage.ReadResponse.PartitionData + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., direct_read_id: _Optional[int] = ..., partition_data: _Optional[_Union[StreamReadMessage.ReadResponse.PartitionData, _Mapping]] = ...) -> None: ... + class FromClient(_message.Message): + __slots__ = ["init_request", "start_direct_read_partition_session_request", "update_token_request"] + INIT_REQUEST_FIELD_NUMBER: _ClassVar[int] + START_DIRECT_READ_PARTITION_SESSION_REQUEST_FIELD_NUMBER: _ClassVar[int] + UPDATE_TOKEN_REQUEST_FIELD_NUMBER: _ClassVar[int] + init_request: StreamDirectReadMessage.InitRequest + start_direct_read_partition_session_request: StreamDirectReadMessage.StartDirectReadPartitionSessionRequest + update_token_request: UpdateTokenRequest + def __init__(self, init_request: _Optional[_Union[StreamDirectReadMessage.InitRequest, _Mapping]] = ..., start_direct_read_partition_session_request: _Optional[_Union[StreamDirectReadMessage.StartDirectReadPartitionSessionRequest, _Mapping]] = ..., update_token_request: _Optional[_Union[UpdateTokenRequest, _Mapping]] = ...) -> None: ... + class FromServer(_message.Message): + __slots__ = ["direct_read_response", "init_response", "issues", "start_direct_read_partition_session_response", "status", "stop_direct_read_partition_session", "update_token_response"] + DIRECT_READ_RESPONSE_FIELD_NUMBER: _ClassVar[int] + INIT_RESPONSE_FIELD_NUMBER: _ClassVar[int] + ISSUES_FIELD_NUMBER: _ClassVar[int] + START_DIRECT_READ_PARTITION_SESSION_RESPONSE_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + STOP_DIRECT_READ_PARTITION_SESSION_FIELD_NUMBER: _ClassVar[int] + UPDATE_TOKEN_RESPONSE_FIELD_NUMBER: _ClassVar[int] + direct_read_response: StreamDirectReadMessage.DirectReadResponse + init_response: StreamDirectReadMessage.InitResponse + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + start_direct_read_partition_session_response: StreamDirectReadMessage.StartDirectReadPartitionSessionResponse + status: _ydb_status_codes_pb2.StatusIds.StatusCode + stop_direct_read_partition_session: StreamDirectReadMessage.StopDirectReadPartitionSession + update_token_response: UpdateTokenResponse + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., init_response: _Optional[_Union[StreamDirectReadMessage.InitResponse, _Mapping]] = ..., start_direct_read_partition_session_response: _Optional[_Union[StreamDirectReadMessage.StartDirectReadPartitionSessionResponse, _Mapping]] = ..., stop_direct_read_partition_session: _Optional[_Union[StreamDirectReadMessage.StopDirectReadPartitionSession, _Mapping]] = ..., direct_read_response: _Optional[_Union[StreamDirectReadMessage.DirectReadResponse, _Mapping]] = ..., update_token_response: _Optional[_Union[UpdateTokenResponse, _Mapping]] = ...) -> None: ... + class InitRequest(_message.Message): + __slots__ = ["consumer", "session_id", "topics_read_settings"] + class TopicReadSettings(_message.Message): + __slots__ = ["path"] + PATH_FIELD_NUMBER: _ClassVar[int] + path: str + def __init__(self, path: _Optional[str] = ...) -> None: ... + CONSUMER_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TOPICS_READ_SETTINGS_FIELD_NUMBER: _ClassVar[int] + consumer: str + session_id: str + topics_read_settings: _containers.RepeatedCompositeFieldContainer[StreamDirectReadMessage.InitRequest.TopicReadSettings] + def __init__(self, session_id: _Optional[str] = ..., topics_read_settings: _Optional[_Iterable[_Union[StreamDirectReadMessage.InitRequest.TopicReadSettings, _Mapping]]] = ..., consumer: _Optional[str] = ...) -> None: ... + class InitResponse(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + class StartDirectReadPartitionSessionRequest(_message.Message): + __slots__ = ["generation", "last_direct_read_id", "partition_session_id"] + GENERATION_FIELD_NUMBER: _ClassVar[int] + LAST_DIRECT_READ_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + generation: int + last_direct_read_id: int + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., last_direct_read_id: _Optional[int] = ..., generation: _Optional[int] = ...) -> None: ... + class StartDirectReadPartitionSessionResponse(_message.Message): + __slots__ = ["generation", "partition_session_id"] + GENERATION_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + generation: int + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., generation: _Optional[int] = ...) -> None: ... + class StopDirectReadPartitionSession(_message.Message): + __slots__ = ["generation", "issues", "partition_session_id", "status"] + GENERATION_FIELD_NUMBER: _ClassVar[int] + ISSUES_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + generation: int + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + partition_session_id: int + status: _ydb_status_codes_pb2.StatusIds.StatusCode + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., partition_session_id: _Optional[int] = ..., generation: _Optional[int] = ...) -> None: ... + def __init__(self) -> None: ... + +class StreamReadMessage(_message.Message): + __slots__ = [] + class CommitOffsetRequest(_message.Message): + __slots__ = ["commit_offsets"] + class PartitionCommitOffset(_message.Message): + __slots__ = ["offsets", "partition_session_id"] + OFFSETS_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + offsets: _containers.RepeatedCompositeFieldContainer[OffsetsRange] + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., offsets: _Optional[_Iterable[_Union[OffsetsRange, _Mapping]]] = ...) -> None: ... + COMMIT_OFFSETS_FIELD_NUMBER: _ClassVar[int] + commit_offsets: _containers.RepeatedCompositeFieldContainer[StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset] + def __init__(self, commit_offsets: _Optional[_Iterable[_Union[StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset, _Mapping]]] = ...) -> None: ... + class CommitOffsetResponse(_message.Message): + __slots__ = ["partitions_committed_offsets"] + class PartitionCommittedOffset(_message.Message): + __slots__ = ["committed_offset", "partition_session_id"] + COMMITTED_OFFSET_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + committed_offset: int + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., committed_offset: _Optional[int] = ...) -> None: ... + PARTITIONS_COMMITTED_OFFSETS_FIELD_NUMBER: _ClassVar[int] + partitions_committed_offsets: _containers.RepeatedCompositeFieldContainer[StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset] + def __init__(self, partitions_committed_offsets: _Optional[_Iterable[_Union[StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset, _Mapping]]] = ...) -> None: ... + class DirectReadAck(_message.Message): + __slots__ = ["direct_read_id", "partition_session_id"] + DIRECT_READ_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + direct_read_id: int + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., direct_read_id: _Optional[int] = ...) -> None: ... + class EndPartitionSession(_message.Message): + __slots__ = ["adjacent_partition_ids", "child_partition_ids", "partition_session_id"] + ADJACENT_PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] + CHILD_PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + adjacent_partition_ids: _containers.RepeatedScalarFieldContainer[int] + child_partition_ids: _containers.RepeatedScalarFieldContainer[int] + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., adjacent_partition_ids: _Optional[_Iterable[int]] = ..., child_partition_ids: _Optional[_Iterable[int]] = ...) -> None: ... + class FromClient(_message.Message): + __slots__ = ["commit_offset_request", "direct_read_ack", "init_request", "partition_session_status_request", "read_request", "start_partition_session_response", "stop_partition_session_response", "update_token_request"] + COMMIT_OFFSET_REQUEST_FIELD_NUMBER: _ClassVar[int] + DIRECT_READ_ACK_FIELD_NUMBER: _ClassVar[int] + INIT_REQUEST_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_STATUS_REQUEST_FIELD_NUMBER: _ClassVar[int] + READ_REQUEST_FIELD_NUMBER: _ClassVar[int] + START_PARTITION_SESSION_RESPONSE_FIELD_NUMBER: _ClassVar[int] + STOP_PARTITION_SESSION_RESPONSE_FIELD_NUMBER: _ClassVar[int] + UPDATE_TOKEN_REQUEST_FIELD_NUMBER: _ClassVar[int] + commit_offset_request: StreamReadMessage.CommitOffsetRequest + direct_read_ack: StreamReadMessage.DirectReadAck + init_request: StreamReadMessage.InitRequest + partition_session_status_request: StreamReadMessage.PartitionSessionStatusRequest + read_request: StreamReadMessage.ReadRequest + start_partition_session_response: StreamReadMessage.StartPartitionSessionResponse + stop_partition_session_response: StreamReadMessage.StopPartitionSessionResponse + update_token_request: UpdateTokenRequest + def __init__(self, init_request: _Optional[_Union[StreamReadMessage.InitRequest, _Mapping]] = ..., read_request: _Optional[_Union[StreamReadMessage.ReadRequest, _Mapping]] = ..., commit_offset_request: _Optional[_Union[StreamReadMessage.CommitOffsetRequest, _Mapping]] = ..., partition_session_status_request: _Optional[_Union[StreamReadMessage.PartitionSessionStatusRequest, _Mapping]] = ..., update_token_request: _Optional[_Union[UpdateTokenRequest, _Mapping]] = ..., direct_read_ack: _Optional[_Union[StreamReadMessage.DirectReadAck, _Mapping]] = ..., start_partition_session_response: _Optional[_Union[StreamReadMessage.StartPartitionSessionResponse, _Mapping]] = ..., stop_partition_session_response: _Optional[_Union[StreamReadMessage.StopPartitionSessionResponse, _Mapping]] = ...) -> None: ... + class FromServer(_message.Message): + __slots__ = ["commit_offset_response", "end_partition_session", "init_response", "issues", "partition_session_status_response", "read_response", "start_partition_session_request", "status", "stop_partition_session_request", "update_partition_session", "update_token_response"] + COMMIT_OFFSET_RESPONSE_FIELD_NUMBER: _ClassVar[int] + END_PARTITION_SESSION_FIELD_NUMBER: _ClassVar[int] + INIT_RESPONSE_FIELD_NUMBER: _ClassVar[int] + ISSUES_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_STATUS_RESPONSE_FIELD_NUMBER: _ClassVar[int] + READ_RESPONSE_FIELD_NUMBER: _ClassVar[int] + START_PARTITION_SESSION_REQUEST_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + STOP_PARTITION_SESSION_REQUEST_FIELD_NUMBER: _ClassVar[int] + UPDATE_PARTITION_SESSION_FIELD_NUMBER: _ClassVar[int] + UPDATE_TOKEN_RESPONSE_FIELD_NUMBER: _ClassVar[int] + commit_offset_response: StreamReadMessage.CommitOffsetResponse + end_partition_session: StreamReadMessage.EndPartitionSession + init_response: StreamReadMessage.InitResponse + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + partition_session_status_response: StreamReadMessage.PartitionSessionStatusResponse + read_response: StreamReadMessage.ReadResponse + start_partition_session_request: StreamReadMessage.StartPartitionSessionRequest + status: _ydb_status_codes_pb2.StatusIds.StatusCode + stop_partition_session_request: StreamReadMessage.StopPartitionSessionRequest + update_partition_session: StreamReadMessage.UpdatePartitionSession + update_token_response: UpdateTokenResponse + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., init_response: _Optional[_Union[StreamReadMessage.InitResponse, _Mapping]] = ..., read_response: _Optional[_Union[StreamReadMessage.ReadResponse, _Mapping]] = ..., commit_offset_response: _Optional[_Union[StreamReadMessage.CommitOffsetResponse, _Mapping]] = ..., partition_session_status_response: _Optional[_Union[StreamReadMessage.PartitionSessionStatusResponse, _Mapping]] = ..., update_token_response: _Optional[_Union[UpdateTokenResponse, _Mapping]] = ..., start_partition_session_request: _Optional[_Union[StreamReadMessage.StartPartitionSessionRequest, _Mapping]] = ..., stop_partition_session_request: _Optional[_Union[StreamReadMessage.StopPartitionSessionRequest, _Mapping]] = ..., update_partition_session: _Optional[_Union[StreamReadMessage.UpdatePartitionSession, _Mapping]] = ..., end_partition_session: _Optional[_Union[StreamReadMessage.EndPartitionSession, _Mapping]] = ...) -> None: ... + class InitRequest(_message.Message): + __slots__ = ["auto_partitioning_support", "consumer", "direct_read", "reader_name", "topics_read_settings"] + class TopicReadSettings(_message.Message): + __slots__ = ["max_lag", "partition_ids", "path", "read_from"] + MAX_LAG_FIELD_NUMBER: _ClassVar[int] + PARTITION_IDS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + READ_FROM_FIELD_NUMBER: _ClassVar[int] + max_lag: _duration_pb2.Duration + partition_ids: _containers.RepeatedScalarFieldContainer[int] + path: str + read_from: _timestamp_pb2.Timestamp + def __init__(self, path: _Optional[str] = ..., partition_ids: _Optional[_Iterable[int]] = ..., max_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., read_from: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + AUTO_PARTITIONING_SUPPORT_FIELD_NUMBER: _ClassVar[int] + CONSUMER_FIELD_NUMBER: _ClassVar[int] + DIRECT_READ_FIELD_NUMBER: _ClassVar[int] + READER_NAME_FIELD_NUMBER: _ClassVar[int] + TOPICS_READ_SETTINGS_FIELD_NUMBER: _ClassVar[int] + auto_partitioning_support: bool + consumer: str + direct_read: bool + reader_name: str + topics_read_settings: _containers.RepeatedCompositeFieldContainer[StreamReadMessage.InitRequest.TopicReadSettings] + def __init__(self, topics_read_settings: _Optional[_Iterable[_Union[StreamReadMessage.InitRequest.TopicReadSettings, _Mapping]]] = ..., consumer: _Optional[str] = ..., reader_name: _Optional[str] = ..., direct_read: bool = ..., auto_partitioning_support: bool = ...) -> None: ... + class InitResponse(_message.Message): + __slots__ = ["session_id"] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + session_id: str + def __init__(self, session_id: _Optional[str] = ...) -> None: ... + class PartitionSession(_message.Message): + __slots__ = ["partition_id", "partition_session_id", "path"] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + partition_id: int + partition_session_id: int + path: str + def __init__(self, partition_session_id: _Optional[int] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ...) -> None: ... + class PartitionSessionStatusRequest(_message.Message): + __slots__ = ["partition_session_id"] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ...) -> None: ... + class PartitionSessionStatusResponse(_message.Message): + __slots__ = ["committed_offset", "partition_offsets", "partition_session_id", "write_time_high_watermark"] + COMMITTED_OFFSET_FIELD_NUMBER: _ClassVar[int] + PARTITION_OFFSETS_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + WRITE_TIME_HIGH_WATERMARK_FIELD_NUMBER: _ClassVar[int] + committed_offset: int + partition_offsets: OffsetsRange + partition_session_id: int + write_time_high_watermark: _timestamp_pb2.Timestamp + def __init__(self, partition_session_id: _Optional[int] = ..., partition_offsets: _Optional[_Union[OffsetsRange, _Mapping]] = ..., committed_offset: _Optional[int] = ..., write_time_high_watermark: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + class ReadRequest(_message.Message): + __slots__ = ["bytes_size"] + BYTES_SIZE_FIELD_NUMBER: _ClassVar[int] + bytes_size: int + def __init__(self, bytes_size: _Optional[int] = ...) -> None: ... + class ReadResponse(_message.Message): + __slots__ = ["bytes_size", "partition_data"] + class Batch(_message.Message): + __slots__ = ["codec", "message_data", "producer_id", "write_session_meta", "written_at"] + class WriteSessionMetaEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + CODEC_FIELD_NUMBER: _ClassVar[int] + MESSAGE_DATA_FIELD_NUMBER: _ClassVar[int] + PRODUCER_ID_FIELD_NUMBER: _ClassVar[int] + WRITE_SESSION_META_FIELD_NUMBER: _ClassVar[int] + WRITTEN_AT_FIELD_NUMBER: _ClassVar[int] + codec: int + message_data: _containers.RepeatedCompositeFieldContainer[StreamReadMessage.ReadResponse.MessageData] + producer_id: str + write_session_meta: _containers.ScalarMap[str, str] + written_at: _timestamp_pb2.Timestamp + def __init__(self, message_data: _Optional[_Iterable[_Union[StreamReadMessage.ReadResponse.MessageData, _Mapping]]] = ..., producer_id: _Optional[str] = ..., write_session_meta: _Optional[_Mapping[str, str]] = ..., codec: _Optional[int] = ..., written_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + class MessageData(_message.Message): + __slots__ = ["created_at", "data", "message_group_id", "metadata_items", "offset", "seq_no", "uncompressed_size"] + CREATED_AT_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + MESSAGE_GROUP_ID_FIELD_NUMBER: _ClassVar[int] + METADATA_ITEMS_FIELD_NUMBER: _ClassVar[int] + OFFSET_FIELD_NUMBER: _ClassVar[int] + SEQ_NO_FIELD_NUMBER: _ClassVar[int] + UNCOMPRESSED_SIZE_FIELD_NUMBER: _ClassVar[int] + created_at: _timestamp_pb2.Timestamp + data: bytes + message_group_id: str + metadata_items: _containers.RepeatedCompositeFieldContainer[MetadataItem] + offset: int + seq_no: int + uncompressed_size: int + def __init__(self, offset: _Optional[int] = ..., seq_no: _Optional[int] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., data: _Optional[bytes] = ..., uncompressed_size: _Optional[int] = ..., message_group_id: _Optional[str] = ..., metadata_items: _Optional[_Iterable[_Union[MetadataItem, _Mapping]]] = ...) -> None: ... + class PartitionData(_message.Message): + __slots__ = ["batches", "partition_session_id"] + BATCHES_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + batches: _containers.RepeatedCompositeFieldContainer[StreamReadMessage.ReadResponse.Batch] + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., batches: _Optional[_Iterable[_Union[StreamReadMessage.ReadResponse.Batch, _Mapping]]] = ...) -> None: ... + BYTES_SIZE_FIELD_NUMBER: _ClassVar[int] + PARTITION_DATA_FIELD_NUMBER: _ClassVar[int] + bytes_size: int + partition_data: _containers.RepeatedCompositeFieldContainer[StreamReadMessage.ReadResponse.PartitionData] + def __init__(self, partition_data: _Optional[_Iterable[_Union[StreamReadMessage.ReadResponse.PartitionData, _Mapping]]] = ..., bytes_size: _Optional[int] = ...) -> None: ... + class StartPartitionSessionRequest(_message.Message): + __slots__ = ["committed_offset", "partition_location", "partition_offsets", "partition_session"] + COMMITTED_OFFSET_FIELD_NUMBER: _ClassVar[int] + PARTITION_LOCATION_FIELD_NUMBER: _ClassVar[int] + PARTITION_OFFSETS_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_FIELD_NUMBER: _ClassVar[int] + committed_offset: int + partition_location: PartitionLocation + partition_offsets: OffsetsRange + partition_session: StreamReadMessage.PartitionSession + def __init__(self, partition_session: _Optional[_Union[StreamReadMessage.PartitionSession, _Mapping]] = ..., committed_offset: _Optional[int] = ..., partition_offsets: _Optional[_Union[OffsetsRange, _Mapping]] = ..., partition_location: _Optional[_Union[PartitionLocation, _Mapping]] = ...) -> None: ... + class StartPartitionSessionResponse(_message.Message): + __slots__ = ["commit_offset", "partition_session_id", "read_offset"] + COMMIT_OFFSET_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + READ_OFFSET_FIELD_NUMBER: _ClassVar[int] + commit_offset: int + partition_session_id: int + read_offset: int + def __init__(self, partition_session_id: _Optional[int] = ..., read_offset: _Optional[int] = ..., commit_offset: _Optional[int] = ...) -> None: ... + class StopPartitionSessionRequest(_message.Message): + __slots__ = ["committed_offset", "graceful", "last_direct_read_id", "partition_session_id"] + COMMITTED_OFFSET_FIELD_NUMBER: _ClassVar[int] + GRACEFUL_FIELD_NUMBER: _ClassVar[int] + LAST_DIRECT_READ_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + committed_offset: int + graceful: bool + last_direct_read_id: int + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., graceful: bool = ..., committed_offset: _Optional[int] = ..., last_direct_read_id: _Optional[int] = ...) -> None: ... + class StopPartitionSessionResponse(_message.Message): + __slots__ = ["graceful", "partition_session_id"] + GRACEFUL_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + graceful: bool + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., graceful: bool = ...) -> None: ... + class UpdatePartitionSession(_message.Message): + __slots__ = ["partition_location", "partition_session_id"] + PARTITION_LOCATION_FIELD_NUMBER: _ClassVar[int] + PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + partition_location: PartitionLocation + partition_session_id: int + def __init__(self, partition_session_id: _Optional[int] = ..., partition_location: _Optional[_Union[PartitionLocation, _Mapping]] = ...) -> None: ... + def __init__(self) -> None: ... + +class StreamWriteMessage(_message.Message): + __slots__ = [] + class FromClient(_message.Message): + __slots__ = ["init_request", "update_token_request", "write_request"] + INIT_REQUEST_FIELD_NUMBER: _ClassVar[int] + UPDATE_TOKEN_REQUEST_FIELD_NUMBER: _ClassVar[int] + WRITE_REQUEST_FIELD_NUMBER: _ClassVar[int] + init_request: StreamWriteMessage.InitRequest + update_token_request: UpdateTokenRequest + write_request: StreamWriteMessage.WriteRequest + def __init__(self, init_request: _Optional[_Union[StreamWriteMessage.InitRequest, _Mapping]] = ..., write_request: _Optional[_Union[StreamWriteMessage.WriteRequest, _Mapping]] = ..., update_token_request: _Optional[_Union[UpdateTokenRequest, _Mapping]] = ...) -> None: ... + class FromServer(_message.Message): + __slots__ = ["init_response", "issues", "status", "update_token_response", "write_response"] + INIT_RESPONSE_FIELD_NUMBER: _ClassVar[int] + ISSUES_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + UPDATE_TOKEN_RESPONSE_FIELD_NUMBER: _ClassVar[int] + WRITE_RESPONSE_FIELD_NUMBER: _ClassVar[int] + init_response: StreamWriteMessage.InitResponse + issues: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] + status: _ydb_status_codes_pb2.StatusIds.StatusCode + update_token_response: UpdateTokenResponse + write_response: StreamWriteMessage.WriteResponse + def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., init_response: _Optional[_Union[StreamWriteMessage.InitResponse, _Mapping]] = ..., write_response: _Optional[_Union[StreamWriteMessage.WriteResponse, _Mapping]] = ..., update_token_response: _Optional[_Union[UpdateTokenResponse, _Mapping]] = ...) -> None: ... + class InitRequest(_message.Message): + __slots__ = ["get_last_seq_no", "message_group_id", "partition_id", "partition_with_generation", "path", "producer_id", "write_session_meta"] + class WriteSessionMetaEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + GET_LAST_SEQ_NO_FIELD_NUMBER: _ClassVar[int] + MESSAGE_GROUP_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_WITH_GENERATION_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + PRODUCER_ID_FIELD_NUMBER: _ClassVar[int] + WRITE_SESSION_META_FIELD_NUMBER: _ClassVar[int] + get_last_seq_no: bool + message_group_id: str + partition_id: int + partition_with_generation: PartitionWithGeneration + path: str + producer_id: str + write_session_meta: _containers.ScalarMap[str, str] + def __init__(self, path: _Optional[str] = ..., producer_id: _Optional[str] = ..., write_session_meta: _Optional[_Mapping[str, str]] = ..., message_group_id: _Optional[str] = ..., partition_id: _Optional[int] = ..., partition_with_generation: _Optional[_Union[PartitionWithGeneration, _Mapping]] = ..., get_last_seq_no: bool = ...) -> None: ... + class InitResponse(_message.Message): + __slots__ = ["last_seq_no", "partition_id", "session_id", "supported_codecs"] + LAST_SEQ_NO_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + SUPPORTED_CODECS_FIELD_NUMBER: _ClassVar[int] + last_seq_no: int + partition_id: int + session_id: str + supported_codecs: SupportedCodecs + def __init__(self, last_seq_no: _Optional[int] = ..., session_id: _Optional[str] = ..., partition_id: _Optional[int] = ..., supported_codecs: _Optional[_Union[SupportedCodecs, _Mapping]] = ...) -> None: ... + class WriteRequest(_message.Message): + __slots__ = ["codec", "messages", "tx"] + class MessageData(_message.Message): + __slots__ = ["created_at", "data", "message_group_id", "metadata_items", "partition_id", "partition_with_generation", "seq_no", "uncompressed_size"] + CREATED_AT_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + MESSAGE_GROUP_ID_FIELD_NUMBER: _ClassVar[int] + METADATA_ITEMS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_WITH_GENERATION_FIELD_NUMBER: _ClassVar[int] + SEQ_NO_FIELD_NUMBER: _ClassVar[int] + UNCOMPRESSED_SIZE_FIELD_NUMBER: _ClassVar[int] + created_at: _timestamp_pb2.Timestamp + data: bytes + message_group_id: str + metadata_items: _containers.RepeatedCompositeFieldContainer[MetadataItem] + partition_id: int + partition_with_generation: PartitionWithGeneration + seq_no: int + uncompressed_size: int + def __init__(self, seq_no: _Optional[int] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., data: _Optional[bytes] = ..., uncompressed_size: _Optional[int] = ..., message_group_id: _Optional[str] = ..., partition_id: _Optional[int] = ..., partition_with_generation: _Optional[_Union[PartitionWithGeneration, _Mapping]] = ..., metadata_items: _Optional[_Iterable[_Union[MetadataItem, _Mapping]]] = ...) -> None: ... + CODEC_FIELD_NUMBER: _ClassVar[int] + MESSAGES_FIELD_NUMBER: _ClassVar[int] + TX_FIELD_NUMBER: _ClassVar[int] + codec: int + messages: _containers.RepeatedCompositeFieldContainer[StreamWriteMessage.WriteRequest.MessageData] + tx: TransactionIdentity + def __init__(self, messages: _Optional[_Iterable[_Union[StreamWriteMessage.WriteRequest.MessageData, _Mapping]]] = ..., codec: _Optional[int] = ..., tx: _Optional[_Union[TransactionIdentity, _Mapping]] = ...) -> None: ... + class WriteResponse(_message.Message): + __slots__ = ["acks", "partition_id", "write_statistics"] + class WriteAck(_message.Message): + __slots__ = ["seq_no", "skipped", "written", "written_in_tx"] + class Skipped(_message.Message): + __slots__ = ["reason"] + class Reason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + REASON_ALREADY_WRITTEN: StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason + REASON_FIELD_NUMBER: _ClassVar[int] + REASON_UNSPECIFIED: StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason + reason: StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason + def __init__(self, reason: _Optional[_Union[StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason, str]] = ...) -> None: ... + class Written(_message.Message): + __slots__ = ["offset"] + OFFSET_FIELD_NUMBER: _ClassVar[int] + offset: int + def __init__(self, offset: _Optional[int] = ...) -> None: ... + class WrittenInTx(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + SEQ_NO_FIELD_NUMBER: _ClassVar[int] + SKIPPED_FIELD_NUMBER: _ClassVar[int] + WRITTEN_FIELD_NUMBER: _ClassVar[int] + WRITTEN_IN_TX_FIELD_NUMBER: _ClassVar[int] + seq_no: int + skipped: StreamWriteMessage.WriteResponse.WriteAck.Skipped + written: StreamWriteMessage.WriteResponse.WriteAck.Written + written_in_tx: StreamWriteMessage.WriteResponse.WriteAck.WrittenInTx + def __init__(self, seq_no: _Optional[int] = ..., written: _Optional[_Union[StreamWriteMessage.WriteResponse.WriteAck.Written, _Mapping]] = ..., skipped: _Optional[_Union[StreamWriteMessage.WriteResponse.WriteAck.Skipped, _Mapping]] = ..., written_in_tx: _Optional[_Union[StreamWriteMessage.WriteResponse.WriteAck.WrittenInTx, _Mapping]] = ...) -> None: ... + class WriteStatistics(_message.Message): + __slots__ = ["max_queue_wait_time", "min_queue_wait_time", "partition_quota_wait_time", "persisting_time", "topic_quota_wait_time"] + MAX_QUEUE_WAIT_TIME_FIELD_NUMBER: _ClassVar[int] + MIN_QUEUE_WAIT_TIME_FIELD_NUMBER: _ClassVar[int] + PARTITION_QUOTA_WAIT_TIME_FIELD_NUMBER: _ClassVar[int] + PERSISTING_TIME_FIELD_NUMBER: _ClassVar[int] + TOPIC_QUOTA_WAIT_TIME_FIELD_NUMBER: _ClassVar[int] + max_queue_wait_time: _duration_pb2.Duration + min_queue_wait_time: _duration_pb2.Duration + partition_quota_wait_time: _duration_pb2.Duration + persisting_time: _duration_pb2.Duration + topic_quota_wait_time: _duration_pb2.Duration + def __init__(self, persisting_time: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., min_queue_wait_time: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_queue_wait_time: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., partition_quota_wait_time: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., topic_quota_wait_time: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...) -> None: ... + ACKS_FIELD_NUMBER: _ClassVar[int] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + WRITE_STATISTICS_FIELD_NUMBER: _ClassVar[int] + acks: _containers.RepeatedCompositeFieldContainer[StreamWriteMessage.WriteResponse.WriteAck] + partition_id: int + write_statistics: StreamWriteMessage.WriteResponse.WriteStatistics + def __init__(self, acks: _Optional[_Iterable[_Union[StreamWriteMessage.WriteResponse.WriteAck, _Mapping]]] = ..., partition_id: _Optional[int] = ..., write_statistics: _Optional[_Union[StreamWriteMessage.WriteResponse.WriteStatistics, _Mapping]] = ...) -> None: ... + def __init__(self) -> None: ... + +class SupportedCodecs(_message.Message): + __slots__ = ["codecs"] + CODECS_FIELD_NUMBER: _ClassVar[int] + codecs: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, codecs: _Optional[_Iterable[int]] = ...) -> None: ... + +class TransactionIdentity(_message.Message): + __slots__ = ["id", "session"] + ID_FIELD_NUMBER: _ClassVar[int] + SESSION_FIELD_NUMBER: _ClassVar[int] + id: str + session: str + def __init__(self, id: _Optional[str] = ..., session: _Optional[str] = ...) -> None: ... + +class UpdateOffsetsInTransactionRequest(_message.Message): + __slots__ = ["consumer", "operation_params", "topics", "tx"] + class TopicOffsets(_message.Message): + __slots__ = ["partitions", "path"] + class PartitionOffsets(_message.Message): + __slots__ = ["partition_id", "partition_offsets"] + PARTITION_ID_FIELD_NUMBER: _ClassVar[int] + PARTITION_OFFSETS_FIELD_NUMBER: _ClassVar[int] + partition_id: int + partition_offsets: _containers.RepeatedCompositeFieldContainer[OffsetsRange] + def __init__(self, partition_id: _Optional[int] = ..., partition_offsets: _Optional[_Iterable[_Union[OffsetsRange, _Mapping]]] = ...) -> None: ... + PARTITIONS_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + partitions: _containers.RepeatedCompositeFieldContainer[UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets] + path: str + def __init__(self, path: _Optional[str] = ..., partitions: _Optional[_Iterable[_Union[UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets, _Mapping]]] = ...) -> None: ... + CONSUMER_FIELD_NUMBER: _ClassVar[int] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + TOPICS_FIELD_NUMBER: _ClassVar[int] + TX_FIELD_NUMBER: _ClassVar[int] + consumer: str + operation_params: _ydb_operation_pb2.OperationParams + topics: _containers.RepeatedCompositeFieldContainer[UpdateOffsetsInTransactionRequest.TopicOffsets] + tx: TransactionIdentity + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., tx: _Optional[_Union[TransactionIdentity, _Mapping]] = ..., topics: _Optional[_Iterable[_Union[UpdateOffsetsInTransactionRequest.TopicOffsets, _Mapping]]] = ..., consumer: _Optional[str] = ...) -> None: ... + +class UpdateOffsetsInTransactionResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class UpdateOffsetsInTransactionResult(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class UpdateTokenRequest(_message.Message): + __slots__ = ["token"] + TOKEN_FIELD_NUMBER: _ClassVar[int] + token: str + def __init__(self, token: _Optional[str] = ...) -> None: ... + +class UpdateTokenResponse(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class Codec(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class AutoPartitioningStrategy(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class MeteringMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] diff --git a/ydb/_grpc/v5/protos/ydb_topic_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_topic_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_topic_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/protos/ydb_value_pb2.py b/ydb/_grpc/v5/protos/ydb_value_pb2.py new file mode 100644 index 00000000..e12a525c --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_value_pb2.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protos/ydb_value.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_value.proto\x12\x03Ydb\x1a\x1cgoogle/protobuf/struct.proto\"/\n\x0b\x44\x65\x63imalType\x12\x11\n\tprecision\x18\x01 \x01(\r\x12\r\n\x05scale\x18\x02 \x01(\r\"\'\n\x0cOptionalType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"#\n\x08ListType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"e\n\x0bVariantType\x12%\n\x0btuple_items\x18\x01 \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12\'\n\x0cstruct_items\x18\x02 \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x42\x06\n\x04type\"(\n\tTupleType\x12\x1b\n\x08\x65lements\x18\x01 \x03(\x0b\x32\t.Ydb.Type\"5\n\x0cStructMember\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"0\n\nStructType\x12\"\n\x07members\x18\x01 \x03(\x0b\x32\x11.Ydb.StructMember\">\n\x08\x44ictType\x12\x16\n\x03key\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x1a\n\x07payload\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"2\n\nTaggedType\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"_\n\x06PgType\x12\x11\n\ttype_name\x18\n \x01(\t\x12\x15\n\rtype_modifier\x18\x0b \x01(\t\x12\x0b\n\x03oid\x18\x01 \x01(\r\x12\x0e\n\x06typlen\x18\x02 \x01(\x05\x12\x0e\n\x06typmod\x18\x03 \x01(\x05\"\x9f\x08\n\x04Type\x12,\n\x07type_id\x18\x01 \x01(\x0e\x32\x19.Ydb.Type.PrimitiveTypeIdH\x00\x12(\n\x0c\x64\x65\x63imal_type\x18\x02 \x01(\x0b\x32\x10.Ydb.DecimalTypeH\x00\x12*\n\roptional_type\x18\x65 \x01(\x0b\x32\x11.Ydb.OptionalTypeH\x00\x12\"\n\tlist_type\x18\x66 \x01(\x0b\x32\r.Ydb.ListTypeH\x00\x12$\n\ntuple_type\x18g \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12&\n\x0bstruct_type\x18h \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x12\"\n\tdict_type\x18i \x01(\x0b\x32\r.Ydb.DictTypeH\x00\x12(\n\x0cvariant_type\x18j \x01(\x0b\x32\x10.Ydb.VariantTypeH\x00\x12&\n\x0btagged_type\x18k \x01(\x0b\x32\x0f.Ydb.TaggedTypeH\x00\x12\x30\n\tvoid_type\x18\xc9\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x30\n\tnull_type\x18\xca\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_list_type\x18\xcb\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_dict_type\x18\xcc\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x1f\n\x07pg_type\x18\xcd\x01 \x01(\x0b\x32\x0b.Ydb.PgTypeH\x00\"\xad\x03\n\x0fPrimitiveTypeId\x12!\n\x1dPRIMITIVE_TYPE_ID_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x06\x12\x08\n\x04INT8\x10\x07\x12\t\n\x05UINT8\x10\x05\x12\t\n\x05INT16\x10\x08\x12\n\n\x06UINT16\x10\t\x12\t\n\x05INT32\x10\x01\x12\n\n\x06UINT32\x10\x02\x12\t\n\x05INT64\x10\x03\x12\n\n\x06UINT64\x10\x04\x12\t\n\x05\x46LOAT\x10!\x12\n\n\x06\x44OUBLE\x10 \x12\x08\n\x04\x44\x41TE\x10\x30\x12\x0c\n\x08\x44\x41TETIME\x10\x31\x12\r\n\tTIMESTAMP\x10\x32\x12\x0c\n\x08INTERVAL\x10\x33\x12\x0b\n\x07TZ_DATE\x10\x34\x12\x0f\n\x0bTZ_DATETIME\x10\x35\x12\x10\n\x0cTZ_TIMESTAMP\x10\x36\x12\n\n\x06\x44\x41TE32\x10@\x12\x0e\n\nDATETIME64\x10\x41\x12\x0f\n\x0bTIMESTAMP64\x10\x42\x12\x0e\n\nINTERVAL64\x10\x43\x12\x0b\n\x06STRING\x10\x81 \x12\t\n\x04UTF8\x10\x80$\x12\t\n\x04YSON\x10\x81$\x12\t\n\x04JSON\x10\x82$\x12\t\n\x04UUID\x10\x83$\x12\x12\n\rJSON_DOCUMENT\x10\x84$\x12\r\n\x08\x44YNUMBER\x10\x82&B\x06\n\x04type\"A\n\tValuePair\x12\x17\n\x03key\x18\x01 \x01(\x0b\x32\n.Ydb.Value\x12\x1b\n\x07payload\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"\xb1\x03\n\x05Value\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint32_value\x18\x02 \x01(\x0fH\x00\x12\x16\n\x0cuint32_value\x18\x03 \x01(\x07H\x00\x12\x15\n\x0bint64_value\x18\x04 \x01(\x10H\x00\x12\x16\n\x0cuint64_value\x18\x05 \x01(\x06H\x00\x12\x15\n\x0b\x66loat_value\x18\x06 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x07 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x08 \x01(\x0cH\x00\x12\x14\n\ntext_value\x18\t \x01(\tH\x00\x12\x35\n\x0fnull_flag_value\x18\n \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\"\n\x0cnested_value\x18\x0b \x01(\x0b\x32\n.Ydb.ValueH\x00\x12\x11\n\x07low_128\x18\x0f \x01(\x06H\x00\x12\x19\n\x05items\x18\x0c \x03(\x0b\x32\n.Ydb.Value\x12\x1d\n\x05pairs\x18\r \x03(\x0b\x32\x0e.Ydb.ValuePair\x12\x15\n\rvariant_index\x18\x0e \x01(\r\x12\x10\n\x08high_128\x18\x10 \x01(\x06\x42\x07\n\x05value\"@\n\nTypedValue\x12\x17\n\x04type\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"/\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"V\n\tResultSet\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x18\n\x04rows\x18\x02 \x03(\x0b\x32\n.Ydb.Value\x12\x11\n\ttruncated\x18\x03 \x01(\x08\x42T\n\x0etech.ydb.protoB\x0bValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_value_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\016tech.ydb.protoB\013ValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\370\001\001' + _DECIMALTYPE._serialized_start=61 + _DECIMALTYPE._serialized_end=108 + _OPTIONALTYPE._serialized_start=110 + _OPTIONALTYPE._serialized_end=149 + _LISTTYPE._serialized_start=151 + _LISTTYPE._serialized_end=186 + _VARIANTTYPE._serialized_start=188 + _VARIANTTYPE._serialized_end=289 + _TUPLETYPE._serialized_start=291 + _TUPLETYPE._serialized_end=331 + _STRUCTMEMBER._serialized_start=333 + _STRUCTMEMBER._serialized_end=386 + _STRUCTTYPE._serialized_start=388 + _STRUCTTYPE._serialized_end=436 + _DICTTYPE._serialized_start=438 + _DICTTYPE._serialized_end=500 + _TAGGEDTYPE._serialized_start=502 + _TAGGEDTYPE._serialized_end=552 + _PGTYPE._serialized_start=554 + _PGTYPE._serialized_end=649 + _TYPE._serialized_start=652 + _TYPE._serialized_end=1707 + _TYPE_PRIMITIVETYPEID._serialized_start=1270 + _TYPE_PRIMITIVETYPEID._serialized_end=1699 + _VALUEPAIR._serialized_start=1709 + _VALUEPAIR._serialized_end=1774 + _VALUE._serialized_start=1777 + _VALUE._serialized_end=2210 + _TYPEDVALUE._serialized_start=2212 + _TYPEDVALUE._serialized_end=2276 + _COLUMN._serialized_start=2278 + _COLUMN._serialized_end=2325 + _RESULTSET._serialized_start=2327 + _RESULTSET._serialized_end=2413 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_value_pb2.pyi b/ydb/_grpc/v5/protos/ydb_value_pb2.pyi new file mode 100644 index 00000000..8382a771 --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_value_pb2.pyi @@ -0,0 +1,220 @@ +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 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class Column(_message.Message): + __slots__ = ["name", "type"] + NAME_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + name: str + type: Type + def __init__(self, name: _Optional[str] = ..., type: _Optional[_Union[Type, _Mapping]] = ...) -> None: ... + +class DecimalType(_message.Message): + __slots__ = ["precision", "scale"] + PRECISION_FIELD_NUMBER: _ClassVar[int] + SCALE_FIELD_NUMBER: _ClassVar[int] + precision: int + scale: int + def __init__(self, precision: _Optional[int] = ..., scale: _Optional[int] = ...) -> None: ... + +class DictType(_message.Message): + __slots__ = ["key", "payload"] + KEY_FIELD_NUMBER: _ClassVar[int] + PAYLOAD_FIELD_NUMBER: _ClassVar[int] + key: Type + payload: Type + def __init__(self, key: _Optional[_Union[Type, _Mapping]] = ..., payload: _Optional[_Union[Type, _Mapping]] = ...) -> None: ... + +class ListType(_message.Message): + __slots__ = ["item"] + ITEM_FIELD_NUMBER: _ClassVar[int] + item: Type + def __init__(self, item: _Optional[_Union[Type, _Mapping]] = ...) -> None: ... + +class OptionalType(_message.Message): + __slots__ = ["item"] + ITEM_FIELD_NUMBER: _ClassVar[int] + item: Type + def __init__(self, item: _Optional[_Union[Type, _Mapping]] = ...) -> None: ... + +class PgType(_message.Message): + __slots__ = ["oid", "type_modifier", "type_name", "typlen", "typmod"] + OID_FIELD_NUMBER: _ClassVar[int] + TYPE_MODIFIER_FIELD_NUMBER: _ClassVar[int] + TYPE_NAME_FIELD_NUMBER: _ClassVar[int] + TYPLEN_FIELD_NUMBER: _ClassVar[int] + TYPMOD_FIELD_NUMBER: _ClassVar[int] + oid: int + type_modifier: str + type_name: str + typlen: int + typmod: int + def __init__(self, type_name: _Optional[str] = ..., type_modifier: _Optional[str] = ..., oid: _Optional[int] = ..., typlen: _Optional[int] = ..., typmod: _Optional[int] = ...) -> None: ... + +class ResultSet(_message.Message): + __slots__ = ["columns", "rows", "truncated"] + COLUMNS_FIELD_NUMBER: _ClassVar[int] + ROWS_FIELD_NUMBER: _ClassVar[int] + TRUNCATED_FIELD_NUMBER: _ClassVar[int] + columns: _containers.RepeatedCompositeFieldContainer[Column] + rows: _containers.RepeatedCompositeFieldContainer[Value] + truncated: bool + def __init__(self, columns: _Optional[_Iterable[_Union[Column, _Mapping]]] = ..., rows: _Optional[_Iterable[_Union[Value, _Mapping]]] = ..., truncated: bool = ...) -> None: ... + +class StructMember(_message.Message): + __slots__ = ["name", "type"] + NAME_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + name: str + type: Type + def __init__(self, name: _Optional[str] = ..., type: _Optional[_Union[Type, _Mapping]] = ...) -> None: ... + +class StructType(_message.Message): + __slots__ = ["members"] + MEMBERS_FIELD_NUMBER: _ClassVar[int] + members: _containers.RepeatedCompositeFieldContainer[StructMember] + def __init__(self, members: _Optional[_Iterable[_Union[StructMember, _Mapping]]] = ...) -> None: ... + +class TaggedType(_message.Message): + __slots__ = ["tag", "type"] + TAG_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + tag: str + type: Type + def __init__(self, tag: _Optional[str] = ..., type: _Optional[_Union[Type, _Mapping]] = ...) -> None: ... + +class TupleType(_message.Message): + __slots__ = ["elements"] + ELEMENTS_FIELD_NUMBER: _ClassVar[int] + elements: _containers.RepeatedCompositeFieldContainer[Type] + def __init__(self, elements: _Optional[_Iterable[_Union[Type, _Mapping]]] = ...) -> None: ... + +class Type(_message.Message): + __slots__ = ["decimal_type", "dict_type", "empty_dict_type", "empty_list_type", "list_type", "null_type", "optional_type", "pg_type", "struct_type", "tagged_type", "tuple_type", "type_id", "variant_type", "void_type"] + class PrimitiveTypeId(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + BOOL: Type.PrimitiveTypeId + DATE: Type.PrimitiveTypeId + DATE32: Type.PrimitiveTypeId + DATETIME: Type.PrimitiveTypeId + DATETIME64: Type.PrimitiveTypeId + DECIMAL_TYPE_FIELD_NUMBER: _ClassVar[int] + DICT_TYPE_FIELD_NUMBER: _ClassVar[int] + DOUBLE: Type.PrimitiveTypeId + DYNUMBER: Type.PrimitiveTypeId + EMPTY_DICT_TYPE_FIELD_NUMBER: _ClassVar[int] + EMPTY_LIST_TYPE_FIELD_NUMBER: _ClassVar[int] + FLOAT: Type.PrimitiveTypeId + INT16: Type.PrimitiveTypeId + INT32: Type.PrimitiveTypeId + INT64: Type.PrimitiveTypeId + INT8: Type.PrimitiveTypeId + INTERVAL: Type.PrimitiveTypeId + INTERVAL64: Type.PrimitiveTypeId + JSON: Type.PrimitiveTypeId + JSON_DOCUMENT: Type.PrimitiveTypeId + LIST_TYPE_FIELD_NUMBER: _ClassVar[int] + NULL_TYPE_FIELD_NUMBER: _ClassVar[int] + OPTIONAL_TYPE_FIELD_NUMBER: _ClassVar[int] + PG_TYPE_FIELD_NUMBER: _ClassVar[int] + PRIMITIVE_TYPE_ID_UNSPECIFIED: Type.PrimitiveTypeId + STRING: Type.PrimitiveTypeId + STRUCT_TYPE_FIELD_NUMBER: _ClassVar[int] + TAGGED_TYPE_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP: Type.PrimitiveTypeId + TIMESTAMP64: Type.PrimitiveTypeId + TUPLE_TYPE_FIELD_NUMBER: _ClassVar[int] + TYPE_ID_FIELD_NUMBER: _ClassVar[int] + TZ_DATE: Type.PrimitiveTypeId + TZ_DATETIME: Type.PrimitiveTypeId + TZ_TIMESTAMP: Type.PrimitiveTypeId + UINT16: Type.PrimitiveTypeId + UINT32: Type.PrimitiveTypeId + UINT64: Type.PrimitiveTypeId + UINT8: Type.PrimitiveTypeId + UTF8: Type.PrimitiveTypeId + UUID: Type.PrimitiveTypeId + VARIANT_TYPE_FIELD_NUMBER: _ClassVar[int] + VOID_TYPE_FIELD_NUMBER: _ClassVar[int] + YSON: Type.PrimitiveTypeId + decimal_type: DecimalType + dict_type: DictType + empty_dict_type: _struct_pb2.NullValue + empty_list_type: _struct_pb2.NullValue + list_type: ListType + null_type: _struct_pb2.NullValue + optional_type: OptionalType + pg_type: PgType + struct_type: StructType + tagged_type: TaggedType + tuple_type: TupleType + type_id: Type.PrimitiveTypeId + variant_type: VariantType + void_type: _struct_pb2.NullValue + def __init__(self, type_id: _Optional[_Union[Type.PrimitiveTypeId, str]] = ..., decimal_type: _Optional[_Union[DecimalType, _Mapping]] = ..., optional_type: _Optional[_Union[OptionalType, _Mapping]] = ..., list_type: _Optional[_Union[ListType, _Mapping]] = ..., tuple_type: _Optional[_Union[TupleType, _Mapping]] = ..., struct_type: _Optional[_Union[StructType, _Mapping]] = ..., dict_type: _Optional[_Union[DictType, _Mapping]] = ..., variant_type: _Optional[_Union[VariantType, _Mapping]] = ..., tagged_type: _Optional[_Union[TaggedType, _Mapping]] = ..., void_type: _Optional[_Union[_struct_pb2.NullValue, str]] = ..., null_type: _Optional[_Union[_struct_pb2.NullValue, str]] = ..., empty_list_type: _Optional[_Union[_struct_pb2.NullValue, str]] = ..., empty_dict_type: _Optional[_Union[_struct_pb2.NullValue, str]] = ..., pg_type: _Optional[_Union[PgType, _Mapping]] = ...) -> None: ... + +class TypedValue(_message.Message): + __slots__ = ["type", "value"] + TYPE_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + type: Type + value: Value + def __init__(self, type: _Optional[_Union[Type, _Mapping]] = ..., value: _Optional[_Union[Value, _Mapping]] = ...) -> None: ... + +class Value(_message.Message): + __slots__ = ["bool_value", "bytes_value", "double_value", "float_value", "high_128", "int32_value", "int64_value", "items", "low_128", "nested_value", "null_flag_value", "pairs", "text_value", "uint32_value", "uint64_value", "variant_index"] + BOOL_VALUE_FIELD_NUMBER: _ClassVar[int] + BYTES_VALUE_FIELD_NUMBER: _ClassVar[int] + DOUBLE_VALUE_FIELD_NUMBER: _ClassVar[int] + FLOAT_VALUE_FIELD_NUMBER: _ClassVar[int] + HIGH_128_FIELD_NUMBER: _ClassVar[int] + INT32_VALUE_FIELD_NUMBER: _ClassVar[int] + INT64_VALUE_FIELD_NUMBER: _ClassVar[int] + ITEMS_FIELD_NUMBER: _ClassVar[int] + LOW_128_FIELD_NUMBER: _ClassVar[int] + NESTED_VALUE_FIELD_NUMBER: _ClassVar[int] + NULL_FLAG_VALUE_FIELD_NUMBER: _ClassVar[int] + PAIRS_FIELD_NUMBER: _ClassVar[int] + TEXT_VALUE_FIELD_NUMBER: _ClassVar[int] + UINT32_VALUE_FIELD_NUMBER: _ClassVar[int] + UINT64_VALUE_FIELD_NUMBER: _ClassVar[int] + VARIANT_INDEX_FIELD_NUMBER: _ClassVar[int] + bool_value: bool + bytes_value: bytes + double_value: float + float_value: float + high_128: int + int32_value: int + int64_value: int + items: _containers.RepeatedCompositeFieldContainer[Value] + low_128: int + nested_value: Value + null_flag_value: _struct_pb2.NullValue + pairs: _containers.RepeatedCompositeFieldContainer[ValuePair] + text_value: str + uint32_value: int + uint64_value: int + variant_index: int + def __init__(self, bool_value: bool = ..., int32_value: _Optional[int] = ..., uint32_value: _Optional[int] = ..., int64_value: _Optional[int] = ..., uint64_value: _Optional[int] = ..., float_value: _Optional[float] = ..., double_value: _Optional[float] = ..., bytes_value: _Optional[bytes] = ..., text_value: _Optional[str] = ..., null_flag_value: _Optional[_Union[_struct_pb2.NullValue, str]] = ..., nested_value: _Optional[_Union[Value, _Mapping]] = ..., low_128: _Optional[int] = ..., items: _Optional[_Iterable[_Union[Value, _Mapping]]] = ..., pairs: _Optional[_Iterable[_Union[ValuePair, _Mapping]]] = ..., variant_index: _Optional[int] = ..., high_128: _Optional[int] = ...) -> None: ... + +class ValuePair(_message.Message): + __slots__ = ["key", "payload"] + KEY_FIELD_NUMBER: _ClassVar[int] + PAYLOAD_FIELD_NUMBER: _ClassVar[int] + key: Value + payload: Value + def __init__(self, key: _Optional[_Union[Value, _Mapping]] = ..., payload: _Optional[_Union[Value, _Mapping]] = ...) -> None: ... + +class VariantType(_message.Message): + __slots__ = ["struct_items", "tuple_items"] + STRUCT_ITEMS_FIELD_NUMBER: _ClassVar[int] + TUPLE_ITEMS_FIELD_NUMBER: _ClassVar[int] + struct_items: StructType + tuple_items: TupleType + def __init__(self, tuple_items: _Optional[_Union[TupleType, _Mapping]] = ..., struct_items: _Optional[_Union[StructType, _Mapping]] = ...) -> None: ... diff --git a/ydb/_grpc/v5/protos/ydb_value_pb2_grpc.py b/ydb/_grpc/v5/protos/ydb_value_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/ydb/_grpc/v5/protos/ydb_value_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/ydb/_grpc/v5/ydb_auth_v1_pb2.py b/ydb/_grpc/v5/ydb_auth_v1_pb2.py new file mode 100644 index 00000000..ec4e9027 --- /dev/null +++ b/ydb/_grpc/v5/ydb_auth_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_auth_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_auth_pb2 as protos_dot_ydb__auth__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11ydb_auth_v1.proto\x12\x0bYdb.Auth.V1\x1a\x15protos/ydb_auth.proto2G\n\x0b\x41uthService\x12\x38\n\x05Login\x12\x16.Ydb.Auth.LoginRequest\x1a\x17.Ydb.Auth.LoginResponseBM\n\x16tech.ydb.proto.auth.v1Z3github.com/ydb-platform/ydb-go-genproto/Ydb_Auth_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_auth_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\026tech.ydb.proto.auth.v1Z3github.com/ydb-platform/ydb-go-genproto/Ydb_Auth_V1' + _AUTHSERVICE._serialized_start=57 + _AUTHSERVICE._serialized_end=128 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_auth_v1_pb2.pyi b/ydb/_grpc/v5/ydb_auth_v1_pb2.pyi new file mode 100644 index 00000000..d0d39926 --- /dev/null +++ b/ydb/_grpc/v5/ydb_auth_v1_pb2.pyi @@ -0,0 +1,5 @@ +from protos import ydb_auth_pb2 as _ydb_auth_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_auth_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_auth_v1_pb2_grpc.py new file mode 100644 index 00000000..91d9543a --- /dev/null +++ b/ydb/_grpc/v5/ydb_auth_v1_pb2_grpc.py @@ -0,0 +1,67 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_auth_pb2 as protos_dot_ydb__auth__pb2 + + +class AuthServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Login = channel.unary_unary( + '/Ydb.Auth.V1.AuthService/Login', + request_serializer=protos_dot_ydb__auth__pb2.LoginRequest.SerializeToString, + response_deserializer=protos_dot_ydb__auth__pb2.LoginResponse.FromString, + ) + + +class AuthServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Login(self, request, context): + """Perform login using built-in auth system + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_AuthServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Login': grpc.unary_unary_rpc_method_handler( + servicer.Login, + request_deserializer=protos_dot_ydb__auth__pb2.LoginRequest.FromString, + response_serializer=protos_dot_ydb__auth__pb2.LoginResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.Auth.V1.AuthService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class AuthService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Login(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, '/Ydb.Auth.V1.AuthService/Login', + protos_dot_ydb__auth__pb2.LoginRequest.SerializeToString, + protos_dot_ydb__auth__pb2.LoginResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/ydb_cms_v1_pb2.py b/ydb/_grpc/v5/ydb_cms_v1_pb2.py new file mode 100644 index 00000000..b883b3c2 --- /dev/null +++ b/ydb/_grpc/v5/ydb_cms_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_cms_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_cms_pb2 as protos_dot_ydb__cms__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10ydb_cms_v1.proto\x12\nYdb.Cms.V1\x1a\x14protos/ydb_cms.proto2\x9c\x04\n\nCmsService\x12Q\n\x0e\x43reateDatabase\x12\x1e.Ydb.Cms.CreateDatabaseRequest\x1a\x1f.Ydb.Cms.CreateDatabaseResponse\x12Z\n\x11GetDatabaseStatus\x12!.Ydb.Cms.GetDatabaseStatusRequest\x1a\".Ydb.Cms.GetDatabaseStatusResponse\x12N\n\rAlterDatabase\x12\x1d.Ydb.Cms.AlterDatabaseRequest\x1a\x1e.Ydb.Cms.AlterDatabaseResponse\x12N\n\rListDatabases\x12\x1d.Ydb.Cms.ListDatabasesRequest\x1a\x1e.Ydb.Cms.ListDatabasesResponse\x12Q\n\x0eRemoveDatabase\x12\x1e.Ydb.Cms.RemoveDatabaseRequest\x1a\x1f.Ydb.Cms.RemoveDatabaseResponse\x12l\n\x17\x44\x65scribeDatabaseOptions\x12\'.Ydb.Cms.DescribeDatabaseOptionsRequest\x1a(.Ydb.Cms.DescribeDatabaseOptionsResponseBK\n\x15tech.ydb.proto.cms.v1Z2github.com/ydb-platform/ydb-go-genproto/Ydb_Cms_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_cms_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\025tech.ydb.proto.cms.v1Z2github.com/ydb-platform/ydb-go-genproto/Ydb_Cms_V1' + _CMSSERVICE._serialized_start=55 + _CMSSERVICE._serialized_end=595 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_cms_v1_pb2.pyi b/ydb/_grpc/v5/ydb_cms_v1_pb2.pyi new file mode 100644 index 00000000..1923a252 --- /dev/null +++ b/ydb/_grpc/v5/ydb_cms_v1_pb2.pyi @@ -0,0 +1,5 @@ +from protos import ydb_cms_pb2 as _ydb_cms_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_cms_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_cms_v1_pb2_grpc.py new file mode 100644 index 00000000..2547d580 --- /dev/null +++ b/ydb/_grpc/v5/ydb_cms_v1_pb2_grpc.py @@ -0,0 +1,249 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_cms_pb2 as protos_dot_ydb__cms__pb2 + + +class CmsServiceStub(object): + """CMS stands for Cluster Management System. CmsService provides some + functionality for managing cluster, i.e. managing YDB Database + instances for example. + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateDatabase = channel.unary_unary( + '/Ydb.Cms.V1.CmsService/CreateDatabase', + request_serializer=protos_dot_ydb__cms__pb2.CreateDatabaseRequest.SerializeToString, + response_deserializer=protos_dot_ydb__cms__pb2.CreateDatabaseResponse.FromString, + ) + self.GetDatabaseStatus = channel.unary_unary( + '/Ydb.Cms.V1.CmsService/GetDatabaseStatus', + request_serializer=protos_dot_ydb__cms__pb2.GetDatabaseStatusRequest.SerializeToString, + response_deserializer=protos_dot_ydb__cms__pb2.GetDatabaseStatusResponse.FromString, + ) + self.AlterDatabase = channel.unary_unary( + '/Ydb.Cms.V1.CmsService/AlterDatabase', + request_serializer=protos_dot_ydb__cms__pb2.AlterDatabaseRequest.SerializeToString, + response_deserializer=protos_dot_ydb__cms__pb2.AlterDatabaseResponse.FromString, + ) + self.ListDatabases = channel.unary_unary( + '/Ydb.Cms.V1.CmsService/ListDatabases', + request_serializer=protos_dot_ydb__cms__pb2.ListDatabasesRequest.SerializeToString, + response_deserializer=protos_dot_ydb__cms__pb2.ListDatabasesResponse.FromString, + ) + self.RemoveDatabase = channel.unary_unary( + '/Ydb.Cms.V1.CmsService/RemoveDatabase', + request_serializer=protos_dot_ydb__cms__pb2.RemoveDatabaseRequest.SerializeToString, + response_deserializer=protos_dot_ydb__cms__pb2.RemoveDatabaseResponse.FromString, + ) + self.DescribeDatabaseOptions = channel.unary_unary( + '/Ydb.Cms.V1.CmsService/DescribeDatabaseOptions', + request_serializer=protos_dot_ydb__cms__pb2.DescribeDatabaseOptionsRequest.SerializeToString, + response_deserializer=protos_dot_ydb__cms__pb2.DescribeDatabaseOptionsResponse.FromString, + ) + + +class CmsServiceServicer(object): + """CMS stands for Cluster Management System. CmsService provides some + functionality for managing cluster, i.e. managing YDB Database + instances for example. + + """ + + def CreateDatabase(self, request, context): + """Create a new database. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetDatabaseStatus(self, request, context): + """Get current database's status. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AlterDatabase(self, request, context): + """Alter database resources. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListDatabases(self, request, context): + """List all databases. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemoveDatabase(self, request, context): + """Remove database. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeDatabaseOptions(self, request, context): + """Describe supported database options. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_CmsServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateDatabase': grpc.unary_unary_rpc_method_handler( + servicer.CreateDatabase, + request_deserializer=protos_dot_ydb__cms__pb2.CreateDatabaseRequest.FromString, + response_serializer=protos_dot_ydb__cms__pb2.CreateDatabaseResponse.SerializeToString, + ), + 'GetDatabaseStatus': grpc.unary_unary_rpc_method_handler( + servicer.GetDatabaseStatus, + request_deserializer=protos_dot_ydb__cms__pb2.GetDatabaseStatusRequest.FromString, + response_serializer=protos_dot_ydb__cms__pb2.GetDatabaseStatusResponse.SerializeToString, + ), + 'AlterDatabase': grpc.unary_unary_rpc_method_handler( + servicer.AlterDatabase, + request_deserializer=protos_dot_ydb__cms__pb2.AlterDatabaseRequest.FromString, + response_serializer=protos_dot_ydb__cms__pb2.AlterDatabaseResponse.SerializeToString, + ), + 'ListDatabases': grpc.unary_unary_rpc_method_handler( + servicer.ListDatabases, + request_deserializer=protos_dot_ydb__cms__pb2.ListDatabasesRequest.FromString, + response_serializer=protos_dot_ydb__cms__pb2.ListDatabasesResponse.SerializeToString, + ), + 'RemoveDatabase': grpc.unary_unary_rpc_method_handler( + servicer.RemoveDatabase, + request_deserializer=protos_dot_ydb__cms__pb2.RemoveDatabaseRequest.FromString, + response_serializer=protos_dot_ydb__cms__pb2.RemoveDatabaseResponse.SerializeToString, + ), + 'DescribeDatabaseOptions': grpc.unary_unary_rpc_method_handler( + servicer.DescribeDatabaseOptions, + request_deserializer=protos_dot_ydb__cms__pb2.DescribeDatabaseOptionsRequest.FromString, + response_serializer=protos_dot_ydb__cms__pb2.DescribeDatabaseOptionsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.Cms.V1.CmsService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class CmsService(object): + """CMS stands for Cluster Management System. CmsService provides some + functionality for managing cluster, i.e. managing YDB Database + instances for example. + + """ + + @staticmethod + def CreateDatabase(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, '/Ydb.Cms.V1.CmsService/CreateDatabase', + protos_dot_ydb__cms__pb2.CreateDatabaseRequest.SerializeToString, + protos_dot_ydb__cms__pb2.CreateDatabaseResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetDatabaseStatus(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, '/Ydb.Cms.V1.CmsService/GetDatabaseStatus', + protos_dot_ydb__cms__pb2.GetDatabaseStatusRequest.SerializeToString, + protos_dot_ydb__cms__pb2.GetDatabaseStatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AlterDatabase(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, '/Ydb.Cms.V1.CmsService/AlterDatabase', + protos_dot_ydb__cms__pb2.AlterDatabaseRequest.SerializeToString, + protos_dot_ydb__cms__pb2.AlterDatabaseResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListDatabases(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, '/Ydb.Cms.V1.CmsService/ListDatabases', + protos_dot_ydb__cms__pb2.ListDatabasesRequest.SerializeToString, + protos_dot_ydb__cms__pb2.ListDatabasesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemoveDatabase(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, '/Ydb.Cms.V1.CmsService/RemoveDatabase', + protos_dot_ydb__cms__pb2.RemoveDatabaseRequest.SerializeToString, + protos_dot_ydb__cms__pb2.RemoveDatabaseResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeDatabaseOptions(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, '/Ydb.Cms.V1.CmsService/DescribeDatabaseOptions', + protos_dot_ydb__cms__pb2.DescribeDatabaseOptionsRequest.SerializeToString, + protos_dot_ydb__cms__pb2.DescribeDatabaseOptionsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/ydb_coordination_v1_pb2.py b/ydb/_grpc/v5/ydb_coordination_v1_pb2.py new file mode 100644 index 00000000..eb8586f4 --- /dev/null +++ b/ydb/_grpc/v5/ydb_coordination_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_coordination_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_coordination_pb2 as protos_dot_ydb__coordination__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19ydb_coordination_v1.proto\x12\x13Ydb.Coordination.V1\x1a\x1dprotos/ydb_coordination.proto2\xca\x03\n\x13\x43oordinationService\x12R\n\x07Session\x12 .Ydb.Coordination.SessionRequest\x1a!.Ydb.Coordination.SessionResponse(\x01\x30\x01\x12W\n\nCreateNode\x12#.Ydb.Coordination.CreateNodeRequest\x1a$.Ydb.Coordination.CreateNodeResponse\x12T\n\tAlterNode\x12\".Ydb.Coordination.AlterNodeRequest\x1a#.Ydb.Coordination.AlterNodeResponse\x12Q\n\x08\x44ropNode\x12!.Ydb.Coordination.DropNodeRequest\x1a\".Ydb.Coordination.DropNodeResponse\x12]\n\x0c\x44\x65scribeNode\x12%.Ydb.Coordination.DescribeNodeRequest\x1a&.Ydb.Coordination.DescribeNodeResponseBq\n\x1etech.ydb.proto.coordination.v1B\x10\x43oordinationGrpcP\x01Z;github.com/ydb-platform/ydb-go-genproto/Ydb_Coordination_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_coordination_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\036tech.ydb.proto.coordination.v1B\020CoordinationGrpcP\001Z;github.com/ydb-platform/ydb-go-genproto/Ydb_Coordination_V1' + _COORDINATIONSERVICE._serialized_start=82 + _COORDINATIONSERVICE._serialized_end=540 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_coordination_v1_pb2.pyi b/ydb/_grpc/v5/ydb_coordination_v1_pb2.pyi new file mode 100644 index 00000000..b4ceeeee --- /dev/null +++ b/ydb/_grpc/v5/ydb_coordination_v1_pb2.pyi @@ -0,0 +1,5 @@ +from protos import ydb_coordination_pb2 as _ydb_coordination_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_coordination_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_coordination_v1_pb2_grpc.py new file mode 100644 index 00000000..c1c72ec2 --- /dev/null +++ b/ydb/_grpc/v5/ydb_coordination_v1_pb2_grpc.py @@ -0,0 +1,210 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_coordination_pb2 as protos_dot_ydb__coordination__pb2 + + +class CoordinationServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Session = channel.stream_stream( + '/Ydb.Coordination.V1.CoordinationService/Session', + request_serializer=protos_dot_ydb__coordination__pb2.SessionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__coordination__pb2.SessionResponse.FromString, + ) + self.CreateNode = channel.unary_unary( + '/Ydb.Coordination.V1.CoordinationService/CreateNode', + request_serializer=protos_dot_ydb__coordination__pb2.CreateNodeRequest.SerializeToString, + response_deserializer=protos_dot_ydb__coordination__pb2.CreateNodeResponse.FromString, + ) + self.AlterNode = channel.unary_unary( + '/Ydb.Coordination.V1.CoordinationService/AlterNode', + request_serializer=protos_dot_ydb__coordination__pb2.AlterNodeRequest.SerializeToString, + response_deserializer=protos_dot_ydb__coordination__pb2.AlterNodeResponse.FromString, + ) + self.DropNode = channel.unary_unary( + '/Ydb.Coordination.V1.CoordinationService/DropNode', + request_serializer=protos_dot_ydb__coordination__pb2.DropNodeRequest.SerializeToString, + response_deserializer=protos_dot_ydb__coordination__pb2.DropNodeResponse.FromString, + ) + self.DescribeNode = channel.unary_unary( + '/Ydb.Coordination.V1.CoordinationService/DescribeNode', + request_serializer=protos_dot_ydb__coordination__pb2.DescribeNodeRequest.SerializeToString, + response_deserializer=protos_dot_ydb__coordination__pb2.DescribeNodeResponse.FromString, + ) + + +class CoordinationServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Session(self, request_iterator, context): + """* + Bidirectional stream used to establish a session with a coordination node + + Relevant APIs for managing semaphores, distributed locking, creating or + restoring a previously established session are described using nested + messages in SessionRequest and SessionResponse. Session is established + with a specific coordination node (previously created using CreateNode + below) and semaphores are local to that coordination node. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateNode(self, request, context): + """Creates a new coordination node + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AlterNode(self, request, context): + """Modifies settings of a coordination node + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DropNode(self, request, context): + """Drops a coordination node + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeNode(self, request, context): + """Describes a coordination node + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_CoordinationServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Session': grpc.stream_stream_rpc_method_handler( + servicer.Session, + request_deserializer=protos_dot_ydb__coordination__pb2.SessionRequest.FromString, + response_serializer=protos_dot_ydb__coordination__pb2.SessionResponse.SerializeToString, + ), + 'CreateNode': grpc.unary_unary_rpc_method_handler( + servicer.CreateNode, + request_deserializer=protos_dot_ydb__coordination__pb2.CreateNodeRequest.FromString, + response_serializer=protos_dot_ydb__coordination__pb2.CreateNodeResponse.SerializeToString, + ), + 'AlterNode': grpc.unary_unary_rpc_method_handler( + servicer.AlterNode, + request_deserializer=protos_dot_ydb__coordination__pb2.AlterNodeRequest.FromString, + response_serializer=protos_dot_ydb__coordination__pb2.AlterNodeResponse.SerializeToString, + ), + 'DropNode': grpc.unary_unary_rpc_method_handler( + servicer.DropNode, + request_deserializer=protos_dot_ydb__coordination__pb2.DropNodeRequest.FromString, + response_serializer=protos_dot_ydb__coordination__pb2.DropNodeResponse.SerializeToString, + ), + 'DescribeNode': grpc.unary_unary_rpc_method_handler( + servicer.DescribeNode, + request_deserializer=protos_dot_ydb__coordination__pb2.DescribeNodeRequest.FromString, + response_serializer=protos_dot_ydb__coordination__pb2.DescribeNodeResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.Coordination.V1.CoordinationService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class CoordinationService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Session(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/Ydb.Coordination.V1.CoordinationService/Session', + protos_dot_ydb__coordination__pb2.SessionRequest.SerializeToString, + protos_dot_ydb__coordination__pb2.SessionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateNode(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, '/Ydb.Coordination.V1.CoordinationService/CreateNode', + protos_dot_ydb__coordination__pb2.CreateNodeRequest.SerializeToString, + protos_dot_ydb__coordination__pb2.CreateNodeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AlterNode(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, '/Ydb.Coordination.V1.CoordinationService/AlterNode', + protos_dot_ydb__coordination__pb2.AlterNodeRequest.SerializeToString, + protos_dot_ydb__coordination__pb2.AlterNodeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DropNode(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, '/Ydb.Coordination.V1.CoordinationService/DropNode', + protos_dot_ydb__coordination__pb2.DropNodeRequest.SerializeToString, + protos_dot_ydb__coordination__pb2.DropNodeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeNode(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, '/Ydb.Coordination.V1.CoordinationService/DescribeNode', + protos_dot_ydb__coordination__pb2.DescribeNodeRequest.SerializeToString, + protos_dot_ydb__coordination__pb2.DescribeNodeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/ydb_discovery_v1_pb2.py b/ydb/_grpc/v5/ydb_discovery_v1_pb2.py new file mode 100644 index 00000000..ce661c89 --- /dev/null +++ b/ydb/_grpc/v5/ydb_discovery_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_discovery_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_discovery_pb2 as protos_dot_ydb__discovery__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16ydb_discovery_v1.proto\x12\x10Ydb.Discovery.V1\x1a\x1aprotos/ydb_discovery.proto2\xb5\x01\n\x10\x44iscoveryService\x12Z\n\rListEndpoints\x12#.Ydb.Discovery.ListEndpointsRequest\x1a$.Ydb.Discovery.ListEndpointsResponse\x12\x45\n\x06WhoAmI\x12\x1c.Ydb.Discovery.WhoAmIRequest\x1a\x1d.Ydb.Discovery.WhoAmIResponseBW\n\x1btech.ydb.proto.discovery.v1Z8github.com/ydb-platform/ydb-go-genproto/Ydb_Discovery_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_discovery_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\033tech.ydb.proto.discovery.v1Z8github.com/ydb-platform/ydb-go-genproto/Ydb_Discovery_V1' + _DISCOVERYSERVICE._serialized_start=73 + _DISCOVERYSERVICE._serialized_end=254 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_discovery_v1_pb2.pyi b/ydb/_grpc/v5/ydb_discovery_v1_pb2.pyi new file mode 100644 index 00000000..96e5859a --- /dev/null +++ b/ydb/_grpc/v5/ydb_discovery_v1_pb2.pyi @@ -0,0 +1,5 @@ +from protos import ydb_discovery_pb2 as _ydb_discovery_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_discovery_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_discovery_v1_pb2_grpc.py new file mode 100644 index 00000000..65da34c7 --- /dev/null +++ b/ydb/_grpc/v5/ydb_discovery_v1_pb2_grpc.py @@ -0,0 +1,99 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_discovery_pb2 as protos_dot_ydb__discovery__pb2 + + +class DiscoveryServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ListEndpoints = channel.unary_unary( + '/Ydb.Discovery.V1.DiscoveryService/ListEndpoints', + request_serializer=protos_dot_ydb__discovery__pb2.ListEndpointsRequest.SerializeToString, + response_deserializer=protos_dot_ydb__discovery__pb2.ListEndpointsResponse.FromString, + ) + self.WhoAmI = channel.unary_unary( + '/Ydb.Discovery.V1.DiscoveryService/WhoAmI', + request_serializer=protos_dot_ydb__discovery__pb2.WhoAmIRequest.SerializeToString, + response_deserializer=protos_dot_ydb__discovery__pb2.WhoAmIResponse.FromString, + ) + + +class DiscoveryServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def ListEndpoints(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def WhoAmI(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_DiscoveryServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ListEndpoints': grpc.unary_unary_rpc_method_handler( + servicer.ListEndpoints, + request_deserializer=protos_dot_ydb__discovery__pb2.ListEndpointsRequest.FromString, + response_serializer=protos_dot_ydb__discovery__pb2.ListEndpointsResponse.SerializeToString, + ), + 'WhoAmI': grpc.unary_unary_rpc_method_handler( + servicer.WhoAmI, + request_deserializer=protos_dot_ydb__discovery__pb2.WhoAmIRequest.FromString, + response_serializer=protos_dot_ydb__discovery__pb2.WhoAmIResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.Discovery.V1.DiscoveryService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class DiscoveryService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def ListEndpoints(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, '/Ydb.Discovery.V1.DiscoveryService/ListEndpoints', + protos_dot_ydb__discovery__pb2.ListEndpointsRequest.SerializeToString, + protos_dot_ydb__discovery__pb2.ListEndpointsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def WhoAmI(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, '/Ydb.Discovery.V1.DiscoveryService/WhoAmI', + protos_dot_ydb__discovery__pb2.WhoAmIRequest.SerializeToString, + protos_dot_ydb__discovery__pb2.WhoAmIResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/ydb_export_v1_pb2.py b/ydb/_grpc/v5/ydb_export_v1_pb2.py new file mode 100644 index 00000000..de125567 --- /dev/null +++ b/ydb/_grpc/v5/ydb_export_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_export_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_export_pb2 as protos_dot_ydb__export__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13ydb_export_v1.proto\x12\rYdb.Export.V1\x1a\x17protos/ydb_export.proto2\xa9\x01\n\rExportService\x12K\n\nExportToYt\x12\x1d.Ydb.Export.ExportToYtRequest\x1a\x1e.Ydb.Export.ExportToYtResponse\x12K\n\nExportToS3\x12\x1d.Ydb.Export.ExportToS3Request\x1a\x1e.Ydb.Export.ExportToS3ResponseBQ\n\x18tech.ydb.proto.export.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Export_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_export_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\030tech.ydb.proto.export.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Export_V1' + _EXPORTSERVICE._serialized_start=64 + _EXPORTSERVICE._serialized_end=233 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_export_v1_pb2.pyi b/ydb/_grpc/v5/ydb_export_v1_pb2.pyi new file mode 100644 index 00000000..9085c886 --- /dev/null +++ b/ydb/_grpc/v5/ydb_export_v1_pb2.pyi @@ -0,0 +1,5 @@ +from protos import ydb_export_pb2 as _ydb_export_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_export_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_export_v1_pb2_grpc.py new file mode 100644 index 00000000..34820dec --- /dev/null +++ b/ydb/_grpc/v5/ydb_export_v1_pb2_grpc.py @@ -0,0 +1,103 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_export_pb2 as protos_dot_ydb__export__pb2 + + +class ExportServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ExportToYt = channel.unary_unary( + '/Ydb.Export.V1.ExportService/ExportToYt', + request_serializer=protos_dot_ydb__export__pb2.ExportToYtRequest.SerializeToString, + response_deserializer=protos_dot_ydb__export__pb2.ExportToYtResponse.FromString, + ) + self.ExportToS3 = channel.unary_unary( + '/Ydb.Export.V1.ExportService/ExportToS3', + request_serializer=protos_dot_ydb__export__pb2.ExportToS3Request.SerializeToString, + response_deserializer=protos_dot_ydb__export__pb2.ExportToS3Response.FromString, + ) + + +class ExportServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def ExportToYt(self, request, context): + """Exports data to YT. + Method starts an asynchronous operation that can be cancelled while it is in progress. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ExportToS3(self, request, context): + """Exports data to S3. + Method starts an asynchronous operation that can be cancelled while it is in progress. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ExportServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ExportToYt': grpc.unary_unary_rpc_method_handler( + servicer.ExportToYt, + request_deserializer=protos_dot_ydb__export__pb2.ExportToYtRequest.FromString, + response_serializer=protos_dot_ydb__export__pb2.ExportToYtResponse.SerializeToString, + ), + 'ExportToS3': grpc.unary_unary_rpc_method_handler( + servicer.ExportToS3, + request_deserializer=protos_dot_ydb__export__pb2.ExportToS3Request.FromString, + response_serializer=protos_dot_ydb__export__pb2.ExportToS3Response.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.Export.V1.ExportService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ExportService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def ExportToYt(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, '/Ydb.Export.V1.ExportService/ExportToYt', + protos_dot_ydb__export__pb2.ExportToYtRequest.SerializeToString, + protos_dot_ydb__export__pb2.ExportToYtResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ExportToS3(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, '/Ydb.Export.V1.ExportService/ExportToS3', + protos_dot_ydb__export__pb2.ExportToS3Request.SerializeToString, + protos_dot_ydb__export__pb2.ExportToS3Response.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/ydb_federation_discovery_v1_pb2.py b/ydb/_grpc/v5/ydb_federation_discovery_v1_pb2.py new file mode 100644 index 00000000..f8caf2eb --- /dev/null +++ b/ydb/_grpc/v5/ydb_federation_discovery_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_federation_discovery_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_federation_discovery_pb2 as protos_dot_ydb__federation__discovery__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!ydb_federation_discovery_v1.proto\x12\x1aYdb.FederationDiscovery.V1\x1a%protos/ydb_federation_discovery.proto2\xab\x01\n\x1a\x46\x65\x64\x65rationDiscoveryService\x12\x8c\x01\n\x17ListFederationDatabases\x12\x37.Ydb.FederationDiscovery.ListFederationDatabasesRequest\x1a\x38.Ydb.FederationDiscovery.ListFederationDatabasesResponseBl\n&tech.ydb.proto.federation.discovery.v1ZBgithub.com/ydb-platform/ydb-go-genproto/Ydb_FederationDiscovery_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_federation_discovery_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n&tech.ydb.proto.federation.discovery.v1ZBgithub.com/ydb-platform/ydb-go-genproto/Ydb_FederationDiscovery_V1' + _FEDERATIONDISCOVERYSERVICE._serialized_start=105 + _FEDERATIONDISCOVERYSERVICE._serialized_end=276 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_federation_discovery_v1_pb2.pyi b/ydb/_grpc/v5/ydb_federation_discovery_v1_pb2.pyi new file mode 100644 index 00000000..82f43ca2 --- /dev/null +++ b/ydb/_grpc/v5/ydb_federation_discovery_v1_pb2.pyi @@ -0,0 +1,5 @@ +from protos import ydb_federation_discovery_pb2 as _ydb_federation_discovery_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_federation_discovery_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_federation_discovery_v1_pb2_grpc.py new file mode 100644 index 00000000..b161dd5c --- /dev/null +++ b/ydb/_grpc/v5/ydb_federation_discovery_v1_pb2_grpc.py @@ -0,0 +1,67 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_federation_discovery_pb2 as protos_dot_ydb__federation__discovery__pb2 + + +class FederationDiscoveryServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ListFederationDatabases = channel.unary_unary( + '/Ydb.FederationDiscovery.V1.FederationDiscoveryService/ListFederationDatabases', + request_serializer=protos_dot_ydb__federation__discovery__pb2.ListFederationDatabasesRequest.SerializeToString, + response_deserializer=protos_dot_ydb__federation__discovery__pb2.ListFederationDatabasesResponse.FromString, + ) + + +class FederationDiscoveryServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def ListFederationDatabases(self, request, context): + """Get list of databases. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_FederationDiscoveryServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ListFederationDatabases': grpc.unary_unary_rpc_method_handler( + servicer.ListFederationDatabases, + request_deserializer=protos_dot_ydb__federation__discovery__pb2.ListFederationDatabasesRequest.FromString, + response_serializer=protos_dot_ydb__federation__discovery__pb2.ListFederationDatabasesResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.FederationDiscovery.V1.FederationDiscoveryService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class FederationDiscoveryService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def ListFederationDatabases(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, '/Ydb.FederationDiscovery.V1.FederationDiscoveryService/ListFederationDatabases', + protos_dot_ydb__federation__discovery__pb2.ListFederationDatabasesRequest.SerializeToString, + protos_dot_ydb__federation__discovery__pb2.ListFederationDatabasesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/ydb_import_v1_pb2.py b/ydb/_grpc/v5/ydb_import_v1_pb2.py new file mode 100644 index 00000000..78bef56e --- /dev/null +++ b/ydb/_grpc/v5/ydb_import_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_import_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_import_pb2 as protos_dot_ydb__import__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13ydb_import_v1.proto\x12\rYdb.Import.V1\x1a\x17protos/ydb_import.proto2\xaf\x01\n\rImportService\x12Q\n\x0cImportFromS3\x12\x1f.Ydb.Import.ImportFromS3Request\x1a .Ydb.Import.ImportFromS3Response\x12K\n\nImportData\x12\x1d.Ydb.Import.ImportDataRequest\x1a\x1e.Ydb.Import.ImportDataResponseBR\n\x19tech.ydb.proto.import_.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Import_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_import_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\031tech.ydb.proto.import_.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Import_V1' + _IMPORTSERVICE._serialized_start=64 + _IMPORTSERVICE._serialized_end=239 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_import_v1_pb2.pyi b/ydb/_grpc/v5/ydb_import_v1_pb2.pyi new file mode 100644 index 00000000..51293778 --- /dev/null +++ b/ydb/_grpc/v5/ydb_import_v1_pb2.pyi @@ -0,0 +1,5 @@ +from protos import ydb_import_pb2 as _ydb_import_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_import_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_import_v1_pb2_grpc.py new file mode 100644 index 00000000..0c3c1503 --- /dev/null +++ b/ydb/_grpc/v5/ydb_import_v1_pb2_grpc.py @@ -0,0 +1,103 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_import_pb2 as protos_dot_ydb__import__pb2 + + +class ImportServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ImportFromS3 = channel.unary_unary( + '/Ydb.Import.V1.ImportService/ImportFromS3', + request_serializer=protos_dot_ydb__import__pb2.ImportFromS3Request.SerializeToString, + response_deserializer=protos_dot_ydb__import__pb2.ImportFromS3Response.FromString, + ) + self.ImportData = channel.unary_unary( + '/Ydb.Import.V1.ImportService/ImportData', + request_serializer=protos_dot_ydb__import__pb2.ImportDataRequest.SerializeToString, + response_deserializer=protos_dot_ydb__import__pb2.ImportDataResponse.FromString, + ) + + +class ImportServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def ImportFromS3(self, request, context): + """Imports data from S3. + Method starts an asynchronous operation that can be cancelled while it is in progress. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ImportData(self, request, context): + """Writes data to a table. + Method accepts serialized data in the selected format and writes it non-transactionally. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ImportServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ImportFromS3': grpc.unary_unary_rpc_method_handler( + servicer.ImportFromS3, + request_deserializer=protos_dot_ydb__import__pb2.ImportFromS3Request.FromString, + response_serializer=protos_dot_ydb__import__pb2.ImportFromS3Response.SerializeToString, + ), + 'ImportData': grpc.unary_unary_rpc_method_handler( + servicer.ImportData, + request_deserializer=protos_dot_ydb__import__pb2.ImportDataRequest.FromString, + response_serializer=protos_dot_ydb__import__pb2.ImportDataResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.Import.V1.ImportService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ImportService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def ImportFromS3(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, '/Ydb.Import.V1.ImportService/ImportFromS3', + protos_dot_ydb__import__pb2.ImportFromS3Request.SerializeToString, + protos_dot_ydb__import__pb2.ImportFromS3Response.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ImportData(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, '/Ydb.Import.V1.ImportService/ImportData', + protos_dot_ydb__import__pb2.ImportDataRequest.SerializeToString, + protos_dot_ydb__import__pb2.ImportDataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/ydb_monitoring_v1_pb2.py b/ydb/_grpc/v5/ydb_monitoring_v1_pb2.py new file mode 100644 index 00000000..06a00d77 --- /dev/null +++ b/ydb/_grpc/v5/ydb_monitoring_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_monitoring_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_monitoring_pb2 as protos_dot_ydb__monitoring__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17ydb_monitoring_v1.proto\x12\x11Ydb.Monitoring.V1\x1a\x1bprotos/ydb_monitoring.proto2\xb7\x01\n\x11MonitoringService\x12P\n\tSelfCheck\x12 .Ydb.Monitoring.SelfCheckRequest\x1a!.Ydb.Monitoring.SelfCheckResponse\x12P\n\tNodeCheck\x12 .Ydb.Monitoring.NodeCheckRequest\x1a!.Ydb.Monitoring.NodeCheckResponseBY\n\x1ctech.ydb.proto.monitoring.v1Z9github.com/ydb-platform/ydb-go-genproto/Ydb_Monitoring_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_monitoring_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\034tech.ydb.proto.monitoring.v1Z9github.com/ydb-platform/ydb-go-genproto/Ydb_Monitoring_V1' + _MONITORINGSERVICE._serialized_start=76 + _MONITORINGSERVICE._serialized_end=259 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_monitoring_v1_pb2.pyi b/ydb/_grpc/v5/ydb_monitoring_v1_pb2.pyi new file mode 100644 index 00000000..e7579128 --- /dev/null +++ b/ydb/_grpc/v5/ydb_monitoring_v1_pb2.pyi @@ -0,0 +1,5 @@ +from protos import ydb_monitoring_pb2 as _ydb_monitoring_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_monitoring_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_monitoring_v1_pb2_grpc.py new file mode 100644 index 00000000..4aa45169 --- /dev/null +++ b/ydb/_grpc/v5/ydb_monitoring_v1_pb2_grpc.py @@ -0,0 +1,101 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_monitoring_pb2 as protos_dot_ydb__monitoring__pb2 + + +class MonitoringServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.SelfCheck = channel.unary_unary( + '/Ydb.Monitoring.V1.MonitoringService/SelfCheck', + request_serializer=protos_dot_ydb__monitoring__pb2.SelfCheckRequest.SerializeToString, + response_deserializer=protos_dot_ydb__monitoring__pb2.SelfCheckResponse.FromString, + ) + self.NodeCheck = channel.unary_unary( + '/Ydb.Monitoring.V1.MonitoringService/NodeCheck', + request_serializer=protos_dot_ydb__monitoring__pb2.NodeCheckRequest.SerializeToString, + response_deserializer=protos_dot_ydb__monitoring__pb2.NodeCheckResponse.FromString, + ) + + +class MonitoringServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def SelfCheck(self, request, context): + """Gets the health status of the database. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def NodeCheck(self, request, context): + """Checks current node health + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_MonitoringServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'SelfCheck': grpc.unary_unary_rpc_method_handler( + servicer.SelfCheck, + request_deserializer=protos_dot_ydb__monitoring__pb2.SelfCheckRequest.FromString, + response_serializer=protos_dot_ydb__monitoring__pb2.SelfCheckResponse.SerializeToString, + ), + 'NodeCheck': grpc.unary_unary_rpc_method_handler( + servicer.NodeCheck, + request_deserializer=protos_dot_ydb__monitoring__pb2.NodeCheckRequest.FromString, + response_serializer=protos_dot_ydb__monitoring__pb2.NodeCheckResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.Monitoring.V1.MonitoringService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class MonitoringService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def SelfCheck(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, '/Ydb.Monitoring.V1.MonitoringService/SelfCheck', + protos_dot_ydb__monitoring__pb2.SelfCheckRequest.SerializeToString, + protos_dot_ydb__monitoring__pb2.SelfCheckResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def NodeCheck(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, '/Ydb.Monitoring.V1.MonitoringService/NodeCheck', + protos_dot_ydb__monitoring__pb2.NodeCheckRequest.SerializeToString, + protos_dot_ydb__monitoring__pb2.NodeCheckResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/ydb_operation_v1_pb2.py b/ydb/_grpc/v5/ydb_operation_v1_pb2.py new file mode 100644 index 00000000..9b2ea106 --- /dev/null +++ b/ydb/_grpc/v5/ydb_operation_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_operation_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16ydb_operation_v1.proto\x12\x10Ydb.Operation.V1\x1a\x1aprotos/ydb_operation.proto2\x96\x03\n\x10OperationService\x12Y\n\x0cGetOperation\x12#.Ydb.Operations.GetOperationRequest\x1a$.Ydb.Operations.GetOperationResponse\x12\x62\n\x0f\x43\x61ncelOperation\x12&.Ydb.Operations.CancelOperationRequest\x1a\'.Ydb.Operations.CancelOperationResponse\x12\x62\n\x0f\x46orgetOperation\x12&.Ydb.Operations.ForgetOperationRequest\x1a\'.Ydb.Operations.ForgetOperationResponse\x12_\n\x0eListOperations\x12%.Ydb.Operations.ListOperationsRequest\x1a&.Ydb.Operations.ListOperationsResponseBW\n\x1btech.ydb.proto.operation.v1Z8github.com/ydb-platform/ydb-go-genproto/Ydb_Operation_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_operation_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\033tech.ydb.proto.operation.v1Z8github.com/ydb-platform/ydb-go-genproto/Ydb_Operation_V1' + _OPERATIONSERVICE._serialized_start=73 + _OPERATIONSERVICE._serialized_end=479 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_operation_v1_pb2.pyi b/ydb/_grpc/v5/ydb_operation_v1_pb2.pyi new file mode 100644 index 00000000..36f4061f --- /dev/null +++ b/ydb/_grpc/v5/ydb_operation_v1_pb2.pyi @@ -0,0 +1,5 @@ +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_operation_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_operation_v1_pb2_grpc.py new file mode 100644 index 00000000..eb10e0b4 --- /dev/null +++ b/ydb/_grpc/v5/ydb_operation_v1_pb2_grpc.py @@ -0,0 +1,217 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 + + +class OperationServiceStub(object): + """All rpc calls to YDB are allowed to be asynchronous. Response message + of an rpc call contains Operation structure and OperationService + is used for polling operation completion. + + Operation has a field 'ready' to notify client if operation has been + completed or not. If result is ready a client has to handle 'result' field, + otherwise it is expected that client continues polling result via + GetOperation rpc of OperationService. Polling is made via unique + operation id provided in 'id' field of Operation. + + Note: Currently some operations have synchronous implementation and their result + is available when response is obtained. But a client must not make any + assumptions about synchronous or asynchronous nature of any operation and + be ready to poll operation status. + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetOperation = channel.unary_unary( + '/Ydb.Operation.V1.OperationService/GetOperation', + request_serializer=protos_dot_ydb__operation__pb2.GetOperationRequest.SerializeToString, + response_deserializer=protos_dot_ydb__operation__pb2.GetOperationResponse.FromString, + ) + self.CancelOperation = channel.unary_unary( + '/Ydb.Operation.V1.OperationService/CancelOperation', + request_serializer=protos_dot_ydb__operation__pb2.CancelOperationRequest.SerializeToString, + response_deserializer=protos_dot_ydb__operation__pb2.CancelOperationResponse.FromString, + ) + self.ForgetOperation = channel.unary_unary( + '/Ydb.Operation.V1.OperationService/ForgetOperation', + request_serializer=protos_dot_ydb__operation__pb2.ForgetOperationRequest.SerializeToString, + response_deserializer=protos_dot_ydb__operation__pb2.ForgetOperationResponse.FromString, + ) + self.ListOperations = channel.unary_unary( + '/Ydb.Operation.V1.OperationService/ListOperations', + request_serializer=protos_dot_ydb__operation__pb2.ListOperationsRequest.SerializeToString, + response_deserializer=protos_dot_ydb__operation__pb2.ListOperationsResponse.FromString, + ) + + +class OperationServiceServicer(object): + """All rpc calls to YDB are allowed to be asynchronous. Response message + of an rpc call contains Operation structure and OperationService + is used for polling operation completion. + + Operation has a field 'ready' to notify client if operation has been + completed or not. If result is ready a client has to handle 'result' field, + otherwise it is expected that client continues polling result via + GetOperation rpc of OperationService. Polling is made via unique + operation id provided in 'id' field of Operation. + + Note: Currently some operations have synchronous implementation and their result + is available when response is obtained. But a client must not make any + assumptions about synchronous or asynchronous nature of any operation and + be ready to poll operation status. + + """ + + def GetOperation(self, request, context): + """Check status for a given operation. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CancelOperation(self, request, context): + """Starts cancellation of a long-running operation, + Clients can use GetOperation to check whether the cancellation succeeded + or whether the operation completed despite cancellation. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ForgetOperation(self, request, context): + """Forgets long-running operation. It does not cancel the operation and returns + an error if operation was not completed. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListOperations(self, request, context): + """Lists operations that match the specified filter in the request. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_OperationServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetOperation': grpc.unary_unary_rpc_method_handler( + servicer.GetOperation, + request_deserializer=protos_dot_ydb__operation__pb2.GetOperationRequest.FromString, + response_serializer=protos_dot_ydb__operation__pb2.GetOperationResponse.SerializeToString, + ), + 'CancelOperation': grpc.unary_unary_rpc_method_handler( + servicer.CancelOperation, + request_deserializer=protos_dot_ydb__operation__pb2.CancelOperationRequest.FromString, + response_serializer=protos_dot_ydb__operation__pb2.CancelOperationResponse.SerializeToString, + ), + 'ForgetOperation': grpc.unary_unary_rpc_method_handler( + servicer.ForgetOperation, + request_deserializer=protos_dot_ydb__operation__pb2.ForgetOperationRequest.FromString, + response_serializer=protos_dot_ydb__operation__pb2.ForgetOperationResponse.SerializeToString, + ), + 'ListOperations': grpc.unary_unary_rpc_method_handler( + servicer.ListOperations, + request_deserializer=protos_dot_ydb__operation__pb2.ListOperationsRequest.FromString, + response_serializer=protos_dot_ydb__operation__pb2.ListOperationsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.Operation.V1.OperationService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class OperationService(object): + """All rpc calls to YDB are allowed to be asynchronous. Response message + of an rpc call contains Operation structure and OperationService + is used for polling operation completion. + + Operation has a field 'ready' to notify client if operation has been + completed or not. If result is ready a client has to handle 'result' field, + otherwise it is expected that client continues polling result via + GetOperation rpc of OperationService. Polling is made via unique + operation id provided in 'id' field of Operation. + + Note: Currently some operations have synchronous implementation and their result + is available when response is obtained. But a client must not make any + assumptions about synchronous or asynchronous nature of any operation and + be ready to poll operation status. + + """ + + @staticmethod + def GetOperation(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, '/Ydb.Operation.V1.OperationService/GetOperation', + protos_dot_ydb__operation__pb2.GetOperationRequest.SerializeToString, + protos_dot_ydb__operation__pb2.GetOperationResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CancelOperation(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, '/Ydb.Operation.V1.OperationService/CancelOperation', + protos_dot_ydb__operation__pb2.CancelOperationRequest.SerializeToString, + protos_dot_ydb__operation__pb2.CancelOperationResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ForgetOperation(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, '/Ydb.Operation.V1.OperationService/ForgetOperation', + protos_dot_ydb__operation__pb2.ForgetOperationRequest.SerializeToString, + protos_dot_ydb__operation__pb2.ForgetOperationResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListOperations(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, '/Ydb.Operation.V1.OperationService/ListOperations', + protos_dot_ydb__operation__pb2.ListOperationsRequest.SerializeToString, + protos_dot_ydb__operation__pb2.ListOperationsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/ydb_query_v1_pb2.py b/ydb/_grpc/v5/ydb_query_v1_pb2.py new file mode 100644 index 00000000..a312cab2 --- /dev/null +++ b/ydb/_grpc/v5/ydb_query_v1_pb2.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_query_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 +from ydb._grpc.v5.protos import ydb_query_pb2 as protos_dot_ydb__query__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12ydb_query_v1.proto\x12\x0cYdb.Query.V1\x1a\x1aprotos/ydb_operation.proto\x1a\x16protos/ydb_query.proto2\xad\x06\n\x0cQueryService\x12R\n\rCreateSession\x12\x1f.Ydb.Query.CreateSessionRequest\x1a .Ydb.Query.CreateSessionResponse\x12R\n\rDeleteSession\x12\x1f.Ydb.Query.DeleteSessionRequest\x1a .Ydb.Query.DeleteSessionResponse\x12K\n\rAttachSession\x12\x1f.Ydb.Query.AttachSessionRequest\x1a\x17.Ydb.Query.SessionState0\x01\x12[\n\x10\x42\x65ginTransaction\x12\".Ydb.Query.BeginTransactionRequest\x1a#.Ydb.Query.BeginTransactionResponse\x12^\n\x11\x43ommitTransaction\x12#.Ydb.Query.CommitTransactionRequest\x1a$.Ydb.Query.CommitTransactionResponse\x12\x64\n\x13RollbackTransaction\x12%.Ydb.Query.RollbackTransactionRequest\x1a&.Ydb.Query.RollbackTransactionResponse\x12U\n\x0c\x45xecuteQuery\x12\x1e.Ydb.Query.ExecuteQueryRequest\x1a#.Ydb.Query.ExecuteQueryResponsePart0\x01\x12K\n\rExecuteScript\x12\x1f.Ydb.Query.ExecuteScriptRequest\x1a\x19.Ydb.Operations.Operation\x12\x61\n\x12\x46\x65tchScriptResults\x12$.Ydb.Query.FetchScriptResultsRequest\x1a%.Ydb.Query.FetchScriptResultsResponseBO\n\x17tech.ydb.proto.query.v1Z4github.com/ydb-platform/ydb-go-genproto/Ydb_Query_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_query_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\027tech.ydb.proto.query.v1Z4github.com/ydb-platform/ydb-go-genproto/Ydb_Query_V1' + _QUERYSERVICE._serialized_start=89 + _QUERYSERVICE._serialized_end=902 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_query_v1_pb2.pyi b/ydb/_grpc/v5/ydb_query_v1_pb2.pyi new file mode 100644 index 00000000..e127517a --- /dev/null +++ b/ydb/_grpc/v5/ydb_query_v1_pb2.pyi @@ -0,0 +1,6 @@ +from protos import ydb_operation_pb2 as _ydb_operation_pb2 +from protos import ydb_query_pb2 as _ydb_query_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_query_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_query_v1_pb2_grpc.py new file mode 100644 index 00000000..2ef0d12d --- /dev/null +++ b/ydb/_grpc/v5/ydb_query_v1_pb2_grpc.py @@ -0,0 +1,375 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 +from ydb._grpc.v5.protos import ydb_query_pb2 as protos_dot_ydb__query__pb2 + + +class QueryServiceStub(object): + """! WARNING: Experimental API + ! This API is currently in experimental state and is a subject for changes. + ! No backward and/or forward compatibility guarantees are provided. + ! DO NOT USE for production workloads. + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateSession = channel.unary_unary( + '/Ydb.Query.V1.QueryService/CreateSession', + request_serializer=protos_dot_ydb__query__pb2.CreateSessionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__query__pb2.CreateSessionResponse.FromString, + ) + self.DeleteSession = channel.unary_unary( + '/Ydb.Query.V1.QueryService/DeleteSession', + request_serializer=protos_dot_ydb__query__pb2.DeleteSessionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__query__pb2.DeleteSessionResponse.FromString, + ) + self.AttachSession = channel.unary_stream( + '/Ydb.Query.V1.QueryService/AttachSession', + request_serializer=protos_dot_ydb__query__pb2.AttachSessionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__query__pb2.SessionState.FromString, + ) + self.BeginTransaction = channel.unary_unary( + '/Ydb.Query.V1.QueryService/BeginTransaction', + request_serializer=protos_dot_ydb__query__pb2.BeginTransactionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__query__pb2.BeginTransactionResponse.FromString, + ) + self.CommitTransaction = channel.unary_unary( + '/Ydb.Query.V1.QueryService/CommitTransaction', + request_serializer=protos_dot_ydb__query__pb2.CommitTransactionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__query__pb2.CommitTransactionResponse.FromString, + ) + self.RollbackTransaction = channel.unary_unary( + '/Ydb.Query.V1.QueryService/RollbackTransaction', + request_serializer=protos_dot_ydb__query__pb2.RollbackTransactionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__query__pb2.RollbackTransactionResponse.FromString, + ) + self.ExecuteQuery = channel.unary_stream( + '/Ydb.Query.V1.QueryService/ExecuteQuery', + request_serializer=protos_dot_ydb__query__pb2.ExecuteQueryRequest.SerializeToString, + response_deserializer=protos_dot_ydb__query__pb2.ExecuteQueryResponsePart.FromString, + ) + self.ExecuteScript = channel.unary_unary( + '/Ydb.Query.V1.QueryService/ExecuteScript', + request_serializer=protos_dot_ydb__query__pb2.ExecuteScriptRequest.SerializeToString, + response_deserializer=protos_dot_ydb__operation__pb2.Operation.FromString, + ) + self.FetchScriptResults = channel.unary_unary( + '/Ydb.Query.V1.QueryService/FetchScriptResults', + request_serializer=protos_dot_ydb__query__pb2.FetchScriptResultsRequest.SerializeToString, + response_deserializer=protos_dot_ydb__query__pb2.FetchScriptResultsResponse.FromString, + ) + + +class QueryServiceServicer(object): + """! WARNING: Experimental API + ! This API is currently in experimental state and is a subject for changes. + ! No backward and/or forward compatibility guarantees are provided. + ! DO NOT USE for production workloads. + + """ + + def CreateSession(self, request, context): + """Sessions are basic primitives for communicating with YDB Query Service. The are similar to + connections for classic relational DBs. Sessions serve three main purposes: + 1. Provide a flow control for DB requests with limited number of active channels. + 2. Distribute load evenly across multiple DB nodes. + 3. Store state for volatile stateful operations, such as short-living transactions. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteSession(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AttachSession(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def BeginTransaction(self, request, context): + """Short-living transactions allow transactional execution of several queries, including support + for interactive transactions. Transaction control can be implemented via flags in ExecuteQuery + call (recommended), or via explicit calls to Begin/Commit/RollbackTransaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CommitTransaction(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RollbackTransaction(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ExecuteQuery(self, request, context): + """Execute interactive query in a specified short-living transaction. + YDB query can contain DML, DDL and DCL statements. Supported mix of different statement types depends + on the chosen transaction type. + In case of error, including transport errors such as interrupted stream, whole transaction + needs to be retried. For non-idempotent transaction, a custom client logic is required to + retry conditionally retriable statuses, when transaction execution state is unknown. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ExecuteScript(self, request, context): + """Execute long-running script. + YDB scripts can contain all type of statements, including TCL statements. This way you can execute multiple + transactions in a single YDB script. + ExecuteScript call returns long-running Ydb.Operation object with: + operation.metadata = ExecuteScriptMetadata + operation.result = Empty + Script execution metadata contains all information about current execution state, including + execution_id, execution statistics and result sets info. + You can use standard operation methods such as Get/Cancel/Forget/ListOperations to work with script executions. + Script can be executed as persistent, in which case all execution information and results will be stored + persistently and available after successful or unsuccessful execution. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def FetchScriptResults(self, request, context): + """Fetch results for script execution using fetch_token for continuation. + For script with multiple result sets, parts of different results sets are interleaved in responses. + For persistent scripts, you can fetch results in specific position of specific result set using + position instead of fetch_token. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_QueryServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateSession': grpc.unary_unary_rpc_method_handler( + servicer.CreateSession, + request_deserializer=protos_dot_ydb__query__pb2.CreateSessionRequest.FromString, + response_serializer=protos_dot_ydb__query__pb2.CreateSessionResponse.SerializeToString, + ), + 'DeleteSession': grpc.unary_unary_rpc_method_handler( + servicer.DeleteSession, + request_deserializer=protos_dot_ydb__query__pb2.DeleteSessionRequest.FromString, + response_serializer=protos_dot_ydb__query__pb2.DeleteSessionResponse.SerializeToString, + ), + 'AttachSession': grpc.unary_stream_rpc_method_handler( + servicer.AttachSession, + request_deserializer=protos_dot_ydb__query__pb2.AttachSessionRequest.FromString, + response_serializer=protos_dot_ydb__query__pb2.SessionState.SerializeToString, + ), + 'BeginTransaction': grpc.unary_unary_rpc_method_handler( + servicer.BeginTransaction, + request_deserializer=protos_dot_ydb__query__pb2.BeginTransactionRequest.FromString, + response_serializer=protos_dot_ydb__query__pb2.BeginTransactionResponse.SerializeToString, + ), + 'CommitTransaction': grpc.unary_unary_rpc_method_handler( + servicer.CommitTransaction, + request_deserializer=protos_dot_ydb__query__pb2.CommitTransactionRequest.FromString, + response_serializer=protos_dot_ydb__query__pb2.CommitTransactionResponse.SerializeToString, + ), + 'RollbackTransaction': grpc.unary_unary_rpc_method_handler( + servicer.RollbackTransaction, + request_deserializer=protos_dot_ydb__query__pb2.RollbackTransactionRequest.FromString, + response_serializer=protos_dot_ydb__query__pb2.RollbackTransactionResponse.SerializeToString, + ), + 'ExecuteQuery': grpc.unary_stream_rpc_method_handler( + servicer.ExecuteQuery, + request_deserializer=protos_dot_ydb__query__pb2.ExecuteQueryRequest.FromString, + response_serializer=protos_dot_ydb__query__pb2.ExecuteQueryResponsePart.SerializeToString, + ), + 'ExecuteScript': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteScript, + request_deserializer=protos_dot_ydb__query__pb2.ExecuteScriptRequest.FromString, + response_serializer=protos_dot_ydb__operation__pb2.Operation.SerializeToString, + ), + 'FetchScriptResults': grpc.unary_unary_rpc_method_handler( + servicer.FetchScriptResults, + request_deserializer=protos_dot_ydb__query__pb2.FetchScriptResultsRequest.FromString, + response_serializer=protos_dot_ydb__query__pb2.FetchScriptResultsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.Query.V1.QueryService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class QueryService(object): + """! WARNING: Experimental API + ! This API is currently in experimental state and is a subject for changes. + ! No backward and/or forward compatibility guarantees are provided. + ! DO NOT USE for production workloads. + + """ + + @staticmethod + def CreateSession(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, '/Ydb.Query.V1.QueryService/CreateSession', + protos_dot_ydb__query__pb2.CreateSessionRequest.SerializeToString, + protos_dot_ydb__query__pb2.CreateSessionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteSession(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, '/Ydb.Query.V1.QueryService/DeleteSession', + protos_dot_ydb__query__pb2.DeleteSessionRequest.SerializeToString, + protos_dot_ydb__query__pb2.DeleteSessionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AttachSession(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_stream(request, target, '/Ydb.Query.V1.QueryService/AttachSession', + protos_dot_ydb__query__pb2.AttachSessionRequest.SerializeToString, + protos_dot_ydb__query__pb2.SessionState.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def BeginTransaction(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, '/Ydb.Query.V1.QueryService/BeginTransaction', + protos_dot_ydb__query__pb2.BeginTransactionRequest.SerializeToString, + protos_dot_ydb__query__pb2.BeginTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CommitTransaction(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, '/Ydb.Query.V1.QueryService/CommitTransaction', + protos_dot_ydb__query__pb2.CommitTransactionRequest.SerializeToString, + protos_dot_ydb__query__pb2.CommitTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RollbackTransaction(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, '/Ydb.Query.V1.QueryService/RollbackTransaction', + protos_dot_ydb__query__pb2.RollbackTransactionRequest.SerializeToString, + protos_dot_ydb__query__pb2.RollbackTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ExecuteQuery(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_stream(request, target, '/Ydb.Query.V1.QueryService/ExecuteQuery', + protos_dot_ydb__query__pb2.ExecuteQueryRequest.SerializeToString, + protos_dot_ydb__query__pb2.ExecuteQueryResponsePart.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ExecuteScript(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, '/Ydb.Query.V1.QueryService/ExecuteScript', + protos_dot_ydb__query__pb2.ExecuteScriptRequest.SerializeToString, + protos_dot_ydb__operation__pb2.Operation.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def FetchScriptResults(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, '/Ydb.Query.V1.QueryService/FetchScriptResults', + protos_dot_ydb__query__pb2.FetchScriptResultsRequest.SerializeToString, + protos_dot_ydb__query__pb2.FetchScriptResultsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/ydb_rate_limiter_v1_pb2.py b/ydb/_grpc/v5/ydb_rate_limiter_v1_pb2.py new file mode 100644 index 00000000..0c8fc00b --- /dev/null +++ b/ydb/_grpc/v5/ydb_rate_limiter_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_rate_limiter_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_rate_limiter_pb2 as protos_dot_ydb__rate__limiter__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19ydb_rate_limiter_v1.proto\x12\x12Ydb.RateLimiter.V1\x1a\x1dprotos/ydb_rate_limiter.proto2\xe3\x04\n\x12RateLimiterService\x12\x61\n\x0e\x43reateResource\x12&.Ydb.RateLimiter.CreateResourceRequest\x1a\'.Ydb.RateLimiter.CreateResourceResponse\x12^\n\rAlterResource\x12%.Ydb.RateLimiter.AlterResourceRequest\x1a&.Ydb.RateLimiter.AlterResourceResponse\x12[\n\x0c\x44ropResource\x12$.Ydb.RateLimiter.DropResourceRequest\x1a%.Ydb.RateLimiter.DropResourceResponse\x12^\n\rListResources\x12%.Ydb.RateLimiter.ListResourcesRequest\x1a&.Ydb.RateLimiter.ListResourcesResponse\x12g\n\x10\x44\x65scribeResource\x12(.Ydb.RateLimiter.DescribeResourceRequest\x1a).Ydb.RateLimiter.DescribeResourceResponse\x12\x64\n\x0f\x41\x63quireResource\x12\'.Ydb.RateLimiter.AcquireResourceRequest\x1a(.Ydb.RateLimiter.AcquireResourceResponseBo\n\x1etech.ydb.proto.rate_limiter.v1B\x0fRateLimiterGrpcP\x01Z:github.com/ydb-platform/ydb-go-genproto/Ydb_RateLimiter_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_rate_limiter_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\036tech.ydb.proto.rate_limiter.v1B\017RateLimiterGrpcP\001Z:github.com/ydb-platform/ydb-go-genproto/Ydb_RateLimiter_V1' + _RATELIMITERSERVICE._serialized_start=81 + _RATELIMITERSERVICE._serialized_end=692 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_rate_limiter_v1_pb2.pyi b/ydb/_grpc/v5/ydb_rate_limiter_v1_pb2.pyi new file mode 100644 index 00000000..6e9b2e3e --- /dev/null +++ b/ydb/_grpc/v5/ydb_rate_limiter_v1_pb2.pyi @@ -0,0 +1,5 @@ +from protos import ydb_rate_limiter_pb2 as _ydb_rate_limiter_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_rate_limiter_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_rate_limiter_v1_pb2_grpc.py new file mode 100644 index 00000000..e26f3335 --- /dev/null +++ b/ydb/_grpc/v5/ydb_rate_limiter_v1_pb2_grpc.py @@ -0,0 +1,252 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_rate_limiter_pb2 as protos_dot_ydb__rate__limiter__pb2 + + +class RateLimiterServiceStub(object): + """Service that implements distributed rate limiting. + + To use rate limiter functionality you need an existing coordination node. + + Control plane API + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateResource = channel.unary_unary( + '/Ydb.RateLimiter.V1.RateLimiterService/CreateResource', + request_serializer=protos_dot_ydb__rate__limiter__pb2.CreateResourceRequest.SerializeToString, + response_deserializer=protos_dot_ydb__rate__limiter__pb2.CreateResourceResponse.FromString, + ) + self.AlterResource = channel.unary_unary( + '/Ydb.RateLimiter.V1.RateLimiterService/AlterResource', + request_serializer=protos_dot_ydb__rate__limiter__pb2.AlterResourceRequest.SerializeToString, + response_deserializer=protos_dot_ydb__rate__limiter__pb2.AlterResourceResponse.FromString, + ) + self.DropResource = channel.unary_unary( + '/Ydb.RateLimiter.V1.RateLimiterService/DropResource', + request_serializer=protos_dot_ydb__rate__limiter__pb2.DropResourceRequest.SerializeToString, + response_deserializer=protos_dot_ydb__rate__limiter__pb2.DropResourceResponse.FromString, + ) + self.ListResources = channel.unary_unary( + '/Ydb.RateLimiter.V1.RateLimiterService/ListResources', + request_serializer=protos_dot_ydb__rate__limiter__pb2.ListResourcesRequest.SerializeToString, + response_deserializer=protos_dot_ydb__rate__limiter__pb2.ListResourcesResponse.FromString, + ) + self.DescribeResource = channel.unary_unary( + '/Ydb.RateLimiter.V1.RateLimiterService/DescribeResource', + request_serializer=protos_dot_ydb__rate__limiter__pb2.DescribeResourceRequest.SerializeToString, + response_deserializer=protos_dot_ydb__rate__limiter__pb2.DescribeResourceResponse.FromString, + ) + self.AcquireResource = channel.unary_unary( + '/Ydb.RateLimiter.V1.RateLimiterService/AcquireResource', + request_serializer=protos_dot_ydb__rate__limiter__pb2.AcquireResourceRequest.SerializeToString, + response_deserializer=protos_dot_ydb__rate__limiter__pb2.AcquireResourceResponse.FromString, + ) + + +class RateLimiterServiceServicer(object): + """Service that implements distributed rate limiting. + + To use rate limiter functionality you need an existing coordination node. + + Control plane API + """ + + def CreateResource(self, request, context): + """Create a new resource in existing coordination node. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AlterResource(self, request, context): + """Update a resource in coordination node. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DropResource(self, request, context): + """Delete a resource from coordination node. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListResources(self, request, context): + """List resources in given coordination node. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeResource(self, request, context): + """Describe properties of resource in coordination node. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AcquireResource(self, request, context): + """Take units for usage of a resource in coordination node. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_RateLimiterServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateResource': grpc.unary_unary_rpc_method_handler( + servicer.CreateResource, + request_deserializer=protos_dot_ydb__rate__limiter__pb2.CreateResourceRequest.FromString, + response_serializer=protos_dot_ydb__rate__limiter__pb2.CreateResourceResponse.SerializeToString, + ), + 'AlterResource': grpc.unary_unary_rpc_method_handler( + servicer.AlterResource, + request_deserializer=protos_dot_ydb__rate__limiter__pb2.AlterResourceRequest.FromString, + response_serializer=protos_dot_ydb__rate__limiter__pb2.AlterResourceResponse.SerializeToString, + ), + 'DropResource': grpc.unary_unary_rpc_method_handler( + servicer.DropResource, + request_deserializer=protos_dot_ydb__rate__limiter__pb2.DropResourceRequest.FromString, + response_serializer=protos_dot_ydb__rate__limiter__pb2.DropResourceResponse.SerializeToString, + ), + 'ListResources': grpc.unary_unary_rpc_method_handler( + servicer.ListResources, + request_deserializer=protos_dot_ydb__rate__limiter__pb2.ListResourcesRequest.FromString, + response_serializer=protos_dot_ydb__rate__limiter__pb2.ListResourcesResponse.SerializeToString, + ), + 'DescribeResource': grpc.unary_unary_rpc_method_handler( + servicer.DescribeResource, + request_deserializer=protos_dot_ydb__rate__limiter__pb2.DescribeResourceRequest.FromString, + response_serializer=protos_dot_ydb__rate__limiter__pb2.DescribeResourceResponse.SerializeToString, + ), + 'AcquireResource': grpc.unary_unary_rpc_method_handler( + servicer.AcquireResource, + request_deserializer=protos_dot_ydb__rate__limiter__pb2.AcquireResourceRequest.FromString, + response_serializer=protos_dot_ydb__rate__limiter__pb2.AcquireResourceResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.RateLimiter.V1.RateLimiterService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class RateLimiterService(object): + """Service that implements distributed rate limiting. + + To use rate limiter functionality you need an existing coordination node. + + Control plane API + """ + + @staticmethod + def CreateResource(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, '/Ydb.RateLimiter.V1.RateLimiterService/CreateResource', + protos_dot_ydb__rate__limiter__pb2.CreateResourceRequest.SerializeToString, + protos_dot_ydb__rate__limiter__pb2.CreateResourceResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AlterResource(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, '/Ydb.RateLimiter.V1.RateLimiterService/AlterResource', + protos_dot_ydb__rate__limiter__pb2.AlterResourceRequest.SerializeToString, + protos_dot_ydb__rate__limiter__pb2.AlterResourceResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DropResource(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, '/Ydb.RateLimiter.V1.RateLimiterService/DropResource', + protos_dot_ydb__rate__limiter__pb2.DropResourceRequest.SerializeToString, + protos_dot_ydb__rate__limiter__pb2.DropResourceResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListResources(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, '/Ydb.RateLimiter.V1.RateLimiterService/ListResources', + protos_dot_ydb__rate__limiter__pb2.ListResourcesRequest.SerializeToString, + protos_dot_ydb__rate__limiter__pb2.ListResourcesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeResource(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, '/Ydb.RateLimiter.V1.RateLimiterService/DescribeResource', + protos_dot_ydb__rate__limiter__pb2.DescribeResourceRequest.SerializeToString, + protos_dot_ydb__rate__limiter__pb2.DescribeResourceResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AcquireResource(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, '/Ydb.RateLimiter.V1.RateLimiterService/AcquireResource', + protos_dot_ydb__rate__limiter__pb2.AcquireResourceRequest.SerializeToString, + protos_dot_ydb__rate__limiter__pb2.AcquireResourceResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/ydb_scheme_v1_pb2.py b/ydb/_grpc/v5/ydb_scheme_v1_pb2.py new file mode 100644 index 00000000..45218d59 --- /dev/null +++ b/ydb/_grpc/v5/ydb_scheme_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_scheme_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_scheme_pb2 as protos_dot_ydb__scheme__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13ydb_scheme_v1.proto\x12\rYdb.Scheme.V1\x1a\x17protos/ydb_scheme.proto2\xcc\x03\n\rSchemeService\x12T\n\rMakeDirectory\x12 .Ydb.Scheme.MakeDirectoryRequest\x1a!.Ydb.Scheme.MakeDirectoryResponse\x12Z\n\x0fRemoveDirectory\x12\".Ydb.Scheme.RemoveDirectoryRequest\x1a#.Ydb.Scheme.RemoveDirectoryResponse\x12T\n\rListDirectory\x12 .Ydb.Scheme.ListDirectoryRequest\x1a!.Ydb.Scheme.ListDirectoryResponse\x12Q\n\x0c\x44\x65scribePath\x12\x1f.Ydb.Scheme.DescribePathRequest\x1a .Ydb.Scheme.DescribePathResponse\x12`\n\x11ModifyPermissions\x12$.Ydb.Scheme.ModifyPermissionsRequest\x1a%.Ydb.Scheme.ModifyPermissionsResponseBQ\n\x18tech.ydb.proto.scheme.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Scheme_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_scheme_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\030tech.ydb.proto.scheme.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Scheme_V1' + _SCHEMESERVICE._serialized_start=64 + _SCHEMESERVICE._serialized_end=524 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_scheme_v1_pb2.pyi b/ydb/_grpc/v5/ydb_scheme_v1_pb2.pyi new file mode 100644 index 00000000..78aeaac3 --- /dev/null +++ b/ydb/_grpc/v5/ydb_scheme_v1_pb2.pyi @@ -0,0 +1,5 @@ +from protos import ydb_scheme_pb2 as _ydb_scheme_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_scheme_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_scheme_v1_pb2_grpc.py new file mode 100644 index 00000000..8b1b6c14 --- /dev/null +++ b/ydb/_grpc/v5/ydb_scheme_v1_pb2_grpc.py @@ -0,0 +1,224 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_scheme_pb2 as protos_dot_ydb__scheme__pb2 + + +class SchemeServiceStub(object): + """Every YDB Database Instance has set of objects organized a tree. + SchemeService provides some functionality to browse and modify + this tree. + + SchemeService provides a generic tree functionality, to create specific + objects like YDB Table or Persistent Queue use corresponding services. + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.MakeDirectory = channel.unary_unary( + '/Ydb.Scheme.V1.SchemeService/MakeDirectory', + request_serializer=protos_dot_ydb__scheme__pb2.MakeDirectoryRequest.SerializeToString, + response_deserializer=protos_dot_ydb__scheme__pb2.MakeDirectoryResponse.FromString, + ) + self.RemoveDirectory = channel.unary_unary( + '/Ydb.Scheme.V1.SchemeService/RemoveDirectory', + request_serializer=protos_dot_ydb__scheme__pb2.RemoveDirectoryRequest.SerializeToString, + response_deserializer=protos_dot_ydb__scheme__pb2.RemoveDirectoryResponse.FromString, + ) + self.ListDirectory = channel.unary_unary( + '/Ydb.Scheme.V1.SchemeService/ListDirectory', + request_serializer=protos_dot_ydb__scheme__pb2.ListDirectoryRequest.SerializeToString, + response_deserializer=protos_dot_ydb__scheme__pb2.ListDirectoryResponse.FromString, + ) + self.DescribePath = channel.unary_unary( + '/Ydb.Scheme.V1.SchemeService/DescribePath', + request_serializer=protos_dot_ydb__scheme__pb2.DescribePathRequest.SerializeToString, + response_deserializer=protos_dot_ydb__scheme__pb2.DescribePathResponse.FromString, + ) + self.ModifyPermissions = channel.unary_unary( + '/Ydb.Scheme.V1.SchemeService/ModifyPermissions', + request_serializer=protos_dot_ydb__scheme__pb2.ModifyPermissionsRequest.SerializeToString, + response_deserializer=protos_dot_ydb__scheme__pb2.ModifyPermissionsResponse.FromString, + ) + + +class SchemeServiceServicer(object): + """Every YDB Database Instance has set of objects organized a tree. + SchemeService provides some functionality to browse and modify + this tree. + + SchemeService provides a generic tree functionality, to create specific + objects like YDB Table or Persistent Queue use corresponding services. + + """ + + def MakeDirectory(self, request, context): + """Make Directory. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemoveDirectory(self, request, context): + """Remove Directory. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListDirectory(self, request, context): + """Returns information about given directory and objects inside it. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribePath(self, request, context): + """Returns information about object with given path. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ModifyPermissions(self, request, context): + """Modify permissions. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_SchemeServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'MakeDirectory': grpc.unary_unary_rpc_method_handler( + servicer.MakeDirectory, + request_deserializer=protos_dot_ydb__scheme__pb2.MakeDirectoryRequest.FromString, + response_serializer=protos_dot_ydb__scheme__pb2.MakeDirectoryResponse.SerializeToString, + ), + 'RemoveDirectory': grpc.unary_unary_rpc_method_handler( + servicer.RemoveDirectory, + request_deserializer=protos_dot_ydb__scheme__pb2.RemoveDirectoryRequest.FromString, + response_serializer=protos_dot_ydb__scheme__pb2.RemoveDirectoryResponse.SerializeToString, + ), + 'ListDirectory': grpc.unary_unary_rpc_method_handler( + servicer.ListDirectory, + request_deserializer=protos_dot_ydb__scheme__pb2.ListDirectoryRequest.FromString, + response_serializer=protos_dot_ydb__scheme__pb2.ListDirectoryResponse.SerializeToString, + ), + 'DescribePath': grpc.unary_unary_rpc_method_handler( + servicer.DescribePath, + request_deserializer=protos_dot_ydb__scheme__pb2.DescribePathRequest.FromString, + response_serializer=protos_dot_ydb__scheme__pb2.DescribePathResponse.SerializeToString, + ), + 'ModifyPermissions': grpc.unary_unary_rpc_method_handler( + servicer.ModifyPermissions, + request_deserializer=protos_dot_ydb__scheme__pb2.ModifyPermissionsRequest.FromString, + response_serializer=protos_dot_ydb__scheme__pb2.ModifyPermissionsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.Scheme.V1.SchemeService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class SchemeService(object): + """Every YDB Database Instance has set of objects organized a tree. + SchemeService provides some functionality to browse and modify + this tree. + + SchemeService provides a generic tree functionality, to create specific + objects like YDB Table or Persistent Queue use corresponding services. + + """ + + @staticmethod + def MakeDirectory(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, '/Ydb.Scheme.V1.SchemeService/MakeDirectory', + protos_dot_ydb__scheme__pb2.MakeDirectoryRequest.SerializeToString, + protos_dot_ydb__scheme__pb2.MakeDirectoryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemoveDirectory(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, '/Ydb.Scheme.V1.SchemeService/RemoveDirectory', + protos_dot_ydb__scheme__pb2.RemoveDirectoryRequest.SerializeToString, + protos_dot_ydb__scheme__pb2.RemoveDirectoryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListDirectory(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, '/Ydb.Scheme.V1.SchemeService/ListDirectory', + protos_dot_ydb__scheme__pb2.ListDirectoryRequest.SerializeToString, + protos_dot_ydb__scheme__pb2.ListDirectoryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribePath(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, '/Ydb.Scheme.V1.SchemeService/DescribePath', + protos_dot_ydb__scheme__pb2.DescribePathRequest.SerializeToString, + protos_dot_ydb__scheme__pb2.DescribePathResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ModifyPermissions(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, '/Ydb.Scheme.V1.SchemeService/ModifyPermissions', + protos_dot_ydb__scheme__pb2.ModifyPermissionsRequest.SerializeToString, + protos_dot_ydb__scheme__pb2.ModifyPermissionsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/ydb_scripting_v1_pb2.py b/ydb/_grpc/v5/ydb_scripting_v1_pb2.py new file mode 100644 index 00000000..988578d8 --- /dev/null +++ b/ydb/_grpc/v5/ydb_scripting_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_scripting_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_scripting_pb2 as protos_dot_ydb__scripting__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16ydb_scripting_v1.proto\x12\x10Ydb.Scripting.V1\x1a\x1aprotos/ydb_scripting.proto2\x9a\x02\n\x10ScriptingService\x12Q\n\nExecuteYql\x12 .Ydb.Scripting.ExecuteYqlRequest\x1a!.Ydb.Scripting.ExecuteYqlResponse\x12`\n\x10StreamExecuteYql\x12 .Ydb.Scripting.ExecuteYqlRequest\x1a(.Ydb.Scripting.ExecuteYqlPartialResponse0\x01\x12Q\n\nExplainYql\x12 .Ydb.Scripting.ExplainYqlRequest\x1a!.Ydb.Scripting.ExplainYqlResponseBW\n\x1btech.ydb.proto.scripting.v1Z8github.com/ydb-platform/ydb-go-genproto/Ydb_Scripting_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_scripting_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\033tech.ydb.proto.scripting.v1Z8github.com/ydb-platform/ydb-go-genproto/Ydb_Scripting_V1' + _SCRIPTINGSERVICE._serialized_start=73 + _SCRIPTINGSERVICE._serialized_end=355 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_scripting_v1_pb2.pyi b/ydb/_grpc/v5/ydb_scripting_v1_pb2.pyi new file mode 100644 index 00000000..e6ef7ade --- /dev/null +++ b/ydb/_grpc/v5/ydb_scripting_v1_pb2.pyi @@ -0,0 +1,5 @@ +from protos import ydb_scripting_pb2 as _ydb_scripting_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_scripting_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_scripting_v1_pb2_grpc.py new file mode 100644 index 00000000..efc6ca2d --- /dev/null +++ b/ydb/_grpc/v5/ydb_scripting_v1_pb2_grpc.py @@ -0,0 +1,133 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_scripting_pb2 as protos_dot_ydb__scripting__pb2 + + +class ScriptingServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ExecuteYql = channel.unary_unary( + '/Ydb.Scripting.V1.ScriptingService/ExecuteYql', + request_serializer=protos_dot_ydb__scripting__pb2.ExecuteYqlRequest.SerializeToString, + response_deserializer=protos_dot_ydb__scripting__pb2.ExecuteYqlResponse.FromString, + ) + self.StreamExecuteYql = channel.unary_stream( + '/Ydb.Scripting.V1.ScriptingService/StreamExecuteYql', + request_serializer=protos_dot_ydb__scripting__pb2.ExecuteYqlRequest.SerializeToString, + response_deserializer=protos_dot_ydb__scripting__pb2.ExecuteYqlPartialResponse.FromString, + ) + self.ExplainYql = channel.unary_unary( + '/Ydb.Scripting.V1.ScriptingService/ExplainYql', + request_serializer=protos_dot_ydb__scripting__pb2.ExplainYqlRequest.SerializeToString, + response_deserializer=protos_dot_ydb__scripting__pb2.ExplainYqlResponse.FromString, + ) + + +class ScriptingServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def ExecuteYql(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def StreamExecuteYql(self, request, context): + """Executes yql request with streaming result. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ExplainYql(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ScriptingServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ExecuteYql': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteYql, + request_deserializer=protos_dot_ydb__scripting__pb2.ExecuteYqlRequest.FromString, + response_serializer=protos_dot_ydb__scripting__pb2.ExecuteYqlResponse.SerializeToString, + ), + 'StreamExecuteYql': grpc.unary_stream_rpc_method_handler( + servicer.StreamExecuteYql, + request_deserializer=protos_dot_ydb__scripting__pb2.ExecuteYqlRequest.FromString, + response_serializer=protos_dot_ydb__scripting__pb2.ExecuteYqlPartialResponse.SerializeToString, + ), + 'ExplainYql': grpc.unary_unary_rpc_method_handler( + servicer.ExplainYql, + request_deserializer=protos_dot_ydb__scripting__pb2.ExplainYqlRequest.FromString, + response_serializer=protos_dot_ydb__scripting__pb2.ExplainYqlResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.Scripting.V1.ScriptingService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ScriptingService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def ExecuteYql(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, '/Ydb.Scripting.V1.ScriptingService/ExecuteYql', + protos_dot_ydb__scripting__pb2.ExecuteYqlRequest.SerializeToString, + protos_dot_ydb__scripting__pb2.ExecuteYqlResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def StreamExecuteYql(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_stream(request, target, '/Ydb.Scripting.V1.ScriptingService/StreamExecuteYql', + protos_dot_ydb__scripting__pb2.ExecuteYqlRequest.SerializeToString, + protos_dot_ydb__scripting__pb2.ExecuteYqlPartialResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ExplainYql(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, '/Ydb.Scripting.V1.ScriptingService/ExplainYql', + protos_dot_ydb__scripting__pb2.ExplainYqlRequest.SerializeToString, + protos_dot_ydb__scripting__pb2.ExplainYqlResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/ydb_table_v1_pb2.py b/ydb/_grpc/v5/ydb_table_v1_pb2.py new file mode 100644 index 00000000..d5e17a7d --- /dev/null +++ b/ydb/_grpc/v5/ydb_table_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_table_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_table_pb2 as protos_dot_ydb__table__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12ydb_table_v1.proto\x12\x0cYdb.Table.V1\x1a\x16protos/ydb_table.proto2\xe9\x0e\n\x0cTableService\x12R\n\rCreateSession\x12\x1f.Ydb.Table.CreateSessionRequest\x1a .Ydb.Table.CreateSessionResponse\x12R\n\rDeleteSession\x12\x1f.Ydb.Table.DeleteSessionRequest\x1a .Ydb.Table.DeleteSessionResponse\x12\x46\n\tKeepAlive\x12\x1b.Ydb.Table.KeepAliveRequest\x1a\x1c.Ydb.Table.KeepAliveResponse\x12L\n\x0b\x43reateTable\x12\x1d.Ydb.Table.CreateTableRequest\x1a\x1e.Ydb.Table.CreateTableResponse\x12\x46\n\tDropTable\x12\x1b.Ydb.Table.DropTableRequest\x1a\x1c.Ydb.Table.DropTableResponse\x12I\n\nAlterTable\x12\x1c.Ydb.Table.AlterTableRequest\x1a\x1d.Ydb.Table.AlterTableResponse\x12\x46\n\tCopyTable\x12\x1b.Ydb.Table.CopyTableRequest\x1a\x1c.Ydb.Table.CopyTableResponse\x12I\n\nCopyTables\x12\x1c.Ydb.Table.CopyTablesRequest\x1a\x1d.Ydb.Table.CopyTablesResponse\x12O\n\x0cRenameTables\x12\x1e.Ydb.Table.RenameTablesRequest\x1a\x1f.Ydb.Table.RenameTablesResponse\x12R\n\rDescribeTable\x12\x1f.Ydb.Table.DescribeTableRequest\x1a .Ydb.Table.DescribeTableResponse\x12[\n\x10\x45xplainDataQuery\x12\".Ydb.Table.ExplainDataQueryRequest\x1a#.Ydb.Table.ExplainDataQueryResponse\x12[\n\x10PrepareDataQuery\x12\".Ydb.Table.PrepareDataQueryRequest\x1a#.Ydb.Table.PrepareDataQueryResponse\x12[\n\x10\x45xecuteDataQuery\x12\".Ydb.Table.ExecuteDataQueryRequest\x1a#.Ydb.Table.ExecuteDataQueryResponse\x12\x61\n\x12\x45xecuteSchemeQuery\x12$.Ydb.Table.ExecuteSchemeQueryRequest\x1a%.Ydb.Table.ExecuteSchemeQueryResponse\x12[\n\x10\x42\x65ginTransaction\x12\".Ydb.Table.BeginTransactionRequest\x1a#.Ydb.Table.BeginTransactionResponse\x12^\n\x11\x43ommitTransaction\x12#.Ydb.Table.CommitTransactionRequest\x1a$.Ydb.Table.CommitTransactionResponse\x12\x64\n\x13RollbackTransaction\x12%.Ydb.Table.RollbackTransactionRequest\x1a&.Ydb.Table.RollbackTransactionResponse\x12g\n\x14\x44\x65scribeTableOptions\x12&.Ydb.Table.DescribeTableOptionsRequest\x1a\'.Ydb.Table.DescribeTableOptionsResponse\x12N\n\x0fStreamReadTable\x12\x1b.Ydb.Table.ReadTableRequest\x1a\x1c.Ydb.Table.ReadTableResponse0\x01\x12\x43\n\x08ReadRows\x12\x1a.Ydb.Table.ReadRowsRequest\x1a\x1b.Ydb.Table.ReadRowsResponse\x12I\n\nBulkUpsert\x12\x1c.Ydb.Table.BulkUpsertRequest\x1a\x1d.Ydb.Table.BulkUpsertResponse\x12j\n\x16StreamExecuteScanQuery\x12\".Ydb.Table.ExecuteScanQueryRequest\x1a*.Ydb.Table.ExecuteScanQueryPartialResponse0\x01\x42O\n\x17tech.ydb.proto.table.v1Z4github.com/ydb-platform/ydb-go-genproto/Ydb_Table_V1b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_table_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\027tech.ydb.proto.table.v1Z4github.com/ydb-platform/ydb-go-genproto/Ydb_Table_V1' + _TABLESERVICE._serialized_start=61 + _TABLESERVICE._serialized_end=1958 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_table_v1_pb2.pyi b/ydb/_grpc/v5/ydb_table_v1_pb2.pyi new file mode 100644 index 00000000..5608ae88 --- /dev/null +++ b/ydb/_grpc/v5/ydb_table_v1_pb2.pyi @@ -0,0 +1,5 @@ +from protos import ydb_table_pb2 as _ydb_table_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_table_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_table_v1_pb2_grpc.py new file mode 100644 index 00000000..7c5fe20b --- /dev/null +++ b/ydb/_grpc/v5/ydb_table_v1_pb2_grpc.py @@ -0,0 +1,793 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_table_pb2 as protos_dot_ydb__table__pb2 + + +class TableServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateSession = channel.unary_unary( + '/Ydb.Table.V1.TableService/CreateSession', + request_serializer=protos_dot_ydb__table__pb2.CreateSessionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.CreateSessionResponse.FromString, + ) + self.DeleteSession = channel.unary_unary( + '/Ydb.Table.V1.TableService/DeleteSession', + request_serializer=protos_dot_ydb__table__pb2.DeleteSessionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.DeleteSessionResponse.FromString, + ) + self.KeepAlive = channel.unary_unary( + '/Ydb.Table.V1.TableService/KeepAlive', + request_serializer=protos_dot_ydb__table__pb2.KeepAliveRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.KeepAliveResponse.FromString, + ) + self.CreateTable = channel.unary_unary( + '/Ydb.Table.V1.TableService/CreateTable', + request_serializer=protos_dot_ydb__table__pb2.CreateTableRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.CreateTableResponse.FromString, + ) + self.DropTable = channel.unary_unary( + '/Ydb.Table.V1.TableService/DropTable', + request_serializer=protos_dot_ydb__table__pb2.DropTableRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.DropTableResponse.FromString, + ) + self.AlterTable = channel.unary_unary( + '/Ydb.Table.V1.TableService/AlterTable', + request_serializer=protos_dot_ydb__table__pb2.AlterTableRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.AlterTableResponse.FromString, + ) + self.CopyTable = channel.unary_unary( + '/Ydb.Table.V1.TableService/CopyTable', + request_serializer=protos_dot_ydb__table__pb2.CopyTableRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.CopyTableResponse.FromString, + ) + self.CopyTables = channel.unary_unary( + '/Ydb.Table.V1.TableService/CopyTables', + request_serializer=protos_dot_ydb__table__pb2.CopyTablesRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.CopyTablesResponse.FromString, + ) + self.RenameTables = channel.unary_unary( + '/Ydb.Table.V1.TableService/RenameTables', + request_serializer=protos_dot_ydb__table__pb2.RenameTablesRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.RenameTablesResponse.FromString, + ) + self.DescribeTable = channel.unary_unary( + '/Ydb.Table.V1.TableService/DescribeTable', + request_serializer=protos_dot_ydb__table__pb2.DescribeTableRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.DescribeTableResponse.FromString, + ) + self.ExplainDataQuery = channel.unary_unary( + '/Ydb.Table.V1.TableService/ExplainDataQuery', + request_serializer=protos_dot_ydb__table__pb2.ExplainDataQueryRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.ExplainDataQueryResponse.FromString, + ) + self.PrepareDataQuery = channel.unary_unary( + '/Ydb.Table.V1.TableService/PrepareDataQuery', + request_serializer=protos_dot_ydb__table__pb2.PrepareDataQueryRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.PrepareDataQueryResponse.FromString, + ) + self.ExecuteDataQuery = channel.unary_unary( + '/Ydb.Table.V1.TableService/ExecuteDataQuery', + request_serializer=protos_dot_ydb__table__pb2.ExecuteDataQueryRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.ExecuteDataQueryResponse.FromString, + ) + self.ExecuteSchemeQuery = channel.unary_unary( + '/Ydb.Table.V1.TableService/ExecuteSchemeQuery', + request_serializer=protos_dot_ydb__table__pb2.ExecuteSchemeQueryRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.ExecuteSchemeQueryResponse.FromString, + ) + self.BeginTransaction = channel.unary_unary( + '/Ydb.Table.V1.TableService/BeginTransaction', + request_serializer=protos_dot_ydb__table__pb2.BeginTransactionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.BeginTransactionResponse.FromString, + ) + self.CommitTransaction = channel.unary_unary( + '/Ydb.Table.V1.TableService/CommitTransaction', + request_serializer=protos_dot_ydb__table__pb2.CommitTransactionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.CommitTransactionResponse.FromString, + ) + self.RollbackTransaction = channel.unary_unary( + '/Ydb.Table.V1.TableService/RollbackTransaction', + request_serializer=protos_dot_ydb__table__pb2.RollbackTransactionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.RollbackTransactionResponse.FromString, + ) + self.DescribeTableOptions = channel.unary_unary( + '/Ydb.Table.V1.TableService/DescribeTableOptions', + request_serializer=protos_dot_ydb__table__pb2.DescribeTableOptionsRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.DescribeTableOptionsResponse.FromString, + ) + self.StreamReadTable = channel.unary_stream( + '/Ydb.Table.V1.TableService/StreamReadTable', + request_serializer=protos_dot_ydb__table__pb2.ReadTableRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.ReadTableResponse.FromString, + ) + self.ReadRows = channel.unary_unary( + '/Ydb.Table.V1.TableService/ReadRows', + request_serializer=protos_dot_ydb__table__pb2.ReadRowsRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.ReadRowsResponse.FromString, + ) + self.BulkUpsert = channel.unary_unary( + '/Ydb.Table.V1.TableService/BulkUpsert', + request_serializer=protos_dot_ydb__table__pb2.BulkUpsertRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.BulkUpsertResponse.FromString, + ) + self.StreamExecuteScanQuery = channel.unary_stream( + '/Ydb.Table.V1.TableService/StreamExecuteScanQuery', + request_serializer=protos_dot_ydb__table__pb2.ExecuteScanQueryRequest.SerializeToString, + response_deserializer=protos_dot_ydb__table__pb2.ExecuteScanQueryPartialResponse.FromString, + ) + + +class TableServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def CreateSession(self, request, context): + """Create new session. Implicit session creation is forbidden, + so user must create new session before execute any query, + otherwise BAD_SESSION status will be returned. + Simultaneous execution of requests are forbiden. + Sessions are volatile, can be invalidated by server, for example in case + of fatal errors. All requests with this session will fail with BAD_SESSION status. + So, client must be able to handle BAD_SESSION status. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteSession(self, request, context): + """Ends a session, releasing server resources associated with it. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def KeepAlive(self, request, context): + """Idle sessions can be kept alive by calling KeepAlive periodically. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateTable(self, request, context): + """Creates new table. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DropTable(self, request, context): + """Drop table. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AlterTable(self, request, context): + """Modifies schema of given table. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CopyTable(self, request, context): + """Creates copy of given table. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CopyTables(self, request, context): + """Creates consistent copy of given tables. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RenameTables(self, request, context): + """Creates consistent move of given tables. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeTable(self, request, context): + """Returns information about given table (metadata). + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ExplainDataQuery(self, request, context): + """Explains data query. + SessionId of previously created session must be provided. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PrepareDataQuery(self, request, context): + """Prepares data query, returns query id. + SessionId of previously created session must be provided. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ExecuteDataQuery(self, request, context): + """Executes data query. + SessionId of previously created session must be provided. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ExecuteSchemeQuery(self, request, context): + """Executes scheme query. + SessionId of previously created session must be provided. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def BeginTransaction(self, request, context): + """Begins new transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CommitTransaction(self, request, context): + """Commits specified active transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RollbackTransaction(self, request, context): + """Performs a rollback of the specified active transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeTableOptions(self, request, context): + """Describe supported table options. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def StreamReadTable(self, request, context): + """Streaming read table + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReadRows(self, request, context): + """Reads specified keys non-transactionally from a single table + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def BulkUpsert(self, request, context): + """Upserts a batch of rows non-transactionally. + Returns success only when all rows were successfully upserted. In case of an error some rows might + be upserted and some might not. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def StreamExecuteScanQuery(self, request, context): + """Executes scan query with streaming result. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_TableServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateSession': grpc.unary_unary_rpc_method_handler( + servicer.CreateSession, + request_deserializer=protos_dot_ydb__table__pb2.CreateSessionRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.CreateSessionResponse.SerializeToString, + ), + 'DeleteSession': grpc.unary_unary_rpc_method_handler( + servicer.DeleteSession, + request_deserializer=protos_dot_ydb__table__pb2.DeleteSessionRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.DeleteSessionResponse.SerializeToString, + ), + 'KeepAlive': grpc.unary_unary_rpc_method_handler( + servicer.KeepAlive, + request_deserializer=protos_dot_ydb__table__pb2.KeepAliveRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.KeepAliveResponse.SerializeToString, + ), + 'CreateTable': grpc.unary_unary_rpc_method_handler( + servicer.CreateTable, + request_deserializer=protos_dot_ydb__table__pb2.CreateTableRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.CreateTableResponse.SerializeToString, + ), + 'DropTable': grpc.unary_unary_rpc_method_handler( + servicer.DropTable, + request_deserializer=protos_dot_ydb__table__pb2.DropTableRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.DropTableResponse.SerializeToString, + ), + 'AlterTable': grpc.unary_unary_rpc_method_handler( + servicer.AlterTable, + request_deserializer=protos_dot_ydb__table__pb2.AlterTableRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.AlterTableResponse.SerializeToString, + ), + 'CopyTable': grpc.unary_unary_rpc_method_handler( + servicer.CopyTable, + request_deserializer=protos_dot_ydb__table__pb2.CopyTableRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.CopyTableResponse.SerializeToString, + ), + 'CopyTables': grpc.unary_unary_rpc_method_handler( + servicer.CopyTables, + request_deserializer=protos_dot_ydb__table__pb2.CopyTablesRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.CopyTablesResponse.SerializeToString, + ), + 'RenameTables': grpc.unary_unary_rpc_method_handler( + servicer.RenameTables, + request_deserializer=protos_dot_ydb__table__pb2.RenameTablesRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.RenameTablesResponse.SerializeToString, + ), + 'DescribeTable': grpc.unary_unary_rpc_method_handler( + servicer.DescribeTable, + request_deserializer=protos_dot_ydb__table__pb2.DescribeTableRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.DescribeTableResponse.SerializeToString, + ), + 'ExplainDataQuery': grpc.unary_unary_rpc_method_handler( + servicer.ExplainDataQuery, + request_deserializer=protos_dot_ydb__table__pb2.ExplainDataQueryRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.ExplainDataQueryResponse.SerializeToString, + ), + 'PrepareDataQuery': grpc.unary_unary_rpc_method_handler( + servicer.PrepareDataQuery, + request_deserializer=protos_dot_ydb__table__pb2.PrepareDataQueryRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.PrepareDataQueryResponse.SerializeToString, + ), + 'ExecuteDataQuery': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteDataQuery, + request_deserializer=protos_dot_ydb__table__pb2.ExecuteDataQueryRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.ExecuteDataQueryResponse.SerializeToString, + ), + 'ExecuteSchemeQuery': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteSchemeQuery, + request_deserializer=protos_dot_ydb__table__pb2.ExecuteSchemeQueryRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.ExecuteSchemeQueryResponse.SerializeToString, + ), + 'BeginTransaction': grpc.unary_unary_rpc_method_handler( + servicer.BeginTransaction, + request_deserializer=protos_dot_ydb__table__pb2.BeginTransactionRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.BeginTransactionResponse.SerializeToString, + ), + 'CommitTransaction': grpc.unary_unary_rpc_method_handler( + servicer.CommitTransaction, + request_deserializer=protos_dot_ydb__table__pb2.CommitTransactionRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.CommitTransactionResponse.SerializeToString, + ), + 'RollbackTransaction': grpc.unary_unary_rpc_method_handler( + servicer.RollbackTransaction, + request_deserializer=protos_dot_ydb__table__pb2.RollbackTransactionRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.RollbackTransactionResponse.SerializeToString, + ), + 'DescribeTableOptions': grpc.unary_unary_rpc_method_handler( + servicer.DescribeTableOptions, + request_deserializer=protos_dot_ydb__table__pb2.DescribeTableOptionsRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.DescribeTableOptionsResponse.SerializeToString, + ), + 'StreamReadTable': grpc.unary_stream_rpc_method_handler( + servicer.StreamReadTable, + request_deserializer=protos_dot_ydb__table__pb2.ReadTableRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.ReadTableResponse.SerializeToString, + ), + 'ReadRows': grpc.unary_unary_rpc_method_handler( + servicer.ReadRows, + request_deserializer=protos_dot_ydb__table__pb2.ReadRowsRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.ReadRowsResponse.SerializeToString, + ), + 'BulkUpsert': grpc.unary_unary_rpc_method_handler( + servicer.BulkUpsert, + request_deserializer=protos_dot_ydb__table__pb2.BulkUpsertRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.BulkUpsertResponse.SerializeToString, + ), + 'StreamExecuteScanQuery': grpc.unary_stream_rpc_method_handler( + servicer.StreamExecuteScanQuery, + request_deserializer=protos_dot_ydb__table__pb2.ExecuteScanQueryRequest.FromString, + response_serializer=protos_dot_ydb__table__pb2.ExecuteScanQueryPartialResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.Table.V1.TableService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class TableService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def CreateSession(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, '/Ydb.Table.V1.TableService/CreateSession', + protos_dot_ydb__table__pb2.CreateSessionRequest.SerializeToString, + protos_dot_ydb__table__pb2.CreateSessionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteSession(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, '/Ydb.Table.V1.TableService/DeleteSession', + protos_dot_ydb__table__pb2.DeleteSessionRequest.SerializeToString, + protos_dot_ydb__table__pb2.DeleteSessionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def KeepAlive(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, '/Ydb.Table.V1.TableService/KeepAlive', + protos_dot_ydb__table__pb2.KeepAliveRequest.SerializeToString, + protos_dot_ydb__table__pb2.KeepAliveResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateTable(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, '/Ydb.Table.V1.TableService/CreateTable', + protos_dot_ydb__table__pb2.CreateTableRequest.SerializeToString, + protos_dot_ydb__table__pb2.CreateTableResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DropTable(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, '/Ydb.Table.V1.TableService/DropTable', + protos_dot_ydb__table__pb2.DropTableRequest.SerializeToString, + protos_dot_ydb__table__pb2.DropTableResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AlterTable(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, '/Ydb.Table.V1.TableService/AlterTable', + protos_dot_ydb__table__pb2.AlterTableRequest.SerializeToString, + protos_dot_ydb__table__pb2.AlterTableResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CopyTable(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, '/Ydb.Table.V1.TableService/CopyTable', + protos_dot_ydb__table__pb2.CopyTableRequest.SerializeToString, + protos_dot_ydb__table__pb2.CopyTableResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CopyTables(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, '/Ydb.Table.V1.TableService/CopyTables', + protos_dot_ydb__table__pb2.CopyTablesRequest.SerializeToString, + protos_dot_ydb__table__pb2.CopyTablesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RenameTables(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, '/Ydb.Table.V1.TableService/RenameTables', + protos_dot_ydb__table__pb2.RenameTablesRequest.SerializeToString, + protos_dot_ydb__table__pb2.RenameTablesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeTable(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, '/Ydb.Table.V1.TableService/DescribeTable', + protos_dot_ydb__table__pb2.DescribeTableRequest.SerializeToString, + protos_dot_ydb__table__pb2.DescribeTableResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ExplainDataQuery(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, '/Ydb.Table.V1.TableService/ExplainDataQuery', + protos_dot_ydb__table__pb2.ExplainDataQueryRequest.SerializeToString, + protos_dot_ydb__table__pb2.ExplainDataQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PrepareDataQuery(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, '/Ydb.Table.V1.TableService/PrepareDataQuery', + protos_dot_ydb__table__pb2.PrepareDataQueryRequest.SerializeToString, + protos_dot_ydb__table__pb2.PrepareDataQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ExecuteDataQuery(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, '/Ydb.Table.V1.TableService/ExecuteDataQuery', + protos_dot_ydb__table__pb2.ExecuteDataQueryRequest.SerializeToString, + protos_dot_ydb__table__pb2.ExecuteDataQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ExecuteSchemeQuery(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, '/Ydb.Table.V1.TableService/ExecuteSchemeQuery', + protos_dot_ydb__table__pb2.ExecuteSchemeQueryRequest.SerializeToString, + protos_dot_ydb__table__pb2.ExecuteSchemeQueryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def BeginTransaction(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, '/Ydb.Table.V1.TableService/BeginTransaction', + protos_dot_ydb__table__pb2.BeginTransactionRequest.SerializeToString, + protos_dot_ydb__table__pb2.BeginTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CommitTransaction(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, '/Ydb.Table.V1.TableService/CommitTransaction', + protos_dot_ydb__table__pb2.CommitTransactionRequest.SerializeToString, + protos_dot_ydb__table__pb2.CommitTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RollbackTransaction(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, '/Ydb.Table.V1.TableService/RollbackTransaction', + protos_dot_ydb__table__pb2.RollbackTransactionRequest.SerializeToString, + protos_dot_ydb__table__pb2.RollbackTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeTableOptions(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, '/Ydb.Table.V1.TableService/DescribeTableOptions', + protos_dot_ydb__table__pb2.DescribeTableOptionsRequest.SerializeToString, + protos_dot_ydb__table__pb2.DescribeTableOptionsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def StreamReadTable(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_stream(request, target, '/Ydb.Table.V1.TableService/StreamReadTable', + protos_dot_ydb__table__pb2.ReadTableRequest.SerializeToString, + protos_dot_ydb__table__pb2.ReadTableResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReadRows(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, '/Ydb.Table.V1.TableService/ReadRows', + protos_dot_ydb__table__pb2.ReadRowsRequest.SerializeToString, + protos_dot_ydb__table__pb2.ReadRowsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def BulkUpsert(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, '/Ydb.Table.V1.TableService/BulkUpsert', + protos_dot_ydb__table__pb2.BulkUpsertRequest.SerializeToString, + protos_dot_ydb__table__pb2.BulkUpsertResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def StreamExecuteScanQuery(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_stream(request, target, '/Ydb.Table.V1.TableService/StreamExecuteScanQuery', + protos_dot_ydb__table__pb2.ExecuteScanQueryRequest.SerializeToString, + protos_dot_ydb__table__pb2.ExecuteScanQueryPartialResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/ydb/_grpc/v5/ydb_topic_v1_pb2.py b/ydb/_grpc/v5/ydb_topic_v1_pb2.py new file mode 100644 index 00000000..54efc1e3 --- /dev/null +++ b/ydb/_grpc/v5/ydb_topic_v1_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# flake8: noqa +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ydb_topic_v1.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ydb._grpc.v5.protos import ydb_topic_pb2 as protos_dot_ydb__topic__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12ydb_topic_v1.proto\x12\x0cYdb.Topic.V1\x1a\x16protos/ydb_topic.proto2\xb7\x06\n\x0cTopicService\x12\x65\n\x0bStreamWrite\x12(.Ydb.Topic.StreamWriteMessage.FromClient\x1a(.Ydb.Topic.StreamWriteMessage.FromServer(\x01\x30\x01\x12\x62\n\nStreamRead\x12\'.Ydb.Topic.StreamReadMessage.FromClient\x1a\'.Ydb.Topic.StreamReadMessage.FromServer(\x01\x30\x01\x12O\n\x0c\x43ommitOffset\x12\x1e.Ydb.Topic.CommitOffsetRequest\x1a\x1f.Ydb.Topic.CommitOffsetResponse\x12y\n\x1aUpdateOffsetsInTransaction\x12,.Ydb.Topic.UpdateOffsetsInTransactionRequest\x1a-.Ydb.Topic.UpdateOffsetsInTransactionResponse\x12L\n\x0b\x43reateTopic\x12\x1d.Ydb.Topic.CreateTopicRequest\x1a\x1e.Ydb.Topic.CreateTopicResponse\x12R\n\rDescribeTopic\x12\x1f.Ydb.Topic.DescribeTopicRequest\x1a .Ydb.Topic.DescribeTopicResponse\x12[\n\x10\x44\x65scribeConsumer\x12\".Ydb.Topic.DescribeConsumerRequest\x1a#.Ydb.Topic.DescribeConsumerResponse\x12I\n\nAlterTopic\x12\x1c.Ydb.Topic.AlterTopicRequest\x1a\x1d.Ydb.Topic.AlterTopicResponse\x12\x46\n\tDropTopic\x12\x1b.Ydb.Topic.DropTopicRequest\x1a\x1c.Ydb.Topic.DropTopicResponseBR\n\x17tech.ydb.proto.topic.v1Z4github.com/ydb-platform/ydb-go-genproto/Ydb_Topic_V1\xf8\x01\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_topic_v1_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\027tech.ydb.proto.topic.v1Z4github.com/ydb-platform/ydb-go-genproto/Ydb_Topic_V1\370\001\001' + _TOPICSERVICE._serialized_start=61 + _TOPICSERVICE._serialized_end=884 +# @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_topic_v1_pb2.pyi b/ydb/_grpc/v5/ydb_topic_v1_pb2.pyi new file mode 100644 index 00000000..c463e198 --- /dev/null +++ b/ydb/_grpc/v5/ydb_topic_v1_pb2.pyi @@ -0,0 +1,5 @@ +from protos import ydb_topic_pb2 as _ydb_topic_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/ydb/_grpc/v5/ydb_topic_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_topic_v1_pb2_grpc.py new file mode 100644 index 00000000..a66732da --- /dev/null +++ b/ydb/_grpc/v5/ydb_topic_v1_pb2_grpc.py @@ -0,0 +1,389 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from ydb._grpc.v5.protos import ydb_topic_pb2 as protos_dot_ydb__topic__pb2 + + +class TopicServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.StreamWrite = channel.stream_stream( + '/Ydb.Topic.V1.TopicService/StreamWrite', + request_serializer=protos_dot_ydb__topic__pb2.StreamWriteMessage.FromClient.SerializeToString, + response_deserializer=protos_dot_ydb__topic__pb2.StreamWriteMessage.FromServer.FromString, + ) + self.StreamRead = channel.stream_stream( + '/Ydb.Topic.V1.TopicService/StreamRead', + request_serializer=protos_dot_ydb__topic__pb2.StreamReadMessage.FromClient.SerializeToString, + response_deserializer=protos_dot_ydb__topic__pb2.StreamReadMessage.FromServer.FromString, + ) + self.CommitOffset = channel.unary_unary( + '/Ydb.Topic.V1.TopicService/CommitOffset', + request_serializer=protos_dot_ydb__topic__pb2.CommitOffsetRequest.SerializeToString, + response_deserializer=protos_dot_ydb__topic__pb2.CommitOffsetResponse.FromString, + ) + self.UpdateOffsetsInTransaction = channel.unary_unary( + '/Ydb.Topic.V1.TopicService/UpdateOffsetsInTransaction', + request_serializer=protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionRequest.SerializeToString, + response_deserializer=protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionResponse.FromString, + ) + self.CreateTopic = channel.unary_unary( + '/Ydb.Topic.V1.TopicService/CreateTopic', + request_serializer=protos_dot_ydb__topic__pb2.CreateTopicRequest.SerializeToString, + response_deserializer=protos_dot_ydb__topic__pb2.CreateTopicResponse.FromString, + ) + self.DescribeTopic = channel.unary_unary( + '/Ydb.Topic.V1.TopicService/DescribeTopic', + request_serializer=protos_dot_ydb__topic__pb2.DescribeTopicRequest.SerializeToString, + response_deserializer=protos_dot_ydb__topic__pb2.DescribeTopicResponse.FromString, + ) + self.DescribeConsumer = channel.unary_unary( + '/Ydb.Topic.V1.TopicService/DescribeConsumer', + request_serializer=protos_dot_ydb__topic__pb2.DescribeConsumerRequest.SerializeToString, + response_deserializer=protos_dot_ydb__topic__pb2.DescribeConsumerResponse.FromString, + ) + self.AlterTopic = channel.unary_unary( + '/Ydb.Topic.V1.TopicService/AlterTopic', + request_serializer=protos_dot_ydb__topic__pb2.AlterTopicRequest.SerializeToString, + response_deserializer=protos_dot_ydb__topic__pb2.AlterTopicResponse.FromString, + ) + self.DropTopic = channel.unary_unary( + '/Ydb.Topic.V1.TopicService/DropTopic', + request_serializer=protos_dot_ydb__topic__pb2.DropTopicRequest.SerializeToString, + response_deserializer=protos_dot_ydb__topic__pb2.DropTopicResponse.FromString, + ) + + +class TopicServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def StreamWrite(self, request_iterator, context): + """Create Write Session + Pipeline example: + client server + InitRequest(Topic, MessageGroupID, ...) + ----------------> + InitResponse(Partition, MaxSeqNo, ...) + <---------------- + WriteRequest(data1, seqNo1) + ----------------> + WriteRequest(data2, seqNo2) + ----------------> + WriteResponse(seqNo1, offset1, ...) + <---------------- + WriteRequest(data3, seqNo3) + ----------------> + WriteResponse(seqNo2, offset2, ...) + <---------------- + [something went wrong] (status != SUCCESS, issues not empty) + <---------------- + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def StreamRead(self, request_iterator, context): + """Create Read Session + Pipeline: + client server + InitRequest(Topics, ClientId, ...) + ----------------> + InitResponse(SessionId) + <---------------- + ReadRequest + ----------------> + ReadRequest + ----------------> + StartPartitionSessionRequest(Topic1, Partition1, PartitionSessionID1, ...) + <---------------- + StartPartitionSessionRequest(Topic2, Partition2, PartitionSessionID2, ...) + <---------------- + StartPartitionSessionResponse(PartitionSessionID1, ...) + client must respond with this message to actually start recieving data messages from this partition + ----------------> + StopPartitionSessionRequest(PartitionSessionID1, ...) + <---------------- + StopPartitionSessionResponse(PartitionSessionID1, ...) + only after this response server will give this parittion to other session. + ----------------> + StartPartitionSessionResponse(PartitionSession2, ...) + ----------------> + ReadResponse(data, ...) + <---------------- + CommitRequest(PartitionCommit1, ...) + ----------------> + CommitResponse(PartitionCommitAck1, ...) + <---------------- + [something went wrong] (status != SUCCESS, issues not empty) + <---------------- + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CommitOffset(self, request, context): + """Single commit offset request. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateOffsetsInTransaction(self, request, context): + """Add information about offset ranges to the transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateTopic(self, request, context): + """Create topic command. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeTopic(self, request, context): + """Describe topic command. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeConsumer(self, request, context): + """Describe topic's consumer command. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AlterTopic(self, request, context): + """Alter topic command. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DropTopic(self, request, context): + """Drop topic command. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_TopicServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'StreamWrite': grpc.stream_stream_rpc_method_handler( + servicer.StreamWrite, + request_deserializer=protos_dot_ydb__topic__pb2.StreamWriteMessage.FromClient.FromString, + response_serializer=protos_dot_ydb__topic__pb2.StreamWriteMessage.FromServer.SerializeToString, + ), + 'StreamRead': grpc.stream_stream_rpc_method_handler( + servicer.StreamRead, + request_deserializer=protos_dot_ydb__topic__pb2.StreamReadMessage.FromClient.FromString, + response_serializer=protos_dot_ydb__topic__pb2.StreamReadMessage.FromServer.SerializeToString, + ), + 'CommitOffset': grpc.unary_unary_rpc_method_handler( + servicer.CommitOffset, + request_deserializer=protos_dot_ydb__topic__pb2.CommitOffsetRequest.FromString, + response_serializer=protos_dot_ydb__topic__pb2.CommitOffsetResponse.SerializeToString, + ), + 'UpdateOffsetsInTransaction': grpc.unary_unary_rpc_method_handler( + servicer.UpdateOffsetsInTransaction, + request_deserializer=protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionRequest.FromString, + response_serializer=protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionResponse.SerializeToString, + ), + 'CreateTopic': grpc.unary_unary_rpc_method_handler( + servicer.CreateTopic, + request_deserializer=protos_dot_ydb__topic__pb2.CreateTopicRequest.FromString, + response_serializer=protos_dot_ydb__topic__pb2.CreateTopicResponse.SerializeToString, + ), + 'DescribeTopic': grpc.unary_unary_rpc_method_handler( + servicer.DescribeTopic, + request_deserializer=protos_dot_ydb__topic__pb2.DescribeTopicRequest.FromString, + response_serializer=protos_dot_ydb__topic__pb2.DescribeTopicResponse.SerializeToString, + ), + 'DescribeConsumer': grpc.unary_unary_rpc_method_handler( + servicer.DescribeConsumer, + request_deserializer=protos_dot_ydb__topic__pb2.DescribeConsumerRequest.FromString, + response_serializer=protos_dot_ydb__topic__pb2.DescribeConsumerResponse.SerializeToString, + ), + 'AlterTopic': grpc.unary_unary_rpc_method_handler( + servicer.AlterTopic, + request_deserializer=protos_dot_ydb__topic__pb2.AlterTopicRequest.FromString, + response_serializer=protos_dot_ydb__topic__pb2.AlterTopicResponse.SerializeToString, + ), + 'DropTopic': grpc.unary_unary_rpc_method_handler( + servicer.DropTopic, + request_deserializer=protos_dot_ydb__topic__pb2.DropTopicRequest.FromString, + response_serializer=protos_dot_ydb__topic__pb2.DropTopicResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Ydb.Topic.V1.TopicService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class TopicService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def StreamWrite(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/Ydb.Topic.V1.TopicService/StreamWrite', + protos_dot_ydb__topic__pb2.StreamWriteMessage.FromClient.SerializeToString, + protos_dot_ydb__topic__pb2.StreamWriteMessage.FromServer.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def StreamRead(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/Ydb.Topic.V1.TopicService/StreamRead', + protos_dot_ydb__topic__pb2.StreamReadMessage.FromClient.SerializeToString, + protos_dot_ydb__topic__pb2.StreamReadMessage.FromServer.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CommitOffset(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, '/Ydb.Topic.V1.TopicService/CommitOffset', + protos_dot_ydb__topic__pb2.CommitOffsetRequest.SerializeToString, + protos_dot_ydb__topic__pb2.CommitOffsetResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateOffsetsInTransaction(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, '/Ydb.Topic.V1.TopicService/UpdateOffsetsInTransaction', + protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionRequest.SerializeToString, + protos_dot_ydb__topic__pb2.UpdateOffsetsInTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateTopic(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, '/Ydb.Topic.V1.TopicService/CreateTopic', + protos_dot_ydb__topic__pb2.CreateTopicRequest.SerializeToString, + protos_dot_ydb__topic__pb2.CreateTopicResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeTopic(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, '/Ydb.Topic.V1.TopicService/DescribeTopic', + protos_dot_ydb__topic__pb2.DescribeTopicRequest.SerializeToString, + protos_dot_ydb__topic__pb2.DescribeTopicResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeConsumer(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, '/Ydb.Topic.V1.TopicService/DescribeConsumer', + protos_dot_ydb__topic__pb2.DescribeConsumerRequest.SerializeToString, + protos_dot_ydb__topic__pb2.DescribeConsumerResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AlterTopic(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, '/Ydb.Topic.V1.TopicService/AlterTopic', + protos_dot_ydb__topic__pb2.AlterTopicRequest.SerializeToString, + protos_dot_ydb__topic__pb2.AlterTopicResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DropTopic(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, '/Ydb.Topic.V1.TopicService/DropTopic', + protos_dot_ydb__topic__pb2.DropTopicRequest.SerializeToString, + protos_dot_ydb__topic__pb2.DropTopicResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) From bb79667c8a48d19e3aee6751490c88911e11b4bf Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 26 Feb 2025 11:36:43 +0300 Subject: [PATCH 370/429] add protobuf 5 compatibility --- .github/workflows/tests.yaml | 14 +++++++++++--- test-requirements.txt | 4 ++-- tox.ini | 6 +++--- ydb/_grpc/common/__init__.py | 11 ++++++++++- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2eb6b514..cbc0bc67 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -17,14 +17,22 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8] - environment: [py-proto4, py-tls-proto4, py-proto3, py-tls-proto3] - folder: [ydb, tests] + python-version: [3.8, 3.9] + environment: [py-proto5, py-tls-proto5, py-proto4, py-tls-proto4, py-proto3, py-tls-proto3] + folder: [ydb, tests --ignore=tests/topics, tests/topics] exclude: + - environment: py-tls-proto5 + folder: ydb - environment: py-tls-proto4 folder: ydb - environment: py-tls-proto3 folder: ydb + - environment: py-tls-proto5 + folder: tests/topics + - environment: py-tls-proto4 + folder: tests/topics + - environment: py-tls-proto3 + folder: tests/topics steps: - uses: actions/checkout@v1 diff --git a/test-requirements.txt b/test-requirements.txt index 787bcf34..c88c5ca0 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,7 +11,7 @@ docker==5.0.0 docker-compose==1.29.2 dockerpty==0.4.1 docopt==0.6.2 -grpcio==1.42.0 +grpcio>=1.42.0 idna==3.2 importlib-metadata==4.6.1 iniconfig==1.1.1 @@ -19,7 +19,7 @@ jsonschema==3.2.0 packaging==21.0 paramiko==2.10.1 pluggy==0.13.1 -protobuf>=3.13.0,<5.0.0 +protobuf>=3.13.0,<6.0.0 py==1.10.0 pycparser==2.20 PyNaCl==1.4.0 diff --git a/tox.ini b/tox.ini index df029d2a..b7d712f9 100644 --- a/tox.ini +++ b/tox.ini @@ -32,14 +32,14 @@ deps = [testenv:py-proto5] commands = - pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} + pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} --ignore=tests/topics deps = -r{toxinidir}/test-requirements.txt protobuf<6.0.0 [testenv:py-proto4] commands = - pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} + pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} --ignore=tests/topics deps = -r{toxinidir}/test-requirements.txt protobuf<5.0.0 @@ -55,7 +55,7 @@ deps = [testenv:py-proto3] commands = - pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} + pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} --ignore=tests/topics deps = -r{toxinidir}/test-requirements.txt protobuf<4.0.0 diff --git a/ydb/_grpc/common/__init__.py b/ydb/_grpc/common/__init__.py index bab864e0..4c06d83a 100644 --- a/ydb/_grpc/common/__init__.py +++ b/ydb/_grpc/common/__init__.py @@ -36,7 +36,7 @@ from ydb._grpc.v3 import protos # noqa sys.modules["ydb._grpc.common.protos"] = sys.modules["ydb._grpc.v3.protos"] - else: + elif protobuf_version < Version("5.0"): from ydb._grpc.v4 import * # noqa sys.modules["ydb._grpc.common"] = sys.modules["ydb._grpc.v4"] @@ -44,3 +44,12 @@ from ydb._grpc.v4 import protos # noqa sys.modules["ydb._grpc.common.protos"] = sys.modules["ydb._grpc.v4.protos"] + + else: + from ydb._grpc.v5 import * # noqa + + sys.modules["ydb._grpc.common"] = sys.modules["ydb._grpc.v5"] + + from ydb._grpc.v5 import protos # noqa + + sys.modules["ydb._grpc.common.protos"] = sys.modules["ydb._grpc.v5.protos"] From a0d1dbd315d70ae2d5904be7d5058d5ed393484e Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 26 Feb 2025 17:03:01 +0300 Subject: [PATCH 371/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cec08b6a..9ab7ce6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* protobuf 5 compatibility + ## 3.18.17 ## * Fix empty result sets from stream From 0c1e47ae2355c09864b91c17e3c0eb79a00730e3 Mon Sep 17 00:00:00 2001 From: robot Date: Wed, 26 Feb 2025 14:05:08 +0000 Subject: [PATCH 372/429] Release: 3.19.0 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ab7ce6d..4e02890e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.19.0 ## * protobuf 5 compatibility ## 3.18.17 ## diff --git a/setup.py b/setup.py index 82471917..c4086463 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.18.17", # AUTOVERSION + version="3.19.0", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 416d33e1..9f92b457 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.17" +VERSION = "3.19.0" From 6a177ed760b3fd2efcd0c0536eb45803e24140ba Mon Sep 17 00:00:00 2001 From: Innokentii Mokin Date: Thu, 27 Feb 2025 12:45:55 +0000 Subject: [PATCH 373/429] fix dynconfig proto usage --- ydb/draft/dynamic_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/draft/dynamic_config.py b/ydb/draft/dynamic_config.py index 4648b29a..f471c785 100644 --- a/ydb/draft/dynamic_config.py +++ b/ydb/draft/dynamic_config.py @@ -71,7 +71,7 @@ def _get_node_labels_request_factory(node_id): def _wrap_dynamic_config(config_pb, dynamic_config_cls=None, *args, **kwargs): dynamic_config_cls = DynamicConfig if dynamic_config_cls is None else dynamic_config_cls - return dynamic_config_cls(config_pb.identity.version, config_pb.identity.cluster, config_pb.config, *args, **kwargs) + return dynamic_config_cls(config_pb.identity[0].version, config_pb.identity[0].cluster, config_pb.config[0], *args, **kwargs) def _wrap_get_config_response(rpc_state, response): From 5e81a4be360916fd5eb6ecc983fc67f7f4272e1c Mon Sep 17 00:00:00 2001 From: Innokentii Mokin Date: Thu, 27 Feb 2025 13:09:17 +0000 Subject: [PATCH 374/429] style fix --- ydb/draft/dynamic_config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ydb/draft/dynamic_config.py b/ydb/draft/dynamic_config.py index f471c785..2089fcb8 100644 --- a/ydb/draft/dynamic_config.py +++ b/ydb/draft/dynamic_config.py @@ -71,7 +71,9 @@ def _get_node_labels_request_factory(node_id): def _wrap_dynamic_config(config_pb, dynamic_config_cls=None, *args, **kwargs): dynamic_config_cls = DynamicConfig if dynamic_config_cls is None else dynamic_config_cls - return dynamic_config_cls(config_pb.identity[0].version, config_pb.identity[0].cluster, config_pb.config[0], *args, **kwargs) + return dynamic_config_cls( + config_pb.identity[0].version, config_pb.identity[0].cluster, config_pb.config[0], *args, **kwargs + ) def _wrap_get_config_response(rpc_state, response): From d42e046f7e19e00335520e59de907ab1f6926490 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 27 Feb 2025 16:17:59 +0300 Subject: [PATCH 375/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e02890e..67d221db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Fix dynconfig proto usage + ## 3.19.0 ## * protobuf 5 compatibility From 47ce490f7aa3fef85ad6ac5a7f00c34c301a00a1 Mon Sep 17 00:00:00 2001 From: robot Date: Thu, 27 Feb 2025 14:13:15 +0000 Subject: [PATCH 376/429] Release: 3.19.1 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67d221db..a593e0ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.19.1 ## * Fix dynconfig proto usage ## 3.19.0 ## diff --git a/setup.py b/setup.py index c4086463..148856b3 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.19.0", # AUTOVERSION + version="3.19.1", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 9f92b457..70e1ba43 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.19.0" +VERSION = "3.19.1" From 5fa498311e6e3e57445e565d3fc8e8b1b135e8fc Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 7 Mar 2025 14:39:29 +0300 Subject: [PATCH 377/429] Fix async query pool acquire race condition --- tests/aio/query/test_query_session_pool.py | 17 +++++++++++++++++ tox.ini | 6 +++--- ydb/aio/query/pool.py | 9 ++++++++- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/tests/aio/query/test_query_session_pool.py b/tests/aio/query/test_query_session_pool.py index f86ff3ed..2cd0d4b9 100644 --- a/tests/aio/query/test_query_session_pool.py +++ b/tests/aio/query/test_query_session_pool.py @@ -162,3 +162,20 @@ async def test_no_session_leak(self, driver, docker_project): docker_project.start() await pool.stop() + + @pytest.mark.asyncio + async def test_acquire_no_race_condition(self, driver): + ids = set() + async with ydb.aio.QuerySessionPool(driver, 1) as pool: + + async def acquire_session(): + session = await pool.acquire() + ids.add(session._state.session_id) + await pool.release(session) + + tasks = [acquire_session() for _ in range(10)] + + await asyncio.gather(*tasks) + + assert len(ids) == 1 + assert pool._current_size == 1 diff --git a/tox.ini b/tox.ini index b7d712f9..df029d2a 100644 --- a/tox.ini +++ b/tox.ini @@ -32,14 +32,14 @@ deps = [testenv:py-proto5] commands = - pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} --ignore=tests/topics + pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} deps = -r{toxinidir}/test-requirements.txt protobuf<6.0.0 [testenv:py-proto4] commands = - pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} --ignore=tests/topics + pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} deps = -r{toxinidir}/test-requirements.txt protobuf<5.0.0 @@ -55,7 +55,7 @@ deps = [testenv:py-proto3] commands = - pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} --ignore=tests/topics + pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} deps = -r{toxinidir}/test-requirements.txt protobuf<4.0.0 diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index f6a84eb0..947db658 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -90,8 +90,15 @@ async def acquire(self) -> QuerySession: logger.debug(f"Acquired dead session from queue: {session._state.session_id}") logger.debug(f"Session pool is not large enough: {self._current_size} < {self._size}, will create new one.") - session = await self._create_new_session() + self._current_size += 1 + try: + session = await self._create_new_session() + except Exception as e: + logger.error("Failed to create new session") + self._current_size -= 1 + raise e + return session async def release(self, session: QuerySession) -> None: From 9ad6ee92bbba85ae5c665ce907a099e5d6d92b5c Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 7 Mar 2025 15:49:18 +0300 Subject: [PATCH 378/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a593e0ce..d86ccfc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Fix async query pool acquire race condition + ## 3.19.1 ## * Fix dynconfig proto usage From 0104976d5304d4444328d17846539d1efc2efd94 Mon Sep 17 00:00:00 2001 From: robot Date: Fri, 7 Mar 2025 12:52:45 +0000 Subject: [PATCH 379/429] Release: 3.19.2 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d86ccfc5..f367b24a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.19.2 ## * Fix async query pool acquire race condition ## 3.19.1 ## diff --git a/setup.py b/setup.py index 148856b3..884ea373 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.19.1", # AUTOVERSION + version="3.19.2", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 70e1ba43..b3fbda15 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.19.1" +VERSION = "3.19.2" From 262558b6dcfa5d38a278eaa86b70bcee73c88dfa Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 18 Mar 2025 16:36:18 +0300 Subject: [PATCH 380/429] Add consumer stats to public consumer --- tests/topics/test_control_plane.py | 3 +++ ydb/_grpc/grpcwrapper/ydb_topic.py | 11 +++++++++- .../grpcwrapper/ydb_topic_public_types.py | 22 +++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/tests/topics/test_control_plane.py b/tests/topics/test_control_plane.py index 79b5976c..5498e832 100644 --- a/tests/topics/test_control_plane.py +++ b/tests/topics/test_control_plane.py @@ -34,6 +34,9 @@ async def test_describe_topic(self, driver, topic_path: str, topic_consumer): has_consumer = False for consumer in res.consumers: + assert consumer.consumer_stats is not None + for stat in ["min_partitions_last_read_time", "max_read_time_lag", "max_write_time_lag", "bytes_read"]: + assert getattr(consumer.consumer_stats, stat, None) is not None if consumer.name == topic_consumer: has_consumer = True break diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index 600dfb69..c41eab27 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -907,10 +907,11 @@ def to_public(self) -> ydb_topic_public_types.PublicConsumer: read_from=self.read_from, supported_codecs=self.supported_codecs.to_public(), attributes=self.attributes, + consumer_stats=self.consumer_stats.to_public(), ) @dataclass - class ConsumerStats(IFromProto): + class ConsumerStats(IFromProto, IToPublic): min_partitions_last_read_time: datetime.datetime max_read_time_lag: datetime.timedelta max_write_time_lag: datetime.timedelta @@ -927,6 +928,14 @@ def from_proto( bytes_read=MultipleWindowsStat.from_proto(msg.bytes_read), ) + def to_public(self) -> ydb_topic_public_types.PublicConsumer.ConsumerStats: + return ydb_topic_public_types.PublicConsumer.ConsumerStats( + min_partitions_last_read_time=self.min_partitions_last_read_time, + max_read_time_lag=self.max_read_time_lag, + max_write_time_lag=self.max_write_time_lag, + bytes_read=self.bytes_read, + ) + @dataclass class AlterConsumer(IToProto, IFromPublic): diff --git a/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py b/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py index 37528a2f..b07aa3fd 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py @@ -117,6 +117,28 @@ class PublicConsumer: attributes: Dict[str, str] = field(default_factory=lambda: dict()) "Attributes of consumer" + consumer_stats: Optional["PublicConsumer.ConsumerStats"] = None + + @dataclass + class ConsumerStats: + min_partitions_last_read_time: datetime.datetime + "Minimal timestamp of last read from partitions." + + max_read_time_lag: datetime.timedelta + """ + Maximum of differences between timestamp of read and write timestamp for all messages, + read during last minute. + """ + + max_write_time_lag: datetime.timedelta + """ + Maximum of differences between write timestamp and create timestamp for all messages, + written during last minute. + """ + + bytes_read: "PublicMultipleWindowsStat" + "Bytes read statistics." + @dataclass class PublicAlterConsumer: From 7e3d1dc7aee77c7ea273aea4f8403d8052d4d835 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 18 Mar 2025 17:26:12 +0300 Subject: [PATCH 381/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f367b24a..a42297a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Add consumer_stats to PublicConsumer + ## 3.19.2 ## * Fix async query pool acquire race condition From f2bbcf24993df63761be93c39e31dbad684e5586 Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 18 Mar 2025 14:28:34 +0000 Subject: [PATCH 382/429] Release: 3.19.3 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a42297a9..7013981a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.19.3 ## * Add consumer_stats to PublicConsumer ## 3.19.2 ## diff --git a/setup.py b/setup.py index 884ea373..38025fad 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.19.2", # AUTOVERSION + version="3.19.3", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index b3fbda15..8bd658d4 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.19.2" +VERSION = "3.19.3" From ec456af8f29a543139698267d7daa39d1cc729fd Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 27 Mar 2025 14:58:27 +0300 Subject: [PATCH 383/429] Topic transactions feature (#559) --- .github/workflows/tests.yaml | 12 +- .../topic/topic_transactions_async_example.py | 86 ++++ examples/topic/topic_transactions_example.py | 85 ++++ tests/query/test_query_transaction.py | 12 + tests/topics/test_topic_reader.py | 14 +- tests/topics/test_topic_transactions.py | 469 ++++++++++++++++++ tox.ini | 6 +- ydb/_apis.py | 1 + ydb/_errors.py | 1 + ydb/_grpc/grpcwrapper/common_utils.py | 3 - ydb/_grpc/grpcwrapper/ydb_topic.py | 67 +++ ydb/_topic_reader/datatypes.py | 9 + ydb/_topic_reader/topic_reader_asyncio.py | 121 ++++- ydb/_topic_reader/topic_reader_sync.py | 34 +- ydb/_topic_writer/topic_writer.py | 10 +- ydb/_topic_writer/topic_writer_asyncio.py | 85 +++- .../topic_writer_asyncio_test.py | 47 +- ydb/_topic_writer/topic_writer_sync.py | 52 +- ydb/aio/driver.py | 1 + ydb/aio/query/pool.py | 2 + ydb/aio/query/transaction.py | 48 +- ydb/driver.py | 1 + ydb/issues.py | 4 + ydb/query/base.py | 67 +++ ydb/query/pool.py | 2 + ydb/query/transaction.py | 87 +++- ydb/topic.py | 76 ++- 27 files changed, 1345 insertions(+), 57 deletions(-) create mode 100644 examples/topic/topic_transactions_async_example.py create mode 100644 examples/topic/topic_transactions_example.py create mode 100644 tests/topics/test_topic_transactions.py diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index cbc0bc67..adbf779f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -18,21 +18,15 @@ jobs: fail-fast: false matrix: python-version: [3.8, 3.9] - environment: [py-proto5, py-tls-proto5, py-proto4, py-tls-proto4, py-proto3, py-tls-proto3] - folder: [ydb, tests --ignore=tests/topics, tests/topics] + environment: [py, py-tls, py-proto4, py-tls-proto4, py-proto3, py-tls-proto3] + folder: [ydb, tests] exclude: - - environment: py-tls-proto5 + - environment: py-tls folder: ydb - environment: py-tls-proto4 folder: ydb - environment: py-tls-proto3 folder: ydb - - environment: py-tls-proto5 - folder: tests/topics - - environment: py-tls-proto4 - folder: tests/topics - - environment: py-tls-proto3 - folder: tests/topics steps: - uses: actions/checkout@v1 diff --git a/examples/topic/topic_transactions_async_example.py b/examples/topic/topic_transactions_async_example.py new file mode 100644 index 00000000..cae61063 --- /dev/null +++ b/examples/topic/topic_transactions_async_example.py @@ -0,0 +1,86 @@ +import asyncio +import argparse +import logging +import ydb + + +async def connect(endpoint: str, database: str) -> ydb.aio.Driver: + config = ydb.DriverConfig(endpoint=endpoint, database=database) + config.credentials = ydb.credentials_from_env_variables() + driver = ydb.aio.Driver(config) + await driver.wait(5, fail_fast=True) + return driver + + +async def create_topic(driver: ydb.aio.Driver, topic: str, consumer: str): + try: + await driver.topic_client.drop_topic(topic) + except ydb.SchemeError: + pass + + await driver.topic_client.create_topic(topic, consumers=[consumer]) + + +async def write_with_tx_example(driver: ydb.aio.Driver, topic: str, message_count: int = 10): + async with ydb.aio.QuerySessionPool(driver) as session_pool: + + async def callee(tx: ydb.aio.QueryTxContext): + tx_writer: ydb.TopicTxWriterAsyncIO = driver.topic_client.tx_writer(tx, topic) + + for i in range(message_count): + async with await tx.execute(query=f"select {i} as res;") as result_stream: + async for result_set in result_stream: + message = str(result_set.rows[0]["res"]) + await tx_writer.write(ydb.TopicWriterMessage(message)) + print(f"Message {result_set.rows[0]['res']} was written with tx.") + + await session_pool.retry_tx_async(callee) + + +async def read_with_tx_example(driver: ydb.aio.Driver, topic: str, consumer: str, message_count: int = 10): + async with driver.topic_client.reader(topic, consumer) as reader: + async with ydb.aio.QuerySessionPool(driver) as session_pool: + for _ in range(message_count): + + async def callee(tx: ydb.aio.QueryTxContext): + batch = await reader.receive_batch_with_tx(tx, max_messages=1) + print(f"Message {batch.messages[0].data.decode()} was read with tx.") + + await session_pool.retry_tx_async(callee) + + +async def main(): + parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description="""YDB topic basic example.\n""", + ) + parser.add_argument("-d", "--database", default="/local", help="Name of the database to use") + parser.add_argument("-e", "--endpoint", default="grpc://localhost:2136", help="Endpoint url to use") + parser.add_argument("-p", "--path", default="test-topic", help="Topic name") + parser.add_argument("-c", "--consumer", default="consumer", help="Consumer name") + parser.add_argument("-v", "--verbose", default=False, action="store_true") + parser.add_argument( + "-s", + "--skip-drop-and-create-topic", + default=False, + action="store_true", + help="Use existed topic, skip remove it and re-create", + ) + + args = parser.parse_args() + + if args.verbose: + logger = logging.getLogger("topicexample") + logger.setLevel(logging.DEBUG) + logger.addHandler(logging.StreamHandler()) + + async with await connect(args.endpoint, args.database) as driver: + if not args.skip_drop_and_create_topic: + await create_topic(driver, args.path, args.consumer) + + await write_with_tx_example(driver, args.path) + await read_with_tx_example(driver, args.path, args.consumer) + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/examples/topic/topic_transactions_example.py b/examples/topic/topic_transactions_example.py new file mode 100644 index 00000000..0f7432e7 --- /dev/null +++ b/examples/topic/topic_transactions_example.py @@ -0,0 +1,85 @@ +import argparse +import logging +import ydb + + +def connect(endpoint: str, database: str) -> ydb.Driver: + config = ydb.DriverConfig(endpoint=endpoint, database=database) + config.credentials = ydb.credentials_from_env_variables() + driver = ydb.Driver(config) + driver.wait(5, fail_fast=True) + return driver + + +def create_topic(driver: ydb.Driver, topic: str, consumer: str): + try: + driver.topic_client.drop_topic(topic) + except ydb.SchemeError: + pass + + driver.topic_client.create_topic(topic, consumers=[consumer]) + + +def write_with_tx_example(driver: ydb.Driver, topic: str, message_count: int = 10): + with ydb.QuerySessionPool(driver) as session_pool: + + def callee(tx: ydb.QueryTxContext): + tx_writer: ydb.TopicTxWriter = driver.topic_client.tx_writer(tx, topic) + + for i in range(message_count): + result_stream = tx.execute(query=f"select {i} as res;") + for result_set in result_stream: + message = str(result_set.rows[0]["res"]) + tx_writer.write(ydb.TopicWriterMessage(message)) + print(f"Message {message} was written with tx.") + + session_pool.retry_tx_sync(callee) + + +def read_with_tx_example(driver: ydb.Driver, topic: str, consumer: str, message_count: int = 10): + with driver.topic_client.reader(topic, consumer) as reader: + with ydb.QuerySessionPool(driver) as session_pool: + for _ in range(message_count): + + def callee(tx: ydb.QueryTxContext): + batch = reader.receive_batch_with_tx(tx, max_messages=1) + print(f"Message {batch.messages[0].data.decode()} was read with tx.") + + session_pool.retry_tx_sync(callee) + + +def main(): + parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description="""YDB topic basic example.\n""", + ) + parser.add_argument("-d", "--database", default="/local", help="Name of the database to use") + parser.add_argument("-e", "--endpoint", default="grpc://localhost:2136", help="Endpoint url to use") + parser.add_argument("-p", "--path", default="test-topic", help="Topic name") + parser.add_argument("-c", "--consumer", default="consumer", help="Consumer name") + parser.add_argument("-v", "--verbose", default=False, action="store_true") + parser.add_argument( + "-s", + "--skip-drop-and-create-topic", + default=False, + action="store_true", + help="Use existed topic, skip remove it and re-create", + ) + + args = parser.parse_args() + + if args.verbose: + logger = logging.getLogger("topicexample") + logger.setLevel(logging.DEBUG) + logger.addHandler(logging.StreamHandler()) + + with connect(args.endpoint, args.database) as driver: + if not args.skip_drop_and_create_topic: + create_topic(driver, args.path, args.consumer) + + write_with_tx_example(driver, args.path) + read_with_tx_example(driver, args.path, args.consumer) + + +if __name__ == "__main__": + main() diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index dfc88897..4533e528 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -92,3 +92,15 @@ def test_execute_two_results(self, tx: QueryTxContext): assert res == [[1], [2]] assert counter == 2 + + def test_tx_identity_before_begin_raises(self, tx: QueryTxContext): + with pytest.raises(RuntimeError): + tx._tx_identity() + + def test_tx_identity_after_begin_works(self, tx: QueryTxContext): + tx.begin() + + identity = tx._tx_identity() + + assert identity.tx_id == tx.tx_id + assert identity.session_id == tx.session_id diff --git a/tests/topics/test_topic_reader.py b/tests/topics/test_topic_reader.py index 23b5b4be..623dc8c0 100644 --- a/tests/topics/test_topic_reader.py +++ b/tests/topics/test_topic_reader.py @@ -174,12 +174,13 @@ def test_read_and_commit_with_close_reader(self, driver_sync, topic_with_message assert message != message2 def test_read_and_commit_with_ack(self, driver_sync, topic_with_messages, topic_consumer): - reader = driver_sync.topic_client.reader(topic_with_messages, topic_consumer) - message = reader.receive_message() - reader.commit_with_ack(message) + with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: + message = reader.receive_message() + reader.commit_with_ack(message) + + with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: + batch = reader.receive_batch() - reader = driver_sync.topic_client.reader(topic_with_messages, topic_consumer) - batch = reader.receive_batch() assert message != batch.messages[0] def test_read_compressed_messages(self, driver_sync, topic_path, topic_consumer): @@ -247,3 +248,6 @@ async def wait(fut): datas.sort() assert datas == ["10", "11"] + + await reader0.close() + await reader1.close() diff --git a/tests/topics/test_topic_transactions.py b/tests/topics/test_topic_transactions.py new file mode 100644 index 00000000..b79df740 --- /dev/null +++ b/tests/topics/test_topic_transactions.py @@ -0,0 +1,469 @@ +import asyncio +from asyncio import wait_for +import pytest +from unittest import mock +import ydb + +DEFAULT_TIMEOUT = 0.5 +DEFAULT_RETRY_SETTINGS = ydb.RetrySettings(max_retries=1) + + +@pytest.mark.asyncio +class TestTopicTransactionalReader: + async def test_commit(self, driver: ydb.aio.Driver, topic_with_messages, topic_consumer): + async with ydb.aio.QuerySessionPool(driver) as pool: + async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: + + async def callee(tx: ydb.aio.QueryTxContext): + batch = await wait_for(reader.receive_batch_with_tx(tx, max_messages=1), DEFAULT_TIMEOUT) + assert len(batch.messages) == 1 + assert batch.messages[0].data.decode() == "123" + + batch = await wait_for(reader.receive_batch_with_tx(tx, max_messages=1), DEFAULT_TIMEOUT) + assert len(batch.messages) == 1 + assert batch.messages[0].data.decode() == "456" + + await pool.retry_tx_async(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + assert len(reader._reconnector._tx_to_batches_map) == 0 + + async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: + msg = await wait_for(reader.receive_message(), DEFAULT_TIMEOUT) + assert msg.data.decode() == "789" + + async def test_rollback(self, driver: ydb.aio.Driver, topic_with_messages, topic_consumer): + async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: + async with ydb.aio.QuerySessionPool(driver) as pool: + + async def callee(tx: ydb.aio.QueryTxContext): + batch = await wait_for(reader.receive_batch_with_tx(tx, max_messages=1), DEFAULT_TIMEOUT) + assert len(batch.messages) == 1 + assert batch.messages[0].data.decode() == "123" + + await tx.rollback() + + await pool.retry_tx_async(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + assert len(reader._reconnector._tx_to_batches_map) == 0 + + msg = await wait_for(reader.receive_message(), DEFAULT_TIMEOUT) + assert msg.data.decode() == "123" + + async def test_tx_failed_if_update_offsets_call_failed( + self, driver: ydb.aio.Driver, topic_with_messages, topic_consumer + ): + async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: + async with ydb.aio.QuerySessionPool(driver) as pool: + with mock.patch.object( + reader._reconnector, + "_do_commit_batches_with_tx_call", + side_effect=ydb.Error("Update offsets in tx failed"), + ): + + async def callee(tx: ydb.aio.QueryTxContext): + batch = await wait_for(reader.receive_batch_with_tx(tx, max_messages=1), DEFAULT_TIMEOUT) + assert len(batch.messages) == 1 + assert batch.messages[0].data.decode() == "123" + + with pytest.raises(ydb.Error, match="Transaction was failed"): + await pool.retry_tx_async(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + assert len(reader._reconnector._tx_to_batches_map) == 0 + + msg = await wait_for(reader.receive_message(), DEFAULT_TIMEOUT) + assert msg.data.decode() == "123" + + async def test_error_in_lambda(self, driver: ydb.aio.Driver, topic_with_messages, topic_consumer): + async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: + async with ydb.aio.QuerySessionPool(driver) as pool: + + async def callee(tx: ydb.aio.QueryTxContext): + batch = await wait_for(reader.receive_batch_with_tx(tx, max_messages=1), DEFAULT_TIMEOUT) + assert len(batch.messages) == 1 + assert batch.messages[0].data.decode() == "123" + + raise RuntimeError("Something went wrong") + + with pytest.raises(RuntimeError): + await pool.retry_tx_async(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + assert len(reader._reconnector._tx_to_batches_map) == 0 + + msg = await wait_for(reader.receive_message(), DEFAULT_TIMEOUT) + assert msg.data.decode() == "123" + + async def test_error_during_commit(self, driver: ydb.aio.Driver, topic_with_messages, topic_consumer): + async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: + async with ydb.aio.QuerySessionPool(driver) as pool: + + async def callee(tx: ydb.aio.QueryTxContext): + with mock.patch.object( + tx, + "_commit_call", + side_effect=ydb.Unavailable("YDB Unavailable"), + ): + batch = await wait_for(reader.receive_batch_with_tx(tx, max_messages=1), DEFAULT_TIMEOUT) + assert len(batch.messages) == 1 + assert batch.messages[0].data.decode() == "123" + + await tx.commit() + + with pytest.raises(ydb.Unavailable): + await pool.retry_tx_async(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + assert len(reader._reconnector._tx_to_batches_map) == 0 + + msg = await wait_for(reader.receive_message(), DEFAULT_TIMEOUT) + assert msg.data.decode() == "123" + + async def test_error_during_rollback(self, driver: ydb.aio.Driver, topic_with_messages, topic_consumer): + async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: + async with ydb.aio.QuerySessionPool(driver) as pool: + + async def callee(tx: ydb.aio.QueryTxContext): + with mock.patch.object( + tx, + "_rollback_call", + side_effect=ydb.Unavailable("YDB Unavailable"), + ): + batch = await wait_for(reader.receive_batch_with_tx(tx, max_messages=1), DEFAULT_TIMEOUT) + assert len(batch.messages) == 1 + assert batch.messages[0].data.decode() == "123" + + await tx.rollback() + + with pytest.raises(ydb.Unavailable): + await pool.retry_tx_async(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + assert len(reader._reconnector._tx_to_batches_map) == 0 + + msg = await wait_for(reader.receive_message(), DEFAULT_TIMEOUT) + assert msg.data.decode() == "123" + + +class TestTopicTransactionalReaderSync: + def test_commit(self, driver_sync: ydb.Driver, topic_with_messages, topic_consumer): + with ydb.QuerySessionPool(driver_sync) as pool: + with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: + + def callee(tx: ydb.QueryTxContext): + batch = reader.receive_batch_with_tx(tx, max_messages=1, timeout=DEFAULT_TIMEOUT) + assert len(batch.messages) == 1 + assert batch.messages[0].data.decode() == "123" + + batch = reader.receive_batch_with_tx(tx, max_messages=1, timeout=DEFAULT_TIMEOUT) + assert len(batch.messages) == 1 + assert batch.messages[0].data.decode() == "456" + + pool.retry_tx_sync(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + assert len(reader._async_reader._reconnector._tx_to_batches_map) == 0 + + with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: + msg = reader.receive_message(timeout=DEFAULT_TIMEOUT) + assert msg.data.decode() == "789" + + def test_rollback(self, driver_sync: ydb.Driver, topic_with_messages, topic_consumer): + with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: + with ydb.QuerySessionPool(driver_sync) as pool: + + def callee(tx: ydb.QueryTxContext): + batch = reader.receive_batch_with_tx(tx, max_messages=1, timeout=DEFAULT_TIMEOUT) + assert len(batch.messages) == 1 + assert batch.messages[0].data.decode() == "123" + + tx.rollback() + + pool.retry_tx_sync(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + assert len(reader._async_reader._reconnector._tx_to_batches_map) == 0 + + msg = reader.receive_message(timeout=DEFAULT_TIMEOUT) + assert msg.data.decode() == "123" + + def test_tx_failed_if_update_offsets_call_failed( + self, driver_sync: ydb.Driver, topic_with_messages, topic_consumer + ): + with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: + with ydb.QuerySessionPool(driver_sync) as pool: + with mock.patch.object( + reader._async_reader._reconnector, + "_do_commit_batches_with_tx_call", + side_effect=ydb.Error("Update offsets in tx failed"), + ): + + def callee(tx: ydb.QueryTxContext): + batch = reader.receive_batch_with_tx(tx, max_messages=1, timeout=DEFAULT_TIMEOUT) + assert len(batch.messages) == 1 + assert batch.messages[0].data.decode() == "123" + + with pytest.raises(ydb.Error, match="Transaction was failed"): + pool.retry_tx_sync(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + assert len(reader._async_reader._reconnector._tx_to_batches_map) == 0 + + msg = reader.receive_message(timeout=DEFAULT_TIMEOUT) + assert msg.data.decode() == "123" + + def test_error_in_lambda(self, driver_sync: ydb.Driver, topic_with_messages, topic_consumer): + with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: + with ydb.QuerySessionPool(driver_sync) as pool: + + def callee(tx: ydb.QueryTxContext): + batch = reader.receive_batch_with_tx(tx, max_messages=1, timeout=DEFAULT_TIMEOUT) + assert len(batch.messages) == 1 + assert batch.messages[0].data.decode() == "123" + + raise RuntimeError("Something went wrong") + + with pytest.raises(RuntimeError): + pool.retry_tx_sync(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + assert len(reader._async_reader._reconnector._tx_to_batches_map) == 0 + + msg = reader.receive_message(timeout=DEFAULT_TIMEOUT) + assert msg.data.decode() == "123" + + def test_error_during_commit(self, driver_sync: ydb.Driver, topic_with_messages, topic_consumer): + with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: + with ydb.QuerySessionPool(driver_sync) as pool: + + def callee(tx: ydb.QueryTxContext): + with mock.patch.object( + tx, + "_commit_call", + side_effect=ydb.Unavailable("YDB Unavailable"), + ): + batch = reader.receive_batch_with_tx(tx, max_messages=1, timeout=DEFAULT_TIMEOUT) + assert len(batch.messages) == 1 + assert batch.messages[0].data.decode() == "123" + + tx.commit() + + with pytest.raises(ydb.Unavailable): + pool.retry_tx_sync(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + assert len(reader._async_reader._reconnector._tx_to_batches_map) == 0 + + msg = reader.receive_message(timeout=DEFAULT_TIMEOUT) + assert msg.data.decode() == "123" + + def test_error_during_rollback(self, driver_sync: ydb.Driver, topic_with_messages, topic_consumer): + with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: + with ydb.QuerySessionPool(driver_sync) as pool: + + def callee(tx: ydb.QueryTxContext): + with mock.patch.object( + tx, + "_rollback_call", + side_effect=ydb.Unavailable("YDB Unavailable"), + ): + batch = reader.receive_batch_with_tx(tx, max_messages=1, timeout=DEFAULT_TIMEOUT) + assert len(batch.messages) == 1 + assert batch.messages[0].data.decode() == "123" + + tx.rollback() + + with pytest.raises(ydb.Unavailable): + pool.retry_tx_sync(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + assert len(reader._async_reader._reconnector._tx_to_batches_map) == 0 + + msg = reader.receive_message(timeout=DEFAULT_TIMEOUT) + assert msg.data.decode() == "123" + + +class TestTopicTransactionalWriter: + async def test_commit(self, driver: ydb.aio.Driver, topic_path, topic_reader: ydb.TopicReaderAsyncIO): + async with ydb.aio.QuerySessionPool(driver) as pool: + + async def callee(tx: ydb.aio.QueryTxContext): + tx_writer = driver.topic_client.tx_writer(tx, topic_path) + await tx_writer.write(ydb.TopicWriterMessage(data="123".encode())) + + await pool.retry_tx_async(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + msg = await wait_for(topic_reader.receive_message(), 0.1) + assert msg.data.decode() == "123" + + async def test_rollback(self, driver: ydb.aio.Driver, topic_path, topic_reader: ydb.TopicReaderAsyncIO): + async with ydb.aio.QuerySessionPool(driver) as pool: + + async def callee(tx: ydb.aio.QueryTxContext): + tx_writer = driver.topic_client.tx_writer(tx, topic_path) + await tx_writer.write(ydb.TopicWriterMessage(data="123".encode())) + + await tx.rollback() + + await pool.retry_tx_async(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + with pytest.raises(asyncio.TimeoutError): + await wait_for(topic_reader.receive_message(), 0.1) + + async def test_no_msg_written_in_error_case( + self, driver: ydb.aio.Driver, topic_path, topic_reader: ydb.TopicReaderAsyncIO + ): + async with ydb.aio.QuerySessionPool(driver) as pool: + + async def callee(tx: ydb.aio.QueryTxContext): + tx_writer = driver.topic_client.tx_writer(tx, topic_path) + await tx_writer.write(ydb.TopicWriterMessage(data="123".encode())) + + raise BaseException("error") + + with pytest.raises(BaseException): + await pool.retry_tx_async(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + with pytest.raises(asyncio.TimeoutError): + await wait_for(topic_reader.receive_message(), 0.1) + + async def test_no_msg_written_in_tx_commit_error( + self, driver: ydb.aio.Driver, topic_path, topic_reader: ydb.TopicReaderAsyncIO + ): + async with ydb.aio.QuerySessionPool(driver) as pool: + + async def callee(tx: ydb.aio.QueryTxContext): + with mock.patch.object( + tx, + "_commit_call", + side_effect=ydb.Unavailable("YDB Unavailable"), + ): + tx_writer = driver.topic_client.tx_writer(tx, topic_path) + await tx_writer.write(ydb.TopicWriterMessage(data="123".encode())) + await tx.commit() + + with pytest.raises(ydb.Unavailable): + await pool.retry_tx_async(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + with pytest.raises(asyncio.TimeoutError): + await wait_for(topic_reader.receive_message(), 0.1) + + async def test_msg_written_exactly_once_with_retries( + self, driver: ydb.aio.Driver, topic_path, topic_reader: ydb.TopicReaderAsyncIO + ): + error_raised = False + async with ydb.aio.QuerySessionPool(driver) as pool: + + async def callee(tx: ydb.aio.QueryTxContext): + nonlocal error_raised + tx_writer = driver.topic_client.tx_writer(tx, topic_path) + await tx_writer.write(ydb.TopicWriterMessage(data="123".encode())) + + if not error_raised: + error_raised = True + raise ydb.issues.Unavailable("some retriable error") + + await pool.retry_tx_async(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + msg = await wait_for(topic_reader.receive_message(), 0.1) + assert msg.data.decode() == "123" + + with pytest.raises(asyncio.TimeoutError): + await wait_for(topic_reader.receive_message(), 0.1) + + async def test_writes_do_not_conflict_with_executes(self, driver: ydb.aio.Driver, topic_path): + async with ydb.aio.QuerySessionPool(driver) as pool: + + async def callee(tx: ydb.aio.QueryTxContext): + tx_writer = driver.topic_client.tx_writer(tx, topic_path) + for _ in range(3): + async with await tx.execute("select 1"): + await tx_writer.write(ydb.TopicWriterMessage(data="123".encode())) + + await pool.retry_tx_async(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + +class TestTopicTransactionalWriterSync: + def test_commit(self, driver_sync: ydb.Driver, topic_path, topic_reader_sync: ydb.TopicReader): + with ydb.QuerySessionPool(driver_sync) as pool: + + def callee(tx: ydb.QueryTxContext): + tx_writer = driver_sync.topic_client.tx_writer(tx, topic_path) + tx_writer.write(ydb.TopicWriterMessage(data="123".encode())) + + pool.retry_tx_sync(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + msg = topic_reader_sync.receive_message(timeout=DEFAULT_TIMEOUT) + assert msg.data.decode() == "123" + + def test_rollback(self, driver_sync: ydb.Driver, topic_path, topic_reader_sync: ydb.TopicReader): + with ydb.QuerySessionPool(driver_sync) as pool: + + def callee(tx: ydb.QueryTxContext): + tx_writer = driver_sync.topic_client.tx_writer(tx, topic_path) + tx_writer.write(ydb.TopicWriterMessage(data="123".encode())) + + tx.rollback() + + pool.retry_tx_sync(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + with pytest.raises(TimeoutError): + topic_reader_sync.receive_message(timeout=DEFAULT_TIMEOUT) + + def test_no_msg_written_in_error_case( + self, driver_sync: ydb.Driver, topic_path, topic_reader_sync: ydb.TopicReader + ): + with ydb.QuerySessionPool(driver_sync) as pool: + + def callee(tx: ydb.QueryTxContext): + tx_writer = driver_sync.topic_client.tx_writer(tx, topic_path) + tx_writer.write(ydb.TopicWriterMessage(data="123".encode())) + + raise BaseException("error") + + with pytest.raises(BaseException): + pool.retry_tx_sync(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + with pytest.raises(TimeoutError): + topic_reader_sync.receive_message(timeout=DEFAULT_TIMEOUT) + + def test_no_msg_written_in_tx_commit_error( + self, driver_sync: ydb.Driver, topic_path, topic_reader_sync: ydb.TopicReader + ): + with ydb.QuerySessionPool(driver_sync) as pool: + + def callee(tx: ydb.QueryTxContext): + with mock.patch.object( + tx, + "_commit_call", + side_effect=ydb.Unavailable("YDB Unavailable"), + ): + tx_writer = driver_sync.topic_client.tx_writer(tx, topic_path) + tx_writer.write(ydb.TopicWriterMessage(data="123".encode())) + tx.commit() + + with pytest.raises(ydb.Unavailable): + pool.retry_tx_sync(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + with pytest.raises(TimeoutError): + topic_reader_sync.receive_message(timeout=DEFAULT_TIMEOUT) + + def test_msg_written_exactly_once_with_retries( + self, driver_sync: ydb.Driver, topic_path, topic_reader_sync: ydb.TopicReader + ): + error_raised = False + with ydb.QuerySessionPool(driver_sync) as pool: + + def callee(tx: ydb.QueryTxContext): + nonlocal error_raised + tx_writer = driver_sync.topic_client.tx_writer(tx, topic_path) + tx_writer.write(ydb.TopicWriterMessage(data="123".encode())) + + if not error_raised: + error_raised = True + raise ydb.issues.Unavailable("some retriable error") + + pool.retry_tx_sync(callee, retry_settings=DEFAULT_RETRY_SETTINGS) + + msg = topic_reader_sync.receive_message(timeout=DEFAULT_TIMEOUT) + assert msg.data.decode() == "123" + + with pytest.raises(TimeoutError): + topic_reader_sync.receive_message(timeout=DEFAULT_TIMEOUT) + + def test_writes_do_not_conflict_with_executes(self, driver_sync: ydb.Driver, topic_path): + with ydb.QuerySessionPool(driver_sync) as pool: + + def callee(tx: ydb.QueryTxContext): + tx_writer = driver_sync.topic_client.tx_writer(tx, topic_path) + for _ in range(3): + with tx.execute("select 1"): + tx_writer.write(ydb.TopicWriterMessage(data="123".encode())) + + pool.retry_tx_sync(callee, retry_settings=DEFAULT_RETRY_SETTINGS) diff --git a/tox.ini b/tox.ini index df029d2a..f91e7d8a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py-proto5,py-proto4,py-proto3,py-tls-proto5,py-tls-proto4,py-tls-proto3,style,pylint,black,protoc,py-cov-proto4 +envlist = py,py-proto4,py-proto3,py-tls,py-tls-proto4,py-tls-proto3,style,pylint,black,protoc,py-cov-proto4 minversion = 4.2.6 skipsdist = True ignore_basepython_conflict = true @@ -30,7 +30,7 @@ deps = -r{toxinidir}/test-requirements.txt protobuf<4.0.0 -[testenv:py-proto5] +[testenv:py] commands = pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs} deps = @@ -60,7 +60,7 @@ deps = -r{toxinidir}/test-requirements.txt protobuf<4.0.0 -[testenv:py-tls-proto5] +[testenv:py-tls] commands = pytest -v -m tls --docker-compose-remove-volumes --docker-compose=docker-compose-tls.yml {posargs} deps = diff --git a/ydb/_apis.py b/ydb/_apis.py index 2a9a14e8..e54f25d2 100644 --- a/ydb/_apis.py +++ b/ydb/_apis.py @@ -116,6 +116,7 @@ class TopicService(object): DropTopic = "DropTopic" StreamRead = "StreamRead" StreamWrite = "StreamWrite" + UpdateOffsetsInTransaction = "UpdateOffsetsInTransaction" class QueryService(object): diff --git a/ydb/_errors.py b/ydb/_errors.py index 17002d25..1e2308ef 100644 --- a/ydb/_errors.py +++ b/ydb/_errors.py @@ -5,6 +5,7 @@ _errors_retriable_fast_backoff_types = [ issues.Unavailable, + issues.ClientInternalError, ] _errors_retriable_slow_backoff_types = [ issues.Aborted, diff --git a/ydb/_grpc/grpcwrapper/common_utils.py b/ydb/_grpc/grpcwrapper/common_utils.py index 7fb5b684..6a7275b4 100644 --- a/ydb/_grpc/grpcwrapper/common_utils.py +++ b/ydb/_grpc/grpcwrapper/common_utils.py @@ -161,9 +161,6 @@ def __init__(self, convert_server_grpc_to_wrapper): self._stream_call = None self._wait_executor = None - def __del__(self): - self._clean_executor(wait=False) - async def start(self, driver: SupportedDriverType, stub, method): if asyncio.iscoroutinefunction(driver.__call__): await self._start_asyncio_driver(driver, stub, method) diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index c41eab27..0ab78e03 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -142,6 +142,18 @@ def from_proto(msg: ydb_topic_pb2.UpdateTokenResponse) -> typing.Any: ######################################################################################################################## +@dataclass +class TransactionIdentity(IToProto): + tx_id: str + session_id: str + + def to_proto(self) -> ydb_topic_pb2.TransactionIdentity: + return ydb_topic_pb2.TransactionIdentity( + id=self.tx_id, + session=self.session_id, + ) + + class StreamWriteMessage: @dataclass() class InitRequest(IToProto): @@ -200,6 +212,7 @@ def from_proto( class WriteRequest(IToProto): messages: typing.List["StreamWriteMessage.WriteRequest.MessageData"] codec: int + tx_identity: Optional[TransactionIdentity] @dataclass class MessageData(IToProto): @@ -238,6 +251,9 @@ def to_proto(self) -> ydb_topic_pb2.StreamWriteMessage.WriteRequest: proto = ydb_topic_pb2.StreamWriteMessage.WriteRequest() proto.codec = self.codec + if self.tx_identity is not None: + proto.tx.CopyFrom(self.tx_identity.to_proto()) + for message in self.messages: proto_mess = proto.messages.add() proto_mess.CopyFrom(message.to_proto()) @@ -298,6 +314,8 @@ def from_proto(cls, proto_ack: ydb_topic_pb2.StreamWriteMessage.WriteResponse.Wr ) except ValueError: message_write_status = reason + elif proto_ack.HasField("written_in_tx"): + message_write_status = StreamWriteMessage.WriteResponse.WriteAck.StatusWrittenInTx() else: raise NotImplementedError("unexpected ack status") @@ -310,6 +328,9 @@ def from_proto(cls, proto_ack: ydb_topic_pb2.StreamWriteMessage.WriteResponse.Wr class StatusWritten: offset: int + class StatusWrittenInTx: + pass + @dataclass class StatusSkipped: reason: "StreamWriteMessage.WriteResponse.WriteAck.StatusSkipped.Reason" @@ -1197,6 +1218,52 @@ def to_public(self) -> ydb_topic_public_types.PublicMeteringMode: return ydb_topic_public_types.PublicMeteringMode.UNSPECIFIED +@dataclass +class UpdateOffsetsInTransactionRequest(IToProto): + tx: TransactionIdentity + topics: List[UpdateOffsetsInTransactionRequest.TopicOffsets] + consumer: str + + def to_proto(self): + return ydb_topic_pb2.UpdateOffsetsInTransactionRequest( + tx=self.tx.to_proto(), + consumer=self.consumer, + topics=list( + map( + UpdateOffsetsInTransactionRequest.TopicOffsets.to_proto, + self.topics, + ) + ), + ) + + @dataclass + class TopicOffsets(IToProto): + path: str + partitions: List[UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets] + + def to_proto(self): + return ydb_topic_pb2.UpdateOffsetsInTransactionRequest.TopicOffsets( + path=self.path, + partitions=list( + map( + UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets.to_proto, + self.partitions, + ) + ), + ) + + @dataclass + class PartitionOffsets(IToProto): + partition_id: int + partition_offsets: List[OffsetsRange] + + def to_proto(self) -> ydb_topic_pb2.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets: + return ydb_topic_pb2.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets( + partition_id=self.partition_id, + partition_offsets=list(map(OffsetsRange.to_proto, self.partition_offsets)), + ) + + @dataclass class CreateTopicRequest(IToProto, IFromPublic): path: str diff --git a/ydb/_topic_reader/datatypes.py b/ydb/_topic_reader/datatypes.py index b48501af..74f06a08 100644 --- a/ydb/_topic_reader/datatypes.py +++ b/ydb/_topic_reader/datatypes.py @@ -108,6 +108,9 @@ def ack_notify(self, offset: int): waiter = self._ack_waiters.popleft() waiter._finish_ok() + def _update_last_commited_offset_if_needed(self, offset: int): + self.committed_offset = max(self.committed_offset, offset) + def close(self): if self.closed: return @@ -211,3 +214,9 @@ def _pop_batch(self, message_count: int) -> PublicBatch: self._bytes_size = self._bytes_size - new_batch._bytes_size return new_batch + + def _update_partition_offsets(self, tx, exc=None): + if exc is not None: + return + offsets = self._commit_get_offsets_range() + self._partition_session._update_last_commited_offset_if_needed(offsets.end) diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 7061b4e4..c9704d55 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -5,7 +5,7 @@ import gzip import typing from asyncio import Task -from collections import OrderedDict +from collections import defaultdict, OrderedDict from typing import Optional, Set, Dict, Union, Callable import ydb @@ -19,17 +19,24 @@ from .._grpc.grpcwrapper.common_utils import ( IGrpcWrapperAsyncIO, SupportedDriverType, + to_thread, GrpcWrapperAsyncIO, ) from .._grpc.grpcwrapper.ydb_topic import ( StreamReadMessage, UpdateTokenRequest, UpdateTokenResponse, + UpdateOffsetsInTransactionRequest, Codec, ) from .._errors import check_retriable_error import logging +from ..query.base import TxEvent + +if typing.TYPE_CHECKING: + from ..query.transaction import BaseQueryTxContext + logger = logging.getLogger(__name__) @@ -77,7 +84,7 @@ def __init__( ): self._loop = asyncio.get_running_loop() self._closed = False - self._reconnector = ReaderReconnector(driver, settings) + self._reconnector = ReaderReconnector(driver, settings, self._loop) self._parent = _parent async def __aenter__(self): @@ -88,8 +95,7 @@ async def __aexit__(self, exc_type, exc_val, exc_tb): def __del__(self): if not self._closed: - task = self._loop.create_task(self.close(flush=False)) - topic_common.wrap_set_name_for_asyncio_task(task, task_name="close reader") + logger.warning("Topic reader was not closed properly. Consider using method close().") async def wait_message(self): """ @@ -112,6 +118,23 @@ async def receive_batch( max_messages=max_messages, ) + async def receive_batch_with_tx( + self, + tx: "BaseQueryTxContext", + max_messages: typing.Union[int, None] = None, + ) -> typing.Union[datatypes.PublicBatch, None]: + """ + Get one messages batch with tx from reader. + All messages in a batch from same partition. + + use asyncio.wait_for for wait with timeout. + """ + await self._reconnector.wait_message() + return self._reconnector.receive_batch_with_tx_nowait( + tx=tx, + max_messages=max_messages, + ) + async def receive_message(self) -> typing.Optional[datatypes.PublicMessage]: """ Block until receive new message @@ -165,11 +188,18 @@ class ReaderReconnector: _state_changed: asyncio.Event _stream_reader: Optional["ReaderStream"] _first_error: asyncio.Future[YdbError] + _tx_to_batches_map: Dict[str, typing.List[datatypes.PublicBatch]] - def __init__(self, driver: Driver, settings: topic_reader.PublicReaderSettings): + def __init__( + self, + driver: Driver, + settings: topic_reader.PublicReaderSettings, + loop: Optional[asyncio.AbstractEventLoop] = None, + ): self._id = self._static_reader_reconnector_counter.inc_and_get() self._settings = settings self._driver = driver + self._loop = loop if loop is not None else asyncio.get_running_loop() self._background_tasks = set() self._state_changed = asyncio.Event() @@ -177,6 +207,8 @@ def __init__(self, driver: Driver, settings: topic_reader.PublicReaderSettings): self._background_tasks.add(asyncio.create_task(self._connection_loop())) self._first_error = asyncio.get_running_loop().create_future() + self._tx_to_batches_map = dict() + async def _connection_loop(self): attempt = 0 while True: @@ -190,6 +222,7 @@ async def _connection_loop(self): if not retry_info.is_retriable: self._set_first_error(err) return + await asyncio.sleep(retry_info.sleep_timeout_seconds) attempt += 1 @@ -222,9 +255,87 @@ def receive_batch_nowait(self, max_messages: Optional[int] = None): max_messages=max_messages, ) + def receive_batch_with_tx_nowait(self, tx: "BaseQueryTxContext", max_messages: Optional[int] = None): + batch = self._stream_reader.receive_batch_nowait( + max_messages=max_messages, + ) + + self._init_tx(tx) + + self._tx_to_batches_map[tx.tx_id].append(batch) + + tx._add_callback(TxEvent.AFTER_COMMIT, batch._update_partition_offsets, self._loop) + + return batch + def receive_message_nowait(self): return self._stream_reader.receive_message_nowait() + def _init_tx(self, tx: "BaseQueryTxContext"): + if tx.tx_id not in self._tx_to_batches_map: # Init tx callbacks + self._tx_to_batches_map[tx.tx_id] = [] + tx._add_callback(TxEvent.BEFORE_COMMIT, self._commit_batches_with_tx, self._loop) + tx._add_callback(TxEvent.AFTER_COMMIT, self._handle_after_tx_commit, self._loop) + tx._add_callback(TxEvent.AFTER_ROLLBACK, self._handle_after_tx_rollback, self._loop) + + async def _commit_batches_with_tx(self, tx: "BaseQueryTxContext"): + grouped_batches = defaultdict(lambda: defaultdict(list)) + for batch in self._tx_to_batches_map[tx.tx_id]: + grouped_batches[batch._partition_session.topic_path][batch._partition_session.partition_id].append(batch) + + request = UpdateOffsetsInTransactionRequest(tx=tx._tx_identity(), consumer=self._settings.consumer, topics=[]) + + for topic_path in grouped_batches: + topic_offsets = UpdateOffsetsInTransactionRequest.TopicOffsets(path=topic_path, partitions=[]) + for partition_id in grouped_batches[topic_path]: + partition_offsets = UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets( + partition_id=partition_id, + partition_offsets=[ + batch._commit_get_offsets_range() for batch in grouped_batches[topic_path][partition_id] + ], + ) + topic_offsets.partitions.append(partition_offsets) + request.topics.append(topic_offsets) + + try: + return await self._do_commit_batches_with_tx_call(request) + except BaseException: + exc = issues.ClientInternalError("Failed to update offsets in tx.") + tx._set_external_error(exc) + self._stream_reader._set_first_error(exc) + finally: + del self._tx_to_batches_map[tx.tx_id] + + async def _do_commit_batches_with_tx_call(self, request: UpdateOffsetsInTransactionRequest): + args = [ + request.to_proto(), + _apis.TopicService.Stub, + _apis.TopicService.UpdateOffsetsInTransaction, + topic_common.wrap_operation, + ] + + if asyncio.iscoroutinefunction(self._driver.__call__): + res = await self._driver(*args) + else: + res = await to_thread(self._driver, *args, executor=None) + + return res + + async def _handle_after_tx_rollback(self, tx: "BaseQueryTxContext", exc: Optional[BaseException]) -> None: + if tx.tx_id in self._tx_to_batches_map: + del self._tx_to_batches_map[tx.tx_id] + exc = issues.ClientInternalError("Reconnect due to transaction rollback") + self._stream_reader._set_first_error(exc) + + async def _handle_after_tx_commit(self, tx: "BaseQueryTxContext", exc: Optional[BaseException]) -> None: + if tx.tx_id in self._tx_to_batches_map: + del self._tx_to_batches_map[tx.tx_id] + + if exc is not None: + self._stream_reader._set_first_error( + issues.ClientInternalError("Reconnect due to transaction commit failed") + ) + def commit(self, batch: datatypes.ICommittable) -> datatypes.PartitionSession.CommitAckWaiter: return self._stream_reader.commit(batch) diff --git a/ydb/_topic_reader/topic_reader_sync.py b/ydb/_topic_reader/topic_reader_sync.py index eda1d374..3e6806d0 100644 --- a/ydb/_topic_reader/topic_reader_sync.py +++ b/ydb/_topic_reader/topic_reader_sync.py @@ -1,5 +1,6 @@ import asyncio import concurrent.futures +import logging import typing from typing import List, Union, Optional @@ -20,6 +21,11 @@ TopicReaderClosedError, ) +if typing.TYPE_CHECKING: + from ..query.transaction import BaseQueryTxContext + +logger = logging.getLogger(__name__) + class TopicReaderSync: _caller: CallFromSyncToAsync @@ -52,7 +58,8 @@ async def create_reader(): self._parent = _parent def __del__(self): - self.close(flush=False) + if not self._closed: + logger.warning("Topic reader was not closed properly. Consider using method close().") def __enter__(self): return self @@ -109,6 +116,31 @@ def receive_batch( timeout, ) + def receive_batch_with_tx( + self, + tx: "BaseQueryTxContext", + *, + max_messages: typing.Union[int, None] = None, + max_bytes: typing.Union[int, None] = None, + timeout: Union[float, None] = None, + ) -> Union[PublicBatch, None]: + """ + Get one messages batch with tx from reader + It has no async_ version for prevent lost messages, use async_wait_message as signal for new batches available. + + if no new message in timeout seconds (default - infinite): raise TimeoutError() + if timeout <= 0 - it will fast wait only one event loop cycle - without wait any i/o operations or pauses, get messages from internal buffer only. + """ + self._check_closed() + + return self._caller.safe_call_with_result( + self._async_reader.receive_batch_with_tx( + tx=tx, + max_messages=max_messages, + ), + timeout, + ) + def commit(self, mess: typing.Union[datatypes.PublicMessage, datatypes.PublicBatch]): """ Put commit message to internal buffer. diff --git a/ydb/_topic_writer/topic_writer.py b/ydb/_topic_writer/topic_writer.py index aa5fe974..a3e407ed 100644 --- a/ydb/_topic_writer/topic_writer.py +++ b/ydb/_topic_writer/topic_writer.py @@ -11,6 +11,7 @@ import ydb.aio from .._grpc.grpcwrapper.ydb_topic import StreamWriteMessage +from .._grpc.grpcwrapper.ydb_topic import TransactionIdentity from .._grpc.grpcwrapper.common_utils import IToProto from .._grpc.grpcwrapper.ydb_topic_public_types import PublicCodec from .. import connection @@ -53,8 +54,12 @@ class Written: class Skipped: pass + @dataclass(eq=True) + class WrittenInTx: + pass + -PublicWriteResultTypes = Union[PublicWriteResult.Written, PublicWriteResult.Skipped] +PublicWriteResultTypes = Union[PublicWriteResult.Written, PublicWriteResult.Skipped, PublicWriteResult.WrittenInTx] class WriterSettings(PublicWriterSettings): @@ -205,6 +210,7 @@ def default_serializer_message_content(data: Any) -> bytes: def messages_to_proto_requests( messages: List[InternalMessage], + tx_identity: Optional[TransactionIdentity], ) -> List[StreamWriteMessage.FromClient]: gropus = _slit_messages_for_send(messages) @@ -215,6 +221,7 @@ def messages_to_proto_requests( StreamWriteMessage.WriteRequest( messages=list(map(InternalMessage.to_message_data, group)), codec=group[0].codec, + tx_identity=tx_identity, ) ) res.append(req) @@ -239,6 +246,7 @@ def messages_to_proto_requests( ), ], codec=20000, + tx_identity=None, ) ) .to_proto() diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index 32d8fefe..1ea6c250 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -1,7 +1,6 @@ import asyncio import concurrent.futures import datetime -import functools import gzip import typing from collections import deque @@ -35,6 +34,7 @@ UpdateTokenRequest, UpdateTokenResponse, StreamWriteMessage, + TransactionIdentity, WriterMessagesFromServerToClient, ) from .._grpc.grpcwrapper.common_utils import ( @@ -43,6 +43,11 @@ GrpcWrapperAsyncIO, ) +from ..query.base import TxEvent + +if typing.TYPE_CHECKING: + from ..query.transaction import BaseQueryTxContext + logger = logging.getLogger(__name__) @@ -74,10 +79,8 @@ async def __aexit__(self, exc_type, exc_val, exc_tb): raise def __del__(self): - if self._closed or self._loop.is_closed(): - return - - self._loop.call_soon(functools.partial(self.close, flush=False)) + if not self._closed: + logger.warning("Topic writer was not closed properly. Consider using method close().") async def close(self, *, flush: bool = True): if self._closed: @@ -164,6 +167,57 @@ async def wait_init(self) -> PublicWriterInitInfo: return await self._reconnector.wait_init() +class TxWriterAsyncIO(WriterAsyncIO): + _tx: "BaseQueryTxContext" + + def __init__( + self, + tx: "BaseQueryTxContext", + driver: SupportedDriverType, + settings: PublicWriterSettings, + _client=None, + _is_implicit=False, + ): + self._tx = tx + self._loop = asyncio.get_running_loop() + self._closed = False + self._reconnector = WriterAsyncIOReconnector(driver=driver, settings=WriterSettings(settings), tx=self._tx) + self._parent = _client + self._is_implicit = _is_implicit + + # For some reason, creating partition could conflict with other session operations. + # Could be removed later. + self._first_write = True + + tx._add_callback(TxEvent.BEFORE_COMMIT, self._on_before_commit, self._loop) + tx._add_callback(TxEvent.BEFORE_ROLLBACK, self._on_before_rollback, self._loop) + + async def write( + self, + messages: Union[Message, List[Message]], + ): + """ + send one or number of messages to server. + it put message to internal buffer + + For wait with timeout use asyncio.wait_for. + """ + if self._first_write: + self._first_write = False + return await super().write_with_ack(messages) + return await super().write(messages) + + async def _on_before_commit(self, tx: "BaseQueryTxContext"): + if self._is_implicit: + return + await self.close() + + async def _on_before_rollback(self, tx: "BaseQueryTxContext"): + if self._is_implicit: + return + await self.close(flush=False) + + class WriterAsyncIOReconnector: _closed: bool _loop: asyncio.AbstractEventLoop @@ -178,6 +232,7 @@ class WriterAsyncIOReconnector: _codec_selector_batch_num: int _codec_selector_last_codec: Optional[PublicCodec] _codec_selector_check_batches_interval: int + _tx: Optional["BaseQueryTxContext"] if typing.TYPE_CHECKING: _messages_for_encode: asyncio.Queue[List[InternalMessage]] @@ -195,7 +250,9 @@ class WriterAsyncIOReconnector: _stop_reason: asyncio.Future _init_info: Optional[PublicWriterInitInfo] - def __init__(self, driver: SupportedDriverType, settings: WriterSettings): + def __init__( + self, driver: SupportedDriverType, settings: WriterSettings, tx: Optional["BaseQueryTxContext"] = None + ): self._closed = False self._loop = asyncio.get_running_loop() self._driver = driver @@ -205,6 +262,7 @@ def __init__(self, driver: SupportedDriverType, settings: WriterSettings): self._init_info = None self._stream_connected = asyncio.Event() self._settings = settings + self._tx = tx self._codec_functions = { PublicCodec.RAW: lambda data: data, @@ -354,10 +412,12 @@ async def _connection_loop(self): # noinspection PyBroadException stream_writer = None try: + tx_identity = None if self._tx is None else self._tx._tx_identity() stream_writer = await WriterAsyncIOStream.create( self._driver, self._init_message, self._settings.update_token_interval, + tx_identity=tx_identity, ) try: if self._init_info is None: @@ -387,7 +447,7 @@ async def _connection_loop(self): done.pop().result() # need for raise exception - reason of stop task except issues.Error as err: err_info = check_retriable_error(err, retry_settings, attempt) - if not err_info.is_retriable: + if not err_info.is_retriable or self._tx is not None: # no retries in tx writer self._stop(err) return @@ -533,6 +593,8 @@ def _handle_receive_ack(self, ack): result = PublicWriteResult.Skipped() elif isinstance(status, write_ack_msg.StatusWritten): result = PublicWriteResult.Written(offset=status.offset) + elif isinstance(status, write_ack_msg.StatusWrittenInTx): + result = PublicWriteResult.WrittenInTx() else: raise TopicWriterError("internal error - receive unexpected ack message.") message_future.set_result(result) @@ -597,10 +659,13 @@ class WriterAsyncIOStream: _update_token_event: asyncio.Event _get_token_function: Optional[Callable[[], str]] + _tx_identity: Optional[TransactionIdentity] + def __init__( self, update_token_interval: Optional[Union[int, float]] = None, get_token_function: Optional[Callable[[], str]] = None, + tx_identity: Optional[TransactionIdentity] = None, ): self._closed = False @@ -609,6 +674,8 @@ def __init__( self._update_token_event = asyncio.Event() self._update_token_task = None + self._tx_identity = tx_identity + async def close(self): if self._closed: return @@ -625,6 +692,7 @@ async def create( driver: SupportedDriverType, init_request: StreamWriteMessage.InitRequest, update_token_interval: Optional[Union[int, float]] = None, + tx_identity: Optional[TransactionIdentity] = None, ) -> "WriterAsyncIOStream": stream = GrpcWrapperAsyncIO(StreamWriteMessage.FromServer.from_proto) @@ -634,6 +702,7 @@ async def create( writer = WriterAsyncIOStream( update_token_interval=update_token_interval, get_token_function=creds.get_auth_token if creds else lambda: "", + tx_identity=tx_identity, ) await writer._start(stream, init_request) return writer @@ -680,7 +749,7 @@ def write(self, messages: List[InternalMessage]): if self._closed: raise RuntimeError("Can not write on closed stream.") - for request in messages_to_proto_requests(messages): + for request in messages_to_proto_requests(messages, self._tx_identity): self._stream.write(request) async def _update_token_loop(self): diff --git a/ydb/_topic_writer/topic_writer_asyncio_test.py b/ydb/_topic_writer/topic_writer_asyncio_test.py index b288d0f0..cf88f797 100644 --- a/ydb/_topic_writer/topic_writer_asyncio_test.py +++ b/ydb/_topic_writer/topic_writer_asyncio_test.py @@ -18,6 +18,7 @@ from .._grpc.grpcwrapper.ydb_topic import ( Codec, StreamWriteMessage, + TransactionIdentity, UpdateTokenRequest, UpdateTokenResponse, ) @@ -43,6 +44,12 @@ from ..credentials import AnonymousCredentials +FAKE_TRANSACTION_IDENTITY = TransactionIdentity( + tx_id="transaction_id", + session_id="session_id", +) + + @pytest.fixture def default_driver() -> aio.Driver: driver = mock.Mock(spec=aio.Driver) @@ -148,6 +155,44 @@ async def test_write_a_message(self, writer_and_stream: WriterWithMockedStream): expected_message = StreamWriteMessage.FromClient( StreamWriteMessage.WriteRequest( codec=Codec.CODEC_RAW, + tx_identity=None, + messages=[ + StreamWriteMessage.WriteRequest.MessageData( + seq_no=1, + created_at=now, + data=data, + metadata_items={}, + uncompressed_size=len(data), + partitioning=None, + ) + ], + ) + ) + + sent_message = await writer_and_stream.stream.from_client.get() + assert expected_message == sent_message + + async def test_write_a_message_with_tx(self, writer_and_stream: WriterWithMockedStream): + writer_and_stream.writer._tx_identity = FAKE_TRANSACTION_IDENTITY + + data = "123".encode() + now = datetime.datetime.now(datetime.timezone.utc) + writer_and_stream.writer.write( + [ + InternalMessage( + PublicMessage( + seqno=1, + created_at=now, + data=data, + ) + ) + ] + ) + + expected_message = StreamWriteMessage.FromClient( + StreamWriteMessage.WriteRequest( + codec=Codec.CODEC_RAW, + tx_identity=FAKE_TRANSACTION_IDENTITY, messages=[ StreamWriteMessage.WriteRequest.MessageData( seq_no=1, @@ -264,7 +309,7 @@ def _create(self): res = DoubleQueueWriters() - async def async_create(driver, init_message, token_getter): + async def async_create(driver, init_message, token_getter, tx_identity): return res.get_first() monkeypatch.setattr(WriterAsyncIOStream, "create", async_create) diff --git a/ydb/_topic_writer/topic_writer_sync.py b/ydb/_topic_writer/topic_writer_sync.py index a5193caf..4796d7ac 100644 --- a/ydb/_topic_writer/topic_writer_sync.py +++ b/ydb/_topic_writer/topic_writer_sync.py @@ -1,6 +1,7 @@ from __future__ import annotations import asyncio +import logging import typing from concurrent.futures import Future from typing import Union, List, Optional @@ -14,13 +15,23 @@ TopicWriterClosedError, ) -from .topic_writer_asyncio import WriterAsyncIO +from ..query.base import TxEvent + +from .topic_writer_asyncio import ( + TxWriterAsyncIO, + WriterAsyncIO, +) from .._topic_common.common import ( _get_shared_event_loop, TimeoutType, CallFromSyncToAsync, ) +if typing.TYPE_CHECKING: + from ..query.transaction import BaseQueryTxContext + +logger = logging.getLogger(__name__) + class WriterSync: _caller: CallFromSyncToAsync @@ -63,7 +74,8 @@ def __exit__(self, exc_type, exc_val, exc_tb): raise def __del__(self): - self.close(flush=False) + if not self._closed: + logger.warning("Topic writer was not closed properly. Consider using method close().") def close(self, *, flush: bool = True, timeout: TimeoutType = None): if self._closed: @@ -122,3 +134,39 @@ def write_with_ack( self._check_closed() return self._caller.unsafe_call_with_result(self._async_writer.write_with_ack(messages), timeout=timeout) + + +class TxWriterSync(WriterSync): + def __init__( + self, + tx: "BaseQueryTxContext", + driver: SupportedDriverType, + settings: PublicWriterSettings, + *, + eventloop: Optional[asyncio.AbstractEventLoop] = None, + _parent=None, + ): + + self._closed = False + + if eventloop: + loop = eventloop + else: + loop = _get_shared_event_loop() + + self._caller = CallFromSyncToAsync(loop) + + async def create_async_writer(): + return TxWriterAsyncIO(tx, driver, settings, _is_implicit=True) + + self._async_writer = self._caller.safe_call_with_result(create_async_writer(), None) + self._parent = _parent + + tx._add_callback(TxEvent.BEFORE_COMMIT, self._on_before_commit, None) + tx._add_callback(TxEvent.BEFORE_ROLLBACK, self._on_before_rollback, None) + + def _on_before_commit(self, tx: "BaseQueryTxContext"): + self.close() + + def _on_before_rollback(self, tx: "BaseQueryTxContext"): + self.close(flush=False) diff --git a/ydb/aio/driver.py b/ydb/aio/driver.py index 9cd6fd2b..267997fb 100644 --- a/ydb/aio/driver.py +++ b/ydb/aio/driver.py @@ -62,4 +62,5 @@ def __init__( async def stop(self, timeout=10): await self.table_client._stop_pool_if_needed(timeout=timeout) + self.topic_client.close() await super().stop(timeout=timeout) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index 947db658..fda22388 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -158,6 +158,8 @@ async def retry_tx_async( async def wrapped_callee(): async with self.checkout() as session: async with session.transaction(tx_mode=tx_mode) as tx: + if tx_mode.name in ["serializable_read_write", "snapshot_read_only"]: + await tx.begin() result = await callee(tx, *args, **kwargs) await tx.commit() return result diff --git a/ydb/aio/query/transaction.py b/ydb/aio/query/transaction.py index 5b63a32b..f0547e5f 100644 --- a/ydb/aio/query/transaction.py +++ b/ydb/aio/query/transaction.py @@ -16,6 +16,28 @@ class QueryTxContext(BaseQueryTxContext): + def __init__(self, driver, session_state, session, tx_mode): + """ + An object that provides a simple transaction context manager that allows statements execution + in a transaction. You don't have to open transaction explicitly, because context manager encapsulates + transaction control logic, and opens new transaction if: + + 1) By explicit .begin() method; + 2) On execution of a first statement, which is strictly recommended method, because that avoids useless round trip + + This context manager is not thread-safe, so you should not manipulate on it concurrently. + + :param driver: A driver instance + :param session_state: A state of session + :param tx_mode: Transaction mode, which is a one from the following choises: + 1) QuerySerializableReadWrite() which is default mode; + 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); + 3) QuerySnapshotReadOnly(); + 4) QueryStaleReadOnly(). + """ + super().__init__(driver, session_state, session, tx_mode) + self._init_callback_handler(base.CallbackHandlerMode.ASYNC) + async def __aenter__(self) -> "QueryTxContext": """ Enters a context manager and returns a transaction @@ -30,7 +52,7 @@ async def __aexit__(self, *args, **kwargs): it is not finished explicitly """ await self._ensure_prev_stream_finished() - if self._tx_state._state == QueryTxStateEnum.BEGINED: + if self._tx_state._state == QueryTxStateEnum.BEGINED and self._external_error is None: # It's strictly recommended to close transactions directly # by using commit_tx=True flag while executing statement or by # .commit() or .rollback() methods, but here we trying to do best @@ -65,7 +87,9 @@ async def commit(self, settings: Optional[BaseRequestSettings] = None) -> None: :return: A committed transaction or exception if commit is failed """ - if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): + self._check_external_error_set() + + if self._tx_state._should_skip(QueryTxStateEnum.COMMITTED): return if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: @@ -74,7 +98,13 @@ async def commit(self, settings: Optional[BaseRequestSettings] = None) -> None: await self._ensure_prev_stream_finished() - await self._commit_call(settings) + try: + await self._execute_callbacks_async(base.TxEvent.BEFORE_COMMIT) + await self._commit_call(settings) + await self._execute_callbacks_async(base.TxEvent.AFTER_COMMIT, exc=None) + except BaseException as e: + await self._execute_callbacks_async(base.TxEvent.AFTER_COMMIT, exc=e) + raise e async def rollback(self, settings: Optional[BaseRequestSettings] = None) -> None: """Calls rollback on a transaction if it is open otherwise is no-op. If transaction execution @@ -84,7 +114,9 @@ async def rollback(self, settings: Optional[BaseRequestSettings] = None) -> None :return: A committed transaction or exception if commit is failed """ - if self._tx_state._already_in(QueryTxStateEnum.ROLLBACKED): + self._check_external_error_set() + + if self._tx_state._should_skip(QueryTxStateEnum.ROLLBACKED): return if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: @@ -93,7 +125,13 @@ async def rollback(self, settings: Optional[BaseRequestSettings] = None) -> None await self._ensure_prev_stream_finished() - await self._rollback_call(settings) + try: + await self._execute_callbacks_async(base.TxEvent.BEFORE_ROLLBACK) + await self._rollback_call(settings) + await self._execute_callbacks_async(base.TxEvent.AFTER_ROLLBACK, exc=None) + except BaseException as e: + await self._execute_callbacks_async(base.TxEvent.AFTER_ROLLBACK, exc=e) + raise e async def execute( self, diff --git a/ydb/driver.py b/ydb/driver.py index 49bd223c..3998aeee 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -288,4 +288,5 @@ def __init__( def stop(self, timeout=10): self.table_client._stop_pool_if_needed(timeout=timeout) + self.topic_client.close() super().stop(timeout=timeout) diff --git a/ydb/issues.py b/ydb/issues.py index 065dcbc8..8b098667 100644 --- a/ydb/issues.py +++ b/ydb/issues.py @@ -179,6 +179,10 @@ class SessionPoolEmpty(Error, queue.Empty): status = StatusCode.SESSION_POOL_EMPTY +class ClientInternalError(Error): + status = StatusCode.CLIENT_INTERNAL_ERROR + + class UnexpectedGrpcMessage(Error): def __init__(self, message: str): super().__init__(message) diff --git a/ydb/query/base.py b/ydb/query/base.py index 57a769bb..a5ebedd9 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -1,6 +1,8 @@ import abc +import asyncio import enum import functools +from collections import defaultdict import typing from typing import ( @@ -17,6 +19,10 @@ from .. import _utilities from .. import _apis +from ydb._topic_common.common import CallFromSyncToAsync, _get_shared_event_loop +from ydb._grpc.grpcwrapper.common_utils import to_thread + + if typing.TYPE_CHECKING: from .transaction import BaseQueryTxContext @@ -196,3 +202,64 @@ def wrap_execute_query_response( return convert.ResultSet.from_message(response_pb.result_set, settings) return None + + +class TxEvent(enum.Enum): + BEFORE_COMMIT = "BEFORE_COMMIT" + AFTER_COMMIT = "AFTER_COMMIT" + BEFORE_ROLLBACK = "BEFORE_ROLLBACK" + AFTER_ROLLBACK = "AFTER_ROLLBACK" + + +class CallbackHandlerMode(enum.Enum): + SYNC = "SYNC" + ASYNC = "ASYNC" + + +def _get_sync_callback(method: typing.Callable, loop: Optional[asyncio.AbstractEventLoop]): + if asyncio.iscoroutinefunction(method): + if loop is None: + loop = _get_shared_event_loop() + + def async_to_sync_callback(*args, **kwargs): + caller = CallFromSyncToAsync(loop) + return caller.safe_call_with_result(method(*args, **kwargs), 10) + + return async_to_sync_callback + return method + + +def _get_async_callback(method: typing.Callable): + if asyncio.iscoroutinefunction(method): + return method + + async def sync_to_async_callback(*args, **kwargs): + return await to_thread(method, *args, **kwargs, executor=None) + + return sync_to_async_callback + + +class CallbackHandler: + def _init_callback_handler(self, mode: CallbackHandlerMode) -> None: + self._callbacks = defaultdict(list) + self._callback_mode = mode + + def _execute_callbacks_sync(self, event_name: str, *args, **kwargs) -> None: + for callback in self._callbacks[event_name]: + callback(self, *args, **kwargs) + + async def _execute_callbacks_async(self, event_name: str, *args, **kwargs) -> None: + tasks = [asyncio.create_task(callback(self, *args, **kwargs)) for callback in self._callbacks[event_name]] + if not tasks: + return + await asyncio.gather(*tasks) + + def _prepare_callback( + self, callback: typing.Callable, loop: Optional[asyncio.AbstractEventLoop] + ) -> typing.Callable: + if self._callback_mode == CallbackHandlerMode.SYNC: + return _get_sync_callback(callback, loop) + return _get_async_callback(callback) + + def _add_callback(self, event_name: str, callback: typing.Callable, loop: Optional[asyncio.AbstractEventLoop]): + self._callbacks[event_name].append(self._prepare_callback(callback, loop)) diff --git a/ydb/query/pool.py b/ydb/query/pool.py index e3775c4d..43cc2e8d 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -167,6 +167,8 @@ def retry_tx_sync( def wrapped_callee(): with self.checkout(timeout=retry_settings.max_session_acquire_timeout) as session: with session.transaction(tx_mode=tx_mode) as tx: + if tx_mode.name in ["serializable_read_write", "snapshot_read_only"]: + tx.begin() result = callee(tx, *args, **kwargs) tx.commit() return result diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 414401da..ae7642db 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -11,6 +11,7 @@ _apis, issues, ) +from .._grpc.grpcwrapper import ydb_topic as _ydb_topic from .._grpc.grpcwrapper import ydb_query as _ydb_query from ..connection import _RpcState as RpcState @@ -42,10 +43,22 @@ class QueryTxStateHelper(abc.ABC): QueryTxStateEnum.DEAD: [], } + _SKIP_TRANSITIONS = { + QueryTxStateEnum.NOT_INITIALIZED: [], + QueryTxStateEnum.BEGINED: [], + QueryTxStateEnum.COMMITTED: [QueryTxStateEnum.COMMITTED, QueryTxStateEnum.ROLLBACKED], + QueryTxStateEnum.ROLLBACKED: [QueryTxStateEnum.COMMITTED, QueryTxStateEnum.ROLLBACKED], + QueryTxStateEnum.DEAD: [], + } + @classmethod def valid_transition(cls, before: QueryTxStateEnum, after: QueryTxStateEnum) -> bool: return after in cls._VALID_TRANSITIONS[before] + @classmethod + def should_skip(cls, before: QueryTxStateEnum, after: QueryTxStateEnum) -> bool: + return after in cls._SKIP_TRANSITIONS[before] + @classmethod def terminal(cls, state: QueryTxStateEnum) -> bool: return len(cls._VALID_TRANSITIONS[state]) == 0 @@ -88,8 +101,8 @@ def _check_tx_ready_to_use(self) -> None: if QueryTxStateHelper.terminal(self._state): raise RuntimeError(f"Transaction is in terminal state: {self._state.value}") - def _already_in(self, target: QueryTxStateEnum) -> bool: - return self._state == target + def _should_skip(self, target: QueryTxStateEnum) -> bool: + return QueryTxStateHelper.should_skip(self._state, target) def _construct_tx_settings(tx_state: QueryTxState) -> _ydb_query.TransactionSettings: @@ -170,7 +183,7 @@ def wrap_tx_rollback_response( return tx -class BaseQueryTxContext: +class BaseQueryTxContext(base.CallbackHandler): def __init__(self, driver, session_state, session, tx_mode): """ An object that provides a simple transaction context manager that allows statements execution @@ -196,6 +209,7 @@ def __init__(self, driver, session_state, session, tx_mode): self._session_state = session_state self.session = session self._prev_stream = None + self._external_error = None @property def session_id(self) -> str: @@ -215,6 +229,19 @@ def tx_id(self) -> Optional[str]: """ return self._tx_state.tx_id + def _tx_identity(self) -> _ydb_topic.TransactionIdentity: + if not self.tx_id: + raise RuntimeError("Unable to get tx identity without started tx.") + return _ydb_topic.TransactionIdentity(self.tx_id, self.session_id) + + def _set_external_error(self, exc: BaseException) -> None: + self._external_error = exc + + def _check_external_error_set(self): + if self._external_error is None: + return + raise issues.ClientInternalError("Transaction was failed by external error.") from self._external_error + def _begin_call(self, settings: Optional[BaseRequestSettings]) -> "BaseQueryTxContext": self._tx_state._check_invalid_transition(QueryTxStateEnum.BEGINED) @@ -228,6 +255,7 @@ def _begin_call(self, settings: Optional[BaseRequestSettings]) -> "BaseQueryTxCo ) def _commit_call(self, settings: Optional[BaseRequestSettings]) -> "BaseQueryTxContext": + self._check_external_error_set() self._tx_state._check_invalid_transition(QueryTxStateEnum.COMMITTED) return self._driver( @@ -240,6 +268,7 @@ def _commit_call(self, settings: Optional[BaseRequestSettings]) -> "BaseQueryTxC ) def _rollback_call(self, settings: Optional[BaseRequestSettings]) -> "BaseQueryTxContext": + self._check_external_error_set() self._tx_state._check_invalid_transition(QueryTxStateEnum.ROLLBACKED) return self._driver( @@ -262,6 +291,7 @@ def _execute_call( settings: Optional[BaseRequestSettings], ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: self._tx_state._check_tx_ready_to_use() + self._check_external_error_set() request = base.create_execute_query_request( query=query, @@ -283,18 +313,41 @@ def _execute_call( ) def _move_to_beginned(self, tx_id: str) -> None: - if self._tx_state._already_in(QueryTxStateEnum.BEGINED) or not tx_id: + if self._tx_state._should_skip(QueryTxStateEnum.BEGINED) or not tx_id: return self._tx_state._change_state(QueryTxStateEnum.BEGINED) self._tx_state.tx_id = tx_id def _move_to_commited(self) -> None: - if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): + if self._tx_state._should_skip(QueryTxStateEnum.COMMITTED): return self._tx_state._change_state(QueryTxStateEnum.COMMITTED) class QueryTxContext(BaseQueryTxContext): + def __init__(self, driver, session_state, session, tx_mode): + """ + An object that provides a simple transaction context manager that allows statements execution + in a transaction. You don't have to open transaction explicitly, because context manager encapsulates + transaction control logic, and opens new transaction if: + + 1) By explicit .begin() method; + 2) On execution of a first statement, which is strictly recommended method, because that avoids useless round trip + + This context manager is not thread-safe, so you should not manipulate on it concurrently. + + :param driver: A driver instance + :param session_state: A state of session + :param tx_mode: Transaction mode, which is a one from the following choises: + 1) QuerySerializableReadWrite() which is default mode; + 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); + 3) QuerySnapshotReadOnly(); + 4) QueryStaleReadOnly(). + """ + + super().__init__(driver, session_state, session, tx_mode) + self._init_callback_handler(base.CallbackHandlerMode.SYNC) + def __enter__(self) -> "BaseQueryTxContext": """ Enters a context manager and returns a transaction @@ -309,7 +362,7 @@ def __exit__(self, *args, **kwargs): it is not finished explicitly """ self._ensure_prev_stream_finished() - if self._tx_state._state == QueryTxStateEnum.BEGINED: + if self._tx_state._state == QueryTxStateEnum.BEGINED and self._external_error is None: # It's strictly recommended to close transactions directly # by using commit_tx=True flag while executing statement or by # .commit() or .rollback() methods, but here we trying to do best @@ -345,7 +398,8 @@ def commit(self, settings: Optional[BaseRequestSettings] = None) -> None: :return: A committed transaction or exception if commit is failed """ - if self._tx_state._already_in(QueryTxStateEnum.COMMITTED): + self._check_external_error_set() + if self._tx_state._should_skip(QueryTxStateEnum.COMMITTED): return if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: @@ -354,7 +408,13 @@ def commit(self, settings: Optional[BaseRequestSettings] = None) -> None: self._ensure_prev_stream_finished() - self._commit_call(settings) + try: + self._execute_callbacks_sync(base.TxEvent.BEFORE_COMMIT) + self._commit_call(settings) + self._execute_callbacks_sync(base.TxEvent.AFTER_COMMIT, exc=None) + except BaseException as e: # TODO: probably should be less wide + self._execute_callbacks_sync(base.TxEvent.AFTER_COMMIT, exc=e) + raise e def rollback(self, settings: Optional[BaseRequestSettings] = None) -> None: """Calls rollback on a transaction if it is open otherwise is no-op. If transaction execution @@ -364,7 +424,8 @@ def rollback(self, settings: Optional[BaseRequestSettings] = None) -> None: :return: A committed transaction or exception if commit is failed """ - if self._tx_state._already_in(QueryTxStateEnum.ROLLBACKED): + self._check_external_error_set() + if self._tx_state._should_skip(QueryTxStateEnum.ROLLBACKED): return if self._tx_state._state == QueryTxStateEnum.NOT_INITIALIZED: @@ -373,7 +434,13 @@ def rollback(self, settings: Optional[BaseRequestSettings] = None) -> None: self._ensure_prev_stream_finished() - self._rollback_call(settings) + try: + self._execute_callbacks_sync(base.TxEvent.BEFORE_ROLLBACK) + self._rollback_call(settings) + self._execute_callbacks_sync(base.TxEvent.AFTER_ROLLBACK, exc=None) + except BaseException as e: # TODO: probably should be less wide + self._execute_callbacks_sync(base.TxEvent.AFTER_ROLLBACK, exc=e) + raise e def execute( self, diff --git a/ydb/topic.py b/ydb/topic.py index 55f4ea04..52f98e61 100644 --- a/ydb/topic.py +++ b/ydb/topic.py @@ -25,6 +25,8 @@ "TopicWriteResult", "TopicWriter", "TopicWriterAsyncIO", + "TopicTxWriter", + "TopicTxWriterAsyncIO", "TopicWriterInitInfo", "TopicWriterMessage", "TopicWriterSettings", @@ -33,6 +35,7 @@ import concurrent.futures import datetime from dataclasses import dataclass +import logging from typing import List, Union, Mapping, Optional, Dict, Callable from . import aio, Credentials, _apis, issues @@ -65,8 +68,10 @@ PublicWriteResult as TopicWriteResult, ) +from ydb._topic_writer.topic_writer_asyncio import TxWriterAsyncIO as TopicTxWriterAsyncIO from ydb._topic_writer.topic_writer_asyncio import WriterAsyncIO as TopicWriterAsyncIO from ._topic_writer.topic_writer_sync import WriterSync as TopicWriter +from ._topic_writer.topic_writer_sync import TxWriterSync as TopicTxWriter from ._topic_common.common import ( wrap_operation as _wrap_operation, @@ -88,6 +93,8 @@ PublicAlterAutoPartitioningSettings as TopicAlterAutoPartitioningSettings, ) +logger = logging.getLogger(__name__) + class TopicClientAsyncIO: _closed: bool @@ -108,7 +115,8 @@ def __init__(self, driver: aio.Driver, settings: Optional[TopicClientSettings] = ) def __del__(self): - self.close() + if not self._closed: + logger.warning("Topic client was not closed properly. Consider using method close().") async def create_topic( self, @@ -276,6 +284,35 @@ def writer( return TopicWriterAsyncIO(self._driver, settings, _client=self) + def tx_writer( + self, + tx, + topic, + *, + producer_id: Optional[str] = None, # default - random + session_metadata: Mapping[str, str] = None, + partition_id: Union[int, None] = None, + auto_seqno: bool = True, + auto_created_at: bool = True, + codec: Optional[TopicCodec] = None, # default mean auto-select + # encoders: map[codec_code] func(encoded_bytes)->decoded_bytes + # the func will be called from multiply threads in parallel. + encoders: Optional[Mapping[_ydb_topic_public_types.PublicCodec, Callable[[bytes], bytes]]] = None, + # custom encoder executor for call builtin and custom decoders. If None - use shared executor pool. + # If max_worker in the executor is 1 - then encoders will be called from the thread without parallel. + encoder_executor: Optional[concurrent.futures.Executor] = None, + ) -> TopicTxWriterAsyncIO: + args = locals().copy() + del args["self"] + del args["tx"] + + settings = TopicWriterSettings(**args) + + if not settings.encoder_executor: + settings.encoder_executor = self._executor + + return TopicTxWriterAsyncIO(tx=tx, driver=self._driver, settings=settings, _client=self) + def close(self): if self._closed: return @@ -287,7 +324,7 @@ def _check_closed(self): if not self._closed: return - raise RuntimeError("Topic client closed") + raise issues.Error("Topic client closed") class TopicClient: @@ -310,7 +347,8 @@ def __init__(self, driver: driver.Driver, settings: Optional[TopicClientSettings ) def __del__(self): - self.close() + if not self._closed: + logger.warning("Topic client was not closed properly. Consider using method close().") def create_topic( self, @@ -487,6 +525,36 @@ def writer( return TopicWriter(self._driver, settings, _parent=self) + def tx_writer( + self, + tx, + topic, + *, + producer_id: Optional[str] = None, # default - random + session_metadata: Mapping[str, str] = None, + partition_id: Union[int, None] = None, + auto_seqno: bool = True, + auto_created_at: bool = True, + codec: Optional[TopicCodec] = None, # default mean auto-select + # encoders: map[codec_code] func(encoded_bytes)->decoded_bytes + # the func will be called from multiply threads in parallel. + encoders: Optional[Mapping[_ydb_topic_public_types.PublicCodec, Callable[[bytes], bytes]]] = None, + # custom encoder executor for call builtin and custom decoders. If None - use shared executor pool. + # If max_worker in the executor is 1 - then encoders will be called from the thread without parallel. + encoder_executor: Optional[concurrent.futures.Executor] = None, # default shared client executor pool + ) -> TopicWriter: + args = locals().copy() + del args["self"] + del args["tx"] + self._check_closed() + + settings = TopicWriterSettings(**args) + + if not settings.encoder_executor: + settings.encoder_executor = self._executor + + return TopicTxWriter(tx, self._driver, settings, _parent=self) + def close(self): if self._closed: return @@ -498,7 +566,7 @@ def _check_closed(self): if not self._closed: return - raise RuntimeError("Topic client closed") + raise issues.Error("Topic client closed") @dataclass From 88ea5d6edf9c11ae330d5a107181b786edcaf7f4 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 28 Mar 2025 11:26:07 +0300 Subject: [PATCH 384/429] Remove QuerySessionPool destructors --- ydb/aio/query/pool.py | 6 ------ ydb/query/pool.py | 3 --- 2 files changed, 9 deletions(-) diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index fda22388..f1ca68d1 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -215,12 +215,6 @@ async def __aenter__(self): async def __aexit__(self, exc_type, exc_val, exc_tb): await self.stop() - def __del__(self): - if self._should_stop.is_set() or self._loop.is_closed(): - return - - self._loop.call_soon(self.stop) - class SimpleQuerySessionCheckoutAsync: def __init__(self, pool: QuerySessionPool): diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 43cc2e8d..b25f7db8 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -226,9 +226,6 @@ def __enter__(self): def __exit__(self, exc_type, exc_val, exc_tb): self.stop() - def __del__(self): - self.stop() - class SimpleQuerySessionCheckout: def __init__(self, pool: QuerySessionPool, timeout: Optional[float]): From 915503b7f94b5ff3c21be456e66fc5fa5016ee0f Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 28 Mar 2025 11:45:08 +0300 Subject: [PATCH 385/429] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7013981a..a2d3b9f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +* Transactions between topics and tables +* Remove QuerySessionPool desctuctors + ## 3.19.3 ## * Add consumer_stats to PublicConsumer From f184eaafaae522986c9f4b29f0cfff8ab40f4c1e Mon Sep 17 00:00:00 2001 From: robot Date: Fri, 28 Mar 2025 08:45:59 +0000 Subject: [PATCH 386/429] Release: 3.20.0 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2d3b9f6..f17681ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.20.0 ## * Transactions between topics and tables * Remove QuerySessionPool desctuctors diff --git a/setup.py b/setup.py index 38025fad..f1726b00 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.19.3", # AUTOVERSION + version="3.20.0", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 8bd658d4..070a2455 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.19.3" +VERSION = "3.20.0" From f876a9066d03b5ffb49916c107623a0e8532896f Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 3 Apr 2025 18:51:51 +0300 Subject: [PATCH 387/429] Add missing fields to tablestats --- tests/table/test_table_client.py | 44 ++++++++++++++++++++++++++++++++ ydb/table.py | 30 ++++++++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/tests/table/test_table_client.py b/tests/table/test_table_client.py index f4e121c8..ef0de906 100644 --- a/tests/table/test_table_client.py +++ b/tests/table/test_table_client.py @@ -86,3 +86,47 @@ def test_copy_table(self, driver_sync: ydb.Driver): copied_description = client.describe_table(table_name + "_copy") assert description.columns == copied_description.columns + + def test_describe_table_creation_time(self, driver_sync: ydb.Driver): + client = driver_sync.table_client + + table_name = "/local/testtableclient" + try: + client.drop_table(table_name) + except ydb.SchemeError: + pass + + description = ( + ydb.TableDescription() + .with_primary_keys("key1", "key2") + .with_columns( + ydb.Column("key1", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("key2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("value", ydb.OptionalType(ydb.PrimitiveType.Utf8)), + ) + ) + + client.create_table(table_name, description) + + desc_before = client.describe_table( + table_name, + ydb.DescribeTableSettings().with_include_table_stats(True), + ) + + assert desc_before.table_stats is not None + + client.alter_table( + table_name, + add_columns=[ + ydb.Column("value2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ], + ) + + desc_after = client.describe_table( + table_name, + ydb.DescribeTableSettings().with_include_table_stats(True), + ) + + assert desc_after.table_stats is not None + + assert desc_before.table_stats.creation_time == desc_after.table_stats.creation_time diff --git a/ydb/table.py b/ydb/table.py index 945e9187..ac73902f 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -545,6 +545,9 @@ class TableStats(object): def __init__(self): self.partitions = None self.store_size = 0 + self.rows_estimate = 0 + self.creation_time = None + self.modification_time = None def with_store_size(self, store_size): self.store_size = store_size @@ -554,6 +557,18 @@ def with_partitions(self, partitions): self.partitions = partitions return self + def with_rows_estimate(self, rows_estimate): + self.rows_estimate = rows_estimate + return self + + def with_creation_time(self, creation_time): + self.creation_time = creation_time + return self + + def with_modification_time(self, modification_time): + self.modification_time = modification_time + return self + class ReadReplicasSettings(object): def __init__(self): @@ -1577,7 +1592,22 @@ def __init__( self.table_stats = None if table_stats is not None: + from ._grpc.grpcwrapper.common_utils import datetime_from_proto_timestamp + self.table_stats = TableStats() + if table_stats.creation_time: + self.table_stats = self.table_stats.with_creation_time( + datetime_from_proto_timestamp(table_stats.creation_time) + ) + + if table_stats.modification_time: + self.table_stats = self.table_stats.with_modification_time( + datetime_from_proto_timestamp(table_stats.modification_time) + ) + + if table_stats.rows_estimate != 0: + self.table_stats = self.table_stats.with_rows_estimate(table_stats.rows_estimate) + if table_stats.partitions != 0: self.table_stats = self.table_stats.with_partitions(table_stats.partitions) From 16a20a48ea019440afdf46d7fe36220c74091b82 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 3 Apr 2025 19:21:31 +0300 Subject: [PATCH 388/429] Return topic desctuctors --- test-requirements.txt | 2 +- tests/topics/test_topic_reader.py | 8 ++++---- tests/topics/test_topic_writer.py | 10 ++++++---- ydb/_grpc/grpcwrapper/common_utils.py | 3 +++ ydb/_topic_reader/topic_reader_asyncio.py | 7 ++++++- ydb/_topic_reader/topic_reader_sync.py | 6 +++++- ydb/_topic_writer/topic_writer_asyncio.py | 8 +++++++- ydb/_topic_writer/topic_writer_sync.py | 6 +++++- ydb/topic.py | 12 ++++++++++-- 9 files changed, 47 insertions(+), 15 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index c88c5ca0..012697ec 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -25,7 +25,7 @@ pycparser==2.20 PyNaCl==1.4.0 pyparsing==2.4.7 pyrsistent==0.18.0 -pytest==7.2.2 +pytest<8.0.0 pytest-asyncio==0.21.0 pytest-docker-compose==3.2.1 python-dotenv==0.18.0 diff --git a/tests/topics/test_topic_reader.py b/tests/topics/test_topic_reader.py index 623dc8c0..dee5ab49 100644 --- a/tests/topics/test_topic_reader.py +++ b/tests/topics/test_topic_reader.py @@ -17,8 +17,8 @@ async def test_read_batch(self, driver, topic_with_messages, topic_consumer): await reader.close() async def test_link_to_client(self, driver, topic_path, topic_consumer): - reader = driver.topic_client.reader(topic_path, topic_consumer) - assert reader._parent is driver.topic_client + async with driver.topic_client.reader(topic_path, topic_consumer) as reader: + assert reader._parent is driver.topic_client async def test_read_message(self, driver, topic_with_messages, topic_consumer): reader = driver.topic_client.reader(topic_with_messages, topic_consumer) @@ -138,8 +138,8 @@ def test_read_batch(self, driver_sync, topic_with_messages, topic_consumer): reader.close() def test_link_to_client(self, driver_sync, topic_path, topic_consumer): - reader = driver_sync.topic_client.reader(topic_path, topic_consumer) - assert reader._parent is driver_sync.topic_client + with driver_sync.topic_client.reader(topic_path, topic_consumer) as reader: + assert reader._parent is driver_sync.topic_client def test_read_message(self, driver_sync, topic_with_messages, topic_consumer): reader = driver_sync.topic_client.reader(topic_with_messages, topic_consumer) diff --git a/tests/topics/test_topic_writer.py b/tests/topics/test_topic_writer.py index ba5ae74c..aed552ab 100644 --- a/tests/topics/test_topic_writer.py +++ b/tests/topics/test_topic_writer.py @@ -37,8 +37,8 @@ async def test_wait_last_seqno(self, driver: ydb.aio.Driver, topic_path): assert init_info.last_seqno == 5 async def test_link_to_client(self, driver, topic_path, topic_consumer): - writer = driver.topic_client.writer(topic_path) - assert writer._parent is driver.topic_client + async with driver.topic_client.writer(topic_path) as writer: + assert writer._parent is driver.topic_client async def test_random_producer_id(self, driver: ydb.aio.Driver, topic_path, topic_reader: ydb.TopicReaderAsyncIO): async with driver.topic_client.writer(topic_path) as writer: @@ -113,6 +113,7 @@ async def test_create_writer_after_stop(self, driver: ydb.aio.Driver, topic_path async with driver.topic_client.writer(topic_path) as writer: await writer.write_with_ack("123") + @pytest.mark.skip(reason="something wrong with this test, need to assess") async def test_send_message_after_stop(self, driver: ydb.aio.Driver, topic_path: str): writer = driver.topic_client.writer(topic_path) await driver.stop() @@ -180,8 +181,8 @@ def test_auto_flush_on_close(self, driver_sync: ydb.Driver, topic_path): assert init_info.last_seqno == last_seqno def test_link_to_client(self, driver_sync, topic_path, topic_consumer): - writer = driver_sync.topic_client.writer(topic_path) - assert writer._parent is driver_sync.topic_client + with driver_sync.topic_client.writer(topic_path) as writer: + assert writer._parent is driver_sync.topic_client def test_random_producer_id( self, @@ -254,6 +255,7 @@ def test_create_writer_after_stop(self, driver_sync: ydb.Driver, topic_path: str with driver_sync.topic_client.writer(topic_path) as writer: writer.write_with_ack("123") + @pytest.mark.skip(reason="something wrong with this test, need to assess") def test_send_message_after_stop(self, driver_sync: ydb.Driver, topic_path: str): writer = driver_sync.topic_client.writer(topic_path) driver_sync.stop() diff --git a/ydb/_grpc/grpcwrapper/common_utils.py b/ydb/_grpc/grpcwrapper/common_utils.py index 6a7275b4..7fb5b684 100644 --- a/ydb/_grpc/grpcwrapper/common_utils.py +++ b/ydb/_grpc/grpcwrapper/common_utils.py @@ -161,6 +161,9 @@ def __init__(self, convert_server_grpc_to_wrapper): self._stream_call = None self._wait_executor = None + def __del__(self): + self._clean_executor(wait=False) + async def start(self, driver: SupportedDriverType, stub, method): if asyncio.iscoroutinefunction(driver.__call__): await self._start_asyncio_driver(driver, stub, method) diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index c9704d55..87012554 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -95,7 +95,12 @@ async def __aexit__(self, exc_type, exc_val, exc_tb): def __del__(self): if not self._closed: - logger.warning("Topic reader was not closed properly. Consider using method close().") + try: + logger.warning("Topic reader was not closed properly. Consider using method close().") + task = self._loop.create_task(self.close(flush=False)) + topic_common.wrap_set_name_for_asyncio_task(task, task_name="close reader") + except BaseException: + logger.warning("Something went wrong during reader close in __del__") async def wait_message(self): """ diff --git a/ydb/_topic_reader/topic_reader_sync.py b/ydb/_topic_reader/topic_reader_sync.py index 3e6806d0..31f28899 100644 --- a/ydb/_topic_reader/topic_reader_sync.py +++ b/ydb/_topic_reader/topic_reader_sync.py @@ -59,7 +59,11 @@ async def create_reader(): def __del__(self): if not self._closed: - logger.warning("Topic reader was not closed properly. Consider using method close().") + try: + logger.warning("Topic reader was not closed properly. Consider using method close().") + self.close(flush=False) + except BaseException: + logger.warning("Something went wrong during reader close in __del__") def __enter__(self): return self diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index 1ea6c250..ec5b2166 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -79,8 +79,14 @@ async def __aexit__(self, exc_type, exc_val, exc_tb): raise def __del__(self): - if not self._closed: + if self._closed or self._loop.is_closed(): + return + try: logger.warning("Topic writer was not closed properly. Consider using method close().") + task = self._loop.create_task(self.close(flush=False)) + topic_common.wrap_set_name_for_asyncio_task(task, task_name="close writer") + except BaseException: + logger.warning("Something went wrong during writer close in __del__") async def close(self, *, flush: bool = True): if self._closed: diff --git a/ydb/_topic_writer/topic_writer_sync.py b/ydb/_topic_writer/topic_writer_sync.py index 4796d7ac..954864c9 100644 --- a/ydb/_topic_writer/topic_writer_sync.py +++ b/ydb/_topic_writer/topic_writer_sync.py @@ -75,7 +75,11 @@ def __exit__(self, exc_type, exc_val, exc_tb): def __del__(self): if not self._closed: - logger.warning("Topic writer was not closed properly. Consider using method close().") + try: + logger.warning("Topic writer was not closed properly. Consider using method close().") + self.close(flush=False) + except BaseException: + logger.warning("Something went wrong during writer close in __del__") def close(self, *, flush: bool = True, timeout: TimeoutType = None): if self._closed: diff --git a/ydb/topic.py b/ydb/topic.py index 52f98e61..a501f9d2 100644 --- a/ydb/topic.py +++ b/ydb/topic.py @@ -116,7 +116,11 @@ def __init__(self, driver: aio.Driver, settings: Optional[TopicClientSettings] = def __del__(self): if not self._closed: - logger.warning("Topic client was not closed properly. Consider using method close().") + try: + logger.warning("Topic client was not closed properly. Consider using method close().") + self.close() + except BaseException: + logger.warning("Something went wrong during topic client close in __del__") async def create_topic( self, @@ -348,7 +352,11 @@ def __init__(self, driver: driver.Driver, settings: Optional[TopicClientSettings def __del__(self): if not self._closed: - logger.warning("Topic client was not closed properly. Consider using method close().") + try: + logger.warning("Topic client was not closed properly. Consider using method close().") + self.close() + except BaseException: + logger.warning("Something went wrong during topic client close in __del__") def create_topic( self, From 1dfdb64cee8b5c46177bd4f456ca436874cfd63a Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 4 Apr 2025 14:14:28 +0300 Subject: [PATCH 389/429] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f17681ea..72a0da43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +* Add missing fields to tablestats +* Return topic destructors + ## 3.20.0 ## * Transactions between topics and tables * Remove QuerySessionPool desctuctors From a2a81811fdd39faa9a1da41d7e197fa70ae21bb7 Mon Sep 17 00:00:00 2001 From: robot Date: Fri, 4 Apr 2025 11:15:32 +0000 Subject: [PATCH 390/429] Release: 3.20.1 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72a0da43..19d75ce8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.20.1 ## * Add missing fields to tablestats * Return topic destructors diff --git a/setup.py b/setup.py index f1726b00..c7db9679 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.20.0", # AUTOVERSION + version="3.20.1", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 070a2455..4a5c580f 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.20.0" +VERSION = "3.20.1" From d9803342b73ffc8289ffdf5009feedc0e83b28e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3?= <150132506+iddqdex@users.noreply.github.com> Date: Sat, 5 Apr 2025 10:19:06 +0300 Subject: [PATCH 391/429] Merge pull request #577 from iddqdex/patch-1 fix deprecation warning in auth.py --- ydb/iam/auth.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ydb/iam/auth.py b/ydb/iam/auth.py index c4096c09..688deded 100644 --- a/ydb/iam/auth.py +++ b/ydb/iam/auth.py @@ -3,7 +3,7 @@ import grpc import time import abc -from datetime import datetime +from datetime import datetime, timezone import json import os @@ -43,8 +43,8 @@ def get_jwt(account_id, access_key_id, private_key, jwt_expiration_timeout, algorithm, token_service_url, subject=None): assert jwt is not None, "Install pyjwt library to use jwt tokens" now = time.time() - now_utc = datetime.utcfromtimestamp(now) - exp_utc = datetime.utcfromtimestamp(now + jwt_expiration_timeout) + now_utc = datetime.fromtimestamp(now, timezone.utc) + exp_utc = datetime.fromtimestamp(now + jwt_expiration_timeout, timezone.utc) payload = { "iss": account_id, "aud": token_service_url, From 73aefa92c9ebc4113c14fa95bbdc2b0730638add Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 09:49:54 +0000 Subject: [PATCH 392/429] Bump cryptography in /examples/reservations-bot-demo/cloud_function Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.0 to 43.0.1. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/41.0.0...43.0.1) --- updated-dependencies: - dependency-name: cryptography dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- examples/reservations-bot-demo/cloud_function/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/reservations-bot-demo/cloud_function/requirements.txt b/examples/reservations-bot-demo/cloud_function/requirements.txt index 3c863b08..5c21a42e 100644 --- a/examples/reservations-bot-demo/cloud_function/requirements.txt +++ b/examples/reservations-bot-demo/cloud_function/requirements.txt @@ -1,7 +1,7 @@ certifi==2020.6.20 cffi==1.14.2 chardet==3.0.4 -cryptography==41.0.0 +cryptography==44.0.1 enum-compat==0.0.3 googleapis-common-protos==1.52.0 grpcio==1.53.2 From f81788f753898dd0ddae62133e822b94d5184c40 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 21 Apr 2025 16:55:34 +0300 Subject: [PATCH 393/429] No Consumer Reader (#580) --- tests/topics/test_topic_reader.py | 246 ++++++++++++++++++++++ ydb/_grpc/grpcwrapper/ydb_topic.py | 5 +- ydb/_topic_reader/events.py | 81 +++++++ ydb/_topic_reader/topic_reader.py | 26 +-- ydb/_topic_reader/topic_reader_asyncio.py | 30 ++- ydb/_topic_reader/topic_reader_sync.py | 13 ++ ydb/topic.py | 48 ++++- 7 files changed, 419 insertions(+), 30 deletions(-) create mode 100644 ydb/_topic_reader/events.py diff --git a/tests/topics/test_topic_reader.py b/tests/topics/test_topic_reader.py index dee5ab49..1836d2e7 100644 --- a/tests/topics/test_topic_reader.py +++ b/tests/topics/test_topic_reader.py @@ -251,3 +251,249 @@ async def wait(fut): await reader0.close() await reader1.close() + + +@pytest.fixture() +def topic_selector(topic_with_messages): + return ydb.TopicReaderSelector(path=topic_with_messages, partitions=[0]) + + +@pytest.mark.asyncio +class TestTopicNoConsumerReaderAsyncIO: + async def test_reader_with_no_partition_ids_raises(self, driver, topic_with_messages): + with pytest.raises(ydb.Error): + driver.topic_client.reader( + topic_with_messages, + consumer=None, + event_handler=ydb.TopicReaderEvents.EventHandler(), + ) + + async def test_reader_with_no_event_handler_raises(self, driver, topic_with_messages): + with pytest.raises(ydb.Error): + driver.topic_client.reader( + topic_with_messages, + consumer=None, + ) + + async def test_reader_with_no_partition_ids_selector_raises(self, driver, topic_selector): + topic_selector.partitions = None + + with pytest.raises(ydb.Error): + driver.topic_client.reader( + topic_selector, + consumer=None, + event_handler=ydb.TopicReaderEvents.EventHandler(), + ) + + async def test_reader_with_default_lambda(self, driver, topic_selector): + reader = driver.topic_client.reader( + topic_selector, + consumer=None, + event_handler=ydb.TopicReaderEvents.EventHandler(), + ) + msg = await reader.receive_message() + + assert msg.seqno == 1 + + await reader.close() + + async def test_reader_with_sync_lambda(self, driver, topic_selector): + class CustomEventHandler(ydb.TopicReaderEvents.EventHandler): + def on_partition_get_start_offset(self, event): + assert topic_selector.path.endswith(event.topic) + assert event.partition_id == 0 + return ydb.TopicReaderEvents.OnPartitionGetStartOffsetResponse(1) + + reader = driver.topic_client.reader( + topic_selector, + consumer=None, + event_handler=CustomEventHandler(), + ) + + msg = await reader.receive_message() + + assert msg.seqno == 2 + + await reader.close() + + async def test_reader_with_async_lambda(self, driver, topic_selector): + class CustomEventHandler(ydb.TopicReaderEvents.EventHandler): + async def on_partition_get_start_offset(self, event): + assert topic_selector.path.endswith(event.topic) + assert event.partition_id == 0 + return ydb.TopicReaderEvents.OnPartitionGetStartOffsetResponse(1) + + reader = driver.topic_client.reader( + topic_selector, + consumer=None, + event_handler=CustomEventHandler(), + ) + + msg = await reader.receive_message() + + assert msg.seqno == 2 + + await reader.close() + + async def test_commit_not_allowed(self, driver, topic_selector): + reader = driver.topic_client.reader( + topic_selector, + consumer=None, + event_handler=ydb.TopicReaderEvents.EventHandler(), + ) + batch = await reader.receive_batch() + + with pytest.raises(ydb.Error): + reader.commit(batch) + + with pytest.raises(ydb.Error): + await reader.commit_with_ack(batch) + + await reader.close() + + async def test_offsets_updated_after_reconnect(self, driver, topic_selector): + current_offset = 0 + + class CustomEventHandler(ydb.TopicReaderEvents.EventHandler): + def on_partition_get_start_offset(self, event): + nonlocal current_offset + return ydb.TopicReaderEvents.OnPartitionGetStartOffsetResponse(current_offset) + + reader = driver.topic_client.reader( + topic_selector, + consumer=None, + event_handler=CustomEventHandler(), + ) + msg = await reader.receive_message() + + assert msg.seqno == current_offset + 1 + + current_offset += 2 + reader._reconnector._stream_reader._set_first_error(ydb.Unavailable("some retriable error")) + + await asyncio.sleep(0) + + msg = await reader.receive_message() + + assert msg.seqno == current_offset + 1 + + await reader.close() + + +class TestTopicReaderWithoutConsumer: + def test_reader_with_no_partition_ids_raises(self, driver_sync, topic_with_messages): + with pytest.raises(ydb.Error): + driver_sync.topic_client.reader( + topic_with_messages, + consumer=None, + event_handler=ydb.TopicReaderEvents.EventHandler(), + ) + + def test_reader_with_no_event_handler_raises(self, driver_sync, topic_with_messages): + with pytest.raises(ydb.Error): + driver_sync.topic_client.reader( + topic_with_messages, + consumer=None, + ) + + def test_reader_with_no_partition_ids_selector_raises(self, driver_sync, topic_selector): + topic_selector.partitions = None + + with pytest.raises(ydb.Error): + driver_sync.topic_client.reader( + topic_selector, + consumer=None, + event_handler=ydb.TopicReaderEvents.EventHandler(), + ) + + def test_reader_with_default_lambda(self, driver_sync, topic_selector): + reader = driver_sync.topic_client.reader( + topic_selector, + consumer=None, + event_handler=ydb.TopicReaderEvents.EventHandler(), + ) + msg = reader.receive_message() + + assert msg.seqno == 1 + + reader.close() + + def test_reader_with_sync_lambda(self, driver_sync, topic_selector): + class CustomEventHandler(ydb.TopicReaderEvents.EventHandler): + def on_partition_get_start_offset(self, event): + assert topic_selector.path.endswith(event.topic) + assert event.partition_id == 0 + return ydb.TopicReaderEvents.OnPartitionGetStartOffsetResponse(1) + + reader = driver_sync.topic_client.reader( + topic_selector, + consumer=None, + event_handler=CustomEventHandler(), + ) + + msg = reader.receive_message() + + assert msg.seqno == 2 + + reader.close() + + def test_reader_with_async_lambda(self, driver_sync, topic_selector): + class CustomEventHandler(ydb.TopicReaderEvents.EventHandler): + async def on_partition_get_start_offset(self, event): + assert topic_selector.path.endswith(event.topic) + assert event.partition_id == 0 + return ydb.TopicReaderEvents.OnPartitionGetStartOffsetResponse(1) + + reader = driver_sync.topic_client.reader( + topic_selector, + consumer=None, + event_handler=CustomEventHandler(), + ) + + msg = reader.receive_message() + + assert msg.seqno == 2 + + reader.close() + + def test_commit_not_allowed(self, driver_sync, topic_selector): + reader = driver_sync.topic_client.reader( + topic_selector, + consumer=None, + event_handler=ydb.TopicReaderEvents.EventHandler(), + ) + batch = reader.receive_batch() + + with pytest.raises(ydb.Error): + reader.commit(batch) + + with pytest.raises(ydb.Error): + reader.commit_with_ack(batch) + + reader.close() + + def test_offsets_updated_after_reconnect(self, driver_sync, topic_selector): + current_offset = 0 + + class CustomEventHandler(ydb.TopicReaderEvents.EventHandler): + def on_partition_get_start_offset(self, event): + nonlocal current_offset + return ydb.TopicReaderEvents.OnPartitionGetStartOffsetResponse(current_offset) + + reader = driver_sync.topic_client.reader( + topic_selector, + consumer=None, + event_handler=CustomEventHandler(), + ) + msg = reader.receive_message() + + assert msg.seqno == current_offset + 1 + + current_offset += 2 + reader._async_reader._reconnector._stream_reader._set_first_error(ydb.Unavailable("some retriable error")) + + msg = reader.receive_message() + + assert msg.seqno == current_offset + 1 + + reader.close() diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index 0ab78e03..a4cdf407 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -439,12 +439,13 @@ def from_proto( @dataclass class InitRequest(IToProto): topics_read_settings: List["StreamReadMessage.InitRequest.TopicReadSettings"] - consumer: str + consumer: Optional[str] auto_partitioning_support: bool def to_proto(self) -> ydb_topic_pb2.StreamReadMessage.InitRequest: res = ydb_topic_pb2.StreamReadMessage.InitRequest() - res.consumer = self.consumer + if self.consumer is not None: + res.consumer = self.consumer for settings in self.topics_read_settings: res.topics_read_settings.append(settings.to_proto()) res.auto_partitioning_support = self.auto_partitioning_support diff --git a/ydb/_topic_reader/events.py b/ydb/_topic_reader/events.py new file mode 100644 index 00000000..b229713c --- /dev/null +++ b/ydb/_topic_reader/events.py @@ -0,0 +1,81 @@ +import asyncio +from dataclasses import dataclass +from typing import Awaitable, Union + +from ..issues import ClientInternalError + +__all__ = [ + "OnCommit", + "OnPartitionGetStartOffsetRequest", + "OnPartitionGetStartOffsetResponse", + "OnInitPartition", + "OnShutdownPartition", + "EventHandler", +] + + +class BaseReaderEvent: + pass + + +@dataclass +class OnCommit(BaseReaderEvent): + topic: str + offset: int + + +@dataclass +class OnPartitionGetStartOffsetRequest(BaseReaderEvent): + topic: str + partition_id: int + + +@dataclass +class OnPartitionGetStartOffsetResponse: + start_offset: int + + +class OnInitPartition(BaseReaderEvent): + pass + + +class OnShutdownPartition: + pass + + +TopicEventDispatchType = Union[OnPartitionGetStartOffsetResponse, None] + + +class EventHandler: + def on_commit(self, event: OnCommit) -> Union[None, Awaitable[None]]: + pass + + def on_partition_get_start_offset( + self, + event: OnPartitionGetStartOffsetRequest, + ) -> Union[OnPartitionGetStartOffsetResponse, Awaitable[OnPartitionGetStartOffsetResponse]]: + pass + + def on_init_partition(self, event: OnInitPartition) -> Union[None, Awaitable[None]]: + pass + + def on_shutdown_partition(self, event: OnShutdownPartition) -> Union[None, Awaitable[None]]: + pass + + async def _dispatch(self, event: BaseReaderEvent) -> Awaitable[TopicEventDispatchType]: + f = None + if isinstance(event, OnCommit): + f = self.on_commit + elif isinstance(event, OnPartitionGetStartOffsetRequest): + f = self.on_partition_get_start_offset + elif isinstance(event, OnInitPartition): + f = self.on_init_partition + elif isinstance(event, OnShutdownPartition): + f = self.on_shutdown_partition + else: + raise ClientInternalError("Unsupported topic reader event") + + if asyncio.iscoroutinefunction(f): + return await f(event) + + return f(event) diff --git a/ydb/_topic_reader/topic_reader.py b/ydb/_topic_reader/topic_reader.py index 8bc12cc0..d477c9ca 100644 --- a/ydb/_topic_reader/topic_reader.py +++ b/ydb/_topic_reader/topic_reader.py @@ -10,6 +10,7 @@ Callable, ) +from .events import EventHandler from ..retries import RetrySettings from .._grpc.grpcwrapper.ydb_topic import StreamReadMessage, OffsetsRange @@ -20,6 +21,7 @@ class PublicTopicSelector: partitions: Optional[Union[int, List[int]]] = None read_from: Optional[datetime.datetime] = None max_lag: Optional[datetime.timedelta] = None + read_offset: Optional[int] = None def _to_topic_read_settings(self) -> StreamReadMessage.InitRequest.TopicReadSettings: partitions = self.partitions @@ -42,7 +44,7 @@ def _to_topic_read_settings(self) -> StreamReadMessage.InitRequest.TopicReadSett @dataclass class PublicReaderSettings: - consumer: str + consumer: Optional[str] topic: TopicSelectorTypes buffer_size_bytes: int = 50 * 1024 * 1024 auto_partitioning_support: bool = True @@ -53,13 +55,14 @@ class PublicReaderSettings: # decoder_executor, must be set for handle non raw messages decoder_executor: Optional[concurrent.futures.Executor] = None update_token_interval: Union[int, float] = 3600 + event_handler: Optional[EventHandler] = None def __post_init__(self): # check possible create init message _ = self._init_message() def _init_message(self) -> StreamReadMessage.InitRequest: - if not isinstance(self.consumer, str): + if self.consumer is not None and not isinstance(self.consumer, str): raise TypeError("Unsupported type for customer field: '%s'" % type(self.consumer)) if isinstance(self.topic, list): @@ -85,25 +88,6 @@ def _retry_settings(self) -> RetrySettings: return RetrySettings(idempotent=True) -class Events: - class OnCommit: - topic: str - offset: int - - class OnPartitionGetStartOffsetRequest: - topic: str - partition_id: int - - class OnPartitionGetStartOffsetResponse: - start_offset: int - - class OnInitPartition: - pass - - class OnShutdownPatition: - pass - - class RetryPolicy: connection_timeout_sec: float overload_timeout_sec: float diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 87012554..34c52108 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -15,6 +15,7 @@ from ..aio import Driver from ..issues import Error as YdbError, _process_response from . import datatypes +from . import events from . import topic_reader from .._grpc.grpcwrapper.common_utils import ( IGrpcWrapperAsyncIO, @@ -72,6 +73,7 @@ def __init__(self): class PublicAsyncIOReader: _loop: asyncio.AbstractEventLoop _closed: bool + _settings: topic_reader.PublicReaderSettings _reconnector: ReaderReconnector _parent: typing.Any # need for prevent close parent client by GC @@ -84,6 +86,7 @@ def __init__( ): self._loop = asyncio.get_running_loop() self._closed = False + self._settings = settings self._reconnector = ReaderReconnector(driver, settings, self._loop) self._parent = _parent @@ -156,6 +159,9 @@ def commit(self, batch: typing.Union[datatypes.PublicMessage, datatypes.PublicBa For the method no way check the commit result (for example if lost connection - commits will not re-send and committed messages will receive again). """ + if self._settings.consumer is None: + raise issues.Error("Commit operations are not supported for topic reader without consumer.") + try: self._reconnector.commit(batch) except PublicTopicReaderPartitionExpiredError: @@ -171,6 +177,9 @@ async def commit_with_ack(self, batch: typing.Union[datatypes.PublicMessage, dat before receive commit ack. Message may be acked or not (if not - it will send in other read session, to this or other reader). """ + if self._settings.consumer is None: + raise issues.Error("Commit operations are not supported for topic reader without consumer.") + waiter = self._reconnector.commit(batch) await waiter.future @@ -393,6 +402,7 @@ class ReaderStream: _update_token_interval: Union[int, float] _update_token_event: asyncio.Event _get_token_function: Callable[[], str] + _settings: topic_reader.PublicReaderSettings def __init__( self, @@ -425,6 +435,8 @@ def __init__( self._get_token_function = get_token_function self._update_token_event = asyncio.Event() + self._settings = settings + @staticmethod async def create( reader_reconnector_id: int, @@ -615,7 +627,7 @@ async def _read_messages_loop(self): message.server_message, StreamReadMessage.StartPartitionSessionRequest, ): - self._on_start_partition_session(message.server_message) + await self._on_start_partition_session(message.server_message) elif isinstance( message.server_message, @@ -660,7 +672,7 @@ async def _update_token(self, token: str): finally: self._update_token_event.clear() - def _on_start_partition_session(self, message: StreamReadMessage.StartPartitionSessionRequest): + async def _on_start_partition_session(self, message: StreamReadMessage.StartPartitionSessionRequest): try: if message.partition_session.partition_session_id in self._partition_sessions: raise TopicReaderError( @@ -676,11 +688,23 @@ def _on_start_partition_session(self, message: StreamReadMessage.StartPartitionS reader_reconnector_id=self._reader_reconnector_id, reader_stream_id=self._id, ) + + read_offset = None + + if self._settings.event_handler is not None: + resp = await self._settings.event_handler._dispatch( + events.OnPartitionGetStartOffsetRequest( + message.partition_session.path, + message.partition_session.partition_id, + ) + ) + read_offset = None if resp is None else resp.start_offset + self._stream.write( StreamReadMessage.FromClient( client_message=StreamReadMessage.StartPartitionSessionResponse( partition_session_id=message.partition_session.partition_session_id, - read_offset=None, + read_offset=read_offset, commit_offset=None, ) ), diff --git a/ydb/_topic_reader/topic_reader_sync.py b/ydb/_topic_reader/topic_reader_sync.py index 31f28899..bb2fc2a3 100644 --- a/ydb/_topic_reader/topic_reader_sync.py +++ b/ydb/_topic_reader/topic_reader_sync.py @@ -4,6 +4,7 @@ import typing from typing import List, Union, Optional +from ydb import issues from ydb._grpc.grpcwrapper.common_utils import SupportedDriverType from ydb._topic_common.common import ( _get_shared_event_loop, @@ -31,6 +32,7 @@ class TopicReaderSync: _caller: CallFromSyncToAsync _async_reader: PublicAsyncIOReader _closed: bool + _settings: PublicReaderSettings _parent: typing.Any # need for prevent stop the client by GC def __init__( @@ -55,6 +57,8 @@ async def create_reader(): self._async_reader = asyncio.run_coroutine_threadsafe(create_reader(), loop).result() + self._settings = settings + self._parent = _parent def __del__(self): @@ -154,6 +158,9 @@ def commit(self, mess: typing.Union[datatypes.PublicMessage, datatypes.PublicBat """ self._check_closed() + if self._settings.consumer is None: + raise issues.Error("Commit operations are not supported for topic reader without consumer.") + self._caller.call_sync(lambda: self._async_reader.commit(mess)) def commit_with_ack( @@ -168,6 +175,9 @@ def commit_with_ack( """ self._check_closed() + if self._settings.consumer is None: + raise issues.Error("Commit operations are not supported for topic reader without consumer.") + return self._caller.unsafe_call_with_result(self._async_reader.commit_with_ack(mess), timeout) def async_commit_with_ack( @@ -178,6 +188,9 @@ def async_commit_with_ack( """ self._check_closed() + if self._settings.consumer is None: + raise issues.Error("Commit operations are not supported for topic reader without consumer.") + return self._caller.unsafe_call_with_future(self._async_reader.commit_with_ack(mess)) def close(self, *, flush: bool = True, timeout: TimeoutType = None): diff --git a/ydb/topic.py b/ydb/topic.py index a501f9d2..1f839ba7 100644 --- a/ydb/topic.py +++ b/ydb/topic.py @@ -16,6 +16,7 @@ "TopicReader", "TopicReaderAsyncIO", "TopicReaderBatch", + "TopicReaderEvents", "TopicReaderMessage", "TopicReaderSelector", "TopicReaderSettings", @@ -42,6 +43,8 @@ from . import driver +from ._topic_reader import events as TopicReaderEvents + from ._topic_reader.datatypes import ( PublicBatch as TopicReaderBatch, PublicMessage as TopicReaderMessage, @@ -52,7 +55,9 @@ PublicTopicSelector as TopicReaderSelector, ) -from ._topic_reader.topic_reader_sync import TopicReaderSync as TopicReader +from ._topic_reader.topic_reader_sync import ( + TopicReaderSync as TopicReader, +) from ._topic_reader.topic_reader_asyncio import ( PublicAsyncIOReader as TopicReaderAsyncIO, @@ -240,7 +245,7 @@ async def drop_topic(self, path: str): def reader( self, topic: Union[str, TopicReaderSelector, List[Union[str, TopicReaderSelector]]], - consumer: str, + consumer: Optional[str], buffer_size_bytes: int = 50 * 1024 * 1024, # decoders: map[codec_code] func(encoded_bytes)->decoded_bytes # the func will be called from multiply threads in parallel @@ -249,6 +254,7 @@ def reader( # if max_worker in the executor is 1 - then decoders will be called from the thread without parallel decoder_executor: Optional[concurrent.futures.Executor] = None, auto_partitioning_support: Optional[bool] = True, # Auto partitioning feature flag. Default - True. + event_handler: Optional[TopicReaderEvents.EventHandler] = None, ) -> TopicReaderAsyncIO: if not decoder_executor: @@ -257,6 +263,23 @@ def reader( args = locals().copy() del args["self"] + if consumer == "": + raise issues.Error( + "Consumer name could not be empty! To use reader without consumer specify consumer as None." + ) + + if consumer is None: + if not isinstance(topic, TopicReaderSelector) or topic.partitions is None: + raise issues.Error( + "To use reader without consumer it is required to specify partition_ids in topic selector." + ) + + if event_handler is None: + raise issues.Error( + "To use reader without consumer it is required to specify event_handler with " + "on_partition_get_start_offset method." + ) + settings = TopicReaderSettings(**args) return TopicReaderAsyncIO(self._driver, settings, _parent=self) @@ -484,7 +507,7 @@ def drop_topic(self, path: str): def reader( self, topic: Union[str, TopicReaderSelector, List[Union[str, TopicReaderSelector]]], - consumer: str, + consumer: Optional[str], buffer_size_bytes: int = 50 * 1024 * 1024, # decoders: map[codec_code] func(encoded_bytes)->decoded_bytes # the func will be called from multiply threads in parallel @@ -493,13 +516,30 @@ def reader( # if max_worker in the executor is 1 - then decoders will be called from the thread without parallel decoder_executor: Optional[concurrent.futures.Executor] = None, # default shared client executor pool auto_partitioning_support: Optional[bool] = True, # Auto partitioning feature flag. Default - True. + event_handler: Optional[TopicReaderEvents.EventHandler] = None, ) -> TopicReader: if not decoder_executor: decoder_executor = self._executor args = locals().copy() del args["self"] - self._check_closed() + + if consumer == "": + raise issues.Error( + "Consumer name could not be empty! To use reader without consumer specify consumer as None." + ) + + if consumer is None: + if not isinstance(topic, TopicReaderSelector) or topic.partitions is None: + raise issues.Error( + "To use reader without consumer it is required to specify partition_ids in topic selector." + ) + + if event_handler is None: + raise issues.Error( + "To use reader without consumer it is required to specify event_handler with " + "on_partition_get_start_offset method." + ) settings = TopicReaderSettings(**args) From c0f68d5d0c818884a41140a33395b7c8f12d9dbe Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 21 Apr 2025 16:56:15 +0300 Subject: [PATCH 394/429] CommitOffset feature --- tests/topics/test_topic_reader.py | 40 ++++++++++++++++++++++++++++++ ydb/_apis.py | 1 + ydb/_grpc/grpcwrapper/ydb_topic.py | 16 ++++++++++++ ydb/_topic_reader/datatypes.py | 4 +++ ydb/topic.py | 30 ++++++++++++++++++++++ 5 files changed, 91 insertions(+) diff --git a/tests/topics/test_topic_reader.py b/tests/topics/test_topic_reader.py index 1836d2e7..e6426660 100644 --- a/tests/topics/test_topic_reader.py +++ b/tests/topics/test_topic_reader.py @@ -64,6 +64,26 @@ async def test_read_and_commit_with_ack(self, driver, topic_with_messages, topic assert message != batch.messages[0] + async def test_commit_offset_works(self, driver, topic_with_messages, topic_consumer): + for out in ["123", "456", "789", "0"]: + async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: + message = await reader.receive_message() + assert message.data.decode() == out + + await driver.topic_client.commit_offset( + topic_with_messages, topic_consumer, message.partition_id, message.offset + 1 + ) + + async def test_reader_reconnect_after_commit_offset(self, driver, topic_with_messages, topic_consumer): + async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: + for out in ["123", "456", "789", "0"]: + message = await reader.receive_message() + assert message.data.decode() == out + + await driver.topic_client.commit_offset( + topic_with_messages, topic_consumer, message.partition_id, message.offset + 1 + ) + async def test_read_compressed_messages(self, driver, topic_path, topic_consumer): async with driver.topic_client.writer(topic_path, codec=ydb.TopicCodec.GZIP) as writer: await writer.write("123") @@ -183,6 +203,26 @@ def test_read_and_commit_with_ack(self, driver_sync, topic_with_messages, topic_ assert message != batch.messages[0] + def test_commit_offset_works(self, driver_sync, topic_with_messages, topic_consumer): + for out in ["123", "456", "789", "0"]: + with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: + message = reader.receive_message() + assert message.data.decode() == out + + driver_sync.topic_client.commit_offset( + topic_with_messages, topic_consumer, message.partition_id, message.offset + 1 + ) + + def test_reader_reconnect_after_commit_offset(self, driver_sync, topic_with_messages, topic_consumer): + with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: + for out in ["123", "456", "789", "0"]: + message = reader.receive_message() + assert message.data.decode() == out + + driver_sync.topic_client.commit_offset( + topic_with_messages, topic_consumer, message.partition_id, message.offset + 1 + ) + def test_read_compressed_messages(self, driver_sync, topic_path, topic_consumer): with driver_sync.topic_client.writer(topic_path, codec=ydb.TopicCodec.GZIP) as writer: writer.write("123") diff --git a/ydb/_apis.py b/ydb/_apis.py index e54f25d2..827a71a4 100644 --- a/ydb/_apis.py +++ b/ydb/_apis.py @@ -117,6 +117,7 @@ class TopicService(object): StreamRead = "StreamRead" StreamWrite = "StreamWrite" UpdateOffsetsInTransaction = "UpdateOffsetsInTransaction" + CommitOffset = "CommitOffset" class QueryService(object): diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index a4cdf407..e70de150 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -137,6 +137,22 @@ def from_proto(msg: ydb_topic_pb2.UpdateTokenResponse) -> typing.Any: return UpdateTokenResponse() +@dataclass +class CommitOffsetRequest(IToProto): + path: str + consumer: str + partition_id: int + offset: int + + def to_proto(self) -> ydb_topic_pb2.CommitOffsetRequest: + return ydb_topic_pb2.CommitOffsetRequest( + path=self.path, + consumer=self.consumer, + partition_id=self.partition_id, + offset=self.offset, + ) + + ######################################################################################################################## # StreamWrite ######################################################################################################################## diff --git a/ydb/_topic_reader/datatypes.py b/ydb/_topic_reader/datatypes.py index 74f06a08..737fa414 100644 --- a/ydb/_topic_reader/datatypes.py +++ b/ydb/_topic_reader/datatypes.py @@ -56,6 +56,10 @@ def _commit_get_offsets_range(self) -> OffsetsRange: def alive(self) -> bool: return not self._partition_session.closed + @property + def partition_id(self) -> int: + return self._partition_session.partition_id + @dataclass class PartitionSession: diff --git a/ydb/topic.py b/ydb/topic.py index 1f839ba7..ceb82efb 100644 --- a/ydb/topic.py +++ b/ydb/topic.py @@ -340,6 +340,21 @@ def tx_writer( return TopicTxWriterAsyncIO(tx=tx, driver=self._driver, settings=settings, _client=self) + async def commit_offset(self, path: str, consumer: str, partition_id: int, offset: int) -> None: + req = _ydb_topic.CommitOffsetRequest( + path=path, + consumer=consumer, + partition_id=partition_id, + offset=offset, + ) + + await self._driver( + req.to_proto(), + _apis.TopicService.Stub, + _apis.TopicService.CommitOffset, + _wrap_operation, + ) + def close(self): if self._closed: return @@ -603,6 +618,21 @@ def tx_writer( return TopicTxWriter(tx, self._driver, settings, _parent=self) + def commit_offset(self, path: str, consumer: str, partition_id: int, offset: int) -> None: + req = _ydb_topic.CommitOffsetRequest( + path=path, + consumer=consumer, + partition_id=partition_id, + offset=offset, + ) + + self._driver( + req.to_proto(), + _apis.TopicService.Stub, + _apis.TopicService.CommitOffset, + _wrap_operation, + ) + def close(self): if self._closed: return From 0c32132bd1f378b35ef2d17963a52817130bdd4a Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 22 Apr 2025 11:45:26 +0300 Subject: [PATCH 395/429] update docker image from trunk to latest --- docker-compose-tls.yml | 2 +- docker-compose.yml | 2 +- tests/query/test_query_parameters.py | 24 +++++++++++++++++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/docker-compose-tls.yml b/docker-compose-tls.yml index f0a4b328..80b09eb9 100644 --- a/docker-compose-tls.yml +++ b/docker-compose-tls.yml @@ -1,7 +1,7 @@ version: "3.9" services: ydb: - image: ydbplatform/local-ydb:trunk + image: ydbplatform/local-ydb:latest restart: always ports: - 2136:2136 diff --git a/docker-compose.yml b/docker-compose.yml index 1a466fab..aafa938a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.3" services: ydb: - image: ydbplatform/local-ydb:trunk + image: ydbplatform/local-ydb:latest restart: always ports: - 2136:2136 diff --git a/tests/query/test_query_parameters.py b/tests/query/test_query_parameters.py index 4171f5eb..0367b6cd 100644 --- a/tests/query/test_query_parameters.py +++ b/tests/query/test_query_parameters.py @@ -4,10 +4,11 @@ import ydb -query = """SELECT $a AS value""" +query_template = "DECLARE $a as %s; SELECT $a AS value" def test_select_implicit_int(pool: ydb.QuerySessionPool): + query = query_template % "Int64" expected_value = 111 res = pool.execute_with_retries(query, parameters={"$a": expected_value}) actual_value = res[0].rows[0]["value"] @@ -15,6 +16,7 @@ def test_select_implicit_int(pool: ydb.QuerySessionPool): def test_select_implicit_float(pool: ydb.QuerySessionPool): + query = query_template % "Double" expected_value = 11.1 res = pool.execute_with_retries(query, parameters={"$a": expected_value}) actual_value = res[0].rows[0]["value"] @@ -22,6 +24,7 @@ def test_select_implicit_float(pool: ydb.QuerySessionPool): def test_select_implicit_bool(pool: ydb.QuerySessionPool): + query = query_template % "Bool" expected_value = False res = pool.execute_with_retries(query, parameters={"$a": expected_value}) actual_value = res[0].rows[0]["value"] @@ -29,6 +32,7 @@ def test_select_implicit_bool(pool: ydb.QuerySessionPool): def test_select_implicit_str(pool: ydb.QuerySessionPool): + query = query_template % "Utf8" expected_value = "text" res = pool.execute_with_retries(query, parameters={"$a": expected_value}) actual_value = res[0].rows[0]["value"] @@ -36,6 +40,7 @@ def test_select_implicit_str(pool: ydb.QuerySessionPool): def test_select_implicit_bytes(pool: ydb.QuerySessionPool): + query = query_template % "String" expected_value = b"text" res = pool.execute_with_retries(query, parameters={"$a": expected_value}) actual_value = res[0].rows[0]["value"] @@ -43,6 +48,7 @@ def test_select_implicit_bytes(pool: ydb.QuerySessionPool): def test_select_implicit_list(pool: ydb.QuerySessionPool): + query = query_template % "List" expected_value = [1, 2, 3] res = pool.execute_with_retries(query, parameters={"$a": expected_value}) actual_value = res[0].rows[0]["value"] @@ -50,6 +56,7 @@ def test_select_implicit_list(pool: ydb.QuerySessionPool): def test_select_implicit_dict(pool: ydb.QuerySessionPool): + query = query_template % "Dict" expected_value = {"a": 1, "b": 2} res = pool.execute_with_retries(query, parameters={"$a": expected_value}) actual_value = res[0].rows[0]["value"] @@ -57,6 +64,7 @@ def test_select_implicit_dict(pool: ydb.QuerySessionPool): def test_select_implicit_list_nested(pool: ydb.QuerySessionPool): + query = query_template % "List>" expected_value = [{"a": 1}, {"b": 2}] res = pool.execute_with_retries(query, parameters={"$a": expected_value}) actual_value = res[0].rows[0]["value"] @@ -64,6 +72,7 @@ def test_select_implicit_list_nested(pool: ydb.QuerySessionPool): def test_select_implicit_dict_nested(pool: ydb.QuerySessionPool): + query = query_template % "Dict>" expected_value = {"a": [1, 2, 3], "b": [4, 5]} res = pool.execute_with_retries(query, parameters={"$a": expected_value}) actual_value = res[0].rows[0]["value"] @@ -71,6 +80,8 @@ def test_select_implicit_dict_nested(pool: ydb.QuerySessionPool): def test_select_implicit_custom_type_raises(pool: ydb.QuerySessionPool): + query = query_template % "Struct" + class CustomClass: pass @@ -80,18 +91,21 @@ class CustomClass: def test_select_implicit_empty_list_raises(pool: ydb.QuerySessionPool): + query = query_template % "List" expected_value = [] with pytest.raises(ValueError): pool.execute_with_retries(query, parameters={"$a": expected_value}) def test_select_implicit_empty_dict_raises(pool: ydb.QuerySessionPool): + query = query_template % "Dict" expected_value = {} with pytest.raises(ValueError): pool.execute_with_retries(query, parameters={"$a": expected_value}) def test_select_explicit_primitive(pool: ydb.QuerySessionPool): + query = query_template % "Int64" expected_value = 111 res = pool.execute_with_retries(query, parameters={"$a": (expected_value, ydb.PrimitiveType.Int64)}) actual_value = res[0].rows[0]["value"] @@ -99,6 +113,7 @@ def test_select_explicit_primitive(pool: ydb.QuerySessionPool): def test_select_explicit_list(pool: ydb.QuerySessionPool): + query = query_template % "List" expected_value = [1, 2, 3] type_ = ydb.ListType(ydb.PrimitiveType.Int64) res = pool.execute_with_retries(query, parameters={"$a": (expected_value, type_)}) @@ -107,6 +122,7 @@ def test_select_explicit_list(pool: ydb.QuerySessionPool): def test_select_explicit_dict(pool: ydb.QuerySessionPool): + query = query_template % "Dict" expected_value = {"key": "value"} type_ = ydb.DictType(ydb.PrimitiveType.Utf8, ydb.PrimitiveType.Utf8) res = pool.execute_with_retries(query, parameters={"$a": (expected_value, type_)}) @@ -115,6 +131,7 @@ def test_select_explicit_dict(pool: ydb.QuerySessionPool): def test_select_explicit_empty_list_not_raises(pool: ydb.QuerySessionPool): + query = query_template % "List" expected_value = [] type_ = ydb.ListType(ydb.PrimitiveType.Int64) res = pool.execute_with_retries(query, parameters={"$a": (expected_value, type_)}) @@ -123,6 +140,7 @@ def test_select_explicit_empty_list_not_raises(pool: ydb.QuerySessionPool): def test_select_explicit_empty_dict_not_raises(pool: ydb.QuerySessionPool): + query = query_template % "Dict" expected_value = {} type_ = ydb.DictType(ydb.PrimitiveType.Utf8, ydb.PrimitiveType.Utf8) res = pool.execute_with_retries(query, parameters={"$a": (expected_value, type_)}) @@ -131,6 +149,7 @@ def test_select_explicit_empty_dict_not_raises(pool: ydb.QuerySessionPool): def test_select_typedvalue_full_primitive(pool: ydb.QuerySessionPool): + query = query_template % "Int64" expected_value = 111 typed_value = ydb.TypedValue(expected_value, ydb.PrimitiveType.Int64) res = pool.execute_with_retries(query, parameters={"$a": typed_value}) @@ -139,6 +158,7 @@ def test_select_typedvalue_full_primitive(pool: ydb.QuerySessionPool): def test_select_typedvalue_implicit_primitive(pool: ydb.QuerySessionPool): + query = query_template % "Int64" expected_value = 111 typed_value = ydb.TypedValue(expected_value) res = pool.execute_with_retries(query, parameters={"$a": typed_value}) @@ -147,6 +167,8 @@ def test_select_typedvalue_implicit_primitive(pool: ydb.QuerySessionPool): def test_select_typevalue_custom_type_raises(pool: ydb.QuerySessionPool): + query = query_template % "Struct" + class CustomClass: pass From b76a5dd274591d5f7096b83af4cbf963869980a8 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 22 Apr 2025 12:21:28 +0300 Subject: [PATCH 396/429] QueryService stats support --- examples/query-stats/main.py | 44 +++++++++++++++++++++++++++ tests/query/test_query_session.py | 33 +++++++++++++++++++- tests/query/test_query_transaction.py | 30 ++++++++++++++++++ ydb/aio/query/pool.py | 2 +- ydb/aio/query/session.py | 13 ++++++-- ydb/aio/query/transaction.py | 16 +++++++--- ydb/query/__init__.py | 2 ++ ydb/query/base.py | 13 ++++++-- ydb/query/pool.py | 2 +- ydb/query/session.py | 31 +++++++++++++++---- ydb/query/transaction.py | 31 ++++++++++++++----- 11 files changed, 193 insertions(+), 24 deletions(-) create mode 100644 examples/query-stats/main.py diff --git a/examples/query-stats/main.py b/examples/query-stats/main.py new file mode 100644 index 00000000..5db4d299 --- /dev/null +++ b/examples/query-stats/main.py @@ -0,0 +1,44 @@ +import os +import ydb + + +SESSION_QUERY = "SELECT 1" +TX_QUERY = "SELECT 1" + + +def get_query_stats_from_session(pool: ydb.QuerySessionPool): + def callee(session: ydb.QuerySession): + with session.execute(SESSION_QUERY, stats_mode=ydb.QueryStatsMode.PROFILE): + pass + + print(session.last_query_stats) + + pool.retry_operation_sync(callee) + + +def get_query_stats_from_tx(pool: ydb.QuerySessionPool): + def callee(tx: ydb.QueryTxContext): + with tx.execute(TX_QUERY, stats_mode=ydb.QueryStatsMode.PROFILE): + pass + + print(tx.last_query_stats) + + pool.retry_tx_sync(callee) + + +def main(): + driver = ydb.Driver( + endpoint=os.getenv("YDB_ENDPOINT", "grpc://localhost:2136"), + database=os.getenv("YDB_DATABASE", "/local"), + credentials=ydb.AnonymousCredentials(), + ) + + with driver: + # wait until driver become initialized + driver.wait(fail_fast=True, timeout=5) + with ydb.QuerySessionPool(driver) as pool: + get_query_stats_from_session(pool) + get_query_stats_from_tx(pool) + + +main() diff --git a/tests/query/test_query_session.py b/tests/query/test_query_session.py index f151661f..af861668 100644 --- a/tests/query/test_query_session.py +++ b/tests/query/test_query_session.py @@ -4,7 +4,7 @@ from concurrent.futures import _base as b from unittest import mock - +from ydb.query.base import QueryStatsMode from ydb.query.session import QuerySession @@ -143,3 +143,34 @@ def cancel(self): assert "attach stream thread" not in thread_names _check_session_state_empty(session) + + @pytest.mark.parametrize( + "stats_mode", + [ + None, + QueryStatsMode.UNSPECIFIED, + QueryStatsMode.NONE, + QueryStatsMode.BASIC, + QueryStatsMode.FULL, + QueryStatsMode.PROFILE, + ], + ) + def test_stats_mode(self, session: QuerySession, stats_mode: QueryStatsMode): + session.create() + + for _ in session.execute("SELECT 1; SELECT 2; SELECT 3;", stats_mode=stats_mode): + pass + + stats = session.last_query_stats + + if stats_mode in [None, QueryStatsMode.NONE, QueryStatsMode.UNSPECIFIED]: + assert stats is None + return + + assert stats is not None + assert len(stats.query_phases) > 0 + + if stats_mode != QueryStatsMode.BASIC: + assert len(stats.query_plan) > 0 + else: + assert stats.query_plan == "" diff --git a/tests/query/test_query_transaction.py b/tests/query/test_query_transaction.py index 4533e528..77c7251b 100644 --- a/tests/query/test_query_transaction.py +++ b/tests/query/test_query_transaction.py @@ -1,5 +1,6 @@ import pytest +from ydb.query.base import QueryStatsMode from ydb.query.transaction import QueryTxContext from ydb.query.transaction import QueryTxStateEnum @@ -104,3 +105,32 @@ def test_tx_identity_after_begin_works(self, tx: QueryTxContext): assert identity.tx_id == tx.tx_id assert identity.session_id == tx.session_id + + @pytest.mark.parametrize( + "stats_mode", + [ + None, + QueryStatsMode.UNSPECIFIED, + QueryStatsMode.NONE, + QueryStatsMode.BASIC, + QueryStatsMode.FULL, + QueryStatsMode.PROFILE, + ], + ) + def test_stats_mode(self, tx: QueryTxContext, stats_mode: QueryStatsMode): + for _ in tx.execute("SELECT 1; SELECT 2; SELECT 3;", commit_tx=True, stats_mode=stats_mode): + pass + + stats = tx.last_query_stats + + if stats_mode in [None, QueryStatsMode.NONE, QueryStatsMode.UNSPECIFIED]: + assert stats is None + return + + assert stats is not None + assert len(stats.query_phases) > 0 + + if stats_mode != QueryStatsMode.BASIC: + assert len(stats.query_plan) > 0 + else: + assert stats.query_plan == "" diff --git a/ydb/aio/query/pool.py b/ydb/aio/query/pool.py index f1ca68d1..b691a1b1 100644 --- a/ydb/aio/query/pool.py +++ b/ydb/aio/query/pool.py @@ -142,7 +142,7 @@ async def retry_tx_async( """Special interface to execute a bunch of commands with transaction in a safe, retriable way. :param callee: A function, that works with session. - :param tx_mode: Transaction mode, which is a one from the following choises: + :param tx_mode: Transaction mode, which is a one from the following choices: 1) QuerySerializableReadWrite() which is default mode; 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); 3) QuerySnapshotReadOnly(); diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index 0561de8c..fe857878 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -117,15 +117,22 @@ async def execute( exec_mode: base.QueryExecMode = None, concurrent_result_sets: bool = False, settings: Optional[BaseRequestSettings] = None, + *, + stats_mode: Optional[base.QueryStatsMode] = None, ) -> AsyncResponseContextIterator: """Sends a query to Query Service :param query: (YQL or SQL text) to be executed. - :param syntax: Syntax of the query, which is a one from the following choises: + :param syntax: Syntax of the query, which is a one from the following choices: 1) QuerySyntax.YQL_V1, which is default; 2) QuerySyntax.PG. :param parameters: dict with parameters and YDB types; :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; + :param stats_mode: Mode of query statistics to gather, which is a one from the following choices: + 1) QueryStatsMode:NONE, which is default; + 2) QueryStatsMode.BASIC; + 3) QueryStatsMode.FULL; + 4) QueryStatsMode.PROFILE; :return: Iterator with result sets """ @@ -133,10 +140,11 @@ async def execute( stream_it = await self._execute_call( query=query, + parameters=parameters, commit_tx=True, syntax=syntax, exec_mode=exec_mode, - parameters=parameters, + stats_mode=stats_mode, concurrent_result_sets=concurrent_result_sets, settings=settings, ) @@ -147,6 +155,7 @@ async def execute( rpc_state=None, response_pb=resp, session_state=self._state, + session=self, settings=self._settings, ), ) diff --git a/ydb/aio/query/transaction.py b/ydb/aio/query/transaction.py index f0547e5f..c9a6e445 100644 --- a/ydb/aio/query/transaction.py +++ b/ydb/aio/query/transaction.py @@ -29,7 +29,7 @@ def __init__(self, driver, session_state, session, tx_mode): :param driver: A driver instance :param session_state: A state of session - :param tx_mode: Transaction mode, which is a one from the following choises: + :param tx_mode: Transaction mode, which is a one from the following choices: 1) QuerySerializableReadWrite() which is default mode; 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); 3) QuerySnapshotReadOnly(); @@ -142,21 +142,28 @@ async def execute( exec_mode: Optional[base.QueryExecMode] = None, concurrent_result_sets: Optional[bool] = False, settings: Optional[BaseRequestSettings] = None, + *, + stats_mode: Optional[base.QueryStatsMode] = None, ) -> AsyncResponseContextIterator: """Sends a query to Query Service :param query: (YQL or SQL text) to be executed. :param parameters: dict with parameters and YDB types; :param commit_tx: A special flag that allows transaction commit. - :param syntax: Syntax of the query, which is a one from the following choises: + :param syntax: Syntax of the query, which is a one from the following choices: 1) QuerySyntax.YQL_V1, which is default; 2) QuerySyntax.PG. - :param exec_mode: Exec mode of the query, which is a one from the following choises: + :param exec_mode: Exec mode of the query, which is a one from the following choices: 1) QueryExecMode.EXECUTE, which is default; 2) QueryExecMode.EXPLAIN; 3) QueryExecMode.VALIDATE; 4) QueryExecMode.PARSE. :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; + :param stats_mode: Mode of query statistics to gather, which is a one from the following choices: + 1) QueryStatsMode:NONE, which is default; + 2) QueryStatsMode.BASIC; + 3) QueryStatsMode.FULL; + 4) QueryStatsMode.PROFILE; :return: Iterator with result sets """ @@ -164,10 +171,11 @@ async def execute( stream_it = await self._execute_call( query=query, + parameters=parameters, commit_tx=commit_tx, syntax=syntax, exec_mode=exec_mode, - parameters=parameters, + stats_mode=stats_mode, concurrent_result_sets=concurrent_result_sets, settings=settings, ) diff --git a/ydb/query/__init__.py b/ydb/query/__init__.py index 59dd7992..76436f98 100644 --- a/ydb/query/__init__.py +++ b/ydb/query/__init__.py @@ -7,6 +7,7 @@ "QuerySessionPool", "QueryClientSettings", "QuerySession", + "QueryStatsMode", "QueryTxContext", ] @@ -14,6 +15,7 @@ from .base import ( QueryClientSettings, + QueryStatsMode, ) from .session import QuerySession diff --git a/ydb/query/base.py b/ydb/query/base.py index a5ebedd9..52a6312e 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -25,6 +25,7 @@ if typing.TYPE_CHECKING: from .transaction import BaseQueryTxContext + from .session import BaseQuerySession class QuerySyntax(enum.IntEnum): @@ -41,7 +42,7 @@ class QueryExecMode(enum.IntEnum): EXECUTE = 50 -class StatsMode(enum.IntEnum): +class QueryStatsMode(enum.IntEnum): UNSPECIFIED = 0 NONE = 10 BASIC = 20 @@ -132,12 +133,13 @@ def create_execute_query_request( tx_mode: Optional[BaseQueryTxMode], syntax: Optional[QuerySyntax], exec_mode: Optional[QueryExecMode], + stats_mode: Optional[QueryStatsMode], parameters: Optional[dict], concurrent_result_sets: Optional[bool], ) -> ydb_query.ExecuteQueryRequest: syntax = QuerySyntax.YQL_V1 if not syntax else syntax exec_mode = QueryExecMode.EXECUTE if not exec_mode else exec_mode - stats_mode = StatsMode.NONE # TODO: choise is not supported yet + stats_mode = QueryStatsMode.NONE if stats_mode is None else stats_mode tx_control = None if not tx_id and not tx_mode: @@ -189,6 +191,7 @@ def wrap_execute_query_response( response_pb: _apis.ydb_query.ExecuteQueryResponsePart, session_state: IQuerySessionState, tx: Optional["BaseQueryTxContext"] = None, + session: Optional["BaseQuerySession"] = None, commit_tx: Optional[bool] = False, settings: Optional[QueryClientSettings] = None, ) -> convert.ResultSet: @@ -198,6 +201,12 @@ def wrap_execute_query_response( elif tx and response_pb.tx_meta and not tx.tx_id: tx._move_to_beginned(response_pb.tx_meta.id) + if response_pb.HasField("exec_stats"): + if tx is not None: + tx._last_query_stats = response_pb.exec_stats + if session is not None: + session._last_query_stats = response_pb.exec_stats + if response_pb.HasField("result_set"): return convert.ResultSet.from_message(response_pb.result_set, settings) diff --git a/ydb/query/pool.py b/ydb/query/pool.py index b25f7db8..1cf95ac0 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -151,7 +151,7 @@ def retry_tx_sync( """Special interface to execute a bunch of commands with transaction in a safe, retriable way. :param callee: A function, that works with session. - :param tx_mode: Transaction mode, which is a one from the following choises: + :param tx_mode: Transaction mode, which is a one from the following choices: 1) QuerySerializableReadWrite() which is default mode; 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); 3) QuerySnapshotReadOnly(); diff --git a/ydb/query/session.py b/ydb/query/session.py index 382c922d..3cc6c13d 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -147,6 +147,12 @@ def __init__(self, driver: common_utils.SupportedDriverType, settings: Optional[ .with_timeout(DEFAULT_ATTACH_LONG_TIMEOUT) ) + self._last_query_stats = None + + @property + def last_query_stats(self): + return self._last_query_stats + def _get_client_settings( self, driver: common_utils.SupportedDriverType, @@ -189,22 +195,26 @@ def _attach_call(self) -> Iterable[_apis.ydb_query.SessionState]: def _execute_call( self, query: str, + parameters: dict = None, commit_tx: bool = False, syntax: base.QuerySyntax = None, exec_mode: base.QueryExecMode = None, - parameters: dict = None, + stats_mode: Optional[base.QueryStatsMode] = None, concurrent_result_sets: bool = False, settings: Optional[BaseRequestSettings] = None, ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: + self._last_query_stats = None + request = base.create_execute_query_request( query=query, - session_id=self._state.session_id, + parameters=parameters, commit_tx=commit_tx, + session_id=self._state.session_id, tx_mode=None, tx_id=None, syntax=syntax, exec_mode=exec_mode, - parameters=parameters, + stats_mode=stats_mode, concurrent_result_sets=concurrent_result_sets, ) @@ -293,7 +303,7 @@ def create(self, settings: Optional[BaseRequestSettings] = None) -> "QuerySessio def transaction(self, tx_mode: Optional[base.BaseQueryTxMode] = None) -> QueryTxContext: """Creates a transaction context manager with specified transaction mode. - :param tx_mode: Transaction mode, which is a one from the following choises: + :param tx_mode: Transaction mode, which is a one from the following choices: 1) QuerySerializableReadWrite() which is default mode; 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); 3) QuerySnapshotReadOnly(); @@ -321,15 +331,22 @@ def execute( exec_mode: base.QueryExecMode = None, concurrent_result_sets: bool = False, settings: Optional[BaseRequestSettings] = None, + *, + stats_mode: Optional[base.QueryStatsMode] = None, ) -> base.SyncResponseContextIterator: """Sends a query to Query Service :param query: (YQL or SQL text) to be executed. - :param syntax: Syntax of the query, which is a one from the following choises: + :param syntax: Syntax of the query, which is a one from the following choices: 1) QuerySyntax.YQL_V1, which is default; 2) QuerySyntax.PG. :param parameters: dict with parameters and YDB types; :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; + :param stats_mode: Mode of query statistics to gather, which is a one from the following choices: + 1) QueryStatsMode:NONE, which is default; + 2) QueryStatsMode.BASIC; + 3) QueryStatsMode.FULL; + 4) QueryStatsMode.PROFILE; :return: Iterator with result sets """ @@ -337,10 +354,11 @@ def execute( stream_it = self._execute_call( query=query, + parameters=parameters, commit_tx=True, syntax=syntax, exec_mode=exec_mode, - parameters=parameters, + stats_mode=stats_mode, concurrent_result_sets=concurrent_result_sets, settings=settings, ) @@ -351,6 +369,7 @@ def execute( rpc_state=None, response_pb=resp, session_state=self._state, + session=self, settings=self._settings, ), ) diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index ae7642db..008ac7c4 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -197,7 +197,7 @@ def __init__(self, driver, session_state, session, tx_mode): :param driver: A driver instance :param session_state: A state of session - :param tx_mode: Transaction mode, which is a one from the following choises: + :param tx_mode: Transaction mode, which is a one from the following choices: 1) QuerySerializableReadWrite() which is default mode; 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); 3) QuerySnapshotReadOnly(); @@ -210,6 +210,7 @@ def __init__(self, driver, session_state, session, tx_mode): self.session = session self._prev_stream = None self._external_error = None + self._last_query_stats = None @property def session_id(self) -> str: @@ -229,6 +230,10 @@ def tx_id(self) -> Optional[str]: """ return self._tx_state.tx_id + @property + def last_query_stats(self): + return self._last_query_stats + def _tx_identity(self) -> _ydb_topic.TransactionIdentity: if not self.tx_id: raise RuntimeError("Unable to get tx identity without started tx.") @@ -283,25 +288,29 @@ def _rollback_call(self, settings: Optional[BaseRequestSettings]) -> "BaseQueryT def _execute_call( self, query: str, + parameters: Optional[dict], commit_tx: Optional[bool], syntax: Optional[base.QuerySyntax], exec_mode: Optional[base.QueryExecMode], - parameters: Optional[dict], + stats_mode: Optional[base.QueryStatsMode], concurrent_result_sets: Optional[bool], settings: Optional[BaseRequestSettings], ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: self._tx_state._check_tx_ready_to_use() self._check_external_error_set() + self._last_query_stats = None + request = base.create_execute_query_request( query=query, - session_id=self._session_state.session_id, + parameters=parameters, commit_tx=commit_tx, + session_id=self._session_state.session_id, tx_id=self._tx_state.tx_id, tx_mode=self._tx_state.tx_mode, syntax=syntax, exec_mode=exec_mode, - parameters=parameters, + stats_mode=stats_mode, concurrent_result_sets=concurrent_result_sets, ) @@ -338,7 +347,7 @@ def __init__(self, driver, session_state, session, tx_mode): :param driver: A driver instance :param session_state: A state of session - :param tx_mode: Transaction mode, which is a one from the following choises: + :param tx_mode: Transaction mode, which is a one from the following choices: 1) QuerySerializableReadWrite() which is default mode; 2) QueryOnlineReadOnly(allow_inconsistent_reads=False); 3) QuerySnapshotReadOnly(); @@ -451,22 +460,29 @@ def execute( exec_mode: Optional[base.QueryExecMode] = None, concurrent_result_sets: Optional[bool] = False, settings: Optional[BaseRequestSettings] = None, + *, + stats_mode: Optional[base.QueryStatsMode] = None, ) -> base.SyncResponseContextIterator: """Sends a query to Query Service :param query: (YQL or SQL text) to be executed. :param parameters: dict with parameters and YDB types; :param commit_tx: A special flag that allows transaction commit. - :param syntax: Syntax of the query, which is a one from the following choises: + :param syntax: Syntax of the query, which is a one from the following choices: 1) QuerySyntax.YQL_V1, which is default; 2) QuerySyntax.PG. - :param exec_mode: Exec mode of the query, which is a one from the following choises: + :param exec_mode: Exec mode of the query, which is a one from the following choices: 1) QueryExecMode.EXECUTE, which is default; 2) QueryExecMode.EXPLAIN; 3) QueryExecMode.VALIDATE; 4) QueryExecMode.PARSE. :param concurrent_result_sets: A flag to allow YDB mix parts of different result sets. Default is False; :param settings: An additional request settings BaseRequestSettings; + :param stats_mode: Mode of query statistics to gather, which is a one from the following choices: + 1) QueryStatsMode:NONE, which is default; + 2) QueryStatsMode.BASIC; + 3) QueryStatsMode.FULL; + 4) QueryStatsMode.PROFILE; :return: Iterator with result sets """ @@ -477,6 +493,7 @@ def execute( commit_tx=commit_tx, syntax=syntax, exec_mode=exec_mode, + stats_mode=stats_mode, parameters=parameters, concurrent_result_sets=concurrent_result_sets, settings=settings, From 0fff143f92843ee22fab60c5b6acbb74490944fd Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 22 Apr 2025 14:04:40 +0300 Subject: [PATCH 397/429] Fix docs publish job --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 568e881f..996abaa6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,7 +6,7 @@ on: jobs: pages: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} From 60f61d777f8bc82f7c8d25594e5f4f52f8308c66 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 22 Apr 2025 14:20:48 +0300 Subject: [PATCH 398/429] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19d75ce8..cd23922c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +* Reader without Consumer +* CommitOffset feature +* QueryService stats support + ## 3.20.1 ## * Add missing fields to tablestats * Return topic destructors From b273d1e58e0e0b6a75c571ae6adf75071ce715fb Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 22 Apr 2025 11:22:35 +0000 Subject: [PATCH 399/429] Release: 3.21.0 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd23922c..c334bb76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.21.0 ## * Reader without Consumer * CommitOffset feature * QueryService stats support diff --git a/setup.py b/setup.py index c7db9679..3f381e16 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.20.1", # AUTOVERSION + version="3.21.0", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 4a5c580f..6b710070 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.20.1" +VERSION = "3.21.0" From 4e2eaec32e320b4b9a0e0402ce22dea43b22a2ae Mon Sep 17 00:00:00 2001 From: Vladislav Polyakov Date: Wed, 23 Apr 2025 18:53:49 +0300 Subject: [PATCH 400/429] Add devcontainer configuration for YDB Python SDK (#585) * Add devcontainer configuration for YDB Python SDK - Create Dockerfile for building the SDK environment - Add docker-compose configuration for YDB services - Include YDB configuration file for storage and channel profiles - Set up initialization and configuration scripts for YDB CLI - Configure Prometheus for monitoring YDB services * Update devcontainer mount to use specific SSH signing key Signed-off-by: Vladislav Polyakov * Add sign-off configuration and GPG settings in initialization scripts Signed-off-by: Vladislav Polyakov * Update postStart.sh --------- Signed-off-by: Vladislav Polyakov Co-authored-by: Oleg Ovcharuk --- .devcontainer/Dockerfile | 8 +++++ .devcontainer/commands/initialize.sh | 6 ++++ .devcontainer/commands/postCreate.sh | 27 ++++++++++++++ .devcontainer/commands/postStart.sh | 11 ++++++ .devcontainer/compose.yml | 51 ++++++++++++++++++++++++++ .devcontainer/devcontainer.json | 54 ++++++++++++++++++++++++++++ 6 files changed, 157 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100755 .devcontainer/commands/initialize.sh create mode 100755 .devcontainer/commands/postCreate.sh create mode 100755 .devcontainer/commands/postStart.sh create mode 100644 .devcontainer/compose.yml create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..723c1843 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,8 @@ +FROM mcr.microsoft.com/devcontainers/python:3.12-bookworm + +# [Optional] Uncomment if you want to install more tools +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + +# [Optional] Uncomment if you want to install ydb cli +RUN curl -fsSL https://raw.githubusercontent.com/ydb-platform/ydb/refs/heads/main/ydb/apps/ydb/install/install.sh | bash diff --git a/.devcontainer/commands/initialize.sh b/.devcontainer/commands/initialize.sh new file mode 100755 index 00000000..926031b6 --- /dev/null +++ b/.devcontainer/commands/initialize.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +git config --local format.signoff true +git config --local user.name "$(git config user.name)" +git config --local user.email "$(git config user.email)" diff --git a/.devcontainer/commands/postCreate.sh b/.devcontainer/commands/postCreate.sh new file mode 100755 index 00000000..40078bf5 --- /dev/null +++ b/.devcontainer/commands/postCreate.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -e + +if git config --get commit.gpgsign | grep -q true; then + git config --global gpg.format ssh + git config --global gpg.ssh.defaultKeyCommand 'ssh-add -L' + git config --global gpg.ssh.allowedSigners '~/.ssh/allowed_signers' +fi + +# Set up YDB profile if ydb cli exists +if which ydb > /dev/null 2>&1; then + ENDPOINT=$(echo ${YDB_CONNECTION_STRING_SECURE:-$YDB_CONNECTION_STRING} | awk -F/ '{print $1 "//" $3}') + DATABASE=$(echo ${YDB_CONNECTION_STRING_SECURE:-$YDB_CONNECTION_STRING} | cut -d/ -f4-) + CA_FILE_OPTION="" + + if [ -n "$YDB_SSL_ROOT_CERTIFICATES_FILE" ]; then + ENDPOINT="${ENDPOINT/grpc:/grpcs:}" + CA_FILE_OPTION="--ca-file ${YDB_SSL_ROOT_CERTIFICATES_FILE}" + fi + + ydb config profile replace local \ + --endpoint "$ENDPOINT" \ + --database "/$DATABASE" \ + $CA_FILE_OPTION + + ydb config profile activate local +fi diff --git a/.devcontainer/commands/postStart.sh b/.devcontainer/commands/postStart.sh new file mode 100755 index 00000000..bf38ac35 --- /dev/null +++ b/.devcontainer/commands/postStart.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -e + + +# Install dependencies +pip install -r requirements.txt +# Install ydb package +pip install -e . +# Install tox for CI +pip install tox + diff --git a/.devcontainer/compose.yml b/.devcontainer/compose.yml new file mode 100644 index 00000000..56039007 --- /dev/null +++ b/.devcontainer/compose.yml @@ -0,0 +1,51 @@ +volumes: + ydb-data: + # driver: local + # driver_opts: + # type: tmpfs + # device: tmpfs + # o: size=80g + ydb-certs: + +services: + sdk: + build: + context: . + dockerfile: Dockerfile + hostname: sdk + + volumes: + - ydb-certs:/ydb_certs + - ../:/workspaces/ydb-python-sdk:cached + + environment: + - YDB_IMAGE_VERSION=24.3 + - YDB_CREDENTIALS_USER=root + - YDB_CREDENTIALS_PASSWORD=1234 + - YDB_CONNECTION_STRING=grpc://ydb:2136/local + - YDB_CONNECTION_STRING_SECURE=grpcs://ydb:2135/local + - YDB_SSL_ROOT_CERTIFICATES_FILE=/ydb_certs/ca.pem + + # Overrides default command so things don't shut down after the process ends. + command: sleep infinity + + ydb: + image: ghcr.io/ydb-platform/local-ydb:24.3 + restart: unless-stopped + hostname: ydb + platform: linux/amd64 + + ports: + - 2135:2135 + - 2136:2136 + - 8765:8765 + + volumes: + - ydb-data:/ydb_data + - ydb-certs:/ydb_certs + + environment: + - YDB_USE_IN_MEMORY_PDISKS=true + - GRPC_TLS_PORT=2135 + - GRPC_PORT=2136 + - MON_PORT=8765 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..21e43676 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,54 @@ +{ + "name": "Python & YDB", + "service": "sdk", + "dockerComposeFile": "compose.yml", + "workspaceFolder": "/workspaces/ydb-python-sdk", + // Allows the container to use ptrace, which is useful for debugging. + "capAdd": [ + "SYS_PTRACE" + ], + // Disables seccomp, which can be necessary for some debugging tools to function correctly. + "securityOpt": [ + "seccomp=unconfined" + ], + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/git": {}, + "ghcr.io/devcontainers/features/common-utils": {}, + "ghcr.io/devcontainers/features/github-cli:1": {} + }, + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [ + 2135, + 2136, + 8765, + 9090, + 9464 + ], + // Use 'initializeCommand' to run commands before the container is created. + "initializeCommand": "chmod +x .devcontainer/commands/initialize.sh && .devcontainer/commands/initialize.sh", + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "chmod +x .devcontainer/commands/postCreate.sh && .devcontainer/commands/postCreate.sh", + // Use 'postStartCommand' to run commands after the container is started. + "postStartCommand": "chmod +x .devcontainer/commands/postStart.sh && .devcontainer/commands/postStart.sh", + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "ms-python.autopep8", + "ms-python.debugpy", + "ms-python.flake8", + "ms-python.isort", + "ms-python.pylint", + "ms-python.python", + "ms-python.vscode-pylance", + "ms-python.vscode-python-envs" + ] + } + }, + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + "remoteUser": "root", + "mounts": [ + "source=${localEnv:HOME}/.ssh/id_ed25519_signing,target=/root/.ssh/id_ed25519_signing,type=bind,readonly" + ] +} From 62b5f580eb79c773acf446f3fc9e654dd7cfdc78 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Thu, 24 Apr 2025 10:45:31 +0300 Subject: [PATCH 401/429] Revert "Add devcontainer configuration for YDB Python SDK (#585)" (#589) This reverts commit 4e2eaec32e320b4b9a0e0402ce22dea43b22a2ae. --- .devcontainer/Dockerfile | 8 ----- .devcontainer/commands/initialize.sh | 6 ---- .devcontainer/commands/postCreate.sh | 27 -------------- .devcontainer/commands/postStart.sh | 11 ------ .devcontainer/compose.yml | 51 -------------------------- .devcontainer/devcontainer.json | 54 ---------------------------- 6 files changed, 157 deletions(-) delete mode 100644 .devcontainer/Dockerfile delete mode 100755 .devcontainer/commands/initialize.sh delete mode 100755 .devcontainer/commands/postCreate.sh delete mode 100755 .devcontainer/commands/postStart.sh delete mode 100644 .devcontainer/compose.yml delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 723c1843..00000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM mcr.microsoft.com/devcontainers/python:3.12-bookworm - -# [Optional] Uncomment if you want to install more tools -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends - -# [Optional] Uncomment if you want to install ydb cli -RUN curl -fsSL https://raw.githubusercontent.com/ydb-platform/ydb/refs/heads/main/ydb/apps/ydb/install/install.sh | bash diff --git a/.devcontainer/commands/initialize.sh b/.devcontainer/commands/initialize.sh deleted file mode 100755 index 926031b6..00000000 --- a/.devcontainer/commands/initialize.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -e - -git config --local format.signoff true -git config --local user.name "$(git config user.name)" -git config --local user.email "$(git config user.email)" diff --git a/.devcontainer/commands/postCreate.sh b/.devcontainer/commands/postCreate.sh deleted file mode 100755 index 40078bf5..00000000 --- a/.devcontainer/commands/postCreate.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -set -e - -if git config --get commit.gpgsign | grep -q true; then - git config --global gpg.format ssh - git config --global gpg.ssh.defaultKeyCommand 'ssh-add -L' - git config --global gpg.ssh.allowedSigners '~/.ssh/allowed_signers' -fi - -# Set up YDB profile if ydb cli exists -if which ydb > /dev/null 2>&1; then - ENDPOINT=$(echo ${YDB_CONNECTION_STRING_SECURE:-$YDB_CONNECTION_STRING} | awk -F/ '{print $1 "//" $3}') - DATABASE=$(echo ${YDB_CONNECTION_STRING_SECURE:-$YDB_CONNECTION_STRING} | cut -d/ -f4-) - CA_FILE_OPTION="" - - if [ -n "$YDB_SSL_ROOT_CERTIFICATES_FILE" ]; then - ENDPOINT="${ENDPOINT/grpc:/grpcs:}" - CA_FILE_OPTION="--ca-file ${YDB_SSL_ROOT_CERTIFICATES_FILE}" - fi - - ydb config profile replace local \ - --endpoint "$ENDPOINT" \ - --database "/$DATABASE" \ - $CA_FILE_OPTION - - ydb config profile activate local -fi diff --git a/.devcontainer/commands/postStart.sh b/.devcontainer/commands/postStart.sh deleted file mode 100755 index bf38ac35..00000000 --- a/.devcontainer/commands/postStart.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -set -e - - -# Install dependencies -pip install -r requirements.txt -# Install ydb package -pip install -e . -# Install tox for CI -pip install tox - diff --git a/.devcontainer/compose.yml b/.devcontainer/compose.yml deleted file mode 100644 index 56039007..00000000 --- a/.devcontainer/compose.yml +++ /dev/null @@ -1,51 +0,0 @@ -volumes: - ydb-data: - # driver: local - # driver_opts: - # type: tmpfs - # device: tmpfs - # o: size=80g - ydb-certs: - -services: - sdk: - build: - context: . - dockerfile: Dockerfile - hostname: sdk - - volumes: - - ydb-certs:/ydb_certs - - ../:/workspaces/ydb-python-sdk:cached - - environment: - - YDB_IMAGE_VERSION=24.3 - - YDB_CREDENTIALS_USER=root - - YDB_CREDENTIALS_PASSWORD=1234 - - YDB_CONNECTION_STRING=grpc://ydb:2136/local - - YDB_CONNECTION_STRING_SECURE=grpcs://ydb:2135/local - - YDB_SSL_ROOT_CERTIFICATES_FILE=/ydb_certs/ca.pem - - # Overrides default command so things don't shut down after the process ends. - command: sleep infinity - - ydb: - image: ghcr.io/ydb-platform/local-ydb:24.3 - restart: unless-stopped - hostname: ydb - platform: linux/amd64 - - ports: - - 2135:2135 - - 2136:2136 - - 8765:8765 - - volumes: - - ydb-data:/ydb_data - - ydb-certs:/ydb_certs - - environment: - - YDB_USE_IN_MEMORY_PDISKS=true - - GRPC_TLS_PORT=2135 - - GRPC_PORT=2136 - - MON_PORT=8765 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 21e43676..00000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "Python & YDB", - "service": "sdk", - "dockerComposeFile": "compose.yml", - "workspaceFolder": "/workspaces/ydb-python-sdk", - // Allows the container to use ptrace, which is useful for debugging. - "capAdd": [ - "SYS_PTRACE" - ], - // Disables seccomp, which can be necessary for some debugging tools to function correctly. - "securityOpt": [ - "seccomp=unconfined" - ], - // Features to add to the dev container. More info: https://containers.dev/features. - "features": { - "ghcr.io/devcontainers/features/git": {}, - "ghcr.io/devcontainers/features/common-utils": {}, - "ghcr.io/devcontainers/features/github-cli:1": {} - }, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - "forwardPorts": [ - 2135, - 2136, - 8765, - 9090, - 9464 - ], - // Use 'initializeCommand' to run commands before the container is created. - "initializeCommand": "chmod +x .devcontainer/commands/initialize.sh && .devcontainer/commands/initialize.sh", - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "chmod +x .devcontainer/commands/postCreate.sh && .devcontainer/commands/postCreate.sh", - // Use 'postStartCommand' to run commands after the container is started. - "postStartCommand": "chmod +x .devcontainer/commands/postStart.sh && .devcontainer/commands/postStart.sh", - // Configure tool-specific properties. - "customizations": { - "vscode": { - "extensions": [ - "ms-python.autopep8", - "ms-python.debugpy", - "ms-python.flake8", - "ms-python.isort", - "ms-python.pylint", - "ms-python.python", - "ms-python.vscode-pylance", - "ms-python.vscode-python-envs" - ] - } - }, - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - "remoteUser": "root", - "mounts": [ - "source=${localEnv:HOME}/.ssh/id_ed25519_signing,target=/root/.ssh/id_ed25519_signing,type=bind,readonly" - ] -} From 7320daf1a2bb18055e1d099e260a9dbdfe8bfd41 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 25 Apr 2025 10:23:29 +0300 Subject: [PATCH 402/429] Support new YDB types (#588) --- docker-compose-tls.yml | 2 +- docker-compose.yml | 2 +- tests/query/test_types.py | 150 ++++++++++++++++++++++++++++++ tests/topics/test_topic_reader.py | 2 + ydb/types.py | 89 +++++++++++++++++- 5 files changed, 239 insertions(+), 6 deletions(-) create mode 100644 tests/query/test_types.py diff --git a/docker-compose-tls.yml b/docker-compose-tls.yml index 80b09eb9..f0a4b328 100644 --- a/docker-compose-tls.yml +++ b/docker-compose-tls.yml @@ -1,7 +1,7 @@ version: "3.9" services: ydb: - image: ydbplatform/local-ydb:latest + image: ydbplatform/local-ydb:trunk restart: always ports: - 2136:2136 diff --git a/docker-compose.yml b/docker-compose.yml index aafa938a..1a466fab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.3" services: ydb: - image: ydbplatform/local-ydb:latest + image: ydbplatform/local-ydb:trunk restart: always ports: - 2136:2136 diff --git a/tests/query/test_types.py b/tests/query/test_types.py new file mode 100644 index 00000000..a2b43586 --- /dev/null +++ b/tests/query/test_types.py @@ -0,0 +1,150 @@ +import pytest +import ydb + +from datetime import date, datetime, timedelta, timezone +from decimal import Decimal +from uuid import uuid4 + + +@pytest.mark.parametrize( + "value,ydb_type", + [ + (True, ydb.PrimitiveType.Bool), + (-125, ydb.PrimitiveType.Int8), + (None, ydb.OptionalType(ydb.PrimitiveType.Int8)), + (-32766, ydb.PrimitiveType.Int16), + (-1123, ydb.PrimitiveType.Int32), + (-2157583648, ydb.PrimitiveType.Int64), + (255, ydb.PrimitiveType.Uint8), + (65534, ydb.PrimitiveType.Uint16), + (5555, ydb.PrimitiveType.Uint32), + (2157583649, ydb.PrimitiveType.Uint64), + (3.1415, ydb.PrimitiveType.Double), + (".31415926535e1", ydb.PrimitiveType.DyNumber), + (Decimal("3.1415926535"), ydb.DecimalType(28, 10)), + (b"Hello, YDB!", ydb.PrimitiveType.String), + ("Hello, 🐍!", ydb.PrimitiveType.Utf8), + ('{"foo": "bar"}', ydb.PrimitiveType.Json), + (b'{"foo"="bar"}', ydb.PrimitiveType.Yson), + ('{"foo":"bar"}', ydb.PrimitiveType.JsonDocument), + (uuid4(), ydb.PrimitiveType.UUID), + ([1, 2, 3], ydb.ListType(ydb.PrimitiveType.Int8)), + ({1: None, 2: None, 3: None}, ydb.SetType(ydb.PrimitiveType.Int8)), + ([b"a", b"b", b"c"], ydb.ListType(ydb.PrimitiveType.String)), + ({"a": 1001, "b": 1002}, ydb.DictType(ydb.PrimitiveType.Utf8, ydb.PrimitiveType.Int32)), + ( + ("a", 1001), + ydb.TupleType().add_element(ydb.PrimitiveType.Utf8).add_element(ydb.PrimitiveType.Int32), + ), + ( + {"foo": True, "bar": None}, + ydb.StructType() + .add_member("foo", ydb.OptionalType(ydb.PrimitiveType.Bool)) + .add_member("bar", ydb.OptionalType(ydb.PrimitiveType.Int32)), + ), + (100, ydb.PrimitiveType.Date), + (100, ydb.PrimitiveType.Date32), + (-100, ydb.PrimitiveType.Date32), + (100, ydb.PrimitiveType.Datetime), + (100, ydb.PrimitiveType.Datetime64), + (-100, ydb.PrimitiveType.Datetime64), + (-100, ydb.PrimitiveType.Interval), + (-100, ydb.PrimitiveType.Interval64), + (100, ydb.PrimitiveType.Timestamp), + (100, ydb.PrimitiveType.Timestamp64), + (-100, ydb.PrimitiveType.Timestamp64), + (1511789040123456, ydb.PrimitiveType.Timestamp), + (1511789040123456, ydb.PrimitiveType.Timestamp64), + (-1511789040123456, ydb.PrimitiveType.Timestamp64), + ], +) +def test_types(driver_sync: ydb.Driver, value, ydb_type): + settings = ( + ydb.QueryClientSettings() + .with_native_date_in_result_sets(False) + .with_native_datetime_in_result_sets(False) + .with_native_timestamp_in_result_sets(False) + .with_native_interval_in_result_sets(False) + .with_native_json_in_result_sets(False) + ) + with ydb.QuerySessionPool(driver_sync, query_client_settings=settings) as pool: + result = pool.execute_with_retries( + f"DECLARE $param as {ydb_type}; SELECT $param as value", + {"$param": (value, ydb_type)}, + ) + assert result[0].rows[0].value == value + + +test_td = timedelta(microseconds=-100) +test_now = datetime.utcnow() +test_old_date = datetime(1221, 1, 1, 0, 0) +test_today = test_now.date() +test_dt_today = datetime.today() +tz4h = timezone(timedelta(hours=4)) + + +@pytest.mark.parametrize( + "value,ydb_type,result_value", + [ + # FIXME: TypeError: 'datetime.datetime' object cannot be interpreted as an integer + # (test_dt_today, "Datetime", test_dt_today), + (test_today, ydb.PrimitiveType.Date, test_today), + (365, ydb.PrimitiveType.Date, date(1971, 1, 1)), + (-365, ydb.PrimitiveType.Date32, date(1969, 1, 1)), + (3600 * 24 * 365, ydb.PrimitiveType.Datetime, datetime(1971, 1, 1, 0, 0)), + (3600 * 24 * 365 * (-1), ydb.PrimitiveType.Datetime64, datetime(1969, 1, 1, 0, 0)), + (datetime(1970, 1, 1, 4, 0, tzinfo=tz4h), ydb.PrimitiveType.Timestamp, datetime(1970, 1, 1, 0, 0)), + (test_td, ydb.PrimitiveType.Interval, test_td), + (test_td, ydb.PrimitiveType.Interval64, test_td), + (test_now, ydb.PrimitiveType.Timestamp, test_now), + (test_old_date, ydb.PrimitiveType.Timestamp64, test_old_date), + ( + 1511789040123456, + ydb.PrimitiveType.Timestamp, + datetime.fromisoformat("2017-11-27 13:24:00.123456"), + ), + ('{"foo": "bar"}', ydb.PrimitiveType.Json, {"foo": "bar"}), + ('{"foo": "bar"}', ydb.PrimitiveType.JsonDocument, {"foo": "bar"}), + ], +) +def test_types_native(driver_sync, value, ydb_type, result_value): + with ydb.QuerySessionPool(driver_sync) as pool: + result = pool.execute_with_retries( + f"DECLARE $param as {ydb_type}; SELECT $param as value", + {"$param": (value, ydb_type)}, + ) + assert result[0].rows[0].value == result_value + + +@pytest.mark.parametrize( + "value,ydb_type,str_repr,result_value", + [ + (test_today, ydb.PrimitiveType.Date, str(test_today), test_today), + (365, ydb.PrimitiveType.Date, "1971-01-01", date(1971, 1, 1)), + (-365, ydb.PrimitiveType.Date32, "1969-01-01", date(1969, 1, 1)), + (3600 * 24 * 365, ydb.PrimitiveType.Datetime, "1971-01-01T00:00:00Z", datetime(1971, 1, 1, 0, 0)), + (3600 * 24 * 365 * (-1), ydb.PrimitiveType.Datetime64, "1969-01-01T00:00:00Z", datetime(1969, 1, 1, 0, 0)), + ( + datetime(1970, 1, 1, 4, 0, tzinfo=tz4h), + ydb.PrimitiveType.Timestamp, + "1970-01-01T00:00:00Z", + datetime(1970, 1, 1, 0, 0), + ), + (test_td, ydb.PrimitiveType.Interval, "-PT0.0001S", test_td), + (test_td, ydb.PrimitiveType.Interval64, "-PT0.0001S", test_td), + (test_old_date, ydb.PrimitiveType.Timestamp64, "1221-01-01T00:00:00Z", test_old_date), + ], +) +def test_type_str_repr(driver_sync, value, ydb_type, str_repr, result_value): + with ydb.QuerySessionPool(driver_sync) as pool: + result = pool.execute_with_retries( + f"DECLARE $param as {ydb_type}; SELECT CAST($param as Utf8) as value", + {"$param": (value, ydb_type)}, + ) + assert result[0].rows[0].value == str_repr + + result = pool.execute_with_retries( + f"DECLARE $param as Utf8; SELECT CAST($param as {ydb_type}) as value", + {"$param": (str_repr, ydb.PrimitiveType.Utf8)}, + ) + assert result[0].rows[0].value == result_value diff --git a/tests/topics/test_topic_reader.py b/tests/topics/test_topic_reader.py index e6426660..107ce980 100644 --- a/tests/topics/test_topic_reader.py +++ b/tests/topics/test_topic_reader.py @@ -299,6 +299,7 @@ def topic_selector(topic_with_messages): @pytest.mark.asyncio +@pytest.mark.skip("something went wrong") class TestTopicNoConsumerReaderAsyncIO: async def test_reader_with_no_partition_ids_raises(self, driver, topic_with_messages): with pytest.raises(ydb.Error): @@ -420,6 +421,7 @@ def on_partition_get_start_offset(self, event): await reader.close() +@pytest.mark.skip("something went wrong") class TestTopicReaderWithoutConsumer: def test_reader_with_no_partition_ids_raises(self, driver_sync, topic_with_messages): with pytest.raises(ydb.Error): diff --git a/ydb/types.py b/ydb/types.py index f8a56e4d..2d4eecc3 100644 --- a/ydb/types.py +++ b/ydb/types.py @@ -40,6 +40,19 @@ def _to_date(pb: ydb_value_pb2.Value, value: typing.Union[date, int]) -> None: pb.uint32_value = value +def _from_date32(x: ydb_value_pb2.Value, table_client_settings: table.TableClientSettings) -> typing.Union[date, int]: + if table_client_settings is not None and table_client_settings._native_date_in_result_sets: + return _EPOCH.date() + timedelta(days=x.int32_value) + return x.int32_value + + +def _to_date32(pb: ydb_value_pb2.Value, value: typing.Union[date, int]) -> None: + if isinstance(value, date): + pb.int32_value = (value - _EPOCH.date()).days + else: + pb.int32_value = value + + def _from_datetime_number( x: typing.Union[float, datetime], table_client_settings: table.TableClientSettings ) -> datetime: @@ -63,6 +76,10 @@ def _from_uuid(pb: ydb_value_pb2.Value, value: uuid.UUID): pb.high_128 = struct.unpack("Q", value.bytes_le[8:16])[0] +def _timedelta_to_microseconds(value: timedelta) -> int: + return (value.days * _SECONDS_IN_DAY + value.seconds) * 1000000 + value.microseconds + + def _from_interval( value_pb: ydb_value_pb2.Value, table_client_settings: table.TableClientSettings ) -> typing.Union[timedelta, int]: @@ -71,10 +88,6 @@ def _from_interval( return value_pb.int64_value -def _timedelta_to_microseconds(value: timedelta) -> int: - return (value.days * _SECONDS_IN_DAY + value.seconds) * 1000000 + value.microseconds - - def _to_interval(pb: ydb_value_pb2.Value, value: typing.Union[timedelta, int]): if isinstance(value, timedelta): pb.int64_value = _timedelta_to_microseconds(value) @@ -101,6 +114,25 @@ def _to_timestamp(pb: ydb_value_pb2.Value, value: typing.Union[datetime, int]): pb.uint64_value = value +def _from_timestamp64( + value_pb: ydb_value_pb2.Value, table_client_settings: table.TableClientSettings +) -> typing.Union[datetime, int]: + if table_client_settings is not None and table_client_settings._native_timestamp_in_result_sets: + return _EPOCH + timedelta(microseconds=value_pb.int64_value) + return value_pb.int64_value + + +def _to_timestamp64(pb: ydb_value_pb2.Value, value: typing.Union[datetime, int]): + if isinstance(value, datetime): + if value.tzinfo: + epoch = _EPOCH_UTC + else: + epoch = _EPOCH + pb.int64_value = _timedelta_to_microseconds(value - epoch) + else: + pb.int64_value = value + + @enum.unique class PrimitiveType(enum.Enum): """ @@ -133,23 +165,46 @@ class PrimitiveType(enum.Enum): _from_date, _to_date, ) + Date32 = ( + _apis.primitive_types.DATE32, + None, + _from_date32, + _to_date32, + ) Datetime = ( _apis.primitive_types.DATETIME, "uint32_value", _from_datetime_number, ) + Datetime64 = ( + _apis.primitive_types.DATETIME64, + "int64_value", + _from_datetime_number, + ) Timestamp = ( _apis.primitive_types.TIMESTAMP, None, _from_timestamp, _to_timestamp, ) + Timestamp64 = ( + _apis.primitive_types.TIMESTAMP64, + None, + _from_timestamp64, + _to_timestamp64, + ) Interval = ( _apis.primitive_types.INTERVAL, None, _from_interval, _to_interval, ) + Interval64 = ( + _apis.primitive_types.INTERVAL64, + None, + _from_interval, + _to_interval, + ) DyNumber = _apis.primitive_types.DYNUMBER, "text_value" @@ -366,6 +421,32 @@ def __str__(self): return self._repr +class SetType(AbstractTypeBuilder): + __slots__ = ("__repr", "__proto") + + def __init__( + self, + key_type: typing.Union[AbstractTypeBuilder, PrimitiveType], + ): + """ + :param key_type: Key type builder + """ + self._repr = "Set<%s>" % (str(key_type)) + self._proto = _apis.ydb_value.Type( + dict_type=_apis.ydb_value.DictType( + key=key_type.proto, + payload=_apis.ydb_value.Type(void_type=struct_pb2.NULL_VALUE), + ) + ) + + @property + def proto(self): + return self._proto + + def __str__(self): + return self._repr + + class TupleType(AbstractTypeBuilder): __slots__ = ("__elements_repr", "__proto") From 224aed0175990b8a87ab4c96998868f23726eb62 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 25 Apr 2025 10:25:41 +0300 Subject: [PATCH 403/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c334bb76..b3ee37f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Support Date32, Datetime64, Timestamp64, Interval64 + ## 3.21.0 ## * Reader without Consumer * CommitOffset feature From 44f7f6d29228890bd757876419d6c0d9eec3fd7d Mon Sep 17 00:00:00 2001 From: robot Date: Fri, 25 Apr 2025 07:26:28 +0000 Subject: [PATCH 404/429] Release: 3.21.1 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3ee37f0..ce8e9001 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.21.1 ## * Support Date32, Datetime64, Timestamp64, Interval64 ## 3.21.0 ## diff --git a/setup.py b/setup.py index 3f381e16..3384dc95 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.21.0", # AUTOVERSION + version="3.21.1", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 6b710070..3c62627b 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.21.0" +VERSION = "3.21.1" From 4edc179c5a529489cb5f700577820a7dc9340493 Mon Sep 17 00:00:00 2001 From: Ivan Blinkov Date: Fri, 16 May 2025 20:27:37 +0700 Subject: [PATCH 405/429] #325: add disable_discovery option to DriverConfig (#666) * #325: add disable_discovery option to DriverConfig * minor * black * flake8 * black 2 --- tests/test_disable_discovery.py | 313 ++++++++++++++++++++++++++++++++ ydb/aio/pool.py | 31 +++- ydb/driver.py | 4 + ydb/pool.py | 31 +++- 4 files changed, 368 insertions(+), 11 deletions(-) create mode 100644 tests/test_disable_discovery.py diff --git a/tests/test_disable_discovery.py b/tests/test_disable_discovery.py new file mode 100644 index 00000000..17e49c72 --- /dev/null +++ b/tests/test_disable_discovery.py @@ -0,0 +1,313 @@ +import pytest +import unittest.mock +import ydb +import asyncio +from ydb import _apis + + +TEST_ERROR = "Test error" +TEST_QUERY = "SELECT 1 + 2 AS sum" + + +@pytest.fixture +def mock_connection(): + """Mock a YDB connection to avoid actual connections.""" + with unittest.mock.patch("ydb.connection.Connection.ready_factory") as mock_factory: + # Setup the mock to return a connection-like object + mock_connection = unittest.mock.MagicMock() + # Use the endpoint fixture value via the function parameter + mock_connection.endpoint = "localhost:2136" # Will be overridden in tests + mock_connection.node_id = "mock_node_id" + mock_factory.return_value = mock_connection + yield mock_factory + + +@pytest.fixture +def mock_aio_connection(): + """Mock a YDB async connection to avoid actual connections.""" + with unittest.mock.patch("ydb.aio.connection.Connection.__init__") as mock_init: + # Setup the mock to return None (as __init__ does) + mock_init.return_value = None + + # Mock connection_ready method + with unittest.mock.patch("ydb.aio.connection.Connection.connection_ready") as mock_ready: + # Create event loop if there isn't one currently + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) + + future = asyncio.Future() + future.set_result(None) + mock_ready.return_value = future + yield mock_init + + +def create_mock_discovery_resolver(path): + """Create a mock discovery resolver that raises exception if called.""" + + def _mock_fixture(): + with unittest.mock.patch(path) as mock_resolve: + # Configure mock to throw an exception if called + mock_resolve.side_effect = Exception("Discovery should not be executed when discovery is disabled") + yield mock_resolve + + return _mock_fixture + + +# Mock discovery resolvers to verify no discovery requests are made +mock_discovery_resolver = pytest.fixture( + create_mock_discovery_resolver("ydb.resolver.DiscoveryEndpointsResolver.context_resolve") +) +mock_aio_discovery_resolver = pytest.fixture( + create_mock_discovery_resolver("ydb.aio.resolver.DiscoveryEndpointsResolver.resolve") +) + + +# Basic unit tests for DriverConfig +def test_driver_config_has_disable_discovery_option(endpoint, database): + """Test that DriverConfig has the disable_discovery option.""" + config = ydb.DriverConfig(endpoint=endpoint, database=database, disable_discovery=True) + assert hasattr(config, "disable_discovery") + assert config.disable_discovery is True + + +# Driver config fixtures +def create_driver_config(endpoint, database, disable_discovery): + """Create a driver config with the given discovery setting.""" + return ydb.DriverConfig( + endpoint=endpoint, + database=database, + disable_discovery=disable_discovery, + ) + + +@pytest.fixture +def driver_config_disabled_discovery(endpoint, database): + """A driver config with discovery disabled""" + return create_driver_config(endpoint, database, True) + + +@pytest.fixture +def driver_config_enabled_discovery(endpoint, database): + """A driver config with discovery enabled (default)""" + return create_driver_config(endpoint, database, False) + + +# Common test assertions +def assert_discovery_disabled(driver): + """Assert that discovery is disabled in the driver.""" + assert "Discovery is disabled" in driver.discovery_debug_details() + + +def create_future_with_error(): + """Create a future with a test error.""" + future = asyncio.Future() + future.set_exception(ydb.issues.Error(TEST_ERROR)) + return future + + +def create_completed_future(): + """Create a completed future.""" + future = asyncio.Future() + future.set_result(None) + return future + + +# Mock tests for synchronous driver +def test_sync_driver_discovery_disabled_mock( + driver_config_disabled_discovery, mock_connection, mock_discovery_resolver +): + """Test that when disable_discovery=True, the discovery thread is not started and resolver is not called (mock).""" + with unittest.mock.patch("ydb.pool.Discovery") as mock_discovery_class: + driver = ydb.Driver(driver_config=driver_config_disabled_discovery) + + try: + # Check that the discovery thread was not created + mock_discovery_class.assert_not_called() + + # Check that discovery is disabled in debug details + assert_discovery_disabled(driver) + + # Execute a dummy call to verify no discovery requests are made + try: + driver(ydb.issues.Error(TEST_ERROR), _apis.OperationService.Stub, "GetOperation") + except ydb.issues.Error: + pass # Expected exception, we just want to ensure no discovery occurs + + # Verify the mock wasn't called + assert ( + not mock_discovery_resolver.called + ), "Discovery resolver should not be called when discovery is disabled" + finally: + # Clean up + driver.stop() + + +def test_sync_driver_discovery_enabled_mock(driver_config_enabled_discovery, mock_connection): + """Test that when disable_discovery=False, the discovery thread is started (mock).""" + with unittest.mock.patch("ydb.pool.Discovery") as mock_discovery_class: + mock_discovery_instance = unittest.mock.MagicMock() + mock_discovery_class.return_value = mock_discovery_instance + + driver = ydb.Driver(driver_config=driver_config_enabled_discovery) + + try: + # Check that the discovery thread was created and started + mock_discovery_class.assert_called_once() + assert mock_discovery_instance.start.called + finally: + # Clean up + driver.stop() + + +# Helper for setting up async driver test mocks +def setup_async_driver_mocks(): + """Set up common mocks for async driver tests.""" + mocks = {} + + # Create mock for Discovery class + discovery_patcher = unittest.mock.patch("ydb.aio.pool.Discovery") + mocks["mock_discovery_class"] = discovery_patcher.start() + + # Mock the event loop + loop_patcher = unittest.mock.patch("asyncio.get_event_loop") + mock_loop = loop_patcher.start() + mock_loop_instance = unittest.mock.MagicMock() + mock_loop.return_value = mock_loop_instance + mock_loop_instance.create_task.return_value = unittest.mock.MagicMock() + mocks["mock_loop"] = mock_loop + + # Mock the connection pool stop method + stop_patcher = unittest.mock.patch("ydb.aio.pool.ConnectionPool.stop") + mock_stop = stop_patcher.start() + mock_stop.return_value = create_completed_future() + mocks["mock_stop"] = mock_stop + + # Add cleanup for all patchers + mocks["patchers"] = [discovery_patcher, loop_patcher, stop_patcher] + + return mocks + + +def teardown_async_mocks(mocks): + """Clean up all mock patchers.""" + for patcher in mocks["patchers"]: + patcher.stop() + + +# Mock tests for asynchronous driver +@pytest.mark.asyncio +async def test_aio_driver_discovery_disabled_mock( + driver_config_disabled_discovery, mock_aio_connection, mock_aio_discovery_resolver +): + """Test that when disable_discovery=True, the discovery is not created and resolver is not called (mock).""" + mocks = setup_async_driver_mocks() + + try: + # Mock the pool's call method to prevent unhandled exceptions + with unittest.mock.patch("ydb.aio.pool.ConnectionPool.__call__") as mock_call: + mock_call.return_value = create_future_with_error() + + driver = ydb.aio.Driver(driver_config=driver_config_disabled_discovery) + + try: + # Check that the discovery class was not instantiated + mocks["mock_discovery_class"].assert_not_called() + + # Check that discovery is disabled in debug details + assert_discovery_disabled(driver) + + # Execute a dummy call to verify no discovery requests are made + try: + try: + await driver(ydb.issues.Error(TEST_ERROR), _apis.OperationService.Stub, "GetOperation") + except ydb.issues.Error: + pass # Expected exception, we just want to ensure no discovery occurs + except Exception as e: + if "discovery is disabled" in str(e).lower(): + raise # If the error is related to discovery being disabled, re-raise it + pass # Other exceptions are expected as we're using mocks + + # Verify the mock wasn't called + assert ( + not mock_aio_discovery_resolver.called + ), "Discovery resolver should not be called when discovery is disabled" + finally: + # The stop method is already mocked, so we don't need to await it + pass + finally: + teardown_async_mocks(mocks) + + +@pytest.mark.asyncio +async def test_aio_driver_discovery_enabled_mock(driver_config_enabled_discovery, mock_aio_connection): + """Test that when disable_discovery=False, the discovery is created (mock).""" + mocks = setup_async_driver_mocks() + + try: + mock_discovery_instance = unittest.mock.MagicMock() + mocks["mock_discovery_class"].return_value = mock_discovery_instance + + driver = ydb.aio.Driver(driver_config=driver_config_enabled_discovery) + + try: + # Check that the discovery class was instantiated + mocks["mock_discovery_class"].assert_called_once() + assert driver is not None # Use the driver variable to avoid F841 + finally: + # The stop method is already mocked, so we don't need to await it + pass + finally: + teardown_async_mocks(mocks) + + +# Common integration test logic +def perform_integration_test_checks(driver, is_async=False): + """Common assertions for integration tests.""" + assert_discovery_disabled(driver) + + +# Integration tests with real YDB +def test_integration_disable_discovery(driver_config_disabled_discovery): + """Integration test that tests the disable_discovery feature with a real YDB container.""" + # Create driver with discovery disabled + driver = ydb.Driver(driver_config=driver_config_disabled_discovery) + try: + driver.wait(timeout=15) + perform_integration_test_checks(driver) + + # Try to execute a simple query to ensure it works with discovery disabled + with ydb.SessionPool(driver) as pool: + + def query_callback(session): + result_sets = session.transaction().execute(TEST_QUERY, commit_tx=True) + assert len(result_sets) == 1 + assert result_sets[0].rows[0].sum == 3 + + pool.retry_operation_sync(query_callback) + finally: + driver.stop(timeout=10) + + +@pytest.mark.asyncio +async def test_integration_aio_disable_discovery(driver_config_disabled_discovery): + """Integration test that tests the disable_discovery feature with a real YDB container (async).""" + # Create driver with discovery disabled + driver = ydb.aio.Driver(driver_config=driver_config_disabled_discovery) + try: + await driver.wait(timeout=15) + perform_integration_test_checks(driver, is_async=True) + + # Try to execute a simple query to ensure it works with discovery disabled + session_pool = ydb.aio.SessionPool(driver, size=10) + + async def query_callback(session): + result_sets = await session.transaction().execute(TEST_QUERY, commit_tx=True) + assert len(result_sets) == 1 + assert result_sets[0].rows[0].sum == 3 + + try: + await session_pool.retry_operation(query_callback) + finally: + await session_pool.stop() + finally: + await driver.stop(timeout=10) diff --git a/ydb/aio/pool.py b/ydb/aio/pool.py index c8fbb904..99a3cfdb 100644 --- a/ydb/aio/pool.py +++ b/ydb/aio/pool.py @@ -199,12 +199,27 @@ def __init__(self, driver_config): self._store = ConnectionsCache(driver_config.use_all_nodes) self._grpc_init = Connection(self._driver_config.endpoint, self._driver_config) self._stopped = False - self._discovery = Discovery(self._store, self._driver_config) - self._discovery_task = asyncio.get_event_loop().create_task(self._discovery.run()) + if driver_config.disable_discovery: + # If discovery is disabled, just add the initial endpoint to the store + async def init_connection(): + ready_connection = Connection(self._driver_config.endpoint, self._driver_config) + await ready_connection.connection_ready( + ready_timeout=getattr(self._driver_config, "discovery_request_timeout", 10) + ) + self._store.add(ready_connection) + + # Create and schedule the task to initialize the connection + self._discovery = None + self._discovery_task = asyncio.get_event_loop().create_task(init_connection()) + else: + # Start discovery as usual + self._discovery = Discovery(self._store, self._driver_config) + self._discovery_task = asyncio.get_event_loop().create_task(self._discovery.run()) async def stop(self, timeout=10): - self._discovery.stop() + if self._discovery: + self._discovery.stop() await self._grpc_init.close() try: await asyncio.wait_for(self._discovery_task, timeout=timeout) @@ -215,7 +230,8 @@ async def stop(self, timeout=10): def _on_disconnected(self, connection): async def __wrapper__(): await connection.close() - self._discovery.notify_disconnected() + if self._discovery: + self._discovery.notify_disconnected() return __wrapper__ @@ -223,7 +239,9 @@ async def wait(self, timeout=7, fail_fast=False): await self._store.get(fast_fail=fail_fast, wait_timeout=timeout) def discovery_debug_details(self): - return self._discovery.discovery_debug_details() + if self._discovery: + return self._discovery.discovery_debug_details() + return "Discovery is disabled, using only the initial endpoint" async def __aenter__(self): return self @@ -248,7 +266,8 @@ async def __call__( try: connection = await self._store.get(preferred_endpoint, fast_fail=fast_fail, wait_timeout=wait_timeout) except BaseException: - self._discovery.notify_disconnected() + if self._discovery: + self._discovery.notify_disconnected() raise return await connection( diff --git a/ydb/driver.py b/ydb/driver.py index 3998aeee..09d531d0 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -96,6 +96,7 @@ class DriverConfig(object): "grpc_lb_policy_name", "discovery_request_timeout", "compression", + "disable_discovery", ) def __init__( @@ -120,6 +121,7 @@ def __init__( grpc_lb_policy_name="round_robin", discovery_request_timeout=10, compression=None, + disable_discovery=False, ): """ A driver config to initialize a driver instance @@ -140,6 +142,7 @@ def __init__( If tracing aio ScopeManager must be ContextVarsScopeManager :param grpc_lb_policy_name: A load balancing policy to be used for discovery channel construction. Default value is `round_round` :param discovery_request_timeout: A default timeout to complete the discovery. The default value is 10 seconds. + :param disable_discovery: If True, endpoint discovery is disabled and only the start endpoint is used for all requests. """ self.endpoint = endpoint @@ -167,6 +170,7 @@ def __init__( self.grpc_lb_policy_name = grpc_lb_policy_name self.discovery_request_timeout = discovery_request_timeout self.compression = compression + self.disable_discovery = disable_discovery def set_database(self, database): self.database = database diff --git a/ydb/pool.py b/ydb/pool.py index 1e75950e..476ea674 100644 --- a/ydb/pool.py +++ b/ydb/pool.py @@ -350,8 +350,21 @@ def __init__(self, driver_config): self._store = ConnectionsCache(driver_config.use_all_nodes, driver_config.tracer) self.tracer = driver_config.tracer self._grpc_init = connection_impl.Connection(self._driver_config.endpoint, self._driver_config) - self._discovery_thread = Discovery(self._store, self._driver_config) - self._discovery_thread.start() + + if driver_config.disable_discovery: + # If discovery is disabled, just add the initial endpoint to the store + ready_connection = connection_impl.Connection.ready_factory( + self._driver_config.endpoint, + self._driver_config, + ready_timeout=getattr(self._driver_config, "discovery_request_timeout", 10), + ) + self._store.add(ready_connection) + self._discovery_thread = None + else: + # Start discovery thread as usual + self._discovery_thread = Discovery(self._store, self._driver_config) + self._discovery_thread.start() + self._stopped = False self._stop_guard = threading.Lock() @@ -367,9 +380,11 @@ def stop(self, timeout=10): return self._stopped = True - self._discovery_thread.stop() + if self._discovery_thread: + self._discovery_thread.stop() self._grpc_init.close() - self._discovery_thread.join(timeout) + if self._discovery_thread: + self._discovery_thread.join(timeout) def async_wait(self, fail_fast=False): """ @@ -404,7 +419,13 @@ def _on_disconnected(self, connection): self._discovery_thread.notify_disconnected() def discovery_debug_details(self): - return self._discovery_thread.discovery_debug_details() + """ + Returns debug string about last errors + :return: str + """ + if self._discovery_thread: + return self._discovery_thread.discovery_debug_details() + return "Discovery is disabled, using only the initial endpoint" @tracing.with_trace() def __call__( From d519478643c01f35cd9473ebff879364dd9eb70f Mon Sep 17 00:00:00 2001 From: Ivan Blinkov Date: Fri, 16 May 2025 20:27:50 +0700 Subject: [PATCH 406/429] Add link to BUILD.md from README.md (#667) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 4cde7ff5..7842bd1d 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,7 @@ Install YDB python sdk: ```sh $ python -m pip install ydb ``` + +## Development + +Instructions on `ydb-python-sdk` development are located in [BUILD.md](BUILD.md). From 988c1c7bd1272b07ee85e9e6e9fef2c6ecd5bdfd Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 16 May 2025 16:28:52 +0300 Subject: [PATCH 407/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce8e9001..aa6dfd8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Add disable_discovery option to DriverConfig + ## 3.21.1 ## * Support Date32, Datetime64, Timestamp64, Interval64 From ae2c13227484c1e672a1613d356e0a1b8a711923 Mon Sep 17 00:00:00 2001 From: robot Date: Fri, 16 May 2025 13:30:07 +0000 Subject: [PATCH 408/429] Release: 3.21.2 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa6dfd8a..0b37205a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.21.2 ## * Add disable_discovery option to DriverConfig ## 3.21.1 ## diff --git a/setup.py b/setup.py index 3384dc95..e590b4b6 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.21.1", # AUTOVERSION + version="3.21.2", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 3c62627b..62af5284 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.21.1" +VERSION = "3.21.2" From 6253aa209cbd3f99b893907434948ca8cc05d6d0 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 6 Jun 2025 14:28:44 +0300 Subject: [PATCH 409/429] Rename indexes feat --- tests/aio/test_table_client.py | 39 ++++++++++++++++++++++++++++++++ tests/table/test_table_client.py | 38 +++++++++++++++++++++++++++++++ ydb/_session_impl.py | 5 ++++ ydb/aio/table.py | 5 ++++ ydb/table.py | 23 +++++++++++++++++++ 5 files changed, 110 insertions(+) diff --git a/tests/aio/test_table_client.py b/tests/aio/test_table_client.py index 89c0ba75..7316dbdf 100644 --- a/tests/aio/test_table_client.py +++ b/tests/aio/test_table_client.py @@ -89,3 +89,42 @@ async def test_copy_table(self, driver: ydb.aio.Driver): copied_description = await client.describe_table(table_name + "_copy") assert description.columns == copied_description.columns + + @pytest.mark.asyncio + async def test_rename_index(self, driver: ydb.aio.Driver): + client = driver.table_client + table_name = "/local/testtableclient" + try: + await client.drop_table(table_name) + except ydb.SchemeError: + pass + + description = ( + ydb.TableDescription() + .with_primary_keys("key1", "key2") + .with_columns( + ydb.Column("key1", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("key2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("value", ydb.OptionalType(ydb.PrimitiveType.Utf8)), + ) + .with_index(ydb.TableIndex("index1").with_index_columns("key1")) + .with_index(ydb.TableIndex("index2").with_index_columns("key1")) + ) + + await client.create_table(table_name, description) + + await client.alter_table(table_name, rename_indexes=[ydb.RenameIndexItem("index1", "index1_1")]) + + description = await client.describe_table(table_name) + names = [index.name for index in description.indexes] + assert len(names) == 2 + for name in ["index1_1", "index2"]: + assert name in names + + await client.alter_table( + table_name, rename_indexes=[ydb.RenameIndexItem("index1_1", "index2", replace_destination=True)] + ) + + description = await client.describe_table(table_name) + assert len(description.indexes) == 1 + assert description.indexes[0].name == "index2" diff --git a/tests/table/test_table_client.py b/tests/table/test_table_client.py index ef0de906..3fc9e063 100644 --- a/tests/table/test_table_client.py +++ b/tests/table/test_table_client.py @@ -130,3 +130,41 @@ def test_describe_table_creation_time(self, driver_sync: ydb.Driver): assert desc_after.table_stats is not None assert desc_before.table_stats.creation_time == desc_after.table_stats.creation_time + + def test_rename_index(self, driver_sync: ydb.Driver): + client = driver_sync.table_client + table_name = "/local/testtableclient" + try: + client.drop_table(table_name) + except ydb.SchemeError: + pass + + description = ( + ydb.TableDescription() + .with_primary_keys("key1", "key2") + .with_columns( + ydb.Column("key1", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("key2", ydb.OptionalType(ydb.PrimitiveType.Uint64)), + ydb.Column("value", ydb.OptionalType(ydb.PrimitiveType.Utf8)), + ) + .with_index(ydb.TableIndex("index1").with_index_columns("key1")) + .with_index(ydb.TableIndex("index2").with_index_columns("key1")) + ) + + client.create_table(table_name, description) + + client.alter_table(table_name, rename_indexes=[ydb.RenameIndexItem("index1", "index1_1")]) + + description = client.describe_table(table_name) + names = [index.name for index in description.indexes] + assert len(names) == 2 + for name in ["index1_1", "index2"]: + assert name in names + + client.alter_table( + table_name, rename_indexes=[ydb.RenameIndexItem("index1_1", "index2", replace_destination=True)] + ) + + description = client.describe_table(table_name) + assert len(description.indexes) == 1 + assert description.indexes[0].name == "index2" diff --git a/ydb/_session_impl.py b/ydb/_session_impl.py index a61612bc..4fcd2331 100644 --- a/ydb/_session_impl.py +++ b/ydb/_session_impl.py @@ -268,6 +268,7 @@ def alter_table_request_factory( alter_partitioning_settings, set_key_bloom_filter, set_read_replicas_settings, + rename_indexes, ): request = session_state.attach_request(_apis.ydb_table.AlterTableRequest(path=path)) if add_columns is not None: @@ -316,6 +317,10 @@ def alter_table_request_factory( if set_read_replicas_settings is not None: request.set_read_replicas_settings.MergeFrom(set_read_replicas_settings.to_pb()) + if rename_indexes is not None: + for rename_index in rename_indexes: + request.rename_indexes.add().MergeFrom(rename_index.to_pb()) + return request diff --git a/ydb/aio/table.py b/ydb/aio/table.py index 538f498b..30b977f3 100644 --- a/ydb/aio/table.py +++ b/ydb/aio/table.py @@ -105,6 +105,7 @@ async def alter_table( alter_partitioning_settings=None, set_key_bloom_filter=None, set_read_replicas_settings=None, + rename_indexes=None, ): # pylint: disable=W0236,R0913,R0914 return await super().alter_table( path, @@ -123,6 +124,7 @@ async def alter_table( alter_partitioning_settings, set_key_bloom_filter, set_read_replicas_settings, + rename_indexes, ) def transaction(self, tx_mode=None, *, allow_split_transactions=None): @@ -250,6 +252,7 @@ async def alter_table( alter_partitioning_settings: Optional["ydb.PartitioningSettings"] = None, set_key_bloom_filter: Optional["ydb.FeatureFlag"] = None, set_read_replicas_settings: Optional["ydb.ReadReplicasSettings"] = None, + rename_indexes: Optional[List["ydb.RenameIndexItem"]] = None, ) -> "ydb.Operation": """ Alter a YDB table. @@ -269,6 +272,7 @@ async def alter_table( :param set_compaction_policy: Compaction policy :param alter_partitioning_settings: ydb.PartitioningSettings to alter :param set_key_bloom_filter: ydb.FeatureFlag to set key bloom filter + :param rename_indexes: List of ydb.RenameIndexItem to rename :return: Operation or YDB error otherwise. """ @@ -293,6 +297,7 @@ async def callee(session: Session): alter_partitioning_settings=alter_partitioning_settings, set_key_bloom_filter=set_key_bloom_filter, set_read_replicas_settings=set_read_replicas_settings, + rename_indexes=rename_indexes, ) return await self._pool.retry_operation(callee) diff --git a/ydb/table.py b/ydb/table.py index ac73902f..8767ca1e 100644 --- a/ydb/table.py +++ b/ydb/table.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- import abc +from dataclasses import dataclass import ydb from abc import abstractmethod import logging @@ -327,6 +328,20 @@ def to_pb(self): return self._pb +@dataclass +class RenameIndexItem: + source_name: str + destination_name: str + replace_destination: bool = False + + def to_pb(self): + return _apis.ydb_table.RenameIndexItem( + source_name=self.source_name, + destination_name=self.destination_name, + replace_destination=self.replace_destination, + ) + + class ReplicationPolicy(object): def __init__(self): self._pb = _apis.ydb_table.ReplicationPolicy() @@ -1124,6 +1139,7 @@ def alter_table( alter_partitioning_settings=None, set_key_bloom_filter=None, set_read_replicas_settings=None, + rename_indexes=None, ): pass @@ -1321,6 +1337,7 @@ def alter_table( alter_partitioning_settings: Optional["ydb.PartitioningSettings"] = None, set_key_bloom_filter: Optional["ydb.FeatureFlag"] = None, set_read_replicas_settings: Optional["ydb.ReadReplicasSettings"] = None, + rename_indexes: Optional[List["ydb.RenameIndexItem"]] = None, ) -> "ydb.Operation": """ Alter a YDB table. @@ -1340,6 +1357,7 @@ def alter_table( :param set_compaction_policy: Compaction policy :param alter_partitioning_settings: ydb.PartitioningSettings to alter :param set_key_bloom_filter: ydb.FeatureFlag to set key bloom filter + :param rename_indexes: List of ydb.RenameIndexItem to rename :return: Operation or YDB error otherwise. """ @@ -1364,6 +1382,7 @@ def callee(session: Session): alter_partitioning_settings=alter_partitioning_settings, set_key_bloom_filter=set_key_bloom_filter, set_read_replicas_settings=set_read_replicas_settings, + rename_indexes=rename_indexes, ) return self._pool.retry_operation_sync(callee) @@ -1857,6 +1876,7 @@ def alter_table( alter_partitioning_settings=None, set_key_bloom_filter=None, set_read_replicas_settings=None, + rename_indexes=None, ): return self._driver( _session_impl.alter_table_request_factory( @@ -1876,6 +1896,7 @@ def alter_table( alter_partitioning_settings, set_key_bloom_filter, set_read_replicas_settings, + rename_indexes, ), _apis.TableService.Stub, _apis.TableService.AlterTable, @@ -2088,6 +2109,7 @@ def async_alter_table( alter_partitioning_settings=None, set_key_bloom_filter=None, set_read_replicas_settings=None, + rename_indexes=None, ): return self._driver.future( _session_impl.alter_table_request_factory( @@ -2107,6 +2129,7 @@ def async_alter_table( alter_partitioning_settings, set_key_bloom_filter, set_read_replicas_settings, + rename_indexes, ), _apis.TableService.Stub, _apis.TableService.AlterTable, From 96907d703dbb4874035e4780e591cce202b15779 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Fri, 6 Jun 2025 17:13:06 +0300 Subject: [PATCH 410/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b37205a..3f832c0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Rename indexes feature + ## 3.21.2 ## * Add disable_discovery option to DriverConfig From 277e6e0067e3b4f3d70f0605840648cfd0719d27 Mon Sep 17 00:00:00 2001 From: robot Date: Fri, 6 Jun 2025 14:14:02 +0000 Subject: [PATCH 411/429] Release: 3.21.3 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f832c0c..8d2af2b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.21.3 ## * Rename indexes feature ## 3.21.2 ## diff --git a/setup.py b/setup.py index e590b4b6..3c11ec7f 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.21.2", # AUTOVERSION + version="3.21.3", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 62af5284..13f62552 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.21.2" +VERSION = "3.21.3" From 7de9687911b51e5fd6ff5b753b1bce2d52682cdc Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 9 Jun 2025 11:22:01 +0300 Subject: [PATCH 412/429] Update protofiles --- ydb-api-protos | 2 +- .../draft/protos/ydb_federated_query_pb2.py | 1579 +++++++++++++---- ydb/_grpc/v3/protos/ydb_export_pb2.py | 198 ++- ydb/_grpc/v3/protos/ydb_import_pb2.py | 491 ++++- ydb/_grpc/v3/protos/ydb_topic_pb2.py | 252 +-- ydb/_grpc/v3/ydb_import_v1_pb2.py | 16 +- ydb/_grpc/v3/ydb_import_v1_pb2_grpc.py | 34 + ydb/_grpc/v3/ydb_query_v1_pb2_grpc.py | 21 +- .../draft/protos/ydb_federated_query_pb2.py | 510 +++--- .../draft/protos/ydb_federated_query_pb2.pyi | 153 +- ydb/_grpc/v4/protos/ydb_export_pb2.py | 81 +- ydb/_grpc/v4/protos/ydb_export_pb2.pyi | 24 +- ydb/_grpc/v4/protos/ydb_import_pb2.py | 91 +- ydb/_grpc/v4/protos/ydb_import_pb2.pyi | 86 +- ydb/_grpc/v4/protos/ydb_topic_pb2.py | 214 +-- ydb/_grpc/v4/protos/ydb_topic_pb2.pyi | 24 +- ydb/_grpc/v4/ydb_import_v1_pb2.py | 4 +- ydb/_grpc/v4/ydb_import_v1_pb2_grpc.py | 34 + ydb/_grpc/v4/ydb_query_v1_pb2_grpc.py | 21 +- .../draft/protos/ydb_federated_query_pb2.py | 510 +++--- .../draft/protos/ydb_federated_query_pb2.pyi | 153 +- ydb/_grpc/v5/protos/ydb_export_pb2.py | 81 +- ydb/_grpc/v5/protos/ydb_export_pb2.pyi | 24 +- ydb/_grpc/v5/protos/ydb_import_pb2.py | 91 +- ydb/_grpc/v5/protos/ydb_import_pb2.pyi | 86 +- ydb/_grpc/v5/protos/ydb_topic_pb2.py | 214 +-- ydb/_grpc/v5/protos/ydb_topic_pb2.pyi | 24 +- ydb/_grpc/v5/ydb_import_v1_pb2.py | 4 +- ydb/_grpc/v5/ydb_import_v1_pb2_grpc.py | 34 + ydb/_grpc/v5/ydb_query_v1_pb2_grpc.py | 21 +- 30 files changed, 3589 insertions(+), 1488 deletions(-) diff --git a/ydb-api-protos b/ydb-api-protos index 1440f00e..97ae28e0 160000 --- a/ydb-api-protos +++ b/ydb-api-protos @@ -1 +1 @@ -Subproject commit 1440f00ea8c997bfe378c9e8e8a29c8916b8b4ba +Subproject commit 97ae28e0194df0daabf5aba34a019413e0e487ad diff --git a/ydb/_grpc/v3/draft/protos/ydb_federated_query_pb2.py b/ydb/_grpc/v3/draft/protos/ydb_federated_query_pb2.py index f11640a6..1df20b87 100644 --- a/ydb/_grpc/v3/draft/protos/ydb_federated_query_pb2.py +++ b/ydb/_grpc/v3/draft/protos/ydb_federated_query_pb2.py @@ -29,7 +29,7 @@ syntax='proto3', serialized_options=b'\n$tech.ydb.proto.draft.federated.queryZGgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_FederatedQuery\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n&draft/protos/ydb_federated_query.proto\x12\x0e\x46\x65\x64\x65ratedQuery\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x16protos/ydb_value.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"{\n\x03\x41\x63l\x12\x32\n\nvisibility\x18\x01 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"@\n\nVisibility\x12\x1a\n\x16VISIBILITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\t\n\x05SCOPE\x10\x02\"\x83\x03\n\x06Limits\x12!\n\x0fvcpu_rate_limit\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0f\x66low_rate_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fvcpu_time_limit\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_size\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_rows\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1e\n\x0cmemory_limit\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\nresult_ttl\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x11\x65xecution_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x38\n\x12\x65xecution_deadline\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\t\n\x07timeout\"\xef\x03\n\x14StreamingDisposition\x12(\n\x06oldest\x18\x01 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\'\n\x05\x66resh\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x42\n\tfrom_time\x18\x03 \x01(\x0b\x32-.FederatedQuery.StreamingDisposition.FromTimeH\x00\x12@\n\x08time_ago\x18\x04 \x01(\x0b\x32,.FederatedQuery.StreamingDisposition.TimeAgoH\x00\x12W\n\x14\x66rom_last_checkpoint\x18\x05 \x01(\x0b\x32\x37.FederatedQuery.StreamingDisposition.FromLastCheckpointH\x00\x1a\x39\n\x08\x46romTime\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x36\n\x07TimeAgo\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a#\n\x12\x46romLastCheckpoint\x12\r\n\x05\x66orce\x18\x01 \x01(\x08\x42\r\n\x0b\x64isposition\"\xd4\x04\n\x0cQueryContent\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12&\n\x06limits\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Limits\x12\x1a\n\x04text\x18\x05 \x01(\tB\x0c\xa2\xe6*\x08\n\x06\x08\x01\x10\x80\xa0\x06\x12\x11\n\tautomatic\x18\x06 \x01(\x08\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\x12\x64\n\x12\x65xecution_settings\x18\n \x03(\x0b\x32\x33.FederatedQuery.QueryContent.ExecutionSettingsEntryB\x13\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x03\x18\x80 \x12\x38\n\x06syntax\x18\x0b \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\x1a\x38\n\x16\x45xecutionSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"E\n\tQueryType\x12\x1a\n\x16QUERY_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tANALYTICS\x10\x01\x12\r\n\tSTREAMING\x10\x02\"?\n\x0bQuerySyntax\x12\x1c\n\x18QUERY_SYNTAX_UNSPECIFIED\x10\x00\x12\n\n\x06YQL_V1\x10\x01\x12\x06\n\x02PG\x10\x02\"\xe5\x01\n\nCommonMeta\x12\x17\n\x02id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x1f\n\ncreated_by\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12 \n\x0bmodified_by\x18\x03 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12.\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bmodified_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x08revision\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbf\x06\n\tQueryMeta\x12*\n\x06\x63ommon\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x30\n\x0csubmitted_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstarted_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x37\n\x06status\x18\x05 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x1f\n\x17last_job_query_revision\x18\x06 \x01(\x03\x12\x13\n\x0blast_job_id\x18\x07 \x01(\t\x12-\n\texpire_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10result_expire_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nstarted_by\x18\n \x01(\t\x12\x14\n\naborted_by\x18\x0b \x01(\tH\x00\x12\x13\n\tpaused_by\x18\x0c \x01(\tH\x00\x12\x1d\n\x15has_saved_checkpoints\x18\r \x01(\x08\"\x83\x02\n\rComputeStatus\x12\x1e\n\x1a\x43OMPUTE_STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STARTING\x10\x01\x12\x13\n\x0f\x41\x42ORTED_BY_USER\x10\x02\x12\x15\n\x11\x41\x42ORTED_BY_SYSTEM\x10\x03\x12\x14\n\x10\x41\x42ORTING_BY_USER\x10\x04\x12\x16\n\x12\x41\x42ORTING_BY_SYSTEM\x10\x05\x12\x0c\n\x08RESUMING\x10\x06\x12\x0b\n\x07RUNNING\x10\x07\x12\r\n\tCOMPLETED\x10\x08\x12\x0e\n\nCOMPLETING\x10\x0c\x12\n\n\x06\x46\x41ILED\x10\t\x12\x0b\n\x07\x46\x41ILING\x10\r\x12\n\n\x06PAUSED\x10\x0b\x12\x0b\n\x07PAUSING\x10\nB\x08\n\x06\x61\x63tion\"\xc9\x01\n\nBriefQuery\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\'\n\x04meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x05 \x01(\x08\"\x19\n\tQueryPlan\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x18\n\x08QueryAst\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\t\"]\n\rResultSetMeta\x12\x1b\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x1c\n\nrows_count\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x11\n\ttruncated\x18\x03 \x01(\x08\"\xf6\x02\n\x05Query\x12\'\n\x04meta\x18\x01 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\'\n\x04plan\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x04 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x30\n\x0ftransient_issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\"\x1f\n\x0fQueryStatistics\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x8e\x02\n\x12\x43reateQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x04 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x43reateQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\".\n\x11\x43reateQueryResult\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x93\x04\n\x12ListQueriesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x39\n\x06\x66ilter\x18\x04 \x01(\x0b\x32).FederatedQuery.ListQueriesRequest.Filter\x1a\xcc\x02\n\x06\x46ilter\x12:\n\nquery_type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12?\n\x06status\x18\x02 \x03(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatusB\x06\x9a\xe6*\x02\x18\x14\x12\x31\n\x04mode\x18\x03 \x03(\x0e\x32\x1b.FederatedQuery.ExecuteModeB\x06\x9a\xe6*\x02\x18\x14\x12\x15\n\x04name\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x05 \x01(\x08\x12\x32\n\nvisibility\x18\x06 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x30\n\tautomatic\x18\x07 \x01(\x0e\x32\x1d.FederatedQuery.AutomaticType\"C\n\x13ListQueriesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"`\n\x11ListQueriesResult\x12)\n\x05query\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.BriefQuery\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"p\n\x14\x44\x65scribeQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"E\n\x15\x44\x65scribeQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\";\n\x13\x44\x65scribeQueryResult\x12$\n\x05query\x18\x01 \x01(\x0b\x32\x15.FederatedQuery.Query\"q\n\x15GetQueryStatusRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"F\n\x16GetQueryStatusResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"f\n\x14GetQueryStatusResult\x12\x37\n\x06status\x18\x01 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x15\n\rmeta_revision\x18\x02 \x01(\x03\"\xb5\x01\n\x12\x44\x65leteQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x44\x65leteQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x44\x65leteQueryResult\"\x8a\x03\n\x12ModifyQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12-\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x05 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12\x36\n\x0fstate_load_mode\x18\x06 \x01(\x0e\x32\x1d.FederatedQuery.StateLoadMode\x12#\n\x11previous_revision\x18\x07 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13ModifyQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11ModifyQueryResult\"\xe3\x01\n\x13\x43ontrolQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12+\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.QueryAction\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"D\n\x14\x43ontrolQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ontrolQueryResult\"\xed\x01\n\x08\x42riefJob\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x12\n\nquery_name\x18\t \x01(\t\x12\x32\n\nvisibility\x18\n \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x83\x04\n\x03Job\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x0c\n\x04text\x18\x02 \x01(\t\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\'\n\x04plan\x18\x04 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\x12\x12\n\nquery_name\x18\t \x01(\t\x12 \n\x03\x61\x63l\x18\n \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x06syntax\x18\r \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\"\x8c\x02\n\x0fListJobsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x10\n\x08query_id\x18\x05 \x01(\t\x12\x36\n\x06\x66ilter\x18\x04 \x01(\x0b\x32&.FederatedQuery.ListJobsRequest.Filter\x1a:\n\x06\x46ilter\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\"@\n\x10ListJobsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Y\n\x0eListJobsResult\x12%\n\x03job\x18\x01 \x03(\x0b\x32\x18.FederatedQuery.BriefJob\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"l\n\x12\x44\x65scribeJobRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\x06job_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"C\n\x13\x44\x65scribeJobResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"5\n\x11\x44\x65scribeJobResult\x12 \n\x03job\x18\x01 \x01(\x0b\x32\x13.FederatedQuery.Job\"\x15\n\x13\x43urrentIAMTokenAuth\"\n\n\x08NoneAuth\")\n\x12ServiceAccountAuth\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\xba\x01\n\x07IamAuth\x12:\n\x0b\x63urrent_iam\x18\x01 \x01(\x0b\x32#.FederatedQuery.CurrentIAMTokenAuthH\x00\x12=\n\x0fservice_account\x18\x02 \x01(\x0b\x32\".FederatedQuery.ServiceAccountAuthH\x00\x12(\n\x04none\x18\x03 \x01(\x0b\x32\x18.FederatedQuery.NoneAuthH\x00\x42\n\n\x08identity\"\x98\x01\n\x0b\x44\x61taStreams\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"g\n\nMonitoring\x12\x18\n\x07project\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12\x18\n\x07\x63luster\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12%\n\x04\x61uth\x18\x03 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x98\x01\n\x0bYdbDatabase\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"\xf8\x01\n\x11\x43lickHouseCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"Y\n\x17ObjectStorageConnection\x12\x17\n\x06\x62ucket\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x91\x02\n\x11PostgreSQLCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x17\n\x06schema\x18\t \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"\xae\x04\n\x11\x43onnectionSetting\x12\x33\n\x0cydb_database\x18\x01 \x01(\x0b\x32\x1b.FederatedQuery.YdbDatabaseH\x00\x12?\n\x12\x63lickhouse_cluster\x18\x02 \x01(\x0b\x32!.FederatedQuery.ClickHouseClusterH\x00\x12\x33\n\x0c\x64\x61ta_streams\x18\x03 \x01(\x0b\x32\x1b.FederatedQuery.DataStreamsH\x00\x12\x41\n\x0eobject_storage\x18\x04 \x01(\x0b\x32\'.FederatedQuery.ObjectStorageConnectionH\x00\x12\x30\n\nmonitoring\x18\x05 \x01(\x0b\x32\x1a.FederatedQuery.MonitoringH\x00\x12?\n\x12postgresql_cluster\x18\x06 \x01(\x0b\x32!.FederatedQuery.PostgreSQLClusterH\x00\"\xa9\x01\n\x0e\x43onnectionType\x12\x1f\n\x1b\x43ONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cYDB_DATABASE\x10\x01\x12\x16\n\x12\x43LICKHOUSE_CLUSTER\x10\x02\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x03\x12\x12\n\x0eOBJECT_STORAGE\x10\x04\x12\x0e\n\nMONITORING\x10\x05\x12\x16\n\x12POSTGRESQL_CLUSTER\x10\x06\x42\x0c\n\nconnection\"\xa2\x01\n\x11\x43onnectionContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"j\n\nConnection\x12\x32\n\x07\x63ontent\x18\x01 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xaa\x01\n\x17\x43reateConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x43reateConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"<\n\x16\x43reateConnectionResult\x12\"\n\rconnection_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\x84\x03\n\x16ListConnectionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12=\n\x06\x66ilter\x18\x04 \x01(\x0b\x32-.FederatedQuery.ListConnectionsRequest.Filter\x1a\xb5\x01\n\x06\x46ilter\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\x12I\n\x0f\x63onnection_type\x18\x03 \x01(\x0e\x32\x30.FederatedQuery.ConnectionSetting.ConnectionType\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"G\n\x17ListConnectionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"i\n\x15ListConnectionsResult\x12.\n\nconnection\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.Connection\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"z\n\x19\x44\x65scribeConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"J\n\x1a\x44\x65scribeConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"J\n\x18\x44\x65scribeConnectionResult\x12.\n\nconnection\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.Connection\"\xf3\x01\n\x17ModifyConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07\x63ontent\x18\x03 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18ModifyConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16ModifyConnectionResult\"\xbf\x01\n\x17\x44\x65leteConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x44\x65leteConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16\x44\x65leteConnectionResult\"\x86\x01\n\x15TestConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\"F\n\x16TestConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x16\n\x14TestConnectionResult\"\xcc\x01\n\x14GetResultDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\x10result_set_index\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12\x18\n\x06offset\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1c\n\x05limit\x18\x05 \x01(\x03\x42\r\xb2\xe6*\t[1; 1000]\"E\n\x15GetResultDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"9\n\x13GetResultDataResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\".\n\x06Schema\x12$\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.ColumnB\x07\x9a\xe6*\x03\x18\xe8\x07\"\xa2\x02\n\x12\x44\x61taStreamsBinding\x12 \n\x0bstream_name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x0b\x63ompression\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12U\n\x0e\x66ormat_setting\x18\x05 \x03(\x0b\x32\x35.FederatedQuery.DataStreamsBinding.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x92\x04\n\x14ObjectStorageBinding\x12;\n\x06subset\x18\x01 \x03(\x0b\x32+.FederatedQuery.ObjectStorageBinding.Subset\x1a\xbc\x03\n\x06Subset\x12!\n\x0cpath_pattern\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12^\n\x0e\x66ormat_setting\x18\x03 \x03(\x0b\x32>.FederatedQuery.ObjectStorageBinding.Subset.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x12\x1c\n\x0b\x63ompression\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x05 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12O\n\nprojection\x18\x06 \x03(\x0b\x32;.FederatedQuery.ObjectStorageBinding.Subset.ProjectionEntry\x12\x16\n\x0epartitioned_by\x18\x07 \x03(\t\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fProjectionEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xea\x01\n\x0e\x42indingSetting\x12:\n\x0c\x64\x61ta_streams\x18\x01 \x01(\x0b\x32\".FederatedQuery.DataStreamsBindingH\x00\x12>\n\x0eobject_storage\x18\x02 \x01(\x0b\x32$.FederatedQuery.ObjectStorageBindingH\x00\"Q\n\x0b\x42indingType\x12\x1c\n\x18\x42INDING_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x01\x12\x12\n\x0eOBJECT_STORAGE\x10\x02\x42\t\n\x07\x62inding\"\xe5\x01\n\x0c\x42riefBinding\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12(\n\x04meta\x18\x03 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x38\n\x04type\x18\x04 \x01(\x0e\x32*.FederatedQuery.BindingSetting.BindingType\x12\x32\n\nvisibility\x18\x05 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"\xc0\x01\n\x0e\x42indingContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07setting\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingSetting\x12 \n\x03\x61\x63l\x18\x04 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"d\n\x07\x42inding\x12/\n\x07\x63ontent\x18\x01 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xa4\x01\n\x14\x43reateBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12/\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x43reateBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"6\n\x13\x43reateBindingResult\x12\x1f\n\nbinding_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\xd3\x02\n\x13ListBindingsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12:\n\x06\x66ilter\x18\x04 \x01(\x0b\x32*.FederatedQuery.ListBindingsRequest.Filter\x1a\x8a\x01\n\x06\x46ilter\x12\x1e\n\rconnection_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x03 \x01(\x08\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"D\n\x14ListBindingsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"e\n\x12ListBindingsResult\x12-\n\x07\x62inding\x18\x01 \x03(\x0b\x32\x1c.FederatedQuery.BriefBinding\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"t\n\x16\x44\x65scribeBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"G\n\x17\x44\x65scribeBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"A\n\x15\x44\x65scribeBindingResult\x12(\n\x07\x62inding\x18\x01 \x01(\x0b\x32\x17.FederatedQuery.Binding\"\xea\x01\n\x14ModifyBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15ModifyBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13ModifyBindingResult\"\xb9\x01\n\x14\x44\x65leteBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x44\x65leteBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13\x44\x65leteBindingResult*q\n\x0b\x45xecuteMode\x12\x1c\n\x18\x45XECUTE_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04SAVE\x10\x01\x12\t\n\x05PARSE\x10\x02\x12\x0b\n\x07\x43OMPILE\x10\x03\x12\x0c\n\x08VALIDATE\x10\x04\x12\x0b\n\x07\x45XPLAIN\x10\x05\x12\x07\n\x03RUN\x10\x06*y\n\x0bQueryAction\x12\x1c\n\x18QUERY_ACTION_UNSPECIFIED\x10\x00\x12\t\n\x05PAUSE\x10\x01\x12\x14\n\x10PAUSE_GRACEFULLY\x10\x02\x12\t\n\x05\x41\x42ORT\x10\x03\x12\x14\n\x10\x41\x42ORT_GRACEFULLY\x10\x04\x12\n\n\x06RESUME\x10\x05*U\n\rStateLoadMode\x12\x1f\n\x1bSTATE_LOAD_MODE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45MPTY\x10\x01\x12\x18\n\x14\x46ROM_LAST_CHECKPOINT\x10\x02*Q\n\rAutomaticType\x12\x1e\n\x1a\x41UTOMATIC_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\x11\n\rNOT_AUTOMATIC\x10\x02\x42r\n$tech.ydb.proto.draft.federated.queryZGgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_FederatedQuery\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n&draft/protos/ydb_federated_query.proto\x12\x0e\x46\x65\x64\x65ratedQuery\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x16protos/ydb_value.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"{\n\x03\x41\x63l\x12\x32\n\nvisibility\x18\x01 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"@\n\nVisibility\x12\x1a\n\x16VISIBILITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\t\n\x05SCOPE\x10\x02\"\x83\x03\n\x06Limits\x12!\n\x0fvcpu_rate_limit\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0f\x66low_rate_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fvcpu_time_limit\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_size\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_rows\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1e\n\x0cmemory_limit\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\nresult_ttl\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x11\x65xecution_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x38\n\x12\x65xecution_deadline\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\t\n\x07timeout\"\xef\x03\n\x14StreamingDisposition\x12(\n\x06oldest\x18\x01 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\'\n\x05\x66resh\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x42\n\tfrom_time\x18\x03 \x01(\x0b\x32-.FederatedQuery.StreamingDisposition.FromTimeH\x00\x12@\n\x08time_ago\x18\x04 \x01(\x0b\x32,.FederatedQuery.StreamingDisposition.TimeAgoH\x00\x12W\n\x14\x66rom_last_checkpoint\x18\x05 \x01(\x0b\x32\x37.FederatedQuery.StreamingDisposition.FromLastCheckpointH\x00\x1a\x39\n\x08\x46romTime\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x36\n\x07TimeAgo\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a#\n\x12\x46romLastCheckpoint\x12\r\n\x05\x66orce\x18\x01 \x01(\x08\x42\r\n\x0b\x64isposition\"\xe8\x05\n\x0cQueryContent\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12&\n\x06limits\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Limits\x12\x1a\n\x04text\x18\x05 \x01(\tB\x0c\xa2\xe6*\x08\n\x06\x08\x01\x10\x80\xa0\x06\x12\x11\n\tautomatic\x18\x06 \x01(\x08\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\x12\x64\n\x12\x65xecution_settings\x18\n \x03(\x0b\x32\x33.FederatedQuery.QueryContent.ExecutionSettingsEntryB\x13\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x03\x18\x80 \x12\x38\n\x06syntax\x18\x0b \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\x12N\n\nparameters\x18\x0c \x03(\x0b\x32,.FederatedQuery.QueryContent.ParametersEntryB\x0c\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\x1a\x38\n\x16\x45xecutionSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"E\n\tQueryType\x12\x1a\n\x16QUERY_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tANALYTICS\x10\x01\x12\r\n\tSTREAMING\x10\x02\"?\n\x0bQuerySyntax\x12\x1c\n\x18QUERY_SYNTAX_UNSPECIFIED\x10\x00\x12\n\n\x06YQL_V1\x10\x01\x12\x06\n\x02PG\x10\x02\"\xe5\x01\n\nCommonMeta\x12\x17\n\x02id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x1f\n\ncreated_by\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12 \n\x0bmodified_by\x18\x03 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12.\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bmodified_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x08revision\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbf\x06\n\tQueryMeta\x12*\n\x06\x63ommon\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x30\n\x0csubmitted_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstarted_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x37\n\x06status\x18\x05 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x1f\n\x17last_job_query_revision\x18\x06 \x01(\x03\x12\x13\n\x0blast_job_id\x18\x07 \x01(\t\x12-\n\texpire_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10result_expire_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nstarted_by\x18\n \x01(\t\x12\x14\n\naborted_by\x18\x0b \x01(\tH\x00\x12\x13\n\tpaused_by\x18\x0c \x01(\tH\x00\x12\x1d\n\x15has_saved_checkpoints\x18\r \x01(\x08\"\x83\x02\n\rComputeStatus\x12\x1e\n\x1a\x43OMPUTE_STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STARTING\x10\x01\x12\x13\n\x0f\x41\x42ORTED_BY_USER\x10\x02\x12\x15\n\x11\x41\x42ORTED_BY_SYSTEM\x10\x03\x12\x14\n\x10\x41\x42ORTING_BY_USER\x10\x04\x12\x16\n\x12\x41\x42ORTING_BY_SYSTEM\x10\x05\x12\x0c\n\x08RESUMING\x10\x06\x12\x0b\n\x07RUNNING\x10\x07\x12\r\n\tCOMPLETED\x10\x08\x12\x0e\n\nCOMPLETING\x10\x0c\x12\n\n\x06\x46\x41ILED\x10\t\x12\x0b\n\x07\x46\x41ILING\x10\r\x12\n\n\x06PAUSED\x10\x0b\x12\x0b\n\x07PAUSING\x10\nB\x08\n\x06\x61\x63tion\"\xc9\x01\n\nBriefQuery\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\'\n\x04meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x05 \x01(\x08\"\x19\n\tQueryPlan\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x18\n\x08QueryAst\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\t\"]\n\rResultSetMeta\x12\x1b\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x1c\n\nrows_count\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x11\n\ttruncated\x18\x03 \x01(\x08\"\x1c\n\rQueryTimeline\x12\x0b\n\x03svg\x18\x01 \x01(\t\"\xa7\x03\n\x05Query\x12\'\n\x04meta\x18\x01 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\'\n\x04plan\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x04 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x30\n\x0ftransient_issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\x12/\n\x08timeline\x18\t \x01(\x0b\x32\x1d.FederatedQuery.QueryTimeline\"\x1f\n\x0fQueryStatistics\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x8e\x02\n\x12\x43reateQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x04 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x43reateQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\".\n\x11\x43reateQueryResult\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x93\x04\n\x12ListQueriesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x39\n\x06\x66ilter\x18\x04 \x01(\x0b\x32).FederatedQuery.ListQueriesRequest.Filter\x1a\xcc\x02\n\x06\x46ilter\x12:\n\nquery_type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12?\n\x06status\x18\x02 \x03(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatusB\x06\x9a\xe6*\x02\x18\x14\x12\x31\n\x04mode\x18\x03 \x03(\x0e\x32\x1b.FederatedQuery.ExecuteModeB\x06\x9a\xe6*\x02\x18\x14\x12\x15\n\x04name\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x05 \x01(\x08\x12\x32\n\nvisibility\x18\x06 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x30\n\tautomatic\x18\x07 \x01(\x0e\x32\x1d.FederatedQuery.AutomaticType\"C\n\x13ListQueriesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"`\n\x11ListQueriesResult\x12)\n\x05query\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.BriefQuery\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"p\n\x14\x44\x65scribeQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"E\n\x15\x44\x65scribeQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\";\n\x13\x44\x65scribeQueryResult\x12$\n\x05query\x18\x01 \x01(\x0b\x32\x15.FederatedQuery.Query\"q\n\x15GetQueryStatusRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"F\n\x16GetQueryStatusResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"f\n\x14GetQueryStatusResult\x12\x37\n\x06status\x18\x01 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x15\n\rmeta_revision\x18\x02 \x01(\x03\"\xb5\x01\n\x12\x44\x65leteQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x44\x65leteQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x44\x65leteQueryResult\"\x8a\x03\n\x12ModifyQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12-\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x05 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12\x36\n\x0fstate_load_mode\x18\x06 \x01(\x0e\x32\x1d.FederatedQuery.StateLoadMode\x12#\n\x11previous_revision\x18\x07 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13ModifyQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11ModifyQueryResult\"\xe3\x01\n\x13\x43ontrolQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12+\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.QueryAction\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"D\n\x14\x43ontrolQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ontrolQueryResult\"\xed\x01\n\x08\x42riefJob\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x12\n\nquery_name\x18\t \x01(\t\x12\x32\n\nvisibility\x18\n \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x80\x05\n\x03Job\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x0c\n\x04text\x18\x02 \x01(\t\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\'\n\x04plan\x18\x04 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\x12\x12\n\nquery_name\x18\t \x01(\t\x12 \n\x03\x61\x63l\x18\n \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x06syntax\x18\r \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\x12\x37\n\nparameters\x18\x0e \x03(\x0b\x32#.FederatedQuery.Job.ParametersEntry\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x8c\x02\n\x0fListJobsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x10\n\x08query_id\x18\x05 \x01(\t\x12\x36\n\x06\x66ilter\x18\x04 \x01(\x0b\x32&.FederatedQuery.ListJobsRequest.Filter\x1a:\n\x06\x46ilter\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\"@\n\x10ListJobsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Y\n\x0eListJobsResult\x12%\n\x03job\x18\x01 \x03(\x0b\x32\x18.FederatedQuery.BriefJob\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"l\n\x12\x44\x65scribeJobRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\x06job_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"C\n\x13\x44\x65scribeJobResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"5\n\x11\x44\x65scribeJobResult\x12 \n\x03job\x18\x01 \x01(\x0b\x32\x13.FederatedQuery.Job\"\x15\n\x13\x43urrentIAMTokenAuth\"\n\n\x08NoneAuth\")\n\x12ServiceAccountAuth\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\'\n\tTokenAuth\x12\x1a\n\x05token\x18\x01 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\"\xe6\x01\n\x07IamAuth\x12:\n\x0b\x63urrent_iam\x18\x01 \x01(\x0b\x32#.FederatedQuery.CurrentIAMTokenAuthH\x00\x12=\n\x0fservice_account\x18\x02 \x01(\x0b\x32\".FederatedQuery.ServiceAccountAuthH\x00\x12(\n\x04none\x18\x03 \x01(\x0b\x32\x18.FederatedQuery.NoneAuthH\x00\x12*\n\x05token\x18\x04 \x01(\x0b\x32\x19.FederatedQuery.TokenAuthH\x00\x42\n\n\x08identity\"\xb0\x01\n\x0b\x44\x61taStreams\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\x12\x16\n\x0eshared_reading\x18\x06 \x01(\x08\"g\n\nMonitoring\x12\x18\n\x07project\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12\x18\n\x07\x63luster\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12%\n\x04\x61uth\x18\x03 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x98\x01\n\x0bYdbDatabase\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"\xf8\x01\n\x11\x43lickHouseCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"Y\n\x17ObjectStorageConnection\x12\x17\n\x06\x62ucket\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x91\x02\n\x11PostgreSQLCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x17\n\x06schema\x18\t \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"\xcb\x01\n\x10GreenplumCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x04 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x17\n\x06schema\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x06 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\xae\x01\n\x0cMySQLCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x04 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12%\n\x04\x61uth\x18\x05 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"C\n\x07Logging\x12\x11\n\tfolder_id\x18\x01 \x01(\t\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\xa4\x01\n\x10IcebergWarehouse\x12\x31\n\x02s3\x18\x01 \x01(\x0b\x32#.FederatedQuery.IcebergWarehouse.S3H\x00\x1aR\n\x02S3\x12\x1c\n\x06\x62ucket\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x88\x01\x01\x12\x1a\n\x04path\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x01\x88\x01\x01\x42\t\n\x07_bucketB\x07\n\x05_pathB\t\n\x07payload\"\xc0\x02\n\x0eIcebergCatalog\x12\x37\n\x06hadoop\x18\x01 \x01(\x0b\x32%.FederatedQuery.IcebergCatalog.HadoopH\x00\x12\x46\n\x0ehive_metastore\x18\x02 \x01(\x0b\x32,.FederatedQuery.IcebergCatalog.HiveMetastoreH\x00\x1a\x37\n\x06Hadoop\x12\x1f\n\tdirectory\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x88\x01\x01\x42\x0c\n\n_directory\x1ai\n\rHiveMetastore\x12\x19\n\x03uri\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x88\x01\x01\x12#\n\rdatabase_name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x01\x88\x01\x01\x42\x06\n\x04_uriB\x10\n\x0e_database_nameB\t\n\x07payload\"\xa0\x01\n\x07Iceberg\x12/\n\x0ewarehouse_auth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x33\n\twarehouse\x18\x03 \x01(\x0b\x32 .FederatedQuery.IcebergWarehouse\x12/\n\x07\x63\x61talog\x18\x04 \x01(\x0b\x32\x1e.FederatedQuery.IcebergCatalog\"\xc0\x06\n\x11\x43onnectionSetting\x12\x33\n\x0cydb_database\x18\x01 \x01(\x0b\x32\x1b.FederatedQuery.YdbDatabaseH\x00\x12?\n\x12\x63lickhouse_cluster\x18\x02 \x01(\x0b\x32!.FederatedQuery.ClickHouseClusterH\x00\x12\x33\n\x0c\x64\x61ta_streams\x18\x03 \x01(\x0b\x32\x1b.FederatedQuery.DataStreamsH\x00\x12\x41\n\x0eobject_storage\x18\x04 \x01(\x0b\x32\'.FederatedQuery.ObjectStorageConnectionH\x00\x12\x30\n\nmonitoring\x18\x05 \x01(\x0b\x32\x1a.FederatedQuery.MonitoringH\x00\x12?\n\x12postgresql_cluster\x18\x06 \x01(\x0b\x32!.FederatedQuery.PostgreSQLClusterH\x00\x12=\n\x11greenplum_cluster\x18\x07 \x01(\x0b\x32 .FederatedQuery.GreenplumClusterH\x00\x12\x35\n\rmysql_cluster\x18\x08 \x01(\x0b\x32\x1c.FederatedQuery.MySQLClusterH\x00\x12*\n\x07logging\x18\t \x01(\x0b\x32\x17.FederatedQuery.LoggingH\x00\x12*\n\x07iceberg\x18\n \x01(\x0b\x32\x17.FederatedQuery.IcebergH\x00\"\xed\x01\n\x0e\x43onnectionType\x12\x1f\n\x1b\x43ONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cYDB_DATABASE\x10\x01\x12\x16\n\x12\x43LICKHOUSE_CLUSTER\x10\x02\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x03\x12\x12\n\x0eOBJECT_STORAGE\x10\x04\x12\x0e\n\nMONITORING\x10\x05\x12\x16\n\x12POSTGRESQL_CLUSTER\x10\x06\x12\x15\n\x11GREENPLUM_CLUSTER\x10\x07\x12\x11\n\rMYSQL_CLUSTER\x10\x08\x12\x0b\n\x07LOGGING\x10\t\x12\x0b\n\x07ICEBERG\x10\nB\x0c\n\nconnection\"\xa2\x01\n\x11\x43onnectionContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"j\n\nConnection\x12\x32\n\x07\x63ontent\x18\x01 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xaa\x01\n\x17\x43reateConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x43reateConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"<\n\x16\x43reateConnectionResult\x12\"\n\rconnection_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\x84\x03\n\x16ListConnectionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12=\n\x06\x66ilter\x18\x04 \x01(\x0b\x32-.FederatedQuery.ListConnectionsRequest.Filter\x1a\xb5\x01\n\x06\x46ilter\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\x12I\n\x0f\x63onnection_type\x18\x03 \x01(\x0e\x32\x30.FederatedQuery.ConnectionSetting.ConnectionType\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"G\n\x17ListConnectionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"i\n\x15ListConnectionsResult\x12.\n\nconnection\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.Connection\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"z\n\x19\x44\x65scribeConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"J\n\x1a\x44\x65scribeConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"J\n\x18\x44\x65scribeConnectionResult\x12.\n\nconnection\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.Connection\"\xf3\x01\n\x17ModifyConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07\x63ontent\x18\x03 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18ModifyConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16ModifyConnectionResult\"\xbf\x01\n\x17\x44\x65leteConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x44\x65leteConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16\x44\x65leteConnectionResult\"\x86\x01\n\x15TestConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\"F\n\x16TestConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x16\n\x14TestConnectionResult\"\xcc\x01\n\x14GetResultDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\x10result_set_index\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12\x18\n\x06offset\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1c\n\x05limit\x18\x05 \x01(\x03\x42\r\xb2\xe6*\t[1; 1000]\"E\n\x15GetResultDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"9\n\x13GetResultDataResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\".\n\x06Schema\x12$\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.ColumnB\x07\x9a\xe6*\x03\x18\xe8\x07\"\xa2\x02\n\x12\x44\x61taStreamsBinding\x12 \n\x0bstream_name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x0b\x63ompression\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12U\n\x0e\x66ormat_setting\x18\x05 \x03(\x0b\x32\x35.FederatedQuery.DataStreamsBinding.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x92\x04\n\x14ObjectStorageBinding\x12;\n\x06subset\x18\x01 \x03(\x0b\x32+.FederatedQuery.ObjectStorageBinding.Subset\x1a\xbc\x03\n\x06Subset\x12!\n\x0cpath_pattern\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12^\n\x0e\x66ormat_setting\x18\x03 \x03(\x0b\x32>.FederatedQuery.ObjectStorageBinding.Subset.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x12\x1c\n\x0b\x63ompression\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x05 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12O\n\nprojection\x18\x06 \x03(\x0b\x32;.FederatedQuery.ObjectStorageBinding.Subset.ProjectionEntry\x12\x16\n\x0epartitioned_by\x18\x07 \x03(\t\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fProjectionEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xea\x01\n\x0e\x42indingSetting\x12:\n\x0c\x64\x61ta_streams\x18\x01 \x01(\x0b\x32\".FederatedQuery.DataStreamsBindingH\x00\x12>\n\x0eobject_storage\x18\x02 \x01(\x0b\x32$.FederatedQuery.ObjectStorageBindingH\x00\"Q\n\x0b\x42indingType\x12\x1c\n\x18\x42INDING_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x01\x12\x12\n\x0eOBJECT_STORAGE\x10\x02\x42\t\n\x07\x62inding\"\xe5\x01\n\x0c\x42riefBinding\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12(\n\x04meta\x18\x03 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x38\n\x04type\x18\x04 \x01(\x0e\x32*.FederatedQuery.BindingSetting.BindingType\x12\x32\n\nvisibility\x18\x05 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"\xc0\x01\n\x0e\x42indingContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07setting\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingSetting\x12 \n\x03\x61\x63l\x18\x04 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"d\n\x07\x42inding\x12/\n\x07\x63ontent\x18\x01 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xa4\x01\n\x14\x43reateBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12/\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x43reateBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"6\n\x13\x43reateBindingResult\x12\x1f\n\nbinding_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\xd3\x02\n\x13ListBindingsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12:\n\x06\x66ilter\x18\x04 \x01(\x0b\x32*.FederatedQuery.ListBindingsRequest.Filter\x1a\x8a\x01\n\x06\x46ilter\x12\x1e\n\rconnection_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x03 \x01(\x08\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"D\n\x14ListBindingsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"e\n\x12ListBindingsResult\x12-\n\x07\x62inding\x18\x01 \x03(\x0b\x32\x1c.FederatedQuery.BriefBinding\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"t\n\x16\x44\x65scribeBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"G\n\x17\x44\x65scribeBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"A\n\x15\x44\x65scribeBindingResult\x12(\n\x07\x62inding\x18\x01 \x01(\x0b\x32\x17.FederatedQuery.Binding\"\xea\x01\n\x14ModifyBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15ModifyBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13ModifyBindingResult\"\xb9\x01\n\x14\x44\x65leteBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x44\x65leteBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13\x44\x65leteBindingResult*q\n\x0b\x45xecuteMode\x12\x1c\n\x18\x45XECUTE_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04SAVE\x10\x01\x12\t\n\x05PARSE\x10\x02\x12\x0b\n\x07\x43OMPILE\x10\x03\x12\x0c\n\x08VALIDATE\x10\x04\x12\x0b\n\x07\x45XPLAIN\x10\x05\x12\x07\n\x03RUN\x10\x06*y\n\x0bQueryAction\x12\x1c\n\x18QUERY_ACTION_UNSPECIFIED\x10\x00\x12\t\n\x05PAUSE\x10\x01\x12\x14\n\x10PAUSE_GRACEFULLY\x10\x02\x12\t\n\x05\x41\x42ORT\x10\x03\x12\x14\n\x10\x41\x42ORT_GRACEFULLY\x10\x04\x12\n\n\x06RESUME\x10\x05*U\n\rStateLoadMode\x12\x1f\n\x1bSTATE_LOAD_MODE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45MPTY\x10\x01\x12\x18\n\x14\x46ROM_LAST_CHECKPOINT\x10\x02*Q\n\rAutomaticType\x12\x1e\n\x1a\x41UTOMATIC_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\x11\n\rNOT_AUTOMATIC\x10\x02\x42r\n$tech.ydb.proto.draft.federated.queryZGgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_FederatedQuery\xf8\x01\x01\x62\x06proto3' , dependencies=[protos_dot_annotations_dot_sensitive__pb2.DESCRIPTOR,protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,protos_dot_ydb__value__pb2.DESCRIPTOR,protos_dot_ydb__issue__message__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,]) @@ -78,8 +78,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=15700, - serialized_end=15813, + serialized_start=17540, + serialized_end=17653, ) _sym_db.RegisterEnumDescriptor(_EXECUTEMODE) @@ -124,8 +124,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=15815, - serialized_end=15936, + serialized_start=17655, + serialized_end=17776, ) _sym_db.RegisterEnumDescriptor(_QUERYACTION) @@ -155,8 +155,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=15938, - serialized_end=16023, + serialized_start=17778, + serialized_end=17863, ) _sym_db.RegisterEnumDescriptor(_STATELOADMODE) @@ -186,8 +186,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=16025, - serialized_end=16106, + serialized_start=17865, + serialized_end=17946, ) _sym_db.RegisterEnumDescriptor(_AUTOMATICTYPE) @@ -268,8 +268,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1785, - serialized_end=1854, + serialized_start=1933, + serialized_end=2002, ) _sym_db.RegisterEnumDescriptor(_QUERYCONTENT_QUERYTYPE) @@ -298,8 +298,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1856, - serialized_end=1919, + serialized_start=2004, + serialized_end=2067, ) _sym_db.RegisterEnumDescriptor(_QUERYCONTENT_QUERYSYNTAX) @@ -383,8 +383,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2716, - serialized_end=2975, + serialized_start=2864, + serialized_end=3123, ) _sym_db.RegisterEnumDescriptor(_QUERYMETA_COMPUTESTATUS) @@ -430,11 +430,31 @@ serialized_options=None, type=None, create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='GREENPLUM_CLUSTER', index=7, number=7, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MYSQL_CLUSTER', index=8, number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='LOGGING', index=9, number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ICEBERG', index=10, number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=9556, - serialized_end=9725, + serialized_start=11328, + serialized_end=11565, ) _sym_db.RegisterEnumDescriptor(_CONNECTIONSETTING_CONNECTIONTYPE) @@ -463,8 +483,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=13397, - serialized_end=13478, + serialized_start=15237, + serialized_end=15318, ) _sym_db.RegisterEnumDescriptor(_BINDINGSETTING_BINDINGTYPE) @@ -787,8 +807,46 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1727, - serialized_end=1783, + serialized_start=1807, + serialized_end=1863, +) + +_QUERYCONTENT_PARAMETERSENTRY = _descriptor.Descriptor( + name='ParametersEntry', + full_name='FederatedQuery.QueryContent.ParametersEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='FederatedQuery.QueryContent.ParametersEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='FederatedQuery.QueryContent.ParametersEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=b'8\001', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1865, + serialized_end=1931, ) _QUERYCONTENT = _descriptor.Descriptor( @@ -862,10 +920,17 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='parameters', full_name='FederatedQuery.QueryContent.parameters', index=9, + number=12, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\252\346*\010\n\006\n\004\010\001\020d', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], - nested_types=[_QUERYCONTENT_EXECUTIONSETTINGSENTRY, ], + nested_types=[_QUERYCONTENT_EXECUTIONSETTINGSENTRY, _QUERYCONTENT_PARAMETERSENTRY, ], enum_types=[ _QUERYCONTENT_QUERYTYPE, _QUERYCONTENT_QUERYSYNTAX, @@ -877,7 +942,7 @@ oneofs=[ ], serialized_start=1323, - serialized_end=1919, + serialized_end=2067, ) @@ -943,8 +1008,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1922, - serialized_end=2151, + serialized_start=2070, + serialized_end=2299, ) @@ -1072,8 +1137,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=2154, - serialized_end=2985, + serialized_start=2302, + serialized_end=3133, ) @@ -1132,8 +1197,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2988, - serialized_end=3189, + serialized_start=3136, + serialized_end=3337, ) @@ -1164,8 +1229,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3191, - serialized_end=3216, + serialized_start=3339, + serialized_end=3364, ) @@ -1196,8 +1261,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3218, - serialized_end=3242, + serialized_start=3366, + serialized_end=3390, ) @@ -1242,8 +1307,40 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3244, - serialized_end=3337, + serialized_start=3392, + serialized_end=3485, +) + + +_QUERYTIMELINE = _descriptor.Descriptor( + name='QueryTimeline', + full_name='FederatedQuery.QueryTimeline', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='svg', full_name='FederatedQuery.QueryTimeline.svg', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3487, + serialized_end=3515, ) @@ -1311,6 +1408,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='timeline', full_name='FederatedQuery.Query.timeline', index=8, + number=9, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1323,8 +1427,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3340, - serialized_end=3714, + serialized_start=3518, + serialized_end=3941, ) @@ -1355,8 +1459,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3716, - serialized_end=3747, + serialized_start=3943, + serialized_end=3974, ) @@ -1415,8 +1519,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3750, - serialized_end=4020, + serialized_start=3977, + serialized_end=4247, ) @@ -1447,8 +1551,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4022, - serialized_end=4089, + serialized_start=4249, + serialized_end=4316, ) @@ -1479,8 +1583,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4091, - serialized_end=4137, + serialized_start=4318, + serialized_end=4364, ) @@ -1553,8 +1657,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4339, - serialized_end=4671, + serialized_start=4566, + serialized_end=4898, ) _LISTQUERIESREQUEST = _descriptor.Descriptor( @@ -1605,8 +1709,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4140, - serialized_end=4671, + serialized_start=4367, + serialized_end=4898, ) @@ -1637,8 +1741,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4673, - serialized_end=4740, + serialized_start=4900, + serialized_end=4967, ) @@ -1676,8 +1780,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4742, - serialized_end=4838, + serialized_start=4969, + serialized_end=5065, ) @@ -1715,8 +1819,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4840, - serialized_end=4952, + serialized_start=5067, + serialized_end=5179, ) @@ -1747,8 +1851,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4954, - serialized_end=5023, + serialized_start=5181, + serialized_end=5250, ) @@ -1779,8 +1883,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5025, - serialized_end=5084, + serialized_start=5252, + serialized_end=5311, ) @@ -1818,8 +1922,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5086, - serialized_end=5199, + serialized_start=5313, + serialized_end=5426, ) @@ -1850,8 +1954,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5201, - serialized_end=5271, + serialized_start=5428, + serialized_end=5498, ) @@ -1889,8 +1993,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5273, - serialized_end=5375, + serialized_start=5500, + serialized_end=5602, ) @@ -1942,8 +2046,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5378, - serialized_end=5559, + serialized_start=5605, + serialized_end=5786, ) @@ -1974,8 +2078,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5561, - serialized_end=5628, + serialized_start=5788, + serialized_end=5855, ) @@ -1999,8 +2103,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5630, - serialized_end=5649, + serialized_start=5857, + serialized_end=5876, ) @@ -2080,8 +2184,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5652, - serialized_end=6046, + serialized_start=5879, + serialized_end=6273, ) @@ -2112,8 +2216,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6048, - serialized_end=6115, + serialized_start=6275, + serialized_end=6342, ) @@ -2137,8 +2241,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6117, - serialized_end=6136, + serialized_start=6344, + serialized_end=6363, ) @@ -2197,8 +2301,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6139, - serialized_end=6366, + serialized_start=6366, + serialized_end=6593, ) @@ -2229,8 +2333,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6368, - serialized_end=6436, + serialized_start=6595, + serialized_end=6663, ) @@ -2254,8 +2358,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6438, - serialized_end=6458, + serialized_start=6665, + serialized_end=6685, ) @@ -2321,11 +2425,49 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6461, - serialized_end=6698, + serialized_start=6688, + serialized_end=6925, ) +_JOB_PARAMETERSENTRY = _descriptor.Descriptor( + name='ParametersEntry', + full_name='FederatedQuery.Job.ParametersEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='FederatedQuery.Job.ParametersEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='FederatedQuery.Job.ParametersEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=b'8\001', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1865, + serialized_end=1931, +) + _JOB = _descriptor.Descriptor( name='Job', full_name='FederatedQuery.Job', @@ -2425,10 +2567,17 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='parameters', full_name='FederatedQuery.Job.parameters', index=13, + number=14, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], - nested_types=[], + nested_types=[_JOB_PARAMETERSENTRY, ], enum_types=[ ], serialized_options=None, @@ -2437,8 +2586,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6701, - serialized_end=7216, + serialized_start=6928, + serialized_end=7568, ) @@ -2476,8 +2625,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7429, - serialized_end=7487, + serialized_start=7781, + serialized_end=7839, ) _LISTJOBSREQUEST = _descriptor.Descriptor( @@ -2535,8 +2684,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7219, - serialized_end=7487, + serialized_start=7571, + serialized_end=7839, ) @@ -2567,8 +2716,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7489, - serialized_end=7553, + serialized_start=7841, + serialized_end=7905, ) @@ -2606,8 +2755,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7555, - serialized_end=7644, + serialized_start=7907, + serialized_end=7996, ) @@ -2645,8 +2794,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7646, - serialized_end=7754, + serialized_start=7998, + serialized_end=8106, ) @@ -2677,8 +2826,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7756, - serialized_end=7823, + serialized_start=8108, + serialized_end=8175, ) @@ -2709,8 +2858,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7825, - serialized_end=7878, + serialized_start=8177, + serialized_end=8230, ) @@ -2734,8 +2883,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7880, - serialized_end=7901, + serialized_start=8232, + serialized_end=8253, ) @@ -2759,8 +2908,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7903, - serialized_end=7913, + serialized_start=8255, + serialized_end=8265, ) @@ -2791,8 +2940,40 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7915, - serialized_end=7956, + serialized_start=8267, + serialized_end=8308, +) + + +_TOKENAUTH = _descriptor.Descriptor( + name='TokenAuth', + full_name='FederatedQuery.TokenAuth', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token', full_name='FederatedQuery.TokenAuth.token', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=8310, + serialized_end=8349, ) @@ -2825,6 +3006,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='token', full_name='FederatedQuery.IamAuth.token', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -2842,8 +3030,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=7959, - serialized_end=8145, + serialized_start=8352, + serialized_end=8582, ) @@ -2890,6 +3078,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='shared_reading', full_name='FederatedQuery.DataStreams.shared_reading', index=5, + number=6, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -2902,8 +3097,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8148, - serialized_end=8300, + serialized_start=8585, + serialized_end=8761, ) @@ -2930,8 +3125,522 @@ is_extension=False, extension_scope=None, serialized_options=b'\242\346*\003\030\310\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='auth', full_name='FederatedQuery.Monitoring.auth', index=2, - number=3, type=11, cpp_type=10, label=1, + name='auth', full_name='FederatedQuery.Monitoring.auth', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=8763, + serialized_end=8866, +) + + +_YDBDATABASE = _descriptor.Descriptor( + name='YdbDatabase', + full_name='FederatedQuery.YdbDatabase', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='database_id', full_name='FederatedQuery.YdbDatabase.database_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auth', full_name='FederatedQuery.YdbDatabase.auth', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='endpoint', full_name='FederatedQuery.YdbDatabase.endpoint', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='database', full_name='FederatedQuery.YdbDatabase.database', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='secure', full_name='FederatedQuery.YdbDatabase.secure', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=8869, + serialized_end=9021, +) + + +_CLICKHOUSECLUSTER = _descriptor.Descriptor( + name='ClickHouseCluster', + full_name='FederatedQuery.ClickHouseCluster', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='database_id', full_name='FederatedQuery.ClickHouseCluster.database_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='database_name', full_name='FederatedQuery.ClickHouseCluster.database_name', index=1, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='login', full_name='FederatedQuery.ClickHouseCluster.login', index=2, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='password', full_name='FederatedQuery.ClickHouseCluster.password', index=3, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auth', full_name='FederatedQuery.ClickHouseCluster.auth', index=4, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='host', full_name='FederatedQuery.ClickHouseCluster.host', index=5, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='port', full_name='FederatedQuery.ClickHouseCluster.port', index=6, + number=6, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\n[0; 65536]', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='secure', full_name='FederatedQuery.ClickHouseCluster.secure', index=7, + number=7, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=9024, + serialized_end=9272, +) + + +_OBJECTSTORAGECONNECTION = _descriptor.Descriptor( + name='ObjectStorageConnection', + full_name='FederatedQuery.ObjectStorageConnection', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='bucket', full_name='FederatedQuery.ObjectStorageConnection.bucket', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auth', full_name='FederatedQuery.ObjectStorageConnection.auth', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=9274, + serialized_end=9363, +) + + +_POSTGRESQLCLUSTER = _descriptor.Descriptor( + name='PostgreSQLCluster', + full_name='FederatedQuery.PostgreSQLCluster', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='database_id', full_name='FederatedQuery.PostgreSQLCluster.database_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='database_name', full_name='FederatedQuery.PostgreSQLCluster.database_name', index=1, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='login', full_name='FederatedQuery.PostgreSQLCluster.login', index=2, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='password', full_name='FederatedQuery.PostgreSQLCluster.password', index=3, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='schema', full_name='FederatedQuery.PostgreSQLCluster.schema', index=4, + number=9, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auth', full_name='FederatedQuery.PostgreSQLCluster.auth', index=5, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='host', full_name='FederatedQuery.PostgreSQLCluster.host', index=6, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='port', full_name='FederatedQuery.PostgreSQLCluster.port', index=7, + number=6, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\n[0; 65536]', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='secure', full_name='FederatedQuery.PostgreSQLCluster.secure', index=8, + number=7, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=9366, + serialized_end=9639, +) + + +_GREENPLUMCLUSTER = _descriptor.Descriptor( + name='GreenplumCluster', + full_name='FederatedQuery.GreenplumCluster', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='database_id', full_name='FederatedQuery.GreenplumCluster.database_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='database_name', full_name='FederatedQuery.GreenplumCluster.database_name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='login', full_name='FederatedQuery.GreenplumCluster.login', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='password', full_name='FederatedQuery.GreenplumCluster.password', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='schema', full_name='FederatedQuery.GreenplumCluster.schema', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auth', full_name='FederatedQuery.GreenplumCluster.auth', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=9642, + serialized_end=9845, +) + + +_MYSQLCLUSTER = _descriptor.Descriptor( + name='MySQLCluster', + full_name='FederatedQuery.MySQLCluster', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='database_id', full_name='FederatedQuery.MySQLCluster.database_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='database_name', full_name='FederatedQuery.MySQLCluster.database_name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='login', full_name='FederatedQuery.MySQLCluster.login', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='password', full_name='FederatedQuery.MySQLCluster.password', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auth', full_name='FederatedQuery.MySQLCluster.auth', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=9848, + serialized_end=10022, +) + + +_LOGGING = _descriptor.Descriptor( + name='Logging', + full_name='FederatedQuery.Logging', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='folder_id', full_name='FederatedQuery.Logging.folder_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='auth', full_name='FederatedQuery.Logging.auth', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10024, + serialized_end=10091, +) + + +_ICEBERGWAREHOUSE_S3 = _descriptor.Descriptor( + name='S3', + full_name='FederatedQuery.IcebergWarehouse.S3', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='bucket', full_name='FederatedQuery.IcebergWarehouse.S3.bucket', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path', full_name='FederatedQuery.IcebergWarehouse.S3.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_bucket', full_name='FederatedQuery.IcebergWarehouse.S3._bucket', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_path', full_name='FederatedQuery.IcebergWarehouse.S3._path', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=10165, + serialized_end=10247, +) + +_ICEBERGWAREHOUSE = _descriptor.Descriptor( + name='IcebergWarehouse', + full_name='FederatedQuery.IcebergWarehouse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='s3', full_name='FederatedQuery.IcebergWarehouse.s3', index=0, + number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -2939,7 +3648,7 @@ ], extensions=[ ], - nested_types=[], + nested_types=[_ICEBERGWAREHOUSE_S3, ], enum_types=[ ], serialized_options=None, @@ -2947,55 +3656,32 @@ syntax='proto3', extension_ranges=[], oneofs=[ + _descriptor.OneofDescriptor( + name='payload', full_name='FederatedQuery.IcebergWarehouse.payload', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=8302, - serialized_end=8405, + serialized_start=10094, + serialized_end=10258, ) -_YDBDATABASE = _descriptor.Descriptor( - name='YdbDatabase', - full_name='FederatedQuery.YdbDatabase', +_ICEBERGCATALOG_HADOOP = _descriptor.Descriptor( + name='Hadoop', + full_name='FederatedQuery.IcebergCatalog.Hadoop', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='database_id', full_name='FederatedQuery.YdbDatabase.database_id', index=0, + name='directory', full_name='FederatedQuery.IcebergCatalog.Hadoop.directory', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='auth', full_name='FederatedQuery.YdbDatabase.auth', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='endpoint', full_name='FederatedQuery.YdbDatabase.endpoint', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='database', full_name='FederatedQuery.YdbDatabase.database', index=3, - number=4, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='secure', full_name='FederatedQuery.YdbDatabase.secure', index=4, - number=5, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -3007,76 +3693,38 @@ syntax='proto3', extension_ranges=[], oneofs=[ + _descriptor.OneofDescriptor( + name='_directory', full_name='FederatedQuery.IcebergCatalog.Hadoop._directory', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=8408, - serialized_end=8560, + serialized_start=10408, + serialized_end=10463, ) - -_CLICKHOUSECLUSTER = _descriptor.Descriptor( - name='ClickHouseCluster', - full_name='FederatedQuery.ClickHouseCluster', +_ICEBERGCATALOG_HIVEMETASTORE = _descriptor.Descriptor( + name='HiveMetastore', + full_name='FederatedQuery.IcebergCatalog.HiveMetastore', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='database_id', full_name='FederatedQuery.ClickHouseCluster.database_id', index=0, + name='uri', full_name='FederatedQuery.IcebergCatalog.HiveMetastore.uri', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='database_name', full_name='FederatedQuery.ClickHouseCluster.database_name', index=1, - number=8, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='login', full_name='FederatedQuery.ClickHouseCluster.login', index=2, + name='database_name', full_name='FederatedQuery.IcebergCatalog.HiveMetastore.database_name', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='password', full_name='FederatedQuery.ClickHouseCluster.password', index=3, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='auth', full_name='FederatedQuery.ClickHouseCluster.auth', index=4, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='host', full_name='FederatedQuery.ClickHouseCluster.host', index=5, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='port', full_name='FederatedQuery.ClickHouseCluster.port', index=6, - number=6, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\262\346*\n[0; 65536]', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='secure', full_name='FederatedQuery.ClickHouseCluster.secure', index=7, - number=7, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -3088,29 +3736,38 @@ syntax='proto3', extension_ranges=[], oneofs=[ + _descriptor.OneofDescriptor( + name='_uri', full_name='FederatedQuery.IcebergCatalog.HiveMetastore._uri', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_database_name', full_name='FederatedQuery.IcebergCatalog.HiveMetastore._database_name', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=8563, - serialized_end=8811, + serialized_start=10465, + serialized_end=10570, ) - -_OBJECTSTORAGECONNECTION = _descriptor.Descriptor( - name='ObjectStorageConnection', - full_name='FederatedQuery.ObjectStorageConnection', +_ICEBERGCATALOG = _descriptor.Descriptor( + name='IcebergCatalog', + full_name='FederatedQuery.IcebergCatalog', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='bucket', full_name='FederatedQuery.ObjectStorageConnection.bucket', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), + name='hadoop', full_name='FederatedQuery.IcebergCatalog.hadoop', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='auth', full_name='FederatedQuery.ObjectStorageConnection.auth', index=1, + name='hive_metastore', full_name='FederatedQuery.IcebergCatalog.hive_metastore', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -3119,7 +3776,7 @@ ], extensions=[ ], - nested_types=[], + nested_types=[_ICEBERGCATALOG_HADOOP, _ICEBERGCATALOG_HIVEMETASTORE, ], enum_types=[ ], serialized_options=None, @@ -3127,80 +3784,43 @@ syntax='proto3', extension_ranges=[], oneofs=[ + _descriptor.OneofDescriptor( + name='payload', full_name='FederatedQuery.IcebergCatalog.payload', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=8813, - serialized_end=8902, + serialized_start=10261, + serialized_end=10581, ) -_POSTGRESQLCLUSTER = _descriptor.Descriptor( - name='PostgreSQLCluster', - full_name='FederatedQuery.PostgreSQLCluster', +_ICEBERG = _descriptor.Descriptor( + name='Iceberg', + full_name='FederatedQuery.Iceberg', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='database_id', full_name='FederatedQuery.PostgreSQLCluster.database_id', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='database_name', full_name='FederatedQuery.PostgreSQLCluster.database_name', index=1, - number=8, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='login', full_name='FederatedQuery.PostgreSQLCluster.login', index=2, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='password', full_name='FederatedQuery.PostgreSQLCluster.password', index=3, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\242\346*\003\030\200\010\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='schema', full_name='FederatedQuery.PostgreSQLCluster.schema', index=4, - number=9, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='auth', full_name='FederatedQuery.PostgreSQLCluster.auth', index=5, - number=4, type=11, cpp_type=10, label=1, + name='warehouse_auth', full_name='FederatedQuery.Iceberg.warehouse_auth', index=0, + number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='host', full_name='FederatedQuery.PostgreSQLCluster.host', index=6, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\242\346*\003\030\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='port', full_name='FederatedQuery.PostgreSQLCluster.port', index=7, - number=6, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, + name='warehouse', full_name='FederatedQuery.Iceberg.warehouse', index=1, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\262\346*\n[0; 65536]', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='secure', full_name='FederatedQuery.PostgreSQLCluster.secure', index=8, - number=7, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, + name='catalog', full_name='FederatedQuery.Iceberg.catalog', index=2, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), @@ -3216,8 +3836,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8905, - serialized_end=9178, + serialized_start=10584, + serialized_end=10744, ) @@ -3271,6 +3891,34 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='greenplum_cluster', full_name='FederatedQuery.ConnectionSetting.greenplum_cluster', index=6, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='mysql_cluster', full_name='FederatedQuery.ConnectionSetting.mysql_cluster', index=7, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='logging', full_name='FederatedQuery.ConnectionSetting.logging', index=8, + number=9, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='iceberg', full_name='FederatedQuery.ConnectionSetting.iceberg', index=9, + number=10, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -3289,8 +3937,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=9181, - serialized_end=9739, + serialized_start=10747, + serialized_end=11579, ) @@ -3342,8 +3990,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9742, - serialized_end=9904, + serialized_start=11582, + serialized_end=11744, ) @@ -3381,8 +4029,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9906, - serialized_end=10012, + serialized_start=11746, + serialized_end=11852, ) @@ -3427,8 +4075,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10015, - serialized_end=10185, + serialized_start=11855, + serialized_end=12025, ) @@ -3459,8 +4107,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10187, - serialized_end=10259, + serialized_start=12027, + serialized_end=12099, ) @@ -3491,8 +4139,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10261, - serialized_end=10321, + serialized_start=12101, + serialized_end=12161, ) @@ -3544,8 +4192,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10531, - serialized_end=10712, + serialized_start=12371, + serialized_end=12552, ) _LISTCONNECTIONSREQUEST = _descriptor.Descriptor( @@ -3596,8 +4244,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10324, - serialized_end=10712, + serialized_start=12164, + serialized_end=12552, ) @@ -3628,8 +4276,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10714, - serialized_end=10785, + serialized_start=12554, + serialized_end=12625, ) @@ -3667,8 +4315,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10787, - serialized_end=10892, + serialized_start=12627, + serialized_end=12732, ) @@ -3706,8 +4354,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10894, - serialized_end=11016, + serialized_start=12734, + serialized_end=12856, ) @@ -3738,8 +4386,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11018, - serialized_end=11092, + serialized_start=12858, + serialized_end=12932, ) @@ -3770,8 +4418,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11094, - serialized_end=11168, + serialized_start=12934, + serialized_end=13008, ) @@ -3830,8 +4478,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11171, - serialized_end=11414, + serialized_start=13011, + serialized_end=13254, ) @@ -3862,8 +4510,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11416, - serialized_end=11488, + serialized_start=13256, + serialized_end=13328, ) @@ -3887,8 +4535,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11490, - serialized_end=11514, + serialized_start=13330, + serialized_end=13354, ) @@ -3940,8 +4588,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11517, - serialized_end=11708, + serialized_start=13357, + serialized_end=13548, ) @@ -3972,8 +4620,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11710, - serialized_end=11782, + serialized_start=13550, + serialized_end=13622, ) @@ -3997,8 +4645,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11784, - serialized_end=11808, + serialized_start=13624, + serialized_end=13648, ) @@ -4036,8 +4684,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11811, - serialized_end=11945, + serialized_start=13651, + serialized_end=13785, ) @@ -4068,8 +4716,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11947, - serialized_end=12017, + serialized_start=13787, + serialized_end=13857, ) @@ -4093,8 +4741,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12019, - serialized_end=12041, + serialized_start=13859, + serialized_end=13881, ) @@ -4153,8 +4801,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12044, - serialized_end=12248, + serialized_start=13884, + serialized_end=14088, ) @@ -4185,8 +4833,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12250, - serialized_end=12319, + serialized_start=14090, + serialized_end=14159, ) @@ -4217,8 +4865,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12321, - serialized_end=12378, + serialized_start=14161, + serialized_end=14218, ) @@ -4249,8 +4897,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12380, - serialized_end=12426, + serialized_start=14220, + serialized_end=14266, ) @@ -4288,8 +4936,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12667, - serialized_end=12719, + serialized_start=14507, + serialized_end=14559, ) _DATASTREAMSBINDING = _descriptor.Descriptor( @@ -4347,8 +4995,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12429, - serialized_end=12719, + serialized_start=14269, + serialized_end=14559, ) @@ -4386,8 +5034,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12667, - serialized_end=12719, + serialized_start=14507, + serialized_end=14559, ) _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY = _descriptor.Descriptor( @@ -4424,8 +5072,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13203, - serialized_end=13252, + serialized_start=15043, + serialized_end=15092, ) _OBJECTSTORAGEBINDING_SUBSET = _descriptor.Descriptor( @@ -4497,8 +5145,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12808, - serialized_end=13252, + serialized_start=14648, + serialized_end=15092, ) _OBJECTSTORAGEBINDING = _descriptor.Descriptor( @@ -4528,8 +5176,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12722, - serialized_end=13252, + serialized_start=14562, + serialized_end=15092, ) @@ -4573,8 +5221,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13255, - serialized_end=13489, + serialized_start=15095, + serialized_end=15329, ) @@ -4633,8 +5281,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13492, - serialized_end=13721, + serialized_start=15332, + serialized_end=15561, ) @@ -4693,8 +5341,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13724, - serialized_end=13916, + serialized_start=15564, + serialized_end=15756, ) @@ -4732,8 +5380,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13918, - serialized_end=14018, + serialized_start=15758, + serialized_end=15858, ) @@ -4778,8 +5426,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14021, - serialized_end=14185, + serialized_start=15861, + serialized_end=16025, ) @@ -4810,8 +5458,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14187, - serialized_end=14256, + serialized_start=16027, + serialized_end=16096, ) @@ -4842,8 +5490,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14258, - serialized_end=14312, + serialized_start=16098, + serialized_end=16152, ) @@ -4895,8 +5543,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14516, - serialized_end=14654, + serialized_start=16356, + serialized_end=16494, ) _LISTBINDINGSREQUEST = _descriptor.Descriptor( @@ -4947,8 +5595,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14315, - serialized_end=14654, + serialized_start=16155, + serialized_end=16494, ) @@ -4979,8 +5627,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14656, - serialized_end=14724, + serialized_start=16496, + serialized_end=16564, ) @@ -5018,8 +5666,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14726, - serialized_end=14827, + serialized_start=16566, + serialized_end=16667, ) @@ -5057,8 +5705,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14829, - serialized_end=14945, + serialized_start=16669, + serialized_end=16785, ) @@ -5089,8 +5737,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14947, - serialized_end=15018, + serialized_start=16787, + serialized_end=16858, ) @@ -5121,8 +5769,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15020, - serialized_end=15085, + serialized_start=16860, + serialized_end=16925, ) @@ -5181,8 +5829,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15088, - serialized_end=15322, + serialized_start=16928, + serialized_end=17162, ) @@ -5213,8 +5861,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15324, - serialized_end=15393, + serialized_start=17164, + serialized_end=17233, ) @@ -5238,8 +5886,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15395, - serialized_end=15416, + serialized_start=17235, + serialized_end=17256, ) @@ -5291,8 +5939,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15419, - serialized_end=15604, + serialized_start=17259, + serialized_end=17444, ) @@ -5323,8 +5971,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15606, - serialized_end=15675, + serialized_start=17446, + serialized_end=17515, ) @@ -5348,8 +5996,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15677, - serialized_end=15698, + serialized_start=17517, + serialized_end=17538, ) _ACL.fields_by_name['visibility'].enum_type = _ACL_VISIBILITY @@ -5389,11 +6037,14 @@ _STREAMINGDISPOSITION.fields_by_name['from_last_checkpoint']) _STREAMINGDISPOSITION.fields_by_name['from_last_checkpoint'].containing_oneof = _STREAMINGDISPOSITION.oneofs_by_name['disposition'] _QUERYCONTENT_EXECUTIONSETTINGSENTRY.containing_type = _QUERYCONTENT +_QUERYCONTENT_PARAMETERSENTRY.fields_by_name['value'].message_type = protos_dot_ydb__value__pb2._TYPEDVALUE +_QUERYCONTENT_PARAMETERSENTRY.containing_type = _QUERYCONTENT _QUERYCONTENT.fields_by_name['type'].enum_type = _QUERYCONTENT_QUERYTYPE _QUERYCONTENT.fields_by_name['acl'].message_type = _ACL _QUERYCONTENT.fields_by_name['limits'].message_type = _LIMITS _QUERYCONTENT.fields_by_name['execution_settings'].message_type = _QUERYCONTENT_EXECUTIONSETTINGSENTRY _QUERYCONTENT.fields_by_name['syntax'].enum_type = _QUERYCONTENT_QUERYSYNTAX +_QUERYCONTENT.fields_by_name['parameters'].message_type = _QUERYCONTENT_PARAMETERSENTRY _QUERYCONTENT_QUERYTYPE.containing_type = _QUERYCONTENT _QUERYCONTENT_QUERYSYNTAX.containing_type = _QUERYCONTENT _COMMONMETA.fields_by_name['created_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP @@ -5425,6 +6076,7 @@ _QUERY.fields_by_name['statistics'].message_type = _QUERYSTATISTICS _QUERY.fields_by_name['result_set_meta'].message_type = _RESULTSETMETA _QUERY.fields_by_name['ast'].message_type = _QUERYAST +_QUERY.fields_by_name['timeline'].message_type = _QUERYTIMELINE _CREATEQUERYREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS _CREATEQUERYREQUEST.fields_by_name['content'].message_type = _QUERYCONTENT _CREATEQUERYREQUEST.fields_by_name['execute_mode'].enum_type = _EXECUTEMODE @@ -5461,6 +6113,8 @@ _BRIEFJOB.fields_by_name['query_meta'].message_type = _QUERYMETA _BRIEFJOB.fields_by_name['visibility'].enum_type = _ACL_VISIBILITY _BRIEFJOB.fields_by_name['expire_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_JOB_PARAMETERSENTRY.fields_by_name['value'].message_type = protos_dot_ydb__value__pb2._TYPEDVALUE +_JOB_PARAMETERSENTRY.containing_type = _JOB _JOB.fields_by_name['meta'].message_type = _COMMONMETA _JOB.fields_by_name['query_meta'].message_type = _QUERYMETA _JOB.fields_by_name['plan'].message_type = _QUERYPLAN @@ -5471,6 +6125,7 @@ _JOB.fields_by_name['acl'].message_type = _ACL _JOB.fields_by_name['expire_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _JOB.fields_by_name['syntax'].enum_type = _QUERYCONTENT_QUERYSYNTAX +_JOB.fields_by_name['parameters'].message_type = _JOB_PARAMETERSENTRY _LISTJOBSREQUEST_FILTER.containing_type = _LISTJOBSREQUEST _LISTJOBSREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS _LISTJOBSREQUEST.fields_by_name['filter'].message_type = _LISTJOBSREQUEST_FILTER @@ -5482,6 +6137,7 @@ _IAMAUTH.fields_by_name['current_iam'].message_type = _CURRENTIAMTOKENAUTH _IAMAUTH.fields_by_name['service_account'].message_type = _SERVICEACCOUNTAUTH _IAMAUTH.fields_by_name['none'].message_type = _NONEAUTH +_IAMAUTH.fields_by_name['token'].message_type = _TOKENAUTH _IAMAUTH.oneofs_by_name['identity'].fields.append( _IAMAUTH.fields_by_name['current_iam']) _IAMAUTH.fields_by_name['current_iam'].containing_oneof = _IAMAUTH.oneofs_by_name['identity'] @@ -5491,18 +6147,61 @@ _IAMAUTH.oneofs_by_name['identity'].fields.append( _IAMAUTH.fields_by_name['none']) _IAMAUTH.fields_by_name['none'].containing_oneof = _IAMAUTH.oneofs_by_name['identity'] +_IAMAUTH.oneofs_by_name['identity'].fields.append( + _IAMAUTH.fields_by_name['token']) +_IAMAUTH.fields_by_name['token'].containing_oneof = _IAMAUTH.oneofs_by_name['identity'] _DATASTREAMS.fields_by_name['auth'].message_type = _IAMAUTH _MONITORING.fields_by_name['auth'].message_type = _IAMAUTH _YDBDATABASE.fields_by_name['auth'].message_type = _IAMAUTH _CLICKHOUSECLUSTER.fields_by_name['auth'].message_type = _IAMAUTH _OBJECTSTORAGECONNECTION.fields_by_name['auth'].message_type = _IAMAUTH _POSTGRESQLCLUSTER.fields_by_name['auth'].message_type = _IAMAUTH +_GREENPLUMCLUSTER.fields_by_name['auth'].message_type = _IAMAUTH +_MYSQLCLUSTER.fields_by_name['auth'].message_type = _IAMAUTH +_LOGGING.fields_by_name['auth'].message_type = _IAMAUTH +_ICEBERGWAREHOUSE_S3.containing_type = _ICEBERGWAREHOUSE +_ICEBERGWAREHOUSE_S3.oneofs_by_name['_bucket'].fields.append( + _ICEBERGWAREHOUSE_S3.fields_by_name['bucket']) +_ICEBERGWAREHOUSE_S3.fields_by_name['bucket'].containing_oneof = _ICEBERGWAREHOUSE_S3.oneofs_by_name['_bucket'] +_ICEBERGWAREHOUSE_S3.oneofs_by_name['_path'].fields.append( + _ICEBERGWAREHOUSE_S3.fields_by_name['path']) +_ICEBERGWAREHOUSE_S3.fields_by_name['path'].containing_oneof = _ICEBERGWAREHOUSE_S3.oneofs_by_name['_path'] +_ICEBERGWAREHOUSE.fields_by_name['s3'].message_type = _ICEBERGWAREHOUSE_S3 +_ICEBERGWAREHOUSE.oneofs_by_name['payload'].fields.append( + _ICEBERGWAREHOUSE.fields_by_name['s3']) +_ICEBERGWAREHOUSE.fields_by_name['s3'].containing_oneof = _ICEBERGWAREHOUSE.oneofs_by_name['payload'] +_ICEBERGCATALOG_HADOOP.containing_type = _ICEBERGCATALOG +_ICEBERGCATALOG_HADOOP.oneofs_by_name['_directory'].fields.append( + _ICEBERGCATALOG_HADOOP.fields_by_name['directory']) +_ICEBERGCATALOG_HADOOP.fields_by_name['directory'].containing_oneof = _ICEBERGCATALOG_HADOOP.oneofs_by_name['_directory'] +_ICEBERGCATALOG_HIVEMETASTORE.containing_type = _ICEBERGCATALOG +_ICEBERGCATALOG_HIVEMETASTORE.oneofs_by_name['_uri'].fields.append( + _ICEBERGCATALOG_HIVEMETASTORE.fields_by_name['uri']) +_ICEBERGCATALOG_HIVEMETASTORE.fields_by_name['uri'].containing_oneof = _ICEBERGCATALOG_HIVEMETASTORE.oneofs_by_name['_uri'] +_ICEBERGCATALOG_HIVEMETASTORE.oneofs_by_name['_database_name'].fields.append( + _ICEBERGCATALOG_HIVEMETASTORE.fields_by_name['database_name']) +_ICEBERGCATALOG_HIVEMETASTORE.fields_by_name['database_name'].containing_oneof = _ICEBERGCATALOG_HIVEMETASTORE.oneofs_by_name['_database_name'] +_ICEBERGCATALOG.fields_by_name['hadoop'].message_type = _ICEBERGCATALOG_HADOOP +_ICEBERGCATALOG.fields_by_name['hive_metastore'].message_type = _ICEBERGCATALOG_HIVEMETASTORE +_ICEBERGCATALOG.oneofs_by_name['payload'].fields.append( + _ICEBERGCATALOG.fields_by_name['hadoop']) +_ICEBERGCATALOG.fields_by_name['hadoop'].containing_oneof = _ICEBERGCATALOG.oneofs_by_name['payload'] +_ICEBERGCATALOG.oneofs_by_name['payload'].fields.append( + _ICEBERGCATALOG.fields_by_name['hive_metastore']) +_ICEBERGCATALOG.fields_by_name['hive_metastore'].containing_oneof = _ICEBERGCATALOG.oneofs_by_name['payload'] +_ICEBERG.fields_by_name['warehouse_auth'].message_type = _IAMAUTH +_ICEBERG.fields_by_name['warehouse'].message_type = _ICEBERGWAREHOUSE +_ICEBERG.fields_by_name['catalog'].message_type = _ICEBERGCATALOG _CONNECTIONSETTING.fields_by_name['ydb_database'].message_type = _YDBDATABASE _CONNECTIONSETTING.fields_by_name['clickhouse_cluster'].message_type = _CLICKHOUSECLUSTER _CONNECTIONSETTING.fields_by_name['data_streams'].message_type = _DATASTREAMS _CONNECTIONSETTING.fields_by_name['object_storage'].message_type = _OBJECTSTORAGECONNECTION _CONNECTIONSETTING.fields_by_name['monitoring'].message_type = _MONITORING _CONNECTIONSETTING.fields_by_name['postgresql_cluster'].message_type = _POSTGRESQLCLUSTER +_CONNECTIONSETTING.fields_by_name['greenplum_cluster'].message_type = _GREENPLUMCLUSTER +_CONNECTIONSETTING.fields_by_name['mysql_cluster'].message_type = _MYSQLCLUSTER +_CONNECTIONSETTING.fields_by_name['logging'].message_type = _LOGGING +_CONNECTIONSETTING.fields_by_name['iceberg'].message_type = _ICEBERG _CONNECTIONSETTING_CONNECTIONTYPE.containing_type = _CONNECTIONSETTING _CONNECTIONSETTING.oneofs_by_name['connection'].fields.append( _CONNECTIONSETTING.fields_by_name['ydb_database']) @@ -5522,6 +6221,18 @@ _CONNECTIONSETTING.oneofs_by_name['connection'].fields.append( _CONNECTIONSETTING.fields_by_name['postgresql_cluster']) _CONNECTIONSETTING.fields_by_name['postgresql_cluster'].containing_oneof = _CONNECTIONSETTING.oneofs_by_name['connection'] +_CONNECTIONSETTING.oneofs_by_name['connection'].fields.append( + _CONNECTIONSETTING.fields_by_name['greenplum_cluster']) +_CONNECTIONSETTING.fields_by_name['greenplum_cluster'].containing_oneof = _CONNECTIONSETTING.oneofs_by_name['connection'] +_CONNECTIONSETTING.oneofs_by_name['connection'].fields.append( + _CONNECTIONSETTING.fields_by_name['mysql_cluster']) +_CONNECTIONSETTING.fields_by_name['mysql_cluster'].containing_oneof = _CONNECTIONSETTING.oneofs_by_name['connection'] +_CONNECTIONSETTING.oneofs_by_name['connection'].fields.append( + _CONNECTIONSETTING.fields_by_name['logging']) +_CONNECTIONSETTING.fields_by_name['logging'].containing_oneof = _CONNECTIONSETTING.oneofs_by_name['connection'] +_CONNECTIONSETTING.oneofs_by_name['connection'].fields.append( + _CONNECTIONSETTING.fields_by_name['iceberg']) +_CONNECTIONSETTING.fields_by_name['iceberg'].containing_oneof = _CONNECTIONSETTING.oneofs_by_name['connection'] _CONNECTIONCONTENT.fields_by_name['setting'].message_type = _CONNECTIONSETTING _CONNECTIONCONTENT.fields_by_name['acl'].message_type = _ACL _CONNECTION.fields_by_name['content'].message_type = _CONNECTIONCONTENT @@ -5604,6 +6315,7 @@ DESCRIPTOR.message_types_by_name['QueryPlan'] = _QUERYPLAN DESCRIPTOR.message_types_by_name['QueryAst'] = _QUERYAST DESCRIPTOR.message_types_by_name['ResultSetMeta'] = _RESULTSETMETA +DESCRIPTOR.message_types_by_name['QueryTimeline'] = _QUERYTIMELINE DESCRIPTOR.message_types_by_name['Query'] = _QUERY DESCRIPTOR.message_types_by_name['QueryStatistics'] = _QUERYSTATISTICS DESCRIPTOR.message_types_by_name['CreateQueryRequest'] = _CREATEQUERYREQUEST @@ -5638,6 +6350,7 @@ DESCRIPTOR.message_types_by_name['CurrentIAMTokenAuth'] = _CURRENTIAMTOKENAUTH DESCRIPTOR.message_types_by_name['NoneAuth'] = _NONEAUTH DESCRIPTOR.message_types_by_name['ServiceAccountAuth'] = _SERVICEACCOUNTAUTH +DESCRIPTOR.message_types_by_name['TokenAuth'] = _TOKENAUTH DESCRIPTOR.message_types_by_name['IamAuth'] = _IAMAUTH DESCRIPTOR.message_types_by_name['DataStreams'] = _DATASTREAMS DESCRIPTOR.message_types_by_name['Monitoring'] = _MONITORING @@ -5645,6 +6358,12 @@ DESCRIPTOR.message_types_by_name['ClickHouseCluster'] = _CLICKHOUSECLUSTER DESCRIPTOR.message_types_by_name['ObjectStorageConnection'] = _OBJECTSTORAGECONNECTION DESCRIPTOR.message_types_by_name['PostgreSQLCluster'] = _POSTGRESQLCLUSTER +DESCRIPTOR.message_types_by_name['GreenplumCluster'] = _GREENPLUMCLUSTER +DESCRIPTOR.message_types_by_name['MySQLCluster'] = _MYSQLCLUSTER +DESCRIPTOR.message_types_by_name['Logging'] = _LOGGING +DESCRIPTOR.message_types_by_name['IcebergWarehouse'] = _ICEBERGWAREHOUSE +DESCRIPTOR.message_types_by_name['IcebergCatalog'] = _ICEBERGCATALOG +DESCRIPTOR.message_types_by_name['Iceberg'] = _ICEBERG DESCRIPTOR.message_types_by_name['ConnectionSetting'] = _CONNECTIONSETTING DESCRIPTOR.message_types_by_name['ConnectionContent'] = _CONNECTIONCONTENT DESCRIPTOR.message_types_by_name['Connection'] = _CONNECTION @@ -5750,12 +6469,20 @@ # @@protoc_insertion_point(class_scope:FederatedQuery.QueryContent.ExecutionSettingsEntry) }) , + + 'ParametersEntry' : _reflection.GeneratedProtocolMessageType('ParametersEntry', (_message.Message,), { + 'DESCRIPTOR' : _QUERYCONTENT_PARAMETERSENTRY, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.QueryContent.ParametersEntry) + }) + , 'DESCRIPTOR' : _QUERYCONTENT, '__module__' : 'draft.protos.ydb_federated_query_pb2' # @@protoc_insertion_point(class_scope:FederatedQuery.QueryContent) }) _sym_db.RegisterMessage(QueryContent) _sym_db.RegisterMessage(QueryContent.ExecutionSettingsEntry) +_sym_db.RegisterMessage(QueryContent.ParametersEntry) CommonMeta = _reflection.GeneratedProtocolMessageType('CommonMeta', (_message.Message,), { 'DESCRIPTOR' : _COMMONMETA, @@ -5799,6 +6526,13 @@ }) _sym_db.RegisterMessage(ResultSetMeta) +QueryTimeline = _reflection.GeneratedProtocolMessageType('QueryTimeline', (_message.Message,), { + 'DESCRIPTOR' : _QUERYTIMELINE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.QueryTimeline) + }) +_sym_db.RegisterMessage(QueryTimeline) + Query = _reflection.GeneratedProtocolMessageType('Query', (_message.Message,), { 'DESCRIPTOR' : _QUERY, '__module__' : 'draft.protos.ydb_federated_query_pb2' @@ -5976,11 +6710,19 @@ _sym_db.RegisterMessage(BriefJob) Job = _reflection.GeneratedProtocolMessageType('Job', (_message.Message,), { + + 'ParametersEntry' : _reflection.GeneratedProtocolMessageType('ParametersEntry', (_message.Message,), { + 'DESCRIPTOR' : _JOB_PARAMETERSENTRY, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.Job.ParametersEntry) + }) + , 'DESCRIPTOR' : _JOB, '__module__' : 'draft.protos.ydb_federated_query_pb2' # @@protoc_insertion_point(class_scope:FederatedQuery.Job) }) _sym_db.RegisterMessage(Job) +_sym_db.RegisterMessage(Job.ParametersEntry) ListJobsRequest = _reflection.GeneratedProtocolMessageType('ListJobsRequest', (_message.Message,), { @@ -6053,6 +6795,13 @@ }) _sym_db.RegisterMessage(ServiceAccountAuth) +TokenAuth = _reflection.GeneratedProtocolMessageType('TokenAuth', (_message.Message,), { + 'DESCRIPTOR' : _TOKENAUTH, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.TokenAuth) + }) +_sym_db.RegisterMessage(TokenAuth) + IamAuth = _reflection.GeneratedProtocolMessageType('IamAuth', (_message.Message,), { 'DESCRIPTOR' : _IAMAUTH, '__module__' : 'draft.protos.ydb_federated_query_pb2' @@ -6102,6 +6851,72 @@ }) _sym_db.RegisterMessage(PostgreSQLCluster) +GreenplumCluster = _reflection.GeneratedProtocolMessageType('GreenplumCluster', (_message.Message,), { + 'DESCRIPTOR' : _GREENPLUMCLUSTER, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.GreenplumCluster) + }) +_sym_db.RegisterMessage(GreenplumCluster) + +MySQLCluster = _reflection.GeneratedProtocolMessageType('MySQLCluster', (_message.Message,), { + 'DESCRIPTOR' : _MYSQLCLUSTER, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.MySQLCluster) + }) +_sym_db.RegisterMessage(MySQLCluster) + +Logging = _reflection.GeneratedProtocolMessageType('Logging', (_message.Message,), { + 'DESCRIPTOR' : _LOGGING, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.Logging) + }) +_sym_db.RegisterMessage(Logging) + +IcebergWarehouse = _reflection.GeneratedProtocolMessageType('IcebergWarehouse', (_message.Message,), { + + 'S3' : _reflection.GeneratedProtocolMessageType('S3', (_message.Message,), { + 'DESCRIPTOR' : _ICEBERGWAREHOUSE_S3, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.IcebergWarehouse.S3) + }) + , + 'DESCRIPTOR' : _ICEBERGWAREHOUSE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.IcebergWarehouse) + }) +_sym_db.RegisterMessage(IcebergWarehouse) +_sym_db.RegisterMessage(IcebergWarehouse.S3) + +IcebergCatalog = _reflection.GeneratedProtocolMessageType('IcebergCatalog', (_message.Message,), { + + 'Hadoop' : _reflection.GeneratedProtocolMessageType('Hadoop', (_message.Message,), { + 'DESCRIPTOR' : _ICEBERGCATALOG_HADOOP, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.IcebergCatalog.Hadoop) + }) + , + + 'HiveMetastore' : _reflection.GeneratedProtocolMessageType('HiveMetastore', (_message.Message,), { + 'DESCRIPTOR' : _ICEBERGCATALOG_HIVEMETASTORE, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.IcebergCatalog.HiveMetastore) + }) + , + 'DESCRIPTOR' : _ICEBERGCATALOG, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.IcebergCatalog) + }) +_sym_db.RegisterMessage(IcebergCatalog) +_sym_db.RegisterMessage(IcebergCatalog.Hadoop) +_sym_db.RegisterMessage(IcebergCatalog.HiveMetastore) + +Iceberg = _reflection.GeneratedProtocolMessageType('Iceberg', (_message.Message,), { + 'DESCRIPTOR' : _ICEBERG, + '__module__' : 'draft.protos.ydb_federated_query_pb2' + # @@protoc_insertion_point(class_scope:FederatedQuery.Iceberg) + }) +_sym_db.RegisterMessage(Iceberg) + ConnectionSetting = _reflection.GeneratedProtocolMessageType('ConnectionSetting', (_message.Message,), { 'DESCRIPTOR' : _CONNECTIONSETTING, '__module__' : 'draft.protos.ydb_federated_query_pb2' @@ -6481,10 +7296,12 @@ _LIMITS.fields_by_name['max_result_rows']._options = None _LIMITS.fields_by_name['memory_limit']._options = None _QUERYCONTENT_EXECUTIONSETTINGSENTRY._options = None +_QUERYCONTENT_PARAMETERSENTRY._options = None _QUERYCONTENT.fields_by_name['name']._options = None _QUERYCONTENT.fields_by_name['text']._options = None _QUERYCONTENT.fields_by_name['description']._options = None _QUERYCONTENT.fields_by_name['execution_settings']._options = None +_QUERYCONTENT.fields_by_name['parameters']._options = None _COMMONMETA.fields_by_name['id']._options = None _COMMONMETA.fields_by_name['created_by']._options = None _COMMONMETA.fields_by_name['modified_by']._options = None @@ -6510,12 +7327,14 @@ _CONTROLQUERYREQUEST.fields_by_name['query_id']._options = None _CONTROLQUERYREQUEST.fields_by_name['previous_revision']._options = None _CONTROLQUERYREQUEST.fields_by_name['idempotency_key']._options = None +_JOB_PARAMETERSENTRY._options = None _LISTJOBSREQUEST_FILTER.fields_by_name['query_id']._options = None _LISTJOBSREQUEST.fields_by_name['page_token']._options = None _LISTJOBSREQUEST.fields_by_name['limit']._options = None _LISTJOBSRESULT.fields_by_name['next_page_token']._options = None _DESCRIBEJOBREQUEST.fields_by_name['job_id']._options = None _SERVICEACCOUNTAUTH.fields_by_name['id']._options = None +_TOKENAUTH.fields_by_name['token']._options = None _DATASTREAMS.fields_by_name['database_id']._options = None _DATASTREAMS.fields_by_name['endpoint']._options = None _DATASTREAMS.fields_by_name['database']._options = None @@ -6538,6 +7357,20 @@ _POSTGRESQLCLUSTER.fields_by_name['schema']._options = None _POSTGRESQLCLUSTER.fields_by_name['host']._options = None _POSTGRESQLCLUSTER.fields_by_name['port']._options = None +_GREENPLUMCLUSTER.fields_by_name['database_id']._options = None +_GREENPLUMCLUSTER.fields_by_name['database_name']._options = None +_GREENPLUMCLUSTER.fields_by_name['login']._options = None +_GREENPLUMCLUSTER.fields_by_name['password']._options = None +_GREENPLUMCLUSTER.fields_by_name['schema']._options = None +_MYSQLCLUSTER.fields_by_name['database_id']._options = None +_MYSQLCLUSTER.fields_by_name['database_name']._options = None +_MYSQLCLUSTER.fields_by_name['login']._options = None +_MYSQLCLUSTER.fields_by_name['password']._options = None +_ICEBERGWAREHOUSE_S3.fields_by_name['bucket']._options = None +_ICEBERGWAREHOUSE_S3.fields_by_name['path']._options = None +_ICEBERGCATALOG_HADOOP.fields_by_name['directory']._options = None +_ICEBERGCATALOG_HIVEMETASTORE.fields_by_name['uri']._options = None +_ICEBERGCATALOG_HIVEMETASTORE.fields_by_name['database_name']._options = None _CONNECTIONCONTENT.fields_by_name['name']._options = None _CONNECTIONCONTENT.fields_by_name['description']._options = None _CREATECONNECTIONREQUEST.fields_by_name['idempotency_key']._options = None diff --git a/ydb/_grpc/v3/protos/ydb_export_pb2.py b/ydb/_grpc/v3/protos/ydb_export_pb2.py index c4f6f107..9fbab765 100644 --- a/ydb/_grpc/v3/protos/ydb_export_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_export_pb2.py @@ -12,6 +12,7 @@ _sym_db = _symbol_database.Default() +from ydb._grpc.v3.protos.annotations import sensitive_pb2 as protos_dot_annotations_dot_sensitive__pb2 from ydb._grpc.v3.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 from ydb._grpc.v3.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 @@ -23,9 +24,9 @@ syntax='proto3', serialized_options=b'\n\025tech.ydb.proto.exportZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x17protos/ydb_export.proto\x12\nYdb.Export\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x0e\x45xportProgress\"\x9e\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x11\n\rPROGRESS_DONE\x10\x03\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x04\x12\x16\n\x12PROGRESS_CANCELLED\x10\x05\"\xa0\x01\n\x12\x45xportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x98\x02\n\x12\x45xportToYtSettings\x12\x12\n\x04host\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x13\n\x05token\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x04 \x03(\x0b\x32#.Ydb.Export.ExportToYtSettings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x06 \x01(\r\x12\x13\n\x0buse_type_v3\x18\x07 \x01(\x08\x1a\x41\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\"\x12\n\x10\x45xportToYtResult\"\xb5\x01\n\x12\x45xportToYtMetadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToYtRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToYtResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xe1\x05\n\x12\x45xportToS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x35\n\x06scheme\x18\x02 \x01(\x0e\x32%.Ydb.Export.ExportToS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x06 \x03(\x0b\x32#.Ydb.Export.ExportToS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x42\n\rstorage_class\x18\t \x01(\x0e\x32+.Ydb.Export.ExportToS3Settings.StorageClass\x12\x13\n\x0b\x63ompression\x18\n \x01(\t\x12\x0e\n\x06region\x18\x0b \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\x0c \x01(\x08\x1a\x43\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12 \n\x12\x64\x65stination_prefix\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\xba\x01\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x16\n\x12REDUCED_REDUNDANCY\x10\x02\x12\x0f\n\x0bSTANDARD_IA\x10\x03\x12\x0e\n\nONEZONE_IA\x10\x04\x12\x17\n\x13INTELLIGENT_TIERING\x10\x05\x12\x0b\n\x07GLACIER\x10\x06\x12\x10\n\x0c\x44\x45\x45P_ARCHIVE\x10\x07\x12\x0c\n\x08OUTPOSTS\x10\x08\"\x12\n\x10\x45xportToS3Result\"\xb5\x01\n\x12\x45xportToS3Metadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3SettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBU\n\x15tech.ydb.proto.exportZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x17protos/ydb_export.proto\x12\nYdb.Export\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x0e\x45xportProgress\"\x9e\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x11\n\rPROGRESS_DONE\x10\x03\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x04\x12\x16\n\x12PROGRESS_CANCELLED\x10\x05\"\xa0\x01\n\x12\x45xportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x98\x02\n\x12\x45xportToYtSettings\x12\x12\n\x04host\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x13\n\x05token\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x04 \x03(\x0b\x32#.Ydb.Export.ExportToYtSettings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x06 \x01(\r\x12\x13\n\x0buse_type_v3\x18\x07 \x01(\x08\x1a\x41\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\"\x12\n\x10\x45xportToYtResult\"\xb5\x01\n\x12\x45xportToYtMetadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToYtRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToYtResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xc1\x06\n\x12\x45xportToS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x35\n\x06scheme\x18\x02 \x01(\x0e\x32%.Ydb.Export.ExportToS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12\x32\n\x05items\x18\x06 \x03(\x0b\x32#.Ydb.Export.ExportToS3Settings.Item\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x42\n\rstorage_class\x18\t \x01(\x0e\x32+.Ydb.Export.ExportToS3Settings.StorageClass\x12\x13\n\x0b\x63ompression\x18\n \x01(\t\x12\x0e\n\x06region\x18\x0b \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\x0c \x01(\x08\x12\x13\n\x0bsource_path\x18\r \x01(\t\x12\x1a\n\x12\x64\x65stination_prefix\x18\x0e \x01(\t\x12;\n\x13\x65ncryption_settings\x18\x0f \x01(\x0b\x32\x1e.Ydb.Export.EncryptionSettings\x1a=\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1a\n\x12\x64\x65stination_prefix\x18\x02 \x01(\t\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\xba\x01\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x16\n\x12REDUCED_REDUNDANCY\x10\x02\x12\x0f\n\x0bSTANDARD_IA\x10\x03\x12\x0e\n\nONEZONE_IA\x10\x04\x12\x17\n\x13INTELLIGENT_TIERING\x10\x05\x12\x0b\n\x07GLACIER\x10\x06\x12\x10\n\x0c\x44\x45\x45P_ARCHIVE\x10\x07\x12\x0c\n\x08OUTPOSTS\x10\x08\"\x12\n\x10\x45xportToS3Result\"\xb5\x01\n\x12\x45xportToS3Metadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3SettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa2\x01\n\x12\x45ncryptionSettings\x12\x1c\n\x14\x65ncryption_algorithm\x18\x01 \x01(\t\x12\x44\n\rsymmetric_key\x18\x02 \x01(\x0b\x32+.Ydb.Export.EncryptionSettings.SymmetricKeyH\x00\x1a!\n\x0cSymmetricKey\x12\x11\n\x03key\x18\x01 \x01(\x0c\x42\x04\xb8\xe6*\x01\x42\x05\n\x03KeyBU\n\x15tech.ydb.proto.exportZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export\xf8\x01\x01\x62\x06proto3' , - dependencies=[protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) + dependencies=[protos_dot_annotations_dot_sensitive__pb2.DESCRIPTOR,protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) @@ -69,8 +70,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=157, - serialized_end=315, + serialized_start=193, + serialized_end=351, ) _sym_db.RegisterEnumDescriptor(_EXPORTPROGRESS_PROGRESS) @@ -99,8 +100,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1675, - serialized_end=1721, + serialized_start=1807, + serialized_end=1853, ) _sym_db.RegisterEnumDescriptor(_EXPORTTOS3SETTINGS_SCHEME) @@ -159,8 +160,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1724, - serialized_end=1910, + serialized_start=1856, + serialized_end=2042, ) _sym_db.RegisterEnumDescriptor(_EXPORTTOS3SETTINGS_STORAGECLASS) @@ -186,8 +187,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=138, - serialized_end=315, + serialized_start=174, + serialized_end=351, ) @@ -239,8 +240,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=318, - serialized_end=478, + serialized_start=354, + serialized_end=514, ) @@ -278,8 +279,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=696, - serialized_end=761, + serialized_start=732, + serialized_end=797, ) _EXPORTTOYTSETTINGS = _descriptor.Descriptor( @@ -351,8 +352,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=481, - serialized_end=761, + serialized_start=517, + serialized_end=797, ) @@ -376,8 +377,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=763, - serialized_end=781, + serialized_start=799, + serialized_end=817, ) @@ -422,8 +423,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=784, - serialized_end=965, + serialized_start=820, + serialized_end=1001, ) @@ -461,8 +462,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=968, - serialized_end=1102, + serialized_start=1004, + serialized_end=1138, ) @@ -493,8 +494,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1104, - serialized_end=1170, + serialized_start=1140, + serialized_end=1206, ) @@ -519,7 +520,7 @@ has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\220\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -532,8 +533,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1606, - serialized_end=1673, + serialized_start=1744, + serialized_end=1805, ) _EXPORTTOS3SETTINGS = _descriptor.Descriptor( @@ -585,7 +586,7 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\232\346*\002(\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='description', full_name='Ydb.Export.ExportToS3Settings.description', index=6, number=7, type=9, cpp_type=9, label=1, @@ -628,6 +629,27 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='source_path', full_name='Ydb.Export.ExportToS3Settings.source_path', index=12, + number=13, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='destination_prefix', full_name='Ydb.Export.ExportToS3Settings.destination_prefix', index=13, + number=14, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='encryption_settings', full_name='Ydb.Export.ExportToS3Settings.encryption_settings', index=14, + number=15, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -642,8 +664,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1173, - serialized_end=1910, + serialized_start=1209, + serialized_end=2042, ) @@ -667,8 +689,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1912, - serialized_end=1930, + serialized_start=2044, + serialized_end=2062, ) @@ -713,8 +735,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1933, - serialized_end=2114, + serialized_start=2065, + serialized_end=2246, ) @@ -752,8 +774,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2117, - serialized_end=2251, + serialized_start=2249, + serialized_end=2383, ) @@ -784,8 +806,83 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2253, - serialized_end=2319, + serialized_start=2385, + serialized_end=2451, +) + + +_ENCRYPTIONSETTINGS_SYMMETRICKEY = _descriptor.Descriptor( + name='SymmetricKey', + full_name='Ydb.Export.EncryptionSettings.SymmetricKey', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='Ydb.Export.EncryptionSettings.SymmetricKey.key', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\270\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2576, + serialized_end=2609, +) + +_ENCRYPTIONSETTINGS = _descriptor.Descriptor( + name='EncryptionSettings', + full_name='Ydb.Export.EncryptionSettings', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='encryption_algorithm', full_name='Ydb.Export.EncryptionSettings.encryption_algorithm', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='symmetric_key', full_name='Ydb.Export.EncryptionSettings.symmetric_key', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_ENCRYPTIONSETTINGS_SYMMETRICKEY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='Key', full_name='Ydb.Export.EncryptionSettings.Key', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=2454, + serialized_end=2616, ) _EXPORTPROGRESS_PROGRESS.containing_type = _EXPORTPROGRESS @@ -803,6 +900,7 @@ _EXPORTTOS3SETTINGS.fields_by_name['scheme'].enum_type = _EXPORTTOS3SETTINGS_SCHEME _EXPORTTOS3SETTINGS.fields_by_name['items'].message_type = _EXPORTTOS3SETTINGS_ITEM _EXPORTTOS3SETTINGS.fields_by_name['storage_class'].enum_type = _EXPORTTOS3SETTINGS_STORAGECLASS +_EXPORTTOS3SETTINGS.fields_by_name['encryption_settings'].message_type = _ENCRYPTIONSETTINGS _EXPORTTOS3SETTINGS_SCHEME.containing_type = _EXPORTTOS3SETTINGS _EXPORTTOS3SETTINGS_STORAGECLASS.containing_type = _EXPORTTOS3SETTINGS _EXPORTTOS3METADATA.fields_by_name['settings'].message_type = _EXPORTTOS3SETTINGS @@ -811,6 +909,11 @@ _EXPORTTOS3REQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS _EXPORTTOS3REQUEST.fields_by_name['settings'].message_type = _EXPORTTOS3SETTINGS _EXPORTTOS3RESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_ENCRYPTIONSETTINGS_SYMMETRICKEY.containing_type = _ENCRYPTIONSETTINGS +_ENCRYPTIONSETTINGS.fields_by_name['symmetric_key'].message_type = _ENCRYPTIONSETTINGS_SYMMETRICKEY +_ENCRYPTIONSETTINGS.oneofs_by_name['Key'].fields.append( + _ENCRYPTIONSETTINGS.fields_by_name['symmetric_key']) +_ENCRYPTIONSETTINGS.fields_by_name['symmetric_key'].containing_oneof = _ENCRYPTIONSETTINGS.oneofs_by_name['Key'] DESCRIPTOR.message_types_by_name['ExportProgress'] = _EXPORTPROGRESS DESCRIPTOR.message_types_by_name['ExportItemProgress'] = _EXPORTITEMPROGRESS DESCRIPTOR.message_types_by_name['ExportToYtSettings'] = _EXPORTTOYTSETTINGS @@ -823,6 +926,7 @@ DESCRIPTOR.message_types_by_name['ExportToS3Metadata'] = _EXPORTTOS3METADATA DESCRIPTOR.message_types_by_name['ExportToS3Request'] = _EXPORTTOS3REQUEST DESCRIPTOR.message_types_by_name['ExportToS3Response'] = _EXPORTTOS3RESPONSE +DESCRIPTOR.message_types_by_name['EncryptionSettings'] = _ENCRYPTIONSETTINGS _sym_db.RegisterFileDescriptor(DESCRIPTOR) ExportProgress = _reflection.GeneratedProtocolMessageType('ExportProgress', (_message.Message,), { @@ -925,6 +1029,21 @@ }) _sym_db.RegisterMessage(ExportToS3Response) +EncryptionSettings = _reflection.GeneratedProtocolMessageType('EncryptionSettings', (_message.Message,), { + + 'SymmetricKey' : _reflection.GeneratedProtocolMessageType('SymmetricKey', (_message.Message,), { + 'DESCRIPTOR' : _ENCRYPTIONSETTINGS_SYMMETRICKEY, + '__module__' : 'protos.ydb_export_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Export.EncryptionSettings.SymmetricKey) + }) + , + 'DESCRIPTOR' : _ENCRYPTIONSETTINGS, + '__module__' : 'protos.ydb_export_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Export.EncryptionSettings) + }) +_sym_db.RegisterMessage(EncryptionSettings) +_sym_db.RegisterMessage(EncryptionSettings.SymmetricKey) + DESCRIPTOR._options = None _EXPORTTOYTSETTINGS_ITEM.fields_by_name['source_path']._options = None @@ -935,12 +1054,11 @@ _EXPORTTOYTSETTINGS.fields_by_name['description']._options = None _EXPORTTOYTREQUEST.fields_by_name['settings']._options = None _EXPORTTOS3SETTINGS_ITEM.fields_by_name['source_path']._options = None -_EXPORTTOS3SETTINGS_ITEM.fields_by_name['destination_prefix']._options = None _EXPORTTOS3SETTINGS.fields_by_name['endpoint']._options = None _EXPORTTOS3SETTINGS.fields_by_name['bucket']._options = None _EXPORTTOS3SETTINGS.fields_by_name['access_key']._options = None _EXPORTTOS3SETTINGS.fields_by_name['secret_key']._options = None -_EXPORTTOS3SETTINGS.fields_by_name['items']._options = None _EXPORTTOS3SETTINGS.fields_by_name['description']._options = None _EXPORTTOS3REQUEST.fields_by_name['settings']._options = None +_ENCRYPTIONSETTINGS_SYMMETRICKEY.fields_by_name['key']._options = None # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v3/protos/ydb_import_pb2.py b/ydb/_grpc/v3/protos/ydb_import_pb2.py index b9f1b90f..736eb32a 100644 --- a/ydb/_grpc/v3/protos/ydb_import_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_import_pb2.py @@ -13,6 +13,7 @@ from ydb._grpc.v3.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 +from ydb._grpc.v3.protos import ydb_export_pb2 as protos_dot_ydb__export__pb2 from ydb._grpc.v3.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 @@ -23,9 +24,9 @@ syntax='proto3', serialized_options=b'\n\026tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x17protos/ydb_import.proto\x12\nYdb.Import\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcd\x01\n\x0eImportProgress\"\xba\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x1a\n\x16PROGRESS_BUILD_INDEXES\x10\x03\x12\x11\n\rPROGRESS_DONE\x10\x04\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x05\x12\x16\n\x12PROGRESS_CANCELLED\x10\x06\"\xa0\x01\n\x12ImportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd1\x03\n\x14ImportFromS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x37\n\x06scheme\x18\x02 \x01(\x0e\x32\'.Ydb.Import.ImportFromS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12<\n\x05items\x18\x06 \x03(\x0b\x32%.Ydb.Import.ImportFromS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x0e\n\x06region\x18\t \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\n \x01(\x08\x1a\x43\n\x04Item\x12\x1b\n\rsource_prefix\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\x14\n\x12ImportFromS3Result\"\xb9\x01\n\x14ImportFromS3Metadata\x12\x32\n\x08settings\x18\x01 \x01(\x0b\x32 .Ydb.Import.ImportFromS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Import.ImportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Import.ImportItemProgress\"\x8a\x01\n\x13ImportFromS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x38\n\x08settings\x18\x02 \x01(\x0b\x32 .Ydb.Import.ImportFromS3SettingsB\x04\x90\xe6*\x01\"D\n\x14ImportFromS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\" \n\rYdbDumpFormat\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\"\x12\n\x10ImportDataResult\"\xae\x01\n\x11ImportDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x17\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x42\t\xa2\xe6*\x05\x18\x80\x80\x80\x04\x12-\n\x08ydb_dump\x18\x04 \x01(\x0b\x32\x19.Ydb.Import.YdbDumpFormatH\x00\x42\x08\n\x06\x66ormat\"B\n\x12ImportDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBV\n\x16tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x17protos/ydb_import.proto\x12\nYdb.Import\x1a#protos/annotations/validation.proto\x1a\x17protos/ydb_export.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xee\x01\n\x0eImportProgress\"\xdb\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x1a\n\x16PROGRESS_BUILD_INDEXES\x10\x03\x12\x11\n\rPROGRESS_DONE\x10\x04\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x05\x12\x16\n\x12PROGRESS_CANCELLED\x10\x06\x12\x1f\n\x1bPROGRESS_CREATE_CHANGEFEEDS\x10\x07\"\xa0\x01\n\x12ImportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x80\x05\n\x14ImportFromS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x37\n\x06scheme\x18\x02 \x01(\x0e\x32\'.Ydb.Import.ImportFromS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12\x34\n\x05items\x18\x06 \x03(\x0b\x32%.Ydb.Import.ImportFromS3Settings.Item\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x0e\n\x06region\x18\t \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\n \x01(\x08\x12\x0e\n\x06no_acl\x18\x0b \x01(\x08\x12 \n\x18skip_checksum_validation\x18\x0c \x01(\x08\x12\x15\n\rsource_prefix\x18\r \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x0e \x01(\t\x12;\n\x13\x65ncryption_settings\x18\x0f \x01(\x0b\x32\x1e.Ydb.Export.EncryptionSettings\x1aZ\n\x04Item\x12\x17\n\rsource_prefix\x18\x01 \x01(\tH\x00\x12\x15\n\x0bsource_path\x18\x03 \x01(\tH\x00\x12\x18\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x08\n\x06Source\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\x14\n\x12ImportFromS3Result\"\xb9\x01\n\x14ImportFromS3Metadata\x12\x32\n\x08settings\x18\x01 \x01(\x0b\x32 .Ydb.Import.ImportFromS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Import.ImportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Import.ImportItemProgress\"\x8a\x01\n\x13ImportFromS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x38\n\x08settings\x18\x02 \x01(\x0b\x32 .Ydb.Import.ImportFromS3SettingsB\x04\x90\xe6*\x01\"D\n\x14ImportFromS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xab\x03\n\x1dListObjectsInS3ExportSettings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x37\n\x06scheme\x18\x02 \x01(\x0e\x32\'.Ydb.Import.ImportFromS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12=\n\x05items\x18\x06 \x03(\x0b\x32..Ydb.Import.ListObjectsInS3ExportSettings.Item\x12\x19\n\x11number_of_retries\x18\x07 \x01(\r\x12\x0e\n\x06region\x18\x08 \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\t \x01(\x08\x12\x0e\n\x06prefix\x18\n \x01(\t\x12;\n\x13\x65ncryption_settings\x18\x0b \x01(\x0b\x32\x1e.Ydb.Export.EncryptionSettings\x1a\x14\n\x04Item\x12\x0c\n\x04path\x18\x01 \x01(\t\"\x99\x01\n\x1bListObjectsInS3ExportResult\x12;\n\x05items\x18\x01 \x03(\x0b\x32,.Ydb.Import.ListObjectsInS3ExportResult.Item\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x1a$\n\x04Item\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\"\xd1\x01\n\x1cListObjectsInS3ExportRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x41\n\x08settings\x18\x02 \x01(\x0b\x32).Ydb.Import.ListObjectsInS3ExportSettingsB\x04\x90\xe6*\x01\x12\x1f\n\tpage_size\x18\x03 \x01(\x03\x42\x0c\xb2\xe6*\x08<= 10000\x12\x12\n\npage_token\x18\x04 \x01(\t\"M\n\x1dListObjectsInS3ExportResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\" \n\rYdbDumpFormat\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\"\x12\n\x10ImportDataResult\"\xae\x01\n\x11ImportDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x17\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x42\t\xa2\xe6*\x05\x18\x80\x80\x80\x08\x12-\n\x08ydb_dump\x18\x04 \x01(\x0b\x32\x19.Ydb.Import.YdbDumpFormatH\x00\x42\x08\n\x06\x66ormat\"B\n\x12ImportDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBV\n\x16tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\xf8\x01\x01\x62\x06proto3' , - dependencies=[protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) + dependencies=[protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__export__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) @@ -71,11 +72,16 @@ serialized_options=None, type=None, create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PROGRESS_CREATE_CHANGEFEEDS', index=7, number=7, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=157, - serialized_end=343, + serialized_start=182, + serialized_end=401, ) _sym_db.RegisterEnumDescriptor(_IMPORTPROGRESS_PROGRESS) @@ -104,8 +110,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=928, - serialized_end=974, + serialized_start=1161, + serialized_end=1207, ) _sym_db.RegisterEnumDescriptor(_IMPORTFROMS3SETTINGS_SCHEME) @@ -131,8 +137,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=138, - serialized_end=343, + serialized_start=163, + serialized_end=401, ) @@ -184,8 +190,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=346, - serialized_end=506, + serialized_start=404, + serialized_end=564, ) @@ -203,14 +209,21 @@ has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\220\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='destination_path', full_name='Ydb.Import.ImportFromS3Settings.Item.destination_path', index=1, + name='source_path', full_name='Ydb.Import.ImportFromS3Settings.Item.source_path', index=1, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='destination_path', full_name='Ydb.Import.ImportFromS3Settings.Item.destination_path', index=2, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\220\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -222,9 +235,14 @@ syntax='proto3', extension_ranges=[], oneofs=[ + _descriptor.OneofDescriptor( + name='Source', full_name='Ydb.Import.ImportFromS3Settings.Item.Source', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=859, - serialized_end=926, + serialized_start=1069, + serialized_end=1159, ) _IMPORTFROMS3SETTINGS = _descriptor.Descriptor( @@ -276,7 +294,7 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\232\346*\002(\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='description', full_name='Ydb.Import.ImportFromS3Settings.description', index=6, number=7, type=9, cpp_type=9, label=1, @@ -305,6 +323,41 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='no_acl', full_name='Ydb.Import.ImportFromS3Settings.no_acl', index=10, + number=11, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='skip_checksum_validation', full_name='Ydb.Import.ImportFromS3Settings.skip_checksum_validation', index=11, + number=12, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='source_prefix', full_name='Ydb.Import.ImportFromS3Settings.source_prefix', index=12, + number=13, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='destination_path', full_name='Ydb.Import.ImportFromS3Settings.destination_path', index=13, + number=14, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='encryption_settings', full_name='Ydb.Import.ImportFromS3Settings.encryption_settings', index=14, + number=15, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -318,8 +371,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=509, - serialized_end=974, + serialized_start=567, + serialized_end=1207, ) @@ -343,8 +396,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=976, - serialized_end=996, + serialized_start=1209, + serialized_end=1229, ) @@ -389,8 +442,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=999, - serialized_end=1184, + serialized_start=1232, + serialized_end=1417, ) @@ -428,8 +481,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1187, - serialized_end=1325, + serialized_start=1420, + serialized_end=1558, ) @@ -460,8 +513,303 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1327, - serialized_end=1395, + serialized_start=1560, + serialized_end=1628, +) + + +_LISTOBJECTSINS3EXPORTSETTINGS_ITEM = _descriptor.Descriptor( + name='Item', + full_name='Ydb.Import.ListObjectsInS3ExportSettings.Item', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.Import.ListObjectsInS3ExportSettings.Item.path', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2038, + serialized_end=2058, +) + +_LISTOBJECTSINS3EXPORTSETTINGS = _descriptor.Descriptor( + name='ListObjectsInS3ExportSettings', + full_name='Ydb.Import.ListObjectsInS3ExportSettings', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='endpoint', full_name='Ydb.Import.ListObjectsInS3ExportSettings.endpoint', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\220\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='scheme', full_name='Ydb.Import.ListObjectsInS3ExportSettings.scheme', index=1, + number=2, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='bucket', full_name='Ydb.Import.ListObjectsInS3ExportSettings.bucket', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\220\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='access_key', full_name='Ydb.Import.ListObjectsInS3ExportSettings.access_key', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\220\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='secret_key', full_name='Ydb.Import.ListObjectsInS3ExportSettings.secret_key', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\220\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='items', full_name='Ydb.Import.ListObjectsInS3ExportSettings.items', index=5, + number=6, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='number_of_retries', full_name='Ydb.Import.ListObjectsInS3ExportSettings.number_of_retries', index=6, + number=7, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='region', full_name='Ydb.Import.ListObjectsInS3ExportSettings.region', index=7, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='disable_virtual_addressing', full_name='Ydb.Import.ListObjectsInS3ExportSettings.disable_virtual_addressing', index=8, + number=9, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='prefix', full_name='Ydb.Import.ListObjectsInS3ExportSettings.prefix', index=9, + number=10, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='encryption_settings', full_name='Ydb.Import.ListObjectsInS3ExportSettings.encryption_settings', index=10, + number=11, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_LISTOBJECTSINS3EXPORTSETTINGS_ITEM, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1631, + serialized_end=2058, +) + + +_LISTOBJECTSINS3EXPORTRESULT_ITEM = _descriptor.Descriptor( + name='Item', + full_name='Ydb.Import.ListObjectsInS3ExportResult.Item', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='prefix', full_name='Ydb.Import.ListObjectsInS3ExportResult.Item.prefix', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path', full_name='Ydb.Import.ListObjectsInS3ExportResult.Item.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2178, + serialized_end=2214, +) + +_LISTOBJECTSINS3EXPORTRESULT = _descriptor.Descriptor( + name='ListObjectsInS3ExportResult', + full_name='Ydb.Import.ListObjectsInS3ExportResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='items', full_name='Ydb.Import.ListObjectsInS3ExportResult.items', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='next_page_token', full_name='Ydb.Import.ListObjectsInS3ExportResult.next_page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_LISTOBJECTSINS3EXPORTRESULT_ITEM, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2061, + serialized_end=2214, +) + + +_LISTOBJECTSINS3EXPORTREQUEST = _descriptor.Descriptor( + name='ListObjectsInS3ExportRequest', + full_name='Ydb.Import.ListObjectsInS3ExportRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation_params', full_name='Ydb.Import.ListObjectsInS3ExportRequest.operation_params', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='settings', full_name='Ydb.Import.ListObjectsInS3ExportRequest.settings', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\220\346*\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_size', full_name='Ydb.Import.ListObjectsInS3ExportRequest.page_size', index=2, + number=3, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\010<= 10000', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_token', full_name='Ydb.Import.ListObjectsInS3ExportRequest.page_token', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2217, + serialized_end=2426, +) + + +_LISTOBJECTSINS3EXPORTRESPONSE = _descriptor.Descriptor( + name='ListObjectsInS3ExportResponse', + full_name='Ydb.Import.ListObjectsInS3ExportResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='operation', full_name='Ydb.Import.ListObjectsInS3ExportResponse.operation', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2428, + serialized_end=2505, ) @@ -492,8 +840,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1397, - serialized_end=1429, + serialized_start=2507, + serialized_end=2539, ) @@ -517,8 +865,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1431, - serialized_end=1449, + serialized_start=2541, + serialized_end=2559, ) @@ -550,7 +898,7 @@ has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\242\346*\005\030\200\200\200\004', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=b'\242\346*\005\030\200\200\200\010', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ydb_dump', full_name='Ydb.Import.ImportDataRequest.ydb_dump', index=3, number=4, type=11, cpp_type=10, label=1, @@ -575,8 +923,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1452, - serialized_end=1626, + serialized_start=2562, + serialized_end=2736, ) @@ -607,16 +955,23 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1628, - serialized_end=1694, + serialized_start=2738, + serialized_end=2804, ) _IMPORTPROGRESS_PROGRESS.containing_type = _IMPORTPROGRESS _IMPORTITEMPROGRESS.fields_by_name['start_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _IMPORTITEMPROGRESS.fields_by_name['end_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _IMPORTFROMS3SETTINGS_ITEM.containing_type = _IMPORTFROMS3SETTINGS +_IMPORTFROMS3SETTINGS_ITEM.oneofs_by_name['Source'].fields.append( + _IMPORTFROMS3SETTINGS_ITEM.fields_by_name['source_prefix']) +_IMPORTFROMS3SETTINGS_ITEM.fields_by_name['source_prefix'].containing_oneof = _IMPORTFROMS3SETTINGS_ITEM.oneofs_by_name['Source'] +_IMPORTFROMS3SETTINGS_ITEM.oneofs_by_name['Source'].fields.append( + _IMPORTFROMS3SETTINGS_ITEM.fields_by_name['source_path']) +_IMPORTFROMS3SETTINGS_ITEM.fields_by_name['source_path'].containing_oneof = _IMPORTFROMS3SETTINGS_ITEM.oneofs_by_name['Source'] _IMPORTFROMS3SETTINGS.fields_by_name['scheme'].enum_type = _IMPORTFROMS3SETTINGS_SCHEME _IMPORTFROMS3SETTINGS.fields_by_name['items'].message_type = _IMPORTFROMS3SETTINGS_ITEM +_IMPORTFROMS3SETTINGS.fields_by_name['encryption_settings'].message_type = protos_dot_ydb__export__pb2._ENCRYPTIONSETTINGS _IMPORTFROMS3SETTINGS_SCHEME.containing_type = _IMPORTFROMS3SETTINGS _IMPORTFROMS3METADATA.fields_by_name['settings'].message_type = _IMPORTFROMS3SETTINGS _IMPORTFROMS3METADATA.fields_by_name['progress'].enum_type = _IMPORTPROGRESS_PROGRESS @@ -624,6 +979,15 @@ _IMPORTFROMS3REQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS _IMPORTFROMS3REQUEST.fields_by_name['settings'].message_type = _IMPORTFROMS3SETTINGS _IMPORTFROMS3RESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION +_LISTOBJECTSINS3EXPORTSETTINGS_ITEM.containing_type = _LISTOBJECTSINS3EXPORTSETTINGS +_LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['scheme'].enum_type = _IMPORTFROMS3SETTINGS_SCHEME +_LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['items'].message_type = _LISTOBJECTSINS3EXPORTSETTINGS_ITEM +_LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['encryption_settings'].message_type = protos_dot_ydb__export__pb2._ENCRYPTIONSETTINGS +_LISTOBJECTSINS3EXPORTRESULT_ITEM.containing_type = _LISTOBJECTSINS3EXPORTRESULT +_LISTOBJECTSINS3EXPORTRESULT.fields_by_name['items'].message_type = _LISTOBJECTSINS3EXPORTRESULT_ITEM +_LISTOBJECTSINS3EXPORTREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS +_LISTOBJECTSINS3EXPORTREQUEST.fields_by_name['settings'].message_type = _LISTOBJECTSINS3EXPORTSETTINGS +_LISTOBJECTSINS3EXPORTRESPONSE.fields_by_name['operation'].message_type = protos_dot_ydb__operation__pb2._OPERATION _IMPORTDATAREQUEST.fields_by_name['operation_params'].message_type = protos_dot_ydb__operation__pb2._OPERATIONPARAMS _IMPORTDATAREQUEST.fields_by_name['ydb_dump'].message_type = _YDBDUMPFORMAT _IMPORTDATAREQUEST.oneofs_by_name['format'].fields.append( @@ -637,6 +1001,10 @@ DESCRIPTOR.message_types_by_name['ImportFromS3Metadata'] = _IMPORTFROMS3METADATA DESCRIPTOR.message_types_by_name['ImportFromS3Request'] = _IMPORTFROMS3REQUEST DESCRIPTOR.message_types_by_name['ImportFromS3Response'] = _IMPORTFROMS3RESPONSE +DESCRIPTOR.message_types_by_name['ListObjectsInS3ExportSettings'] = _LISTOBJECTSINS3EXPORTSETTINGS +DESCRIPTOR.message_types_by_name['ListObjectsInS3ExportResult'] = _LISTOBJECTSINS3EXPORTRESULT +DESCRIPTOR.message_types_by_name['ListObjectsInS3ExportRequest'] = _LISTOBJECTSINS3EXPORTREQUEST +DESCRIPTOR.message_types_by_name['ListObjectsInS3ExportResponse'] = _LISTOBJECTSINS3EXPORTRESPONSE DESCRIPTOR.message_types_by_name['YdbDumpFormat'] = _YDBDUMPFORMAT DESCRIPTOR.message_types_by_name['ImportDataResult'] = _IMPORTDATARESULT DESCRIPTOR.message_types_by_name['ImportDataRequest'] = _IMPORTDATAREQUEST @@ -700,6 +1068,50 @@ }) _sym_db.RegisterMessage(ImportFromS3Response) +ListObjectsInS3ExportSettings = _reflection.GeneratedProtocolMessageType('ListObjectsInS3ExportSettings', (_message.Message,), { + + 'Item' : _reflection.GeneratedProtocolMessageType('Item', (_message.Message,), { + 'DESCRIPTOR' : _LISTOBJECTSINS3EXPORTSETTINGS_ITEM, + '__module__' : 'protos.ydb_import_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Import.ListObjectsInS3ExportSettings.Item) + }) + , + 'DESCRIPTOR' : _LISTOBJECTSINS3EXPORTSETTINGS, + '__module__' : 'protos.ydb_import_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Import.ListObjectsInS3ExportSettings) + }) +_sym_db.RegisterMessage(ListObjectsInS3ExportSettings) +_sym_db.RegisterMessage(ListObjectsInS3ExportSettings.Item) + +ListObjectsInS3ExportResult = _reflection.GeneratedProtocolMessageType('ListObjectsInS3ExportResult', (_message.Message,), { + + 'Item' : _reflection.GeneratedProtocolMessageType('Item', (_message.Message,), { + 'DESCRIPTOR' : _LISTOBJECTSINS3EXPORTRESULT_ITEM, + '__module__' : 'protos.ydb_import_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Import.ListObjectsInS3ExportResult.Item) + }) + , + 'DESCRIPTOR' : _LISTOBJECTSINS3EXPORTRESULT, + '__module__' : 'protos.ydb_import_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Import.ListObjectsInS3ExportResult) + }) +_sym_db.RegisterMessage(ListObjectsInS3ExportResult) +_sym_db.RegisterMessage(ListObjectsInS3ExportResult.Item) + +ListObjectsInS3ExportRequest = _reflection.GeneratedProtocolMessageType('ListObjectsInS3ExportRequest', (_message.Message,), { + 'DESCRIPTOR' : _LISTOBJECTSINS3EXPORTREQUEST, + '__module__' : 'protos.ydb_import_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Import.ListObjectsInS3ExportRequest) + }) +_sym_db.RegisterMessage(ListObjectsInS3ExportRequest) + +ListObjectsInS3ExportResponse = _reflection.GeneratedProtocolMessageType('ListObjectsInS3ExportResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTOBJECTSINS3EXPORTRESPONSE, + '__module__' : 'protos.ydb_import_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Import.ListObjectsInS3ExportResponse) + }) +_sym_db.RegisterMessage(ListObjectsInS3ExportResponse) + YdbDumpFormat = _reflection.GeneratedProtocolMessageType('YdbDumpFormat', (_message.Message,), { 'DESCRIPTOR' : _YDBDUMPFORMAT, '__module__' : 'protos.ydb_import_pb2' @@ -730,14 +1142,17 @@ DESCRIPTOR._options = None -_IMPORTFROMS3SETTINGS_ITEM.fields_by_name['source_prefix']._options = None -_IMPORTFROMS3SETTINGS_ITEM.fields_by_name['destination_path']._options = None _IMPORTFROMS3SETTINGS.fields_by_name['endpoint']._options = None _IMPORTFROMS3SETTINGS.fields_by_name['bucket']._options = None _IMPORTFROMS3SETTINGS.fields_by_name['access_key']._options = None _IMPORTFROMS3SETTINGS.fields_by_name['secret_key']._options = None -_IMPORTFROMS3SETTINGS.fields_by_name['items']._options = None _IMPORTFROMS3SETTINGS.fields_by_name['description']._options = None _IMPORTFROMS3REQUEST.fields_by_name['settings']._options = None +_LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['endpoint']._options = None +_LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['bucket']._options = None +_LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['access_key']._options = None +_LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['secret_key']._options = None +_LISTOBJECTSINS3EXPORTREQUEST.fields_by_name['settings']._options = None +_LISTOBJECTSINS3EXPORTREQUEST.fields_by_name['page_size']._options = None _IMPORTDATAREQUEST.fields_by_name['data']._options = None # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v3/protos/ydb_topic_pb2.py b/ydb/_grpc/v3/protos/ydb_topic_pb2.py index 4481c384..ce7e5f6b 100644 --- a/ydb/_grpc/v3/protos/ydb_topic_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_topic_pb2.py @@ -29,7 +29,7 @@ syntax='proto3', serialized_options=b'\n\024tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\")\n\x12UpdateTokenRequest\x12\x13\n\x05token\x18\x01 \x01(\tB\x04\xb8\xe6*\x01\"\x15\n\x13UpdateTokenResponse\"C\n\x17PartitionWithGeneration\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x9e\x14\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xfe\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12#\n\x10message_group_id\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x07 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\xe8\x03\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x12/\n\x02tx\x18\x03 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentityH\x00\x88\x01\x01\x1a\xc6\x02\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12#\n\x10message_group_id\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x08 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioningB\x05\n\x03_tx\x1a\xeb\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\xf8\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x12Y\n\rwritten_in_tx\x18\x04 \x01(\x0b\x32@.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenInTxH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x1a\r\n\x0bWrittenInTxB\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x9c#\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xb1\x05\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x45\n\x0f\x64irect_read_ack\x18\x08 \x01(\x0b\x32*.Ydb.Topic.StreamReadMessage.DirectReadAckH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xf0\x06\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x12W\n\x18update_partition_session\x18\n \x01(\x0b\x32\x33.Ydb.Topic.StreamReadMessage.UpdatePartitionSessionH\x00\x12Q\n\x15\x65nd_partition_session\x18\x0b \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.EndPartitionSessionH\x00\x42\x10\n\x0eserver_message\x1a\xdc\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64irect_read\x18\x04 \x01(\x08\x12!\n\x19\x61uto_partitioning_support\x18\x05 \x01(\x08\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\x91\x06\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xda\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12!\n\x10message_group_id\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xcd\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xf0\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x38\n\x12partition_location\x18\x04 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1a\x84\x01\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x04 \x01(\x03\x1aN\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x1ap\n\x16UpdatePartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x38\n\x12partition_location\x18\x02 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x45\n\rDirectReadAck\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x1ap\n\x13\x45ndPartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1e\n\x16\x61\x64jacent_partition_ids\x18\x02 \x03(\x03\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\"\xf7\x0c\n\x17StreamDirectReadMessage\x1a\xa8\x02\n\nFromClient\x12\x46\n\x0cinit_request\x18\x01 \x01(\x0b\x32..Ydb.Topic.StreamDirectReadMessage.InitRequestH\x00\x12\x80\x01\n+start_direct_read_partition_session_request\x18\x02 \x01(\x0b\x32I.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xca\x04\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12H\n\rinit_response\x18\x06 \x01(\x0b\x32/.Ydb.Topic.StreamDirectReadMessage.InitResponseH\x00\x12\x82\x01\n,start_direct_read_partition_session_response\x18\x07 \x01(\x0b\x32J.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionResponseH\x00\x12o\n\"stop_direct_read_partition_session\x18\x03 \x01(\x0b\x32\x41.Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSessionH\x00\x12U\n\x14\x64irect_read_response\x18\x04 \x01(\x0b\x32\x35.Ydb.Topic.StreamDirectReadMessage.DirectReadResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xb6\x01\n\x0bInitRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12^\n\x14topics_read_settings\x18\x02 \x03(\x0b\x32@.Ydb.Topic.StreamDirectReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x1a!\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x1a\x0e\n\x0cInitResponse\x1aw\n&StartDirectReadPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x02 \x01(\x03\x12\x12\n\ngeneration\x18\x03 \x01(\x03\x1a[\n\'StartDirectReadPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\x1a\xa6\x01\n\x1eStopDirectReadPartitionSession\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1c\n\x14partition_session_id\x18\x03 \x01(\x03\x12\x12\n\ngeneration\x18\x04 \x01(\x03\x1a\x9b\x01\n\x12\x44irectReadResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x12O\n\x0epartition_data\x18\x03 \x01(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\"2\n\x13TransactionIdentity\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07session\x18\x02 \x01(\t\"\xc4\x03\n!UpdateOffsetsInTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12*\n\x02tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentity\x12I\n\x06topics\x18\x03 \x03(\x0b\x32\x39.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x1a\xda\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12^\n\npartitions\x18\x02 \x03(\x0b\x32J.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"R\n\"UpdateOffsetsInTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\"\n UpdateOffsetsInTransactionResult\"\x96\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xb3\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf3\x01\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"\xdc\x01\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12)\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0\x12G\n\x1a\x61uto_partitioning_settings\x18\x04 \x01(\x0b\x32#.Ydb.Topic.AutoPartitioningSettings\"\x9f\x01\n\x18\x41utoPartitioningSettings\x12\x35\n\x08strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategy\x12L\n\x15partition_write_speed\x18\x02 \x01(\x0b\x32-.Ydb.Topic.AutoPartitioningWriteSpeedStrategy\"\xb3\x01\n\"AutoPartitioningWriteSpeedStrategy\x12\x37\n\x14stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n\x16up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12*\n\x18\x64own_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\"\x8b\x03\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x32\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12W\n alter_auto_partitioning_settings\x18\x04 \x01(\x0b\x32(.Ydb.Topic.AlterAutoPartitioningSettingsH\x03\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_max_active_partitionsB\x1c\n\x1a_set_partition_count_limitB#\n!_alter_auto_partitioning_settings\"\xea\x01\n\x1d\x41lterAutoPartitioningSettings\x12>\n\x0cset_strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategyH\x00\x88\x01\x01\x12Z\n\x19set_partition_write_speed\x18\x02 \x01(\x0b\x32\x32.Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategyH\x01\x88\x01\x01\x42\x0f\n\r_set_strategyB\x1c\n\x1a_set_partition_write_speed\"\xb0\x02\n\'AlterAutoPartitioningWriteSpeedStrategy\x12@\n\x18set_stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x12\x31\n\x1aset_up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x33\n\x1cset_down_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x42\x1b\n\x19_set_stabilization_windowB\x1d\n\x1b_set_up_utilization_percentB\x1f\n\x1d_set_down_utilization_percent\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"8\n\x11PartitionLocation\x12\x0f\n\x07node_id\x18\x01 \x01(\x05\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"\x90\x01\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\x12\x18\n\x10include_location\x18\x04 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x11PartitionKeyRange\x12\x17\n\nfrom_bound\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x15\n\x08to_bound\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_from_boundB\x0b\n\t_to_bound\"\xfa\t\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12\x33\n+partition_total_read_speed_bytes_per_second\x18\x0e \x01(\x03\x12\x36\n.partition_consumer_read_speed_bytes_per_second\x18\x0f \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x8f\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12\x38\n\x12partition_location\x18\x06 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x12/\n\tkey_range\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionKeyRange\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\xaa\x01\n\x18\x44\x65scribePartitionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"I\n\x19\x44\x65scribePartitionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Z\n\x17\x44\x65scribePartitionResult\x12?\n\tpartition\x18\x01 \x01(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\"\xa5\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x98\x07\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\xba\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x12\x38\n\x12partition_location\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\xb3\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\xa0\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x1d\n\x11partition_node_id\x18\x08 \x01(\x05\x42\x02\x18\x01\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*\xf1\x01\n\x18\x41utoPartitioningStrategy\x12*\n&AUTO_PARTITIONING_STRATEGY_UNSPECIFIED\x10\x00\x12\'\n#AUTO_PARTITIONING_STRATEGY_DISABLED\x10\x01\x12\'\n#AUTO_PARTITIONING_STRATEGY_SCALE_UP\x10\x02\x12\x30\n,AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN\x10\x03\x12%\n!AUTO_PARTITIONING_STRATEGY_PAUSED\x10\x04*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\")\n\x12UpdateTokenRequest\x12\x13\n\x05token\x18\x01 \x01(\tB\x04\xb8\xe6*\x01\"\x15\n\x13UpdateTokenResponse\"C\n\x17PartitionWithGeneration\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x9e\x14\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xfe\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12#\n\x10message_group_id\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x07 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\xe8\x03\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x12/\n\x02tx\x18\x03 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentityH\x00\x88\x01\x01\x1a\xc6\x02\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12#\n\x10message_group_id\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x08 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioningB\x05\n\x03_tx\x1a\xeb\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\xf8\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x12Y\n\rwritten_in_tx\x18\x04 \x01(\x0b\x32@.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenInTxH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x1a\r\n\x0bWrittenInTxB\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x9c#\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xb1\x05\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x45\n\x0f\x64irect_read_ack\x18\x08 \x01(\x0b\x32*.Ydb.Topic.StreamReadMessage.DirectReadAckH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xf0\x06\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x12W\n\x18update_partition_session\x18\n \x01(\x0b\x32\x33.Ydb.Topic.StreamReadMessage.UpdatePartitionSessionH\x00\x12Q\n\x15\x65nd_partition_session\x18\x0b \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.EndPartitionSessionH\x00\x42\x10\n\x0eserver_message\x1a\xdc\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64irect_read\x18\x04 \x01(\x08\x12!\n\x19\x61uto_partitioning_support\x18\x05 \x01(\x08\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\x91\x06\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xda\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12!\n\x10message_group_id\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xcd\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xf0\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x38\n\x12partition_location\x18\x04 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1a\x84\x01\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x04 \x01(\x03\x1aN\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x1ap\n\x16UpdatePartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x38\n\x12partition_location\x18\x02 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x45\n\rDirectReadAck\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x1ap\n\x13\x45ndPartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1e\n\x16\x61\x64jacent_partition_ids\x18\x02 \x03(\x03\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\"\x8b\r\n\x17StreamDirectReadMessage\x1a\xa8\x02\n\nFromClient\x12\x46\n\x0cinit_request\x18\x01 \x01(\x0b\x32..Ydb.Topic.StreamDirectReadMessage.InitRequestH\x00\x12\x80\x01\n+start_direct_read_partition_session_request\x18\x02 \x01(\x0b\x32I.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xca\x04\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12H\n\rinit_response\x18\x06 \x01(\x0b\x32/.Ydb.Topic.StreamDirectReadMessage.InitResponseH\x00\x12\x82\x01\n,start_direct_read_partition_session_response\x18\x07 \x01(\x0b\x32J.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionResponseH\x00\x12o\n\"stop_direct_read_partition_session\x18\x03 \x01(\x0b\x32\x41.Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSessionH\x00\x12U\n\x14\x64irect_read_response\x18\x04 \x01(\x0b\x32\x35.Ydb.Topic.StreamDirectReadMessage.DirectReadResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xb6\x01\n\x0bInitRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12^\n\x14topics_read_settings\x18\x02 \x03(\x0b\x32@.Ydb.Topic.StreamDirectReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x1a!\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x1a\x0e\n\x0cInitResponse\x1aw\n&StartDirectReadPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x02 \x01(\x03\x12\x12\n\ngeneration\x18\x03 \x01(\x03\x1a[\n\'StartDirectReadPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\x1a\xa6\x01\n\x1eStopDirectReadPartitionSession\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1c\n\x14partition_session_id\x18\x03 \x01(\x03\x12\x12\n\ngeneration\x18\x04 \x01(\x03\x1a\xaf\x01\n\x12\x44irectReadResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x12O\n\x0epartition_data\x18\x03 \x01(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x04 \x01(\x03\"2\n\x13TransactionIdentity\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07session\x18\x02 \x01(\t\"\xc4\x03\n!UpdateOffsetsInTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12*\n\x02tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentity\x12I\n\x06topics\x18\x03 \x03(\x0b\x32\x39.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x1a\xda\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12^\n\npartitions\x18\x02 \x03(\x0b\x32J.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"R\n\"UpdateOffsetsInTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\"\n UpdateOffsetsInTransactionResult\"\xaf\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x06 \x01(\t\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xee\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xae\x02\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16max_committed_time_lag\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"\xdc\x01\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12)\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0\x12G\n\x1a\x61uto_partitioning_settings\x18\x04 \x01(\x0b\x32#.Ydb.Topic.AutoPartitioningSettings\"\x9f\x01\n\x18\x41utoPartitioningSettings\x12\x35\n\x08strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategy\x12L\n\x15partition_write_speed\x18\x02 \x01(\x0b\x32-.Ydb.Topic.AutoPartitioningWriteSpeedStrategy\"\xb3\x01\n\"AutoPartitioningWriteSpeedStrategy\x12\x37\n\x14stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n\x16up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12*\n\x18\x64own_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\"\x8b\x03\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x32\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12W\n alter_auto_partitioning_settings\x18\x04 \x01(\x0b\x32(.Ydb.Topic.AlterAutoPartitioningSettingsH\x03\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_max_active_partitionsB\x1c\n\x1a_set_partition_count_limitB#\n!_alter_auto_partitioning_settings\"\xea\x01\n\x1d\x41lterAutoPartitioningSettings\x12>\n\x0cset_strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategyH\x00\x88\x01\x01\x12Z\n\x19set_partition_write_speed\x18\x02 \x01(\x0b\x32\x32.Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategyH\x01\x88\x01\x01\x42\x0f\n\r_set_strategyB\x1c\n\x1a_set_partition_write_speed\"\xb0\x02\n\'AlterAutoPartitioningWriteSpeedStrategy\x12@\n\x18set_stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x12\x31\n\x1aset_up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x33\n\x1cset_down_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x42\x1b\n\x19_set_stabilization_windowB\x1d\n\x1b_set_up_utilization_percentB\x1f\n\x1d_set_down_utilization_percent\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"8\n\x11PartitionLocation\x12\x0f\n\x07node_id\x18\x01 \x01(\x05\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"\x90\x01\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\x12\x18\n\x10include_location\x18\x04 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x11PartitionKeyRange\x12\x17\n\nfrom_bound\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x15\n\x08to_bound\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_from_boundB\x0b\n\t_to_bound\"\xfa\t\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12\x33\n+partition_total_read_speed_bytes_per_second\x18\x0e \x01(\x03\x12\x36\n.partition_consumer_read_speed_bytes_per_second\x18\x0f \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x8f\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12\x38\n\x12partition_location\x18\x06 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x12/\n\tkey_range\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionKeyRange\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\xaa\x01\n\x18\x44\x65scribePartitionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"I\n\x19\x44\x65scribePartitionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Z\n\x17\x44\x65scribePartitionResult\x12?\n\tpartition\x18\x01 \x01(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\"\xa5\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xd3\x07\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\xba\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x12\x38\n\x12partition_location\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\xee\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16max_committed_time_lag\x18\r \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\xa0\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x1d\n\x11partition_node_id\x18\x08 \x01(\x05\x42\x02\x18\x01\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*\xf1\x01\n\x18\x41utoPartitioningStrategy\x12*\n&AUTO_PARTITIONING_STRATEGY_UNSPECIFIED\x10\x00\x12\'\n#AUTO_PARTITIONING_STRATEGY_DISABLED\x10\x01\x12\'\n#AUTO_PARTITIONING_STRATEGY_SCALE_UP\x10\x02\x12\x30\n,AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN\x10\x03\x12%\n!AUTO_PARTITIONING_STRATEGY_PAUSED\x10\x04*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3' , dependencies=[protos_dot_ydb__operation__pb2.DESCRIPTOR,protos_dot_ydb__scheme__pb2.DESCRIPTOR,protos_dot_ydb__status__codes__pb2.DESCRIPTOR,protos_dot_ydb__issue__message__pb2.DESCRIPTOR,protos_dot_annotations_dot_sensitive__pb2.DESCRIPTOR,protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) @@ -73,8 +73,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=18023, - serialized_end=18154, + serialized_start=18186, + serialized_end=18317, ) _sym_db.RegisterEnumDescriptor(_CODEC) @@ -114,8 +114,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=18157, - serialized_end=18398, + serialized_start=18320, + serialized_end=18561, ) _sym_db.RegisterEnumDescriptor(_AUTOPARTITIONINGSTRATEGY) @@ -145,8 +145,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=18400, - serialized_end=18515, + serialized_start=18563, + serialized_end=18678, ) _sym_db.RegisterEnumDescriptor(_METERINGMODE) @@ -2700,6 +2700,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='bytes_size', full_name='Ydb.Topic.StreamDirectReadMessage.DirectReadResponse.bytes_size', index=3, + number=4, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -2713,7 +2720,7 @@ oneofs=[ ], serialized_start=9176, - serialized_end=9331, + serialized_end=9351, ) _STREAMDIRECTREADMESSAGE = _descriptor.Descriptor( @@ -2737,7 +2744,7 @@ oneofs=[ ], serialized_start=7676, - serialized_end=9331, + serialized_end=9351, ) @@ -2775,8 +2782,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9333, - serialized_end=9383, + serialized_start=9353, + serialized_end=9403, ) @@ -2814,8 +2821,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9746, - serialized_end=9838, + serialized_start=9766, + serialized_end=9858, ) _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS = _descriptor.Descriptor( @@ -2852,8 +2859,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9620, - serialized_end=9838, + serialized_start=9640, + serialized_end=9858, ) _UPDATEOFFSETSINTRANSACTIONREQUEST = _descriptor.Descriptor( @@ -2904,8 +2911,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9386, - serialized_end=9838, + serialized_start=9406, + serialized_end=9858, ) @@ -2936,8 +2943,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9840, - serialized_end=9922, + serialized_start=9860, + serialized_end=9942, ) @@ -2961,8 +2968,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9924, - serialized_end=9958, + serialized_start=9944, + serialized_end=9978, ) @@ -3009,6 +3016,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='read_session_id', full_name='Ydb.Topic.CommitOffsetRequest.read_session_id', index=5, + number=6, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -3021,8 +3035,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9961, - serialized_end=10111, + serialized_start=9981, + serialized_end=10156, ) @@ -3053,8 +3067,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10113, - serialized_end=10181, + serialized_start=10158, + serialized_end=10226, ) @@ -3078,8 +3092,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10183, - serialized_end=10203, + serialized_start=10228, + serialized_end=10248, ) @@ -3124,8 +3138,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10205, - serialized_end=10281, + serialized_start=10250, + serialized_end=10326, ) @@ -3163,8 +3177,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10546, - serialized_end=10595, + serialized_start=10591, + serialized_end=10640, ) _CONSUMER_CONSUMERSTATS = _descriptor.Descriptor( @@ -3197,7 +3211,14 @@ is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='bytes_read', full_name='Ydb.Topic.Consumer.ConsumerStats.bytes_read', index=3, + name='max_committed_time_lag', full_name='Ydb.Topic.Consumer.ConsumerStats.max_committed_time_lag', index=3, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='bytes_read', full_name='Ydb.Topic.Consumer.ConsumerStats.bytes_read', index=4, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -3215,8 +3236,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10598, - serialized_end=10841, + serialized_start=10643, + serialized_end=10945, ) _CONSUMER = _descriptor.Descriptor( @@ -3281,8 +3302,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10284, - serialized_end=10847, + serialized_start=10329, + serialized_end=10951, ) @@ -3320,8 +3341,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11091, - serialized_end=11145, + serialized_start=11195, + serialized_end=11249, ) _ALTERCONSUMER = _descriptor.Descriptor( @@ -3384,8 +3405,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10850, - serialized_end=11169, + serialized_start=10954, + serialized_end=11273, ) @@ -3437,8 +3458,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11172, - serialized_end=11392, + serialized_start=11276, + serialized_end=11496, ) @@ -3476,8 +3497,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11395, - serialized_end=11554, + serialized_start=11499, + serialized_end=11658, ) @@ -3522,8 +3543,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11557, - serialized_end=11736, + serialized_start=11661, + serialized_end=11840, ) @@ -3595,8 +3616,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11739, - serialized_end=12134, + serialized_start=11843, + serialized_end=12238, ) @@ -3644,8 +3665,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12137, - serialized_end=12371, + serialized_start=12241, + serialized_end=12475, ) @@ -3705,8 +3726,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12374, - serialized_end=12678, + serialized_start=12478, + serialized_end=12782, ) @@ -3744,8 +3765,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10546, - serialized_end=10595, + serialized_start=10591, + serialized_end=10640, ) _CREATETOPICREQUEST = _descriptor.Descriptor( @@ -3845,8 +3866,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12681, - serialized_end=13311, + serialized_start=12785, + serialized_end=13415, ) @@ -3877,8 +3898,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13313, - serialized_end=13380, + serialized_start=13417, + serialized_end=13484, ) @@ -3902,8 +3923,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13382, - serialized_end=13401, + serialized_start=13486, + serialized_end=13505, ) @@ -3941,8 +3962,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13403, - serialized_end=13459, + serialized_start=13507, + serialized_end=13563, ) @@ -3994,8 +4015,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13462, - serialized_end=13606, + serialized_start=13566, + serialized_end=13710, ) @@ -4026,8 +4047,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13608, - serialized_end=13677, + serialized_start=13712, + serialized_end=13781, ) @@ -4075,8 +4096,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13679, - serialized_end=13774, + serialized_start=13783, + serialized_end=13878, ) @@ -4114,8 +4135,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10546, - serialized_end=10595, + serialized_start=10591, + serialized_end=10640, ) _DESCRIBETOPICRESULT_PARTITIONINFO = _descriptor.Descriptor( @@ -4187,8 +4208,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14566, - serialized_end=14837, + serialized_start=14670, + serialized_end=14941, ) _DESCRIBETOPICRESULT_TOPICSTATS = _descriptor.Descriptor( @@ -4239,8 +4260,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14840, - serialized_end=15045, + serialized_start=14944, + serialized_end=15149, ) _DESCRIBETOPICRESULT = _descriptor.Descriptor( @@ -4361,8 +4382,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13777, - serialized_end=15051, + serialized_start=13881, + serialized_end=15155, ) @@ -4421,8 +4442,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15054, - serialized_end=15224, + serialized_start=15158, + serialized_end=15328, ) @@ -4453,8 +4474,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15226, - serialized_end=15299, + serialized_start=15330, + serialized_end=15403, ) @@ -4485,8 +4506,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15301, - serialized_end=15391, + serialized_start=15405, + serialized_end=15495, ) @@ -4545,8 +4566,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15394, - serialized_end=15559, + serialized_start=15498, + serialized_end=15663, ) @@ -4577,8 +4598,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15561, - serialized_end=15633, + serialized_start=15665, + serialized_end=15737, ) @@ -4651,8 +4672,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15804, - serialized_end=16118, + serialized_start=15908, + serialized_end=16222, ) _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS = _descriptor.Descriptor( @@ -4713,21 +4734,28 @@ is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='bytes_read', full_name='Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats.bytes_read', index=7, + name='max_committed_time_lag', full_name='Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats.max_committed_time_lag', index=7, + number=13, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='bytes_read', full_name='Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats.bytes_read', index=8, number=8, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='reader_name', full_name='Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats.reader_name', index=8, + name='reader_name', full_name='Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats.reader_name', index=9, number=11, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='connection_node_id', full_name='Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats.connection_node_id', index=9, + name='connection_node_id', full_name='Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats.connection_node_id', index=10, number=12, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, @@ -4745,8 +4773,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16121, - serialized_end=16556, + serialized_start=16225, + serialized_end=16719, ) _DESCRIBECONSUMERRESULT = _descriptor.Descriptor( @@ -4790,8 +4818,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15636, - serialized_end=16556, + serialized_start=15740, + serialized_end=16719, ) @@ -4857,8 +4885,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16559, - serialized_end=16847, + serialized_start=16722, + serialized_end=17010, ) @@ -4896,8 +4924,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11091, - serialized_end=11145, + serialized_start=11195, + serialized_end=11249, ) _ALTERTOPICREQUEST = _descriptor.Descriptor( @@ -5026,8 +5054,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16850, - serialized_end=17753, + serialized_start=17013, + serialized_end=17916, ) @@ -5058,8 +5086,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17755, - serialized_end=17821, + serialized_start=17918, + serialized_end=17984, ) @@ -5083,8 +5111,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17823, - serialized_end=17841, + serialized_start=17986, + serialized_end=18004, ) @@ -5122,8 +5150,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17843, - serialized_end=17934, + serialized_start=18006, + serialized_end=18097, ) @@ -5154,8 +5182,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17936, - serialized_end=18001, + serialized_start=18099, + serialized_end=18164, ) @@ -5179,8 +5207,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18003, - serialized_end=18020, + serialized_start=18166, + serialized_end=18183, ) _STREAMWRITEMESSAGE_FROMCLIENT.fields_by_name['init_request'].message_type = _STREAMWRITEMESSAGE_INITREQUEST @@ -5453,6 +5481,7 @@ _CONSUMER_CONSUMERSTATS.fields_by_name['min_partitions_last_read_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _CONSUMER_CONSUMERSTATS.fields_by_name['max_read_time_lag'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _CONSUMER_CONSUMERSTATS.fields_by_name['max_write_time_lag'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +_CONSUMER_CONSUMERSTATS.fields_by_name['max_committed_time_lag'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _CONSUMER_CONSUMERSTATS.fields_by_name['bytes_read'].message_type = _MULTIPLEWINDOWSSTAT _CONSUMER_CONSUMERSTATS.containing_type = _CONSUMER _CONSUMER.fields_by_name['read_from'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP @@ -5549,6 +5578,7 @@ _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS.fields_by_name['last_read_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS.fields_by_name['max_read_time_lag'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS.fields_by_name['max_write_time_lag'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +_DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS.fields_by_name['max_committed_time_lag'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS.fields_by_name['bytes_read'].message_type = _MULTIPLEWINDOWSSTAT _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS.containing_type = _DESCRIBECONSUMERRESULT _DESCRIBECONSUMERRESULT.fields_by_name['self'].message_type = protos_dot_ydb__scheme__pb2._ENTRY diff --git a/ydb/_grpc/v3/ydb_import_v1_pb2.py b/ydb/_grpc/v3/ydb_import_v1_pb2.py index ddc27744..af3a3b90 100644 --- a/ydb/_grpc/v3/ydb_import_v1_pb2.py +++ b/ydb/_grpc/v3/ydb_import_v1_pb2.py @@ -21,7 +21,7 @@ syntax='proto3', serialized_options=b'\n\031tech.ydb.proto.import_.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Import_V1', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x13ydb_import_v1.proto\x12\rYdb.Import.V1\x1a\x17protos/ydb_import.proto2\xaf\x01\n\rImportService\x12Q\n\x0cImportFromS3\x12\x1f.Ydb.Import.ImportFromS3Request\x1a .Ydb.Import.ImportFromS3Response\x12K\n\nImportData\x12\x1d.Ydb.Import.ImportDataRequest\x1a\x1e.Ydb.Import.ImportDataResponseBR\n\x19tech.ydb.proto.import_.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Import_V1b\x06proto3' + serialized_pb=b'\n\x13ydb_import_v1.proto\x12\rYdb.Import.V1\x1a\x17protos/ydb_import.proto2\x9d\x02\n\rImportService\x12Q\n\x0cImportFromS3\x12\x1f.Ydb.Import.ImportFromS3Request\x1a .Ydb.Import.ImportFromS3Response\x12l\n\x15ListObjectsInS3Export\x12(.Ydb.Import.ListObjectsInS3ExportRequest\x1a).Ydb.Import.ListObjectsInS3ExportResponse\x12K\n\nImportData\x12\x1d.Ydb.Import.ImportDataRequest\x1a\x1e.Ydb.Import.ImportDataResponseBR\n\x19tech.ydb.proto.import_.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Import_V1b\x06proto3' , dependencies=[protos_dot_ydb__import__pb2.DESCRIPTOR,]) @@ -40,7 +40,7 @@ serialized_options=None, create_key=_descriptor._internal_create_key, serialized_start=64, - serialized_end=239, + serialized_end=349, methods=[ _descriptor.MethodDescriptor( name='ImportFromS3', @@ -52,10 +52,20 @@ serialized_options=None, create_key=_descriptor._internal_create_key, ), + _descriptor.MethodDescriptor( + name='ListObjectsInS3Export', + full_name='Ydb.Import.V1.ImportService.ListObjectsInS3Export', + index=1, + containing_service=None, + input_type=protos_dot_ydb__import__pb2._LISTOBJECTSINS3EXPORTREQUEST, + output_type=protos_dot_ydb__import__pb2._LISTOBJECTSINS3EXPORTRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), _descriptor.MethodDescriptor( name='ImportData', full_name='Ydb.Import.V1.ImportService.ImportData', - index=1, + index=2, containing_service=None, input_type=protos_dot_ydb__import__pb2._IMPORTDATAREQUEST, output_type=protos_dot_ydb__import__pb2._IMPORTDATARESPONSE, diff --git a/ydb/_grpc/v3/ydb_import_v1_pb2_grpc.py b/ydb/_grpc/v3/ydb_import_v1_pb2_grpc.py index f227c8c6..075399db 100644 --- a/ydb/_grpc/v3/ydb_import_v1_pb2_grpc.py +++ b/ydb/_grpc/v3/ydb_import_v1_pb2_grpc.py @@ -19,6 +19,11 @@ def __init__(self, channel): request_serializer=protos_dot_ydb__import__pb2.ImportFromS3Request.SerializeToString, response_deserializer=protos_dot_ydb__import__pb2.ImportFromS3Response.FromString, ) + self.ListObjectsInS3Export = channel.unary_unary( + '/Ydb.Import.V1.ImportService/ListObjectsInS3Export', + request_serializer=protos_dot_ydb__import__pb2.ListObjectsInS3ExportRequest.SerializeToString, + response_deserializer=protos_dot_ydb__import__pb2.ListObjectsInS3ExportResponse.FromString, + ) self.ImportData = channel.unary_unary( '/Ydb.Import.V1.ImportService/ImportData', request_serializer=protos_dot_ydb__import__pb2.ImportDataRequest.SerializeToString, @@ -37,6 +42,13 @@ def ImportFromS3(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def ListObjectsInS3Export(self, request, context): + """List objects from existing export stored in S3 bucket + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ImportData(self, request, context): """Writes data to a table. Method accepts serialized data in the selected format and writes it non-transactionally. @@ -53,6 +65,11 @@ def add_ImportServiceServicer_to_server(servicer, server): request_deserializer=protos_dot_ydb__import__pb2.ImportFromS3Request.FromString, response_serializer=protos_dot_ydb__import__pb2.ImportFromS3Response.SerializeToString, ), + 'ListObjectsInS3Export': grpc.unary_unary_rpc_method_handler( + servicer.ListObjectsInS3Export, + request_deserializer=protos_dot_ydb__import__pb2.ListObjectsInS3ExportRequest.FromString, + response_serializer=protos_dot_ydb__import__pb2.ListObjectsInS3ExportResponse.SerializeToString, + ), 'ImportData': grpc.unary_unary_rpc_method_handler( servicer.ImportData, request_deserializer=protos_dot_ydb__import__pb2.ImportDataRequest.FromString, @@ -85,6 +102,23 @@ def ImportFromS3(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def ListObjectsInS3Export(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, '/Ydb.Import.V1.ImportService/ListObjectsInS3Export', + protos_dot_ydb__import__pb2.ListObjectsInS3ExportRequest.SerializeToString, + protos_dot_ydb__import__pb2.ListObjectsInS3ExportResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def ImportData(request, target, diff --git a/ydb/_grpc/v3/ydb_query_v1_pb2_grpc.py b/ydb/_grpc/v3/ydb_query_v1_pb2_grpc.py index cd0ffb26..4c2ba438 100644 --- a/ydb/_grpc/v3/ydb_query_v1_pb2_grpc.py +++ b/ydb/_grpc/v3/ydb_query_v1_pb2_grpc.py @@ -7,12 +7,7 @@ class QueryServiceStub(object): - """! WARNING: Experimental API - ! This API is currently in experimental state and is a subject for changes. - ! No backward and/or forward compatibility guarantees are provided. - ! DO NOT USE for production workloads. - - """ + """Missing associated documentation comment in .proto file.""" def __init__(self, channel): """Constructor. @@ -68,12 +63,7 @@ def __init__(self, channel): class QueryServiceServicer(object): - """! WARNING: Experimental API - ! This API is currently in experimental state and is a subject for changes. - ! No backward and/or forward compatibility guarantees are provided. - ! DO NOT USE for production workloads. - - """ + """Missing associated documentation comment in .proto file.""" def CreateSession(self, request, context): """Sessions are basic primitives for communicating with YDB Query Service. The are similar to @@ -214,12 +204,7 @@ def add_QueryServiceServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. class QueryService(object): - """! WARNING: Experimental API - ! This API is currently in experimental state and is a subject for changes. - ! No backward and/or forward compatibility guarantees are provided. - ! DO NOT USE for production workloads. - - """ + """Missing associated documentation comment in .proto file.""" @staticmethod def CreateSession(request, diff --git a/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.py b/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.py index 0de1cb16..ed40e13d 100644 --- a/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.py +++ b/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.py @@ -22,7 +22,7 @@ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&draft/protos/ydb_federated_query.proto\x12\x0e\x46\x65\x64\x65ratedQuery\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x16protos/ydb_value.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"{\n\x03\x41\x63l\x12\x32\n\nvisibility\x18\x01 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"@\n\nVisibility\x12\x1a\n\x16VISIBILITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\t\n\x05SCOPE\x10\x02\"\x83\x03\n\x06Limits\x12!\n\x0fvcpu_rate_limit\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0f\x66low_rate_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fvcpu_time_limit\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_size\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_rows\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1e\n\x0cmemory_limit\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\nresult_ttl\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x11\x65xecution_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x38\n\x12\x65xecution_deadline\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\t\n\x07timeout\"\xef\x03\n\x14StreamingDisposition\x12(\n\x06oldest\x18\x01 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\'\n\x05\x66resh\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x42\n\tfrom_time\x18\x03 \x01(\x0b\x32-.FederatedQuery.StreamingDisposition.FromTimeH\x00\x12@\n\x08time_ago\x18\x04 \x01(\x0b\x32,.FederatedQuery.StreamingDisposition.TimeAgoH\x00\x12W\n\x14\x66rom_last_checkpoint\x18\x05 \x01(\x0b\x32\x37.FederatedQuery.StreamingDisposition.FromLastCheckpointH\x00\x1a\x39\n\x08\x46romTime\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x36\n\x07TimeAgo\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a#\n\x12\x46romLastCheckpoint\x12\r\n\x05\x66orce\x18\x01 \x01(\x08\x42\r\n\x0b\x64isposition\"\xd4\x04\n\x0cQueryContent\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12&\n\x06limits\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Limits\x12\x1a\n\x04text\x18\x05 \x01(\tB\x0c\xa2\xe6*\x08\n\x06\x08\x01\x10\x80\xa0\x06\x12\x11\n\tautomatic\x18\x06 \x01(\x08\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\x12\x64\n\x12\x65xecution_settings\x18\n \x03(\x0b\x32\x33.FederatedQuery.QueryContent.ExecutionSettingsEntryB\x13\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x03\x18\x80 \x12\x38\n\x06syntax\x18\x0b \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\x1a\x38\n\x16\x45xecutionSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"E\n\tQueryType\x12\x1a\n\x16QUERY_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tANALYTICS\x10\x01\x12\r\n\tSTREAMING\x10\x02\"?\n\x0bQuerySyntax\x12\x1c\n\x18QUERY_SYNTAX_UNSPECIFIED\x10\x00\x12\n\n\x06YQL_V1\x10\x01\x12\x06\n\x02PG\x10\x02\"\xe5\x01\n\nCommonMeta\x12\x17\n\x02id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x1f\n\ncreated_by\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12 \n\x0bmodified_by\x18\x03 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12.\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bmodified_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x08revision\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbf\x06\n\tQueryMeta\x12*\n\x06\x63ommon\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x30\n\x0csubmitted_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstarted_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x37\n\x06status\x18\x05 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x1f\n\x17last_job_query_revision\x18\x06 \x01(\x03\x12\x13\n\x0blast_job_id\x18\x07 \x01(\t\x12-\n\texpire_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10result_expire_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nstarted_by\x18\n \x01(\t\x12\x14\n\naborted_by\x18\x0b \x01(\tH\x00\x12\x13\n\tpaused_by\x18\x0c \x01(\tH\x00\x12\x1d\n\x15has_saved_checkpoints\x18\r \x01(\x08\"\x83\x02\n\rComputeStatus\x12\x1e\n\x1a\x43OMPUTE_STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STARTING\x10\x01\x12\x13\n\x0f\x41\x42ORTED_BY_USER\x10\x02\x12\x15\n\x11\x41\x42ORTED_BY_SYSTEM\x10\x03\x12\x14\n\x10\x41\x42ORTING_BY_USER\x10\x04\x12\x16\n\x12\x41\x42ORTING_BY_SYSTEM\x10\x05\x12\x0c\n\x08RESUMING\x10\x06\x12\x0b\n\x07RUNNING\x10\x07\x12\r\n\tCOMPLETED\x10\x08\x12\x0e\n\nCOMPLETING\x10\x0c\x12\n\n\x06\x46\x41ILED\x10\t\x12\x0b\n\x07\x46\x41ILING\x10\r\x12\n\n\x06PAUSED\x10\x0b\x12\x0b\n\x07PAUSING\x10\nB\x08\n\x06\x61\x63tion\"\xc9\x01\n\nBriefQuery\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\'\n\x04meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x05 \x01(\x08\"\x19\n\tQueryPlan\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x18\n\x08QueryAst\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\t\"]\n\rResultSetMeta\x12\x1b\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x1c\n\nrows_count\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x11\n\ttruncated\x18\x03 \x01(\x08\"\xf6\x02\n\x05Query\x12\'\n\x04meta\x18\x01 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\'\n\x04plan\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x04 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x30\n\x0ftransient_issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\"\x1f\n\x0fQueryStatistics\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x8e\x02\n\x12\x43reateQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x04 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x43reateQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\".\n\x11\x43reateQueryResult\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x93\x04\n\x12ListQueriesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x39\n\x06\x66ilter\x18\x04 \x01(\x0b\x32).FederatedQuery.ListQueriesRequest.Filter\x1a\xcc\x02\n\x06\x46ilter\x12:\n\nquery_type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12?\n\x06status\x18\x02 \x03(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatusB\x06\x9a\xe6*\x02\x18\x14\x12\x31\n\x04mode\x18\x03 \x03(\x0e\x32\x1b.FederatedQuery.ExecuteModeB\x06\x9a\xe6*\x02\x18\x14\x12\x15\n\x04name\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x05 \x01(\x08\x12\x32\n\nvisibility\x18\x06 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x30\n\tautomatic\x18\x07 \x01(\x0e\x32\x1d.FederatedQuery.AutomaticType\"C\n\x13ListQueriesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"`\n\x11ListQueriesResult\x12)\n\x05query\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.BriefQuery\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"p\n\x14\x44\x65scribeQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"E\n\x15\x44\x65scribeQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\";\n\x13\x44\x65scribeQueryResult\x12$\n\x05query\x18\x01 \x01(\x0b\x32\x15.FederatedQuery.Query\"q\n\x15GetQueryStatusRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"F\n\x16GetQueryStatusResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"f\n\x14GetQueryStatusResult\x12\x37\n\x06status\x18\x01 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x15\n\rmeta_revision\x18\x02 \x01(\x03\"\xb5\x01\n\x12\x44\x65leteQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x44\x65leteQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x44\x65leteQueryResult\"\x8a\x03\n\x12ModifyQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12-\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x05 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12\x36\n\x0fstate_load_mode\x18\x06 \x01(\x0e\x32\x1d.FederatedQuery.StateLoadMode\x12#\n\x11previous_revision\x18\x07 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13ModifyQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11ModifyQueryResult\"\xe3\x01\n\x13\x43ontrolQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12+\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.QueryAction\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"D\n\x14\x43ontrolQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ontrolQueryResult\"\xed\x01\n\x08\x42riefJob\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x12\n\nquery_name\x18\t \x01(\t\x12\x32\n\nvisibility\x18\n \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x83\x04\n\x03Job\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x0c\n\x04text\x18\x02 \x01(\t\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\'\n\x04plan\x18\x04 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\x12\x12\n\nquery_name\x18\t \x01(\t\x12 \n\x03\x61\x63l\x18\n \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x06syntax\x18\r \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\"\x8c\x02\n\x0fListJobsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x10\n\x08query_id\x18\x05 \x01(\t\x12\x36\n\x06\x66ilter\x18\x04 \x01(\x0b\x32&.FederatedQuery.ListJobsRequest.Filter\x1a:\n\x06\x46ilter\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\"@\n\x10ListJobsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Y\n\x0eListJobsResult\x12%\n\x03job\x18\x01 \x03(\x0b\x32\x18.FederatedQuery.BriefJob\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"l\n\x12\x44\x65scribeJobRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\x06job_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"C\n\x13\x44\x65scribeJobResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"5\n\x11\x44\x65scribeJobResult\x12 \n\x03job\x18\x01 \x01(\x0b\x32\x13.FederatedQuery.Job\"\x15\n\x13\x43urrentIAMTokenAuth\"\n\n\x08NoneAuth\")\n\x12ServiceAccountAuth\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\xba\x01\n\x07IamAuth\x12:\n\x0b\x63urrent_iam\x18\x01 \x01(\x0b\x32#.FederatedQuery.CurrentIAMTokenAuthH\x00\x12=\n\x0fservice_account\x18\x02 \x01(\x0b\x32\".FederatedQuery.ServiceAccountAuthH\x00\x12(\n\x04none\x18\x03 \x01(\x0b\x32\x18.FederatedQuery.NoneAuthH\x00\x42\n\n\x08identity\"\x98\x01\n\x0b\x44\x61taStreams\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"g\n\nMonitoring\x12\x18\n\x07project\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12\x18\n\x07\x63luster\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12%\n\x04\x61uth\x18\x03 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x98\x01\n\x0bYdbDatabase\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"\xf8\x01\n\x11\x43lickHouseCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"Y\n\x17ObjectStorageConnection\x12\x17\n\x06\x62ucket\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x91\x02\n\x11PostgreSQLCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x17\n\x06schema\x18\t \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"\xae\x04\n\x11\x43onnectionSetting\x12\x33\n\x0cydb_database\x18\x01 \x01(\x0b\x32\x1b.FederatedQuery.YdbDatabaseH\x00\x12?\n\x12\x63lickhouse_cluster\x18\x02 \x01(\x0b\x32!.FederatedQuery.ClickHouseClusterH\x00\x12\x33\n\x0c\x64\x61ta_streams\x18\x03 \x01(\x0b\x32\x1b.FederatedQuery.DataStreamsH\x00\x12\x41\n\x0eobject_storage\x18\x04 \x01(\x0b\x32\'.FederatedQuery.ObjectStorageConnectionH\x00\x12\x30\n\nmonitoring\x18\x05 \x01(\x0b\x32\x1a.FederatedQuery.MonitoringH\x00\x12?\n\x12postgresql_cluster\x18\x06 \x01(\x0b\x32!.FederatedQuery.PostgreSQLClusterH\x00\"\xa9\x01\n\x0e\x43onnectionType\x12\x1f\n\x1b\x43ONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cYDB_DATABASE\x10\x01\x12\x16\n\x12\x43LICKHOUSE_CLUSTER\x10\x02\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x03\x12\x12\n\x0eOBJECT_STORAGE\x10\x04\x12\x0e\n\nMONITORING\x10\x05\x12\x16\n\x12POSTGRESQL_CLUSTER\x10\x06\x42\x0c\n\nconnection\"\xa2\x01\n\x11\x43onnectionContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"j\n\nConnection\x12\x32\n\x07\x63ontent\x18\x01 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xaa\x01\n\x17\x43reateConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x43reateConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"<\n\x16\x43reateConnectionResult\x12\"\n\rconnection_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\x84\x03\n\x16ListConnectionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12=\n\x06\x66ilter\x18\x04 \x01(\x0b\x32-.FederatedQuery.ListConnectionsRequest.Filter\x1a\xb5\x01\n\x06\x46ilter\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\x12I\n\x0f\x63onnection_type\x18\x03 \x01(\x0e\x32\x30.FederatedQuery.ConnectionSetting.ConnectionType\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"G\n\x17ListConnectionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"i\n\x15ListConnectionsResult\x12.\n\nconnection\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.Connection\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"z\n\x19\x44\x65scribeConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"J\n\x1a\x44\x65scribeConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"J\n\x18\x44\x65scribeConnectionResult\x12.\n\nconnection\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.Connection\"\xf3\x01\n\x17ModifyConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07\x63ontent\x18\x03 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18ModifyConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16ModifyConnectionResult\"\xbf\x01\n\x17\x44\x65leteConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x44\x65leteConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16\x44\x65leteConnectionResult\"\x86\x01\n\x15TestConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\"F\n\x16TestConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x16\n\x14TestConnectionResult\"\xcc\x01\n\x14GetResultDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\x10result_set_index\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12\x18\n\x06offset\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1c\n\x05limit\x18\x05 \x01(\x03\x42\r\xb2\xe6*\t[1; 1000]\"E\n\x15GetResultDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"9\n\x13GetResultDataResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\".\n\x06Schema\x12$\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.ColumnB\x07\x9a\xe6*\x03\x18\xe8\x07\"\xa2\x02\n\x12\x44\x61taStreamsBinding\x12 \n\x0bstream_name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x0b\x63ompression\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12U\n\x0e\x66ormat_setting\x18\x05 \x03(\x0b\x32\x35.FederatedQuery.DataStreamsBinding.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x92\x04\n\x14ObjectStorageBinding\x12;\n\x06subset\x18\x01 \x03(\x0b\x32+.FederatedQuery.ObjectStorageBinding.Subset\x1a\xbc\x03\n\x06Subset\x12!\n\x0cpath_pattern\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12^\n\x0e\x66ormat_setting\x18\x03 \x03(\x0b\x32>.FederatedQuery.ObjectStorageBinding.Subset.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x12\x1c\n\x0b\x63ompression\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x05 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12O\n\nprojection\x18\x06 \x03(\x0b\x32;.FederatedQuery.ObjectStorageBinding.Subset.ProjectionEntry\x12\x16\n\x0epartitioned_by\x18\x07 \x03(\t\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fProjectionEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xea\x01\n\x0e\x42indingSetting\x12:\n\x0c\x64\x61ta_streams\x18\x01 \x01(\x0b\x32\".FederatedQuery.DataStreamsBindingH\x00\x12>\n\x0eobject_storage\x18\x02 \x01(\x0b\x32$.FederatedQuery.ObjectStorageBindingH\x00\"Q\n\x0b\x42indingType\x12\x1c\n\x18\x42INDING_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x01\x12\x12\n\x0eOBJECT_STORAGE\x10\x02\x42\t\n\x07\x62inding\"\xe5\x01\n\x0c\x42riefBinding\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12(\n\x04meta\x18\x03 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x38\n\x04type\x18\x04 \x01(\x0e\x32*.FederatedQuery.BindingSetting.BindingType\x12\x32\n\nvisibility\x18\x05 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"\xc0\x01\n\x0e\x42indingContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07setting\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingSetting\x12 \n\x03\x61\x63l\x18\x04 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"d\n\x07\x42inding\x12/\n\x07\x63ontent\x18\x01 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xa4\x01\n\x14\x43reateBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12/\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x43reateBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"6\n\x13\x43reateBindingResult\x12\x1f\n\nbinding_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\xd3\x02\n\x13ListBindingsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12:\n\x06\x66ilter\x18\x04 \x01(\x0b\x32*.FederatedQuery.ListBindingsRequest.Filter\x1a\x8a\x01\n\x06\x46ilter\x12\x1e\n\rconnection_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x03 \x01(\x08\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"D\n\x14ListBindingsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"e\n\x12ListBindingsResult\x12-\n\x07\x62inding\x18\x01 \x03(\x0b\x32\x1c.FederatedQuery.BriefBinding\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"t\n\x16\x44\x65scribeBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"G\n\x17\x44\x65scribeBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"A\n\x15\x44\x65scribeBindingResult\x12(\n\x07\x62inding\x18\x01 \x01(\x0b\x32\x17.FederatedQuery.Binding\"\xea\x01\n\x14ModifyBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15ModifyBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13ModifyBindingResult\"\xb9\x01\n\x14\x44\x65leteBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x44\x65leteBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13\x44\x65leteBindingResult*q\n\x0b\x45xecuteMode\x12\x1c\n\x18\x45XECUTE_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04SAVE\x10\x01\x12\t\n\x05PARSE\x10\x02\x12\x0b\n\x07\x43OMPILE\x10\x03\x12\x0c\n\x08VALIDATE\x10\x04\x12\x0b\n\x07\x45XPLAIN\x10\x05\x12\x07\n\x03RUN\x10\x06*y\n\x0bQueryAction\x12\x1c\n\x18QUERY_ACTION_UNSPECIFIED\x10\x00\x12\t\n\x05PAUSE\x10\x01\x12\x14\n\x10PAUSE_GRACEFULLY\x10\x02\x12\t\n\x05\x41\x42ORT\x10\x03\x12\x14\n\x10\x41\x42ORT_GRACEFULLY\x10\x04\x12\n\n\x06RESUME\x10\x05*U\n\rStateLoadMode\x12\x1f\n\x1bSTATE_LOAD_MODE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45MPTY\x10\x01\x12\x18\n\x14\x46ROM_LAST_CHECKPOINT\x10\x02*Q\n\rAutomaticType\x12\x1e\n\x1a\x41UTOMATIC_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\x11\n\rNOT_AUTOMATIC\x10\x02\x42r\n$tech.ydb.proto.draft.federated.queryZGgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_FederatedQuery\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&draft/protos/ydb_federated_query.proto\x12\x0e\x46\x65\x64\x65ratedQuery\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x16protos/ydb_value.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"{\n\x03\x41\x63l\x12\x32\n\nvisibility\x18\x01 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"@\n\nVisibility\x12\x1a\n\x16VISIBILITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\t\n\x05SCOPE\x10\x02\"\x83\x03\n\x06Limits\x12!\n\x0fvcpu_rate_limit\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0f\x66low_rate_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fvcpu_time_limit\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_size\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_rows\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1e\n\x0cmemory_limit\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\nresult_ttl\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x11\x65xecution_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x38\n\x12\x65xecution_deadline\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\t\n\x07timeout\"\xef\x03\n\x14StreamingDisposition\x12(\n\x06oldest\x18\x01 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\'\n\x05\x66resh\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x42\n\tfrom_time\x18\x03 \x01(\x0b\x32-.FederatedQuery.StreamingDisposition.FromTimeH\x00\x12@\n\x08time_ago\x18\x04 \x01(\x0b\x32,.FederatedQuery.StreamingDisposition.TimeAgoH\x00\x12W\n\x14\x66rom_last_checkpoint\x18\x05 \x01(\x0b\x32\x37.FederatedQuery.StreamingDisposition.FromLastCheckpointH\x00\x1a\x39\n\x08\x46romTime\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x36\n\x07TimeAgo\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a#\n\x12\x46romLastCheckpoint\x12\r\n\x05\x66orce\x18\x01 \x01(\x08\x42\r\n\x0b\x64isposition\"\xe8\x05\n\x0cQueryContent\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12&\n\x06limits\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Limits\x12\x1a\n\x04text\x18\x05 \x01(\tB\x0c\xa2\xe6*\x08\n\x06\x08\x01\x10\x80\xa0\x06\x12\x11\n\tautomatic\x18\x06 \x01(\x08\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\x12\x64\n\x12\x65xecution_settings\x18\n \x03(\x0b\x32\x33.FederatedQuery.QueryContent.ExecutionSettingsEntryB\x13\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x03\x18\x80 \x12\x38\n\x06syntax\x18\x0b \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\x12N\n\nparameters\x18\x0c \x03(\x0b\x32,.FederatedQuery.QueryContent.ParametersEntryB\x0c\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\x1a\x38\n\x16\x45xecutionSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"E\n\tQueryType\x12\x1a\n\x16QUERY_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tANALYTICS\x10\x01\x12\r\n\tSTREAMING\x10\x02\"?\n\x0bQuerySyntax\x12\x1c\n\x18QUERY_SYNTAX_UNSPECIFIED\x10\x00\x12\n\n\x06YQL_V1\x10\x01\x12\x06\n\x02PG\x10\x02\"\xe5\x01\n\nCommonMeta\x12\x17\n\x02id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x1f\n\ncreated_by\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12 \n\x0bmodified_by\x18\x03 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12.\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bmodified_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x08revision\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbf\x06\n\tQueryMeta\x12*\n\x06\x63ommon\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x30\n\x0csubmitted_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstarted_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x37\n\x06status\x18\x05 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x1f\n\x17last_job_query_revision\x18\x06 \x01(\x03\x12\x13\n\x0blast_job_id\x18\x07 \x01(\t\x12-\n\texpire_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10result_expire_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nstarted_by\x18\n \x01(\t\x12\x14\n\naborted_by\x18\x0b \x01(\tH\x00\x12\x13\n\tpaused_by\x18\x0c \x01(\tH\x00\x12\x1d\n\x15has_saved_checkpoints\x18\r \x01(\x08\"\x83\x02\n\rComputeStatus\x12\x1e\n\x1a\x43OMPUTE_STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STARTING\x10\x01\x12\x13\n\x0f\x41\x42ORTED_BY_USER\x10\x02\x12\x15\n\x11\x41\x42ORTED_BY_SYSTEM\x10\x03\x12\x14\n\x10\x41\x42ORTING_BY_USER\x10\x04\x12\x16\n\x12\x41\x42ORTING_BY_SYSTEM\x10\x05\x12\x0c\n\x08RESUMING\x10\x06\x12\x0b\n\x07RUNNING\x10\x07\x12\r\n\tCOMPLETED\x10\x08\x12\x0e\n\nCOMPLETING\x10\x0c\x12\n\n\x06\x46\x41ILED\x10\t\x12\x0b\n\x07\x46\x41ILING\x10\r\x12\n\n\x06PAUSED\x10\x0b\x12\x0b\n\x07PAUSING\x10\nB\x08\n\x06\x61\x63tion\"\xc9\x01\n\nBriefQuery\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\'\n\x04meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x05 \x01(\x08\"\x19\n\tQueryPlan\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x18\n\x08QueryAst\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\t\"]\n\rResultSetMeta\x12\x1b\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x1c\n\nrows_count\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x11\n\ttruncated\x18\x03 \x01(\x08\"\x1c\n\rQueryTimeline\x12\x0b\n\x03svg\x18\x01 \x01(\t\"\xa7\x03\n\x05Query\x12\'\n\x04meta\x18\x01 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\'\n\x04plan\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x04 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x30\n\x0ftransient_issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\x12/\n\x08timeline\x18\t \x01(\x0b\x32\x1d.FederatedQuery.QueryTimeline\"\x1f\n\x0fQueryStatistics\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x8e\x02\n\x12\x43reateQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x04 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x43reateQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\".\n\x11\x43reateQueryResult\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x93\x04\n\x12ListQueriesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x39\n\x06\x66ilter\x18\x04 \x01(\x0b\x32).FederatedQuery.ListQueriesRequest.Filter\x1a\xcc\x02\n\x06\x46ilter\x12:\n\nquery_type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12?\n\x06status\x18\x02 \x03(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatusB\x06\x9a\xe6*\x02\x18\x14\x12\x31\n\x04mode\x18\x03 \x03(\x0e\x32\x1b.FederatedQuery.ExecuteModeB\x06\x9a\xe6*\x02\x18\x14\x12\x15\n\x04name\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x05 \x01(\x08\x12\x32\n\nvisibility\x18\x06 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x30\n\tautomatic\x18\x07 \x01(\x0e\x32\x1d.FederatedQuery.AutomaticType\"C\n\x13ListQueriesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"`\n\x11ListQueriesResult\x12)\n\x05query\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.BriefQuery\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"p\n\x14\x44\x65scribeQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"E\n\x15\x44\x65scribeQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\";\n\x13\x44\x65scribeQueryResult\x12$\n\x05query\x18\x01 \x01(\x0b\x32\x15.FederatedQuery.Query\"q\n\x15GetQueryStatusRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"F\n\x16GetQueryStatusResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"f\n\x14GetQueryStatusResult\x12\x37\n\x06status\x18\x01 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x15\n\rmeta_revision\x18\x02 \x01(\x03\"\xb5\x01\n\x12\x44\x65leteQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x44\x65leteQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x44\x65leteQueryResult\"\x8a\x03\n\x12ModifyQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12-\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x05 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12\x36\n\x0fstate_load_mode\x18\x06 \x01(\x0e\x32\x1d.FederatedQuery.StateLoadMode\x12#\n\x11previous_revision\x18\x07 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13ModifyQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11ModifyQueryResult\"\xe3\x01\n\x13\x43ontrolQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12+\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.QueryAction\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"D\n\x14\x43ontrolQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ontrolQueryResult\"\xed\x01\n\x08\x42riefJob\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x12\n\nquery_name\x18\t \x01(\t\x12\x32\n\nvisibility\x18\n \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x80\x05\n\x03Job\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x0c\n\x04text\x18\x02 \x01(\t\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\'\n\x04plan\x18\x04 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\x12\x12\n\nquery_name\x18\t \x01(\t\x12 \n\x03\x61\x63l\x18\n \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x06syntax\x18\r \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\x12\x37\n\nparameters\x18\x0e \x03(\x0b\x32#.FederatedQuery.Job.ParametersEntry\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x8c\x02\n\x0fListJobsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x10\n\x08query_id\x18\x05 \x01(\t\x12\x36\n\x06\x66ilter\x18\x04 \x01(\x0b\x32&.FederatedQuery.ListJobsRequest.Filter\x1a:\n\x06\x46ilter\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\"@\n\x10ListJobsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Y\n\x0eListJobsResult\x12%\n\x03job\x18\x01 \x03(\x0b\x32\x18.FederatedQuery.BriefJob\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"l\n\x12\x44\x65scribeJobRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\x06job_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"C\n\x13\x44\x65scribeJobResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"5\n\x11\x44\x65scribeJobResult\x12 \n\x03job\x18\x01 \x01(\x0b\x32\x13.FederatedQuery.Job\"\x15\n\x13\x43urrentIAMTokenAuth\"\n\n\x08NoneAuth\")\n\x12ServiceAccountAuth\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\'\n\tTokenAuth\x12\x1a\n\x05token\x18\x01 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\"\xe6\x01\n\x07IamAuth\x12:\n\x0b\x63urrent_iam\x18\x01 \x01(\x0b\x32#.FederatedQuery.CurrentIAMTokenAuthH\x00\x12=\n\x0fservice_account\x18\x02 \x01(\x0b\x32\".FederatedQuery.ServiceAccountAuthH\x00\x12(\n\x04none\x18\x03 \x01(\x0b\x32\x18.FederatedQuery.NoneAuthH\x00\x12*\n\x05token\x18\x04 \x01(\x0b\x32\x19.FederatedQuery.TokenAuthH\x00\x42\n\n\x08identity\"\xb0\x01\n\x0b\x44\x61taStreams\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\x12\x16\n\x0eshared_reading\x18\x06 \x01(\x08\"g\n\nMonitoring\x12\x18\n\x07project\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12\x18\n\x07\x63luster\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12%\n\x04\x61uth\x18\x03 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x98\x01\n\x0bYdbDatabase\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"\xf8\x01\n\x11\x43lickHouseCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"Y\n\x17ObjectStorageConnection\x12\x17\n\x06\x62ucket\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x91\x02\n\x11PostgreSQLCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x17\n\x06schema\x18\t \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"\xcb\x01\n\x10GreenplumCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x04 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x17\n\x06schema\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x06 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\xae\x01\n\x0cMySQLCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x04 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12%\n\x04\x61uth\x18\x05 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"C\n\x07Logging\x12\x11\n\tfolder_id\x18\x01 \x01(\t\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\xa4\x01\n\x10IcebergWarehouse\x12\x31\n\x02s3\x18\x01 \x01(\x0b\x32#.FederatedQuery.IcebergWarehouse.S3H\x00\x1aR\n\x02S3\x12\x1c\n\x06\x62ucket\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x88\x01\x01\x12\x1a\n\x04path\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x01\x88\x01\x01\x42\t\n\x07_bucketB\x07\n\x05_pathB\t\n\x07payload\"\xc0\x02\n\x0eIcebergCatalog\x12\x37\n\x06hadoop\x18\x01 \x01(\x0b\x32%.FederatedQuery.IcebergCatalog.HadoopH\x00\x12\x46\n\x0ehive_metastore\x18\x02 \x01(\x0b\x32,.FederatedQuery.IcebergCatalog.HiveMetastoreH\x00\x1a\x37\n\x06Hadoop\x12\x1f\n\tdirectory\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x88\x01\x01\x42\x0c\n\n_directory\x1ai\n\rHiveMetastore\x12\x19\n\x03uri\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x88\x01\x01\x12#\n\rdatabase_name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x01\x88\x01\x01\x42\x06\n\x04_uriB\x10\n\x0e_database_nameB\t\n\x07payload\"\xa0\x01\n\x07Iceberg\x12/\n\x0ewarehouse_auth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x33\n\twarehouse\x18\x03 \x01(\x0b\x32 .FederatedQuery.IcebergWarehouse\x12/\n\x07\x63\x61talog\x18\x04 \x01(\x0b\x32\x1e.FederatedQuery.IcebergCatalog\"\xc0\x06\n\x11\x43onnectionSetting\x12\x33\n\x0cydb_database\x18\x01 \x01(\x0b\x32\x1b.FederatedQuery.YdbDatabaseH\x00\x12?\n\x12\x63lickhouse_cluster\x18\x02 \x01(\x0b\x32!.FederatedQuery.ClickHouseClusterH\x00\x12\x33\n\x0c\x64\x61ta_streams\x18\x03 \x01(\x0b\x32\x1b.FederatedQuery.DataStreamsH\x00\x12\x41\n\x0eobject_storage\x18\x04 \x01(\x0b\x32\'.FederatedQuery.ObjectStorageConnectionH\x00\x12\x30\n\nmonitoring\x18\x05 \x01(\x0b\x32\x1a.FederatedQuery.MonitoringH\x00\x12?\n\x12postgresql_cluster\x18\x06 \x01(\x0b\x32!.FederatedQuery.PostgreSQLClusterH\x00\x12=\n\x11greenplum_cluster\x18\x07 \x01(\x0b\x32 .FederatedQuery.GreenplumClusterH\x00\x12\x35\n\rmysql_cluster\x18\x08 \x01(\x0b\x32\x1c.FederatedQuery.MySQLClusterH\x00\x12*\n\x07logging\x18\t \x01(\x0b\x32\x17.FederatedQuery.LoggingH\x00\x12*\n\x07iceberg\x18\n \x01(\x0b\x32\x17.FederatedQuery.IcebergH\x00\"\xed\x01\n\x0e\x43onnectionType\x12\x1f\n\x1b\x43ONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cYDB_DATABASE\x10\x01\x12\x16\n\x12\x43LICKHOUSE_CLUSTER\x10\x02\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x03\x12\x12\n\x0eOBJECT_STORAGE\x10\x04\x12\x0e\n\nMONITORING\x10\x05\x12\x16\n\x12POSTGRESQL_CLUSTER\x10\x06\x12\x15\n\x11GREENPLUM_CLUSTER\x10\x07\x12\x11\n\rMYSQL_CLUSTER\x10\x08\x12\x0b\n\x07LOGGING\x10\t\x12\x0b\n\x07ICEBERG\x10\nB\x0c\n\nconnection\"\xa2\x01\n\x11\x43onnectionContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"j\n\nConnection\x12\x32\n\x07\x63ontent\x18\x01 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xaa\x01\n\x17\x43reateConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x43reateConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"<\n\x16\x43reateConnectionResult\x12\"\n\rconnection_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\x84\x03\n\x16ListConnectionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12=\n\x06\x66ilter\x18\x04 \x01(\x0b\x32-.FederatedQuery.ListConnectionsRequest.Filter\x1a\xb5\x01\n\x06\x46ilter\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\x12I\n\x0f\x63onnection_type\x18\x03 \x01(\x0e\x32\x30.FederatedQuery.ConnectionSetting.ConnectionType\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"G\n\x17ListConnectionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"i\n\x15ListConnectionsResult\x12.\n\nconnection\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.Connection\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"z\n\x19\x44\x65scribeConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"J\n\x1a\x44\x65scribeConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"J\n\x18\x44\x65scribeConnectionResult\x12.\n\nconnection\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.Connection\"\xf3\x01\n\x17ModifyConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07\x63ontent\x18\x03 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18ModifyConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16ModifyConnectionResult\"\xbf\x01\n\x17\x44\x65leteConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x44\x65leteConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16\x44\x65leteConnectionResult\"\x86\x01\n\x15TestConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\"F\n\x16TestConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x16\n\x14TestConnectionResult\"\xcc\x01\n\x14GetResultDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\x10result_set_index\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12\x18\n\x06offset\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1c\n\x05limit\x18\x05 \x01(\x03\x42\r\xb2\xe6*\t[1; 1000]\"E\n\x15GetResultDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"9\n\x13GetResultDataResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\".\n\x06Schema\x12$\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.ColumnB\x07\x9a\xe6*\x03\x18\xe8\x07\"\xa2\x02\n\x12\x44\x61taStreamsBinding\x12 \n\x0bstream_name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x0b\x63ompression\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12U\n\x0e\x66ormat_setting\x18\x05 \x03(\x0b\x32\x35.FederatedQuery.DataStreamsBinding.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x92\x04\n\x14ObjectStorageBinding\x12;\n\x06subset\x18\x01 \x03(\x0b\x32+.FederatedQuery.ObjectStorageBinding.Subset\x1a\xbc\x03\n\x06Subset\x12!\n\x0cpath_pattern\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12^\n\x0e\x66ormat_setting\x18\x03 \x03(\x0b\x32>.FederatedQuery.ObjectStorageBinding.Subset.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x12\x1c\n\x0b\x63ompression\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x05 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12O\n\nprojection\x18\x06 \x03(\x0b\x32;.FederatedQuery.ObjectStorageBinding.Subset.ProjectionEntry\x12\x16\n\x0epartitioned_by\x18\x07 \x03(\t\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fProjectionEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xea\x01\n\x0e\x42indingSetting\x12:\n\x0c\x64\x61ta_streams\x18\x01 \x01(\x0b\x32\".FederatedQuery.DataStreamsBindingH\x00\x12>\n\x0eobject_storage\x18\x02 \x01(\x0b\x32$.FederatedQuery.ObjectStorageBindingH\x00\"Q\n\x0b\x42indingType\x12\x1c\n\x18\x42INDING_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x01\x12\x12\n\x0eOBJECT_STORAGE\x10\x02\x42\t\n\x07\x62inding\"\xe5\x01\n\x0c\x42riefBinding\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12(\n\x04meta\x18\x03 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x38\n\x04type\x18\x04 \x01(\x0e\x32*.FederatedQuery.BindingSetting.BindingType\x12\x32\n\nvisibility\x18\x05 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"\xc0\x01\n\x0e\x42indingContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07setting\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingSetting\x12 \n\x03\x61\x63l\x18\x04 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"d\n\x07\x42inding\x12/\n\x07\x63ontent\x18\x01 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xa4\x01\n\x14\x43reateBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12/\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x43reateBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"6\n\x13\x43reateBindingResult\x12\x1f\n\nbinding_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\xd3\x02\n\x13ListBindingsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12:\n\x06\x66ilter\x18\x04 \x01(\x0b\x32*.FederatedQuery.ListBindingsRequest.Filter\x1a\x8a\x01\n\x06\x46ilter\x12\x1e\n\rconnection_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x03 \x01(\x08\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"D\n\x14ListBindingsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"e\n\x12ListBindingsResult\x12-\n\x07\x62inding\x18\x01 \x03(\x0b\x32\x1c.FederatedQuery.BriefBinding\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"t\n\x16\x44\x65scribeBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"G\n\x17\x44\x65scribeBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"A\n\x15\x44\x65scribeBindingResult\x12(\n\x07\x62inding\x18\x01 \x01(\x0b\x32\x17.FederatedQuery.Binding\"\xea\x01\n\x14ModifyBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15ModifyBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13ModifyBindingResult\"\xb9\x01\n\x14\x44\x65leteBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x44\x65leteBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13\x44\x65leteBindingResult*q\n\x0b\x45xecuteMode\x12\x1c\n\x18\x45XECUTE_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04SAVE\x10\x01\x12\t\n\x05PARSE\x10\x02\x12\x0b\n\x07\x43OMPILE\x10\x03\x12\x0c\n\x08VALIDATE\x10\x04\x12\x0b\n\x07\x45XPLAIN\x10\x05\x12\x07\n\x03RUN\x10\x06*y\n\x0bQueryAction\x12\x1c\n\x18QUERY_ACTION_UNSPECIFIED\x10\x00\x12\t\n\x05PAUSE\x10\x01\x12\x14\n\x10PAUSE_GRACEFULLY\x10\x02\x12\t\n\x05\x41\x42ORT\x10\x03\x12\x14\n\x10\x41\x42ORT_GRACEFULLY\x10\x04\x12\n\n\x06RESUME\x10\x05*U\n\rStateLoadMode\x12\x1f\n\x1bSTATE_LOAD_MODE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45MPTY\x10\x01\x12\x18\n\x14\x46ROM_LAST_CHECKPOINT\x10\x02*Q\n\rAutomaticType\x12\x1e\n\x1a\x41UTOMATIC_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\x11\n\rNOT_AUTOMATIC\x10\x02\x42r\n$tech.ydb.proto.draft.federated.queryZGgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_FederatedQuery\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.protos.ydb_federated_query_pb2', globals()) @@ -44,6 +44,8 @@ _LIMITS.fields_by_name['memory_limit']._serialized_options = b'\262\346*\004>= 0' _QUERYCONTENT_EXECUTIONSETTINGSENTRY._options = None _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_options = b'8\001' + _QUERYCONTENT_PARAMETERSENTRY._options = None + _QUERYCONTENT_PARAMETERSENTRY._serialized_options = b'8\001' _QUERYCONTENT.fields_by_name['name']._options = None _QUERYCONTENT.fields_by_name['name']._serialized_options = b'\242\346*\003\030\200\010' _QUERYCONTENT.fields_by_name['text']._options = None @@ -52,6 +54,8 @@ _QUERYCONTENT.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200P' _QUERYCONTENT.fields_by_name['execution_settings']._options = None _QUERYCONTENT.fields_by_name['execution_settings']._serialized_options = b'\252\346*\010\n\006\n\004\010\001\020d\242\346*\003\030\200 ' + _QUERYCONTENT.fields_by_name['parameters']._options = None + _QUERYCONTENT.fields_by_name['parameters']._serialized_options = b'\252\346*\010\n\006\n\004\010\001\020d' _COMMONMETA.fields_by_name['id']._options = None _COMMONMETA.fields_by_name['id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' _COMMONMETA.fields_by_name['created_by']._options = None @@ -102,6 +106,8 @@ _CONTROLQUERYREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' _CONTROLQUERYREQUEST.fields_by_name['idempotency_key']._options = None _CONTROLQUERYREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _JOB_PARAMETERSENTRY._options = None + _JOB_PARAMETERSENTRY._serialized_options = b'8\001' _LISTJOBSREQUEST_FILTER.fields_by_name['query_id']._options = None _LISTJOBSREQUEST_FILTER.fields_by_name['query_id']._serialized_options = b'\242\346*\003\030\200\010' _LISTJOBSREQUEST.fields_by_name['page_token']._options = None @@ -114,6 +120,8 @@ _DESCRIBEJOBREQUEST.fields_by_name['job_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' _SERVICEACCOUNTAUTH.fields_by_name['id']._options = None _SERVICEACCOUNTAUTH.fields_by_name['id']._serialized_options = b'\242\346*\003\030\200\010' + _TOKENAUTH.fields_by_name['token']._options = None + _TOKENAUTH.fields_by_name['token']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' _DATASTREAMS.fields_by_name['database_id']._options = None _DATASTREAMS.fields_by_name['database_id']._serialized_options = b'\242\346*\003\030\200\010' _DATASTREAMS.fields_by_name['endpoint']._options = None @@ -158,6 +166,34 @@ _POSTGRESQLCLUSTER.fields_by_name['host']._serialized_options = b'\242\346*\003\030\200\010' _POSTGRESQLCLUSTER.fields_by_name['port']._options = None _POSTGRESQLCLUSTER.fields_by_name['port']._serialized_options = b'\262\346*\n[0; 65536]' + _GREENPLUMCLUSTER.fields_by_name['database_id']._options = None + _GREENPLUMCLUSTER.fields_by_name['database_id']._serialized_options = b'\242\346*\003\030\200\010' + _GREENPLUMCLUSTER.fields_by_name['database_name']._options = None + _GREENPLUMCLUSTER.fields_by_name['database_name']._serialized_options = b'\242\346*\003\030\200\010' + _GREENPLUMCLUSTER.fields_by_name['login']._options = None + _GREENPLUMCLUSTER.fields_by_name['login']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _GREENPLUMCLUSTER.fields_by_name['password']._options = None + _GREENPLUMCLUSTER.fields_by_name['password']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _GREENPLUMCLUSTER.fields_by_name['schema']._options = None + _GREENPLUMCLUSTER.fields_by_name['schema']._serialized_options = b'\242\346*\003\030\200\010' + _MYSQLCLUSTER.fields_by_name['database_id']._options = None + _MYSQLCLUSTER.fields_by_name['database_id']._serialized_options = b'\242\346*\003\030\200\010' + _MYSQLCLUSTER.fields_by_name['database_name']._options = None + _MYSQLCLUSTER.fields_by_name['database_name']._serialized_options = b'\242\346*\003\030\200\010' + _MYSQLCLUSTER.fields_by_name['login']._options = None + _MYSQLCLUSTER.fields_by_name['login']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _MYSQLCLUSTER.fields_by_name['password']._options = None + _MYSQLCLUSTER.fields_by_name['password']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _ICEBERGWAREHOUSE_S3.fields_by_name['bucket']._options = None + _ICEBERGWAREHOUSE_S3.fields_by_name['bucket']._serialized_options = b'\242\346*\003\030\200\010' + _ICEBERGWAREHOUSE_S3.fields_by_name['path']._options = None + _ICEBERGWAREHOUSE_S3.fields_by_name['path']._serialized_options = b'\242\346*\003\030\200\010' + _ICEBERGCATALOG_HADOOP.fields_by_name['directory']._options = None + _ICEBERGCATALOG_HADOOP.fields_by_name['directory']._serialized_options = b'\242\346*\003\030\200\010' + _ICEBERGCATALOG_HIVEMETASTORE.fields_by_name['uri']._options = None + _ICEBERGCATALOG_HIVEMETASTORE.fields_by_name['uri']._serialized_options = b'\242\346*\003\030\200\010' + _ICEBERGCATALOG_HIVEMETASTORE.fields_by_name['database_name']._options = None + _ICEBERGCATALOG_HIVEMETASTORE.fields_by_name['database_name']._serialized_options = b'\242\346*\003\030\200\010' _CONNECTIONCONTENT.fields_by_name['name']._options = None _CONNECTIONCONTENT.fields_by_name['name']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' _CONNECTIONCONTENT.fields_by_name['description']._options = None @@ -258,14 +294,14 @@ _DELETEBINDINGREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' _DELETEBINDINGREQUEST.fields_by_name['idempotency_key']._options = None _DELETEBINDINGREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' - _EXECUTEMODE._serialized_start=15700 - _EXECUTEMODE._serialized_end=15813 - _QUERYACTION._serialized_start=15815 - _QUERYACTION._serialized_end=15936 - _STATELOADMODE._serialized_start=15938 - _STATELOADMODE._serialized_end=16023 - _AUTOMATICTYPE._serialized_start=16025 - _AUTOMATICTYPE._serialized_end=16106 + _EXECUTEMODE._serialized_start=17540 + _EXECUTEMODE._serialized_end=17653 + _QUERYACTION._serialized_start=17655 + _QUERYACTION._serialized_end=17776 + _STATELOADMODE._serialized_start=17778 + _STATELOADMODE._serialized_end=17863 + _AUTOMATICTYPE._serialized_start=17865 + _AUTOMATICTYPE._serialized_end=17946 _ACL._serialized_start=309 _ACL._serialized_end=432 _ACL_VISIBILITY._serialized_start=368 @@ -281,219 +317,245 @@ _STREAMINGDISPOSITION_FROMLASTCHECKPOINT._serialized_start=1270 _STREAMINGDISPOSITION_FROMLASTCHECKPOINT._serialized_end=1305 _QUERYCONTENT._serialized_start=1323 - _QUERYCONTENT._serialized_end=1919 - _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_start=1727 - _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_end=1783 - _QUERYCONTENT_QUERYTYPE._serialized_start=1785 - _QUERYCONTENT_QUERYTYPE._serialized_end=1854 - _QUERYCONTENT_QUERYSYNTAX._serialized_start=1856 - _QUERYCONTENT_QUERYSYNTAX._serialized_end=1919 - _COMMONMETA._serialized_start=1922 - _COMMONMETA._serialized_end=2151 - _QUERYMETA._serialized_start=2154 - _QUERYMETA._serialized_end=2985 - _QUERYMETA_COMPUTESTATUS._serialized_start=2716 - _QUERYMETA_COMPUTESTATUS._serialized_end=2975 - _BRIEFQUERY._serialized_start=2988 - _BRIEFQUERY._serialized_end=3189 - _QUERYPLAN._serialized_start=3191 - _QUERYPLAN._serialized_end=3216 - _QUERYAST._serialized_start=3218 - _QUERYAST._serialized_end=3242 - _RESULTSETMETA._serialized_start=3244 - _RESULTSETMETA._serialized_end=3337 - _QUERY._serialized_start=3340 - _QUERY._serialized_end=3714 - _QUERYSTATISTICS._serialized_start=3716 - _QUERYSTATISTICS._serialized_end=3747 - _CREATEQUERYREQUEST._serialized_start=3750 - _CREATEQUERYREQUEST._serialized_end=4020 - _CREATEQUERYRESPONSE._serialized_start=4022 - _CREATEQUERYRESPONSE._serialized_end=4089 - _CREATEQUERYRESULT._serialized_start=4091 - _CREATEQUERYRESULT._serialized_end=4137 - _LISTQUERIESREQUEST._serialized_start=4140 - _LISTQUERIESREQUEST._serialized_end=4671 - _LISTQUERIESREQUEST_FILTER._serialized_start=4339 - _LISTQUERIESREQUEST_FILTER._serialized_end=4671 - _LISTQUERIESRESPONSE._serialized_start=4673 - _LISTQUERIESRESPONSE._serialized_end=4740 - _LISTQUERIESRESULT._serialized_start=4742 - _LISTQUERIESRESULT._serialized_end=4838 - _DESCRIBEQUERYREQUEST._serialized_start=4840 - _DESCRIBEQUERYREQUEST._serialized_end=4952 - _DESCRIBEQUERYRESPONSE._serialized_start=4954 - _DESCRIBEQUERYRESPONSE._serialized_end=5023 - _DESCRIBEQUERYRESULT._serialized_start=5025 - _DESCRIBEQUERYRESULT._serialized_end=5084 - _GETQUERYSTATUSREQUEST._serialized_start=5086 - _GETQUERYSTATUSREQUEST._serialized_end=5199 - _GETQUERYSTATUSRESPONSE._serialized_start=5201 - _GETQUERYSTATUSRESPONSE._serialized_end=5271 - _GETQUERYSTATUSRESULT._serialized_start=5273 - _GETQUERYSTATUSRESULT._serialized_end=5375 - _DELETEQUERYREQUEST._serialized_start=5378 - _DELETEQUERYREQUEST._serialized_end=5559 - _DELETEQUERYRESPONSE._serialized_start=5561 - _DELETEQUERYRESPONSE._serialized_end=5628 - _DELETEQUERYRESULT._serialized_start=5630 - _DELETEQUERYRESULT._serialized_end=5649 - _MODIFYQUERYREQUEST._serialized_start=5652 - _MODIFYQUERYREQUEST._serialized_end=6046 - _MODIFYQUERYRESPONSE._serialized_start=6048 - _MODIFYQUERYRESPONSE._serialized_end=6115 - _MODIFYQUERYRESULT._serialized_start=6117 - _MODIFYQUERYRESULT._serialized_end=6136 - _CONTROLQUERYREQUEST._serialized_start=6139 - _CONTROLQUERYREQUEST._serialized_end=6366 - _CONTROLQUERYRESPONSE._serialized_start=6368 - _CONTROLQUERYRESPONSE._serialized_end=6436 - _CONTROLQUERYRESULT._serialized_start=6438 - _CONTROLQUERYRESULT._serialized_end=6458 - _BRIEFJOB._serialized_start=6461 - _BRIEFJOB._serialized_end=6698 - _JOB._serialized_start=6701 - _JOB._serialized_end=7216 - _LISTJOBSREQUEST._serialized_start=7219 - _LISTJOBSREQUEST._serialized_end=7487 - _LISTJOBSREQUEST_FILTER._serialized_start=7429 - _LISTJOBSREQUEST_FILTER._serialized_end=7487 - _LISTJOBSRESPONSE._serialized_start=7489 - _LISTJOBSRESPONSE._serialized_end=7553 - _LISTJOBSRESULT._serialized_start=7555 - _LISTJOBSRESULT._serialized_end=7644 - _DESCRIBEJOBREQUEST._serialized_start=7646 - _DESCRIBEJOBREQUEST._serialized_end=7754 - _DESCRIBEJOBRESPONSE._serialized_start=7756 - _DESCRIBEJOBRESPONSE._serialized_end=7823 - _DESCRIBEJOBRESULT._serialized_start=7825 - _DESCRIBEJOBRESULT._serialized_end=7878 - _CURRENTIAMTOKENAUTH._serialized_start=7880 - _CURRENTIAMTOKENAUTH._serialized_end=7901 - _NONEAUTH._serialized_start=7903 - _NONEAUTH._serialized_end=7913 - _SERVICEACCOUNTAUTH._serialized_start=7915 - _SERVICEACCOUNTAUTH._serialized_end=7956 - _IAMAUTH._serialized_start=7959 - _IAMAUTH._serialized_end=8145 - _DATASTREAMS._serialized_start=8148 - _DATASTREAMS._serialized_end=8300 - _MONITORING._serialized_start=8302 - _MONITORING._serialized_end=8405 - _YDBDATABASE._serialized_start=8408 - _YDBDATABASE._serialized_end=8560 - _CLICKHOUSECLUSTER._serialized_start=8563 - _CLICKHOUSECLUSTER._serialized_end=8811 - _OBJECTSTORAGECONNECTION._serialized_start=8813 - _OBJECTSTORAGECONNECTION._serialized_end=8902 - _POSTGRESQLCLUSTER._serialized_start=8905 - _POSTGRESQLCLUSTER._serialized_end=9178 - _CONNECTIONSETTING._serialized_start=9181 - _CONNECTIONSETTING._serialized_end=9739 - _CONNECTIONSETTING_CONNECTIONTYPE._serialized_start=9556 - _CONNECTIONSETTING_CONNECTIONTYPE._serialized_end=9725 - _CONNECTIONCONTENT._serialized_start=9742 - _CONNECTIONCONTENT._serialized_end=9904 - _CONNECTION._serialized_start=9906 - _CONNECTION._serialized_end=10012 - _CREATECONNECTIONREQUEST._serialized_start=10015 - _CREATECONNECTIONREQUEST._serialized_end=10185 - _CREATECONNECTIONRESPONSE._serialized_start=10187 - _CREATECONNECTIONRESPONSE._serialized_end=10259 - _CREATECONNECTIONRESULT._serialized_start=10261 - _CREATECONNECTIONRESULT._serialized_end=10321 - _LISTCONNECTIONSREQUEST._serialized_start=10324 - _LISTCONNECTIONSREQUEST._serialized_end=10712 - _LISTCONNECTIONSREQUEST_FILTER._serialized_start=10531 - _LISTCONNECTIONSREQUEST_FILTER._serialized_end=10712 - _LISTCONNECTIONSRESPONSE._serialized_start=10714 - _LISTCONNECTIONSRESPONSE._serialized_end=10785 - _LISTCONNECTIONSRESULT._serialized_start=10787 - _LISTCONNECTIONSRESULT._serialized_end=10892 - _DESCRIBECONNECTIONREQUEST._serialized_start=10894 - _DESCRIBECONNECTIONREQUEST._serialized_end=11016 - _DESCRIBECONNECTIONRESPONSE._serialized_start=11018 - _DESCRIBECONNECTIONRESPONSE._serialized_end=11092 - _DESCRIBECONNECTIONRESULT._serialized_start=11094 - _DESCRIBECONNECTIONRESULT._serialized_end=11168 - _MODIFYCONNECTIONREQUEST._serialized_start=11171 - _MODIFYCONNECTIONREQUEST._serialized_end=11414 - _MODIFYCONNECTIONRESPONSE._serialized_start=11416 - _MODIFYCONNECTIONRESPONSE._serialized_end=11488 - _MODIFYCONNECTIONRESULT._serialized_start=11490 - _MODIFYCONNECTIONRESULT._serialized_end=11514 - _DELETECONNECTIONREQUEST._serialized_start=11517 - _DELETECONNECTIONREQUEST._serialized_end=11708 - _DELETECONNECTIONRESPONSE._serialized_start=11710 - _DELETECONNECTIONRESPONSE._serialized_end=11782 - _DELETECONNECTIONRESULT._serialized_start=11784 - _DELETECONNECTIONRESULT._serialized_end=11808 - _TESTCONNECTIONREQUEST._serialized_start=11811 - _TESTCONNECTIONREQUEST._serialized_end=11945 - _TESTCONNECTIONRESPONSE._serialized_start=11947 - _TESTCONNECTIONRESPONSE._serialized_end=12017 - _TESTCONNECTIONRESULT._serialized_start=12019 - _TESTCONNECTIONRESULT._serialized_end=12041 - _GETRESULTDATAREQUEST._serialized_start=12044 - _GETRESULTDATAREQUEST._serialized_end=12248 - _GETRESULTDATARESPONSE._serialized_start=12250 - _GETRESULTDATARESPONSE._serialized_end=12319 - _GETRESULTDATARESULT._serialized_start=12321 - _GETRESULTDATARESULT._serialized_end=12378 - _SCHEMA._serialized_start=12380 - _SCHEMA._serialized_end=12426 - _DATASTREAMSBINDING._serialized_start=12429 - _DATASTREAMSBINDING._serialized_end=12719 - _DATASTREAMSBINDING_FORMATSETTINGENTRY._serialized_start=12667 - _DATASTREAMSBINDING_FORMATSETTINGENTRY._serialized_end=12719 - _OBJECTSTORAGEBINDING._serialized_start=12722 - _OBJECTSTORAGEBINDING._serialized_end=13252 - _OBJECTSTORAGEBINDING_SUBSET._serialized_start=12808 - _OBJECTSTORAGEBINDING_SUBSET._serialized_end=13252 - _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._serialized_start=12667 - _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._serialized_end=12719 - _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._serialized_start=13203 - _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._serialized_end=13252 - _BINDINGSETTING._serialized_start=13255 - _BINDINGSETTING._serialized_end=13489 - _BINDINGSETTING_BINDINGTYPE._serialized_start=13397 - _BINDINGSETTING_BINDINGTYPE._serialized_end=13478 - _BRIEFBINDING._serialized_start=13492 - _BRIEFBINDING._serialized_end=13721 - _BINDINGCONTENT._serialized_start=13724 - _BINDINGCONTENT._serialized_end=13916 - _BINDING._serialized_start=13918 - _BINDING._serialized_end=14018 - _CREATEBINDINGREQUEST._serialized_start=14021 - _CREATEBINDINGREQUEST._serialized_end=14185 - _CREATEBINDINGRESPONSE._serialized_start=14187 - _CREATEBINDINGRESPONSE._serialized_end=14256 - _CREATEBINDINGRESULT._serialized_start=14258 - _CREATEBINDINGRESULT._serialized_end=14312 - _LISTBINDINGSREQUEST._serialized_start=14315 - _LISTBINDINGSREQUEST._serialized_end=14654 - _LISTBINDINGSREQUEST_FILTER._serialized_start=14516 - _LISTBINDINGSREQUEST_FILTER._serialized_end=14654 - _LISTBINDINGSRESPONSE._serialized_start=14656 - _LISTBINDINGSRESPONSE._serialized_end=14724 - _LISTBINDINGSRESULT._serialized_start=14726 - _LISTBINDINGSRESULT._serialized_end=14827 - _DESCRIBEBINDINGREQUEST._serialized_start=14829 - _DESCRIBEBINDINGREQUEST._serialized_end=14945 - _DESCRIBEBINDINGRESPONSE._serialized_start=14947 - _DESCRIBEBINDINGRESPONSE._serialized_end=15018 - _DESCRIBEBINDINGRESULT._serialized_start=15020 - _DESCRIBEBINDINGRESULT._serialized_end=15085 - _MODIFYBINDINGREQUEST._serialized_start=15088 - _MODIFYBINDINGREQUEST._serialized_end=15322 - _MODIFYBINDINGRESPONSE._serialized_start=15324 - _MODIFYBINDINGRESPONSE._serialized_end=15393 - _MODIFYBINDINGRESULT._serialized_start=15395 - _MODIFYBINDINGRESULT._serialized_end=15416 - _DELETEBINDINGREQUEST._serialized_start=15419 - _DELETEBINDINGREQUEST._serialized_end=15604 - _DELETEBINDINGRESPONSE._serialized_start=15606 - _DELETEBINDINGRESPONSE._serialized_end=15675 - _DELETEBINDINGRESULT._serialized_start=15677 - _DELETEBINDINGRESULT._serialized_end=15698 + _QUERYCONTENT._serialized_end=2067 + _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_start=1807 + _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_end=1863 + _QUERYCONTENT_PARAMETERSENTRY._serialized_start=1865 + _QUERYCONTENT_PARAMETERSENTRY._serialized_end=1931 + _QUERYCONTENT_QUERYTYPE._serialized_start=1933 + _QUERYCONTENT_QUERYTYPE._serialized_end=2002 + _QUERYCONTENT_QUERYSYNTAX._serialized_start=2004 + _QUERYCONTENT_QUERYSYNTAX._serialized_end=2067 + _COMMONMETA._serialized_start=2070 + _COMMONMETA._serialized_end=2299 + _QUERYMETA._serialized_start=2302 + _QUERYMETA._serialized_end=3133 + _QUERYMETA_COMPUTESTATUS._serialized_start=2864 + _QUERYMETA_COMPUTESTATUS._serialized_end=3123 + _BRIEFQUERY._serialized_start=3136 + _BRIEFQUERY._serialized_end=3337 + _QUERYPLAN._serialized_start=3339 + _QUERYPLAN._serialized_end=3364 + _QUERYAST._serialized_start=3366 + _QUERYAST._serialized_end=3390 + _RESULTSETMETA._serialized_start=3392 + _RESULTSETMETA._serialized_end=3485 + _QUERYTIMELINE._serialized_start=3487 + _QUERYTIMELINE._serialized_end=3515 + _QUERY._serialized_start=3518 + _QUERY._serialized_end=3941 + _QUERYSTATISTICS._serialized_start=3943 + _QUERYSTATISTICS._serialized_end=3974 + _CREATEQUERYREQUEST._serialized_start=3977 + _CREATEQUERYREQUEST._serialized_end=4247 + _CREATEQUERYRESPONSE._serialized_start=4249 + _CREATEQUERYRESPONSE._serialized_end=4316 + _CREATEQUERYRESULT._serialized_start=4318 + _CREATEQUERYRESULT._serialized_end=4364 + _LISTQUERIESREQUEST._serialized_start=4367 + _LISTQUERIESREQUEST._serialized_end=4898 + _LISTQUERIESREQUEST_FILTER._serialized_start=4566 + _LISTQUERIESREQUEST_FILTER._serialized_end=4898 + _LISTQUERIESRESPONSE._serialized_start=4900 + _LISTQUERIESRESPONSE._serialized_end=4967 + _LISTQUERIESRESULT._serialized_start=4969 + _LISTQUERIESRESULT._serialized_end=5065 + _DESCRIBEQUERYREQUEST._serialized_start=5067 + _DESCRIBEQUERYREQUEST._serialized_end=5179 + _DESCRIBEQUERYRESPONSE._serialized_start=5181 + _DESCRIBEQUERYRESPONSE._serialized_end=5250 + _DESCRIBEQUERYRESULT._serialized_start=5252 + _DESCRIBEQUERYRESULT._serialized_end=5311 + _GETQUERYSTATUSREQUEST._serialized_start=5313 + _GETQUERYSTATUSREQUEST._serialized_end=5426 + _GETQUERYSTATUSRESPONSE._serialized_start=5428 + _GETQUERYSTATUSRESPONSE._serialized_end=5498 + _GETQUERYSTATUSRESULT._serialized_start=5500 + _GETQUERYSTATUSRESULT._serialized_end=5602 + _DELETEQUERYREQUEST._serialized_start=5605 + _DELETEQUERYREQUEST._serialized_end=5786 + _DELETEQUERYRESPONSE._serialized_start=5788 + _DELETEQUERYRESPONSE._serialized_end=5855 + _DELETEQUERYRESULT._serialized_start=5857 + _DELETEQUERYRESULT._serialized_end=5876 + _MODIFYQUERYREQUEST._serialized_start=5879 + _MODIFYQUERYREQUEST._serialized_end=6273 + _MODIFYQUERYRESPONSE._serialized_start=6275 + _MODIFYQUERYRESPONSE._serialized_end=6342 + _MODIFYQUERYRESULT._serialized_start=6344 + _MODIFYQUERYRESULT._serialized_end=6363 + _CONTROLQUERYREQUEST._serialized_start=6366 + _CONTROLQUERYREQUEST._serialized_end=6593 + _CONTROLQUERYRESPONSE._serialized_start=6595 + _CONTROLQUERYRESPONSE._serialized_end=6663 + _CONTROLQUERYRESULT._serialized_start=6665 + _CONTROLQUERYRESULT._serialized_end=6685 + _BRIEFJOB._serialized_start=6688 + _BRIEFJOB._serialized_end=6925 + _JOB._serialized_start=6928 + _JOB._serialized_end=7568 + _JOB_PARAMETERSENTRY._serialized_start=1865 + _JOB_PARAMETERSENTRY._serialized_end=1931 + _LISTJOBSREQUEST._serialized_start=7571 + _LISTJOBSREQUEST._serialized_end=7839 + _LISTJOBSREQUEST_FILTER._serialized_start=7781 + _LISTJOBSREQUEST_FILTER._serialized_end=7839 + _LISTJOBSRESPONSE._serialized_start=7841 + _LISTJOBSRESPONSE._serialized_end=7905 + _LISTJOBSRESULT._serialized_start=7907 + _LISTJOBSRESULT._serialized_end=7996 + _DESCRIBEJOBREQUEST._serialized_start=7998 + _DESCRIBEJOBREQUEST._serialized_end=8106 + _DESCRIBEJOBRESPONSE._serialized_start=8108 + _DESCRIBEJOBRESPONSE._serialized_end=8175 + _DESCRIBEJOBRESULT._serialized_start=8177 + _DESCRIBEJOBRESULT._serialized_end=8230 + _CURRENTIAMTOKENAUTH._serialized_start=8232 + _CURRENTIAMTOKENAUTH._serialized_end=8253 + _NONEAUTH._serialized_start=8255 + _NONEAUTH._serialized_end=8265 + _SERVICEACCOUNTAUTH._serialized_start=8267 + _SERVICEACCOUNTAUTH._serialized_end=8308 + _TOKENAUTH._serialized_start=8310 + _TOKENAUTH._serialized_end=8349 + _IAMAUTH._serialized_start=8352 + _IAMAUTH._serialized_end=8582 + _DATASTREAMS._serialized_start=8585 + _DATASTREAMS._serialized_end=8761 + _MONITORING._serialized_start=8763 + _MONITORING._serialized_end=8866 + _YDBDATABASE._serialized_start=8869 + _YDBDATABASE._serialized_end=9021 + _CLICKHOUSECLUSTER._serialized_start=9024 + _CLICKHOUSECLUSTER._serialized_end=9272 + _OBJECTSTORAGECONNECTION._serialized_start=9274 + _OBJECTSTORAGECONNECTION._serialized_end=9363 + _POSTGRESQLCLUSTER._serialized_start=9366 + _POSTGRESQLCLUSTER._serialized_end=9639 + _GREENPLUMCLUSTER._serialized_start=9642 + _GREENPLUMCLUSTER._serialized_end=9845 + _MYSQLCLUSTER._serialized_start=9848 + _MYSQLCLUSTER._serialized_end=10022 + _LOGGING._serialized_start=10024 + _LOGGING._serialized_end=10091 + _ICEBERGWAREHOUSE._serialized_start=10094 + _ICEBERGWAREHOUSE._serialized_end=10258 + _ICEBERGWAREHOUSE_S3._serialized_start=10165 + _ICEBERGWAREHOUSE_S3._serialized_end=10247 + _ICEBERGCATALOG._serialized_start=10261 + _ICEBERGCATALOG._serialized_end=10581 + _ICEBERGCATALOG_HADOOP._serialized_start=10408 + _ICEBERGCATALOG_HADOOP._serialized_end=10463 + _ICEBERGCATALOG_HIVEMETASTORE._serialized_start=10465 + _ICEBERGCATALOG_HIVEMETASTORE._serialized_end=10570 + _ICEBERG._serialized_start=10584 + _ICEBERG._serialized_end=10744 + _CONNECTIONSETTING._serialized_start=10747 + _CONNECTIONSETTING._serialized_end=11579 + _CONNECTIONSETTING_CONNECTIONTYPE._serialized_start=11328 + _CONNECTIONSETTING_CONNECTIONTYPE._serialized_end=11565 + _CONNECTIONCONTENT._serialized_start=11582 + _CONNECTIONCONTENT._serialized_end=11744 + _CONNECTION._serialized_start=11746 + _CONNECTION._serialized_end=11852 + _CREATECONNECTIONREQUEST._serialized_start=11855 + _CREATECONNECTIONREQUEST._serialized_end=12025 + _CREATECONNECTIONRESPONSE._serialized_start=12027 + _CREATECONNECTIONRESPONSE._serialized_end=12099 + _CREATECONNECTIONRESULT._serialized_start=12101 + _CREATECONNECTIONRESULT._serialized_end=12161 + _LISTCONNECTIONSREQUEST._serialized_start=12164 + _LISTCONNECTIONSREQUEST._serialized_end=12552 + _LISTCONNECTIONSREQUEST_FILTER._serialized_start=12371 + _LISTCONNECTIONSREQUEST_FILTER._serialized_end=12552 + _LISTCONNECTIONSRESPONSE._serialized_start=12554 + _LISTCONNECTIONSRESPONSE._serialized_end=12625 + _LISTCONNECTIONSRESULT._serialized_start=12627 + _LISTCONNECTIONSRESULT._serialized_end=12732 + _DESCRIBECONNECTIONREQUEST._serialized_start=12734 + _DESCRIBECONNECTIONREQUEST._serialized_end=12856 + _DESCRIBECONNECTIONRESPONSE._serialized_start=12858 + _DESCRIBECONNECTIONRESPONSE._serialized_end=12932 + _DESCRIBECONNECTIONRESULT._serialized_start=12934 + _DESCRIBECONNECTIONRESULT._serialized_end=13008 + _MODIFYCONNECTIONREQUEST._serialized_start=13011 + _MODIFYCONNECTIONREQUEST._serialized_end=13254 + _MODIFYCONNECTIONRESPONSE._serialized_start=13256 + _MODIFYCONNECTIONRESPONSE._serialized_end=13328 + _MODIFYCONNECTIONRESULT._serialized_start=13330 + _MODIFYCONNECTIONRESULT._serialized_end=13354 + _DELETECONNECTIONREQUEST._serialized_start=13357 + _DELETECONNECTIONREQUEST._serialized_end=13548 + _DELETECONNECTIONRESPONSE._serialized_start=13550 + _DELETECONNECTIONRESPONSE._serialized_end=13622 + _DELETECONNECTIONRESULT._serialized_start=13624 + _DELETECONNECTIONRESULT._serialized_end=13648 + _TESTCONNECTIONREQUEST._serialized_start=13651 + _TESTCONNECTIONREQUEST._serialized_end=13785 + _TESTCONNECTIONRESPONSE._serialized_start=13787 + _TESTCONNECTIONRESPONSE._serialized_end=13857 + _TESTCONNECTIONRESULT._serialized_start=13859 + _TESTCONNECTIONRESULT._serialized_end=13881 + _GETRESULTDATAREQUEST._serialized_start=13884 + _GETRESULTDATAREQUEST._serialized_end=14088 + _GETRESULTDATARESPONSE._serialized_start=14090 + _GETRESULTDATARESPONSE._serialized_end=14159 + _GETRESULTDATARESULT._serialized_start=14161 + _GETRESULTDATARESULT._serialized_end=14218 + _SCHEMA._serialized_start=14220 + _SCHEMA._serialized_end=14266 + _DATASTREAMSBINDING._serialized_start=14269 + _DATASTREAMSBINDING._serialized_end=14559 + _DATASTREAMSBINDING_FORMATSETTINGENTRY._serialized_start=14507 + _DATASTREAMSBINDING_FORMATSETTINGENTRY._serialized_end=14559 + _OBJECTSTORAGEBINDING._serialized_start=14562 + _OBJECTSTORAGEBINDING._serialized_end=15092 + _OBJECTSTORAGEBINDING_SUBSET._serialized_start=14648 + _OBJECTSTORAGEBINDING_SUBSET._serialized_end=15092 + _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._serialized_start=14507 + _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._serialized_end=14559 + _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._serialized_start=15043 + _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._serialized_end=15092 + _BINDINGSETTING._serialized_start=15095 + _BINDINGSETTING._serialized_end=15329 + _BINDINGSETTING_BINDINGTYPE._serialized_start=15237 + _BINDINGSETTING_BINDINGTYPE._serialized_end=15318 + _BRIEFBINDING._serialized_start=15332 + _BRIEFBINDING._serialized_end=15561 + _BINDINGCONTENT._serialized_start=15564 + _BINDINGCONTENT._serialized_end=15756 + _BINDING._serialized_start=15758 + _BINDING._serialized_end=15858 + _CREATEBINDINGREQUEST._serialized_start=15861 + _CREATEBINDINGREQUEST._serialized_end=16025 + _CREATEBINDINGRESPONSE._serialized_start=16027 + _CREATEBINDINGRESPONSE._serialized_end=16096 + _CREATEBINDINGRESULT._serialized_start=16098 + _CREATEBINDINGRESULT._serialized_end=16152 + _LISTBINDINGSREQUEST._serialized_start=16155 + _LISTBINDINGSREQUEST._serialized_end=16494 + _LISTBINDINGSREQUEST_FILTER._serialized_start=16356 + _LISTBINDINGSREQUEST_FILTER._serialized_end=16494 + _LISTBINDINGSRESPONSE._serialized_start=16496 + _LISTBINDINGSRESPONSE._serialized_end=16564 + _LISTBINDINGSRESULT._serialized_start=16566 + _LISTBINDINGSRESULT._serialized_end=16667 + _DESCRIBEBINDINGREQUEST._serialized_start=16669 + _DESCRIBEBINDINGREQUEST._serialized_end=16785 + _DESCRIBEBINDINGRESPONSE._serialized_start=16787 + _DESCRIBEBINDINGRESPONSE._serialized_end=16858 + _DESCRIBEBINDINGRESULT._serialized_start=16860 + _DESCRIBEBINDINGRESULT._serialized_end=16925 + _MODIFYBINDINGREQUEST._serialized_start=16928 + _MODIFYBINDINGREQUEST._serialized_end=17162 + _MODIFYBINDINGRESPONSE._serialized_start=17164 + _MODIFYBINDINGRESPONSE._serialized_end=17233 + _MODIFYBINDINGRESULT._serialized_start=17235 + _MODIFYBINDINGRESULT._serialized_end=17256 + _DELETEBINDINGREQUEST._serialized_start=17259 + _DELETEBINDINGREQUEST._serialized_end=17444 + _DELETEBINDINGRESPONSE._serialized_start=17446 + _DELETEBINDINGRESPONSE._serialized_end=17515 + _DELETEBINDINGRESULT._serialized_start=17517 + _DELETEBINDINGRESULT._serialized_end=17538 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.pyi b/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.pyi index bc950b0a..008977fc 100644 --- a/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.pyi +++ b/ydb/_grpc/v4/draft/protos/ydb_federated_query_pb2.pyi @@ -180,7 +180,7 @@ class ConnectionContent(_message.Message): def __init__(self, name: _Optional[str] = ..., setting: _Optional[_Union[ConnectionSetting, _Mapping]] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., description: _Optional[str] = ...) -> None: ... class ConnectionSetting(_message.Message): - __slots__ = ["clickhouse_cluster", "data_streams", "monitoring", "object_storage", "postgresql_cluster", "ydb_database"] + __slots__ = ["clickhouse_cluster", "data_streams", "greenplum_cluster", "iceberg", "logging", "monitoring", "mysql_cluster", "object_storage", "postgresql_cluster", "ydb_database"] class ConnectionType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] CLICKHOUSE_CLUSTER: ConnectionSetting.ConnectionType @@ -188,8 +188,16 @@ class ConnectionSetting(_message.Message): CONNECTION_TYPE_UNSPECIFIED: ConnectionSetting.ConnectionType DATA_STREAMS: ConnectionSetting.ConnectionType DATA_STREAMS_FIELD_NUMBER: _ClassVar[int] + GREENPLUM_CLUSTER: ConnectionSetting.ConnectionType + GREENPLUM_CLUSTER_FIELD_NUMBER: _ClassVar[int] + ICEBERG: ConnectionSetting.ConnectionType + ICEBERG_FIELD_NUMBER: _ClassVar[int] + LOGGING: ConnectionSetting.ConnectionType + LOGGING_FIELD_NUMBER: _ClassVar[int] MONITORING: ConnectionSetting.ConnectionType MONITORING_FIELD_NUMBER: _ClassVar[int] + MYSQL_CLUSTER: ConnectionSetting.ConnectionType + MYSQL_CLUSTER_FIELD_NUMBER: _ClassVar[int] OBJECT_STORAGE: ConnectionSetting.ConnectionType OBJECT_STORAGE_FIELD_NUMBER: _ClassVar[int] POSTGRESQL_CLUSTER: ConnectionSetting.ConnectionType @@ -198,11 +206,15 @@ class ConnectionSetting(_message.Message): YDB_DATABASE_FIELD_NUMBER: _ClassVar[int] clickhouse_cluster: ClickHouseCluster data_streams: DataStreams + greenplum_cluster: GreenplumCluster + iceberg: Iceberg + logging: Logging monitoring: Monitoring + mysql_cluster: MySQLCluster object_storage: ObjectStorageConnection postgresql_cluster: PostgreSQLCluster ydb_database: YdbDatabase - def __init__(self, ydb_database: _Optional[_Union[YdbDatabase, _Mapping]] = ..., clickhouse_cluster: _Optional[_Union[ClickHouseCluster, _Mapping]] = ..., data_streams: _Optional[_Union[DataStreams, _Mapping]] = ..., object_storage: _Optional[_Union[ObjectStorageConnection, _Mapping]] = ..., monitoring: _Optional[_Union[Monitoring, _Mapping]] = ..., postgresql_cluster: _Optional[_Union[PostgreSQLCluster, _Mapping]] = ...) -> None: ... + def __init__(self, ydb_database: _Optional[_Union[YdbDatabase, _Mapping]] = ..., clickhouse_cluster: _Optional[_Union[ClickHouseCluster, _Mapping]] = ..., data_streams: _Optional[_Union[DataStreams, _Mapping]] = ..., object_storage: _Optional[_Union[ObjectStorageConnection, _Mapping]] = ..., monitoring: _Optional[_Union[Monitoring, _Mapping]] = ..., postgresql_cluster: _Optional[_Union[PostgreSQLCluster, _Mapping]] = ..., greenplum_cluster: _Optional[_Union[GreenplumCluster, _Mapping]] = ..., mysql_cluster: _Optional[_Union[MySQLCluster, _Mapping]] = ..., logging: _Optional[_Union[Logging, _Mapping]] = ..., iceberg: _Optional[_Union[Iceberg, _Mapping]] = ...) -> None: ... class ControlQueryRequest(_message.Message): __slots__ = ["action", "idempotency_key", "operation_params", "previous_revision", "query_id"] @@ -303,18 +315,20 @@ class CurrentIAMTokenAuth(_message.Message): def __init__(self) -> None: ... class DataStreams(_message.Message): - __slots__ = ["auth", "database", "database_id", "endpoint", "secure"] + __slots__ = ["auth", "database", "database_id", "endpoint", "secure", "shared_reading"] AUTH_FIELD_NUMBER: _ClassVar[int] DATABASE_FIELD_NUMBER: _ClassVar[int] DATABASE_ID_FIELD_NUMBER: _ClassVar[int] ENDPOINT_FIELD_NUMBER: _ClassVar[int] SECURE_FIELD_NUMBER: _ClassVar[int] + SHARED_READING_FIELD_NUMBER: _ClassVar[int] auth: IamAuth database: str database_id: str endpoint: str secure: bool - def __init__(self, database_id: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ..., endpoint: _Optional[str] = ..., database: _Optional[str] = ..., secure: bool = ...) -> None: ... + shared_reading: bool + def __init__(self, database_id: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ..., endpoint: _Optional[str] = ..., database: _Optional[str] = ..., secure: bool = ..., shared_reading: bool = ...) -> None: ... class DataStreamsBinding(_message.Message): __slots__ = ["compression", "format", "format_setting", "schema", "stream_name"] @@ -531,24 +545,93 @@ class GetResultDataResult(_message.Message): result_set: _ydb_value_pb2.ResultSet def __init__(self, result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ...) -> None: ... +class GreenplumCluster(_message.Message): + __slots__ = ["auth", "database_id", "database_name", "login", "password", "schema"] + AUTH_FIELD_NUMBER: _ClassVar[int] + DATABASE_ID_FIELD_NUMBER: _ClassVar[int] + DATABASE_NAME_FIELD_NUMBER: _ClassVar[int] + LOGIN_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + SCHEMA_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + database_id: str + database_name: str + login: str + password: str + schema: str + def __init__(self, database_id: _Optional[str] = ..., database_name: _Optional[str] = ..., login: _Optional[str] = ..., password: _Optional[str] = ..., schema: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ...) -> None: ... + class IamAuth(_message.Message): - __slots__ = ["current_iam", "none", "service_account"] + __slots__ = ["current_iam", "none", "service_account", "token"] CURRENT_IAM_FIELD_NUMBER: _ClassVar[int] NONE_FIELD_NUMBER: _ClassVar[int] SERVICE_ACCOUNT_FIELD_NUMBER: _ClassVar[int] + TOKEN_FIELD_NUMBER: _ClassVar[int] current_iam: CurrentIAMTokenAuth none: NoneAuth service_account: ServiceAccountAuth - def __init__(self, current_iam: _Optional[_Union[CurrentIAMTokenAuth, _Mapping]] = ..., service_account: _Optional[_Union[ServiceAccountAuth, _Mapping]] = ..., none: _Optional[_Union[NoneAuth, _Mapping]] = ...) -> None: ... + token: TokenAuth + def __init__(self, current_iam: _Optional[_Union[CurrentIAMTokenAuth, _Mapping]] = ..., service_account: _Optional[_Union[ServiceAccountAuth, _Mapping]] = ..., none: _Optional[_Union[NoneAuth, _Mapping]] = ..., token: _Optional[_Union[TokenAuth, _Mapping]] = ...) -> None: ... + +class Iceberg(_message.Message): + __slots__ = ["catalog", "warehouse", "warehouse_auth"] + CATALOG_FIELD_NUMBER: _ClassVar[int] + WAREHOUSE_AUTH_FIELD_NUMBER: _ClassVar[int] + WAREHOUSE_FIELD_NUMBER: _ClassVar[int] + catalog: IcebergCatalog + warehouse: IcebergWarehouse + warehouse_auth: IamAuth + def __init__(self, warehouse_auth: _Optional[_Union[IamAuth, _Mapping]] = ..., warehouse: _Optional[_Union[IcebergWarehouse, _Mapping]] = ..., catalog: _Optional[_Union[IcebergCatalog, _Mapping]] = ...) -> None: ... + +class IcebergCatalog(_message.Message): + __slots__ = ["hadoop", "hive_metastore"] + class Hadoop(_message.Message): + __slots__ = ["directory"] + DIRECTORY_FIELD_NUMBER: _ClassVar[int] + directory: str + def __init__(self, directory: _Optional[str] = ...) -> None: ... + class HiveMetastore(_message.Message): + __slots__ = ["database_name", "uri"] + DATABASE_NAME_FIELD_NUMBER: _ClassVar[int] + URI_FIELD_NUMBER: _ClassVar[int] + database_name: str + uri: str + def __init__(self, uri: _Optional[str] = ..., database_name: _Optional[str] = ...) -> None: ... + HADOOP_FIELD_NUMBER: _ClassVar[int] + HIVE_METASTORE_FIELD_NUMBER: _ClassVar[int] + hadoop: IcebergCatalog.Hadoop + hive_metastore: IcebergCatalog.HiveMetastore + def __init__(self, hadoop: _Optional[_Union[IcebergCatalog.Hadoop, _Mapping]] = ..., hive_metastore: _Optional[_Union[IcebergCatalog.HiveMetastore, _Mapping]] = ...) -> None: ... + +class IcebergWarehouse(_message.Message): + __slots__ = ["s3"] + class S3(_message.Message): + __slots__ = ["bucket", "path"] + BUCKET_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + bucket: str + path: str + def __init__(self, bucket: _Optional[str] = ..., path: _Optional[str] = ...) -> None: ... + S3_FIELD_NUMBER: _ClassVar[int] + s3: IcebergWarehouse.S3 + def __init__(self, s3: _Optional[_Union[IcebergWarehouse.S3, _Mapping]] = ...) -> None: ... class Job(_message.Message): - __slots__ = ["acl", "ast", "automatic", "expire_at", "issue", "meta", "plan", "query_meta", "query_name", "result_set_meta", "statistics", "syntax", "text"] + __slots__ = ["acl", "ast", "automatic", "expire_at", "issue", "meta", "parameters", "plan", "query_meta", "query_name", "result_set_meta", "statistics", "syntax", "text"] + class ParametersEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: _ydb_value_pb2.TypedValue + def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... ACL_FIELD_NUMBER: _ClassVar[int] AST_FIELD_NUMBER: _ClassVar[int] AUTOMATIC_FIELD_NUMBER: _ClassVar[int] EXPIRE_AT_FIELD_NUMBER: _ClassVar[int] ISSUE_FIELD_NUMBER: _ClassVar[int] META_FIELD_NUMBER: _ClassVar[int] + PARAMETERS_FIELD_NUMBER: _ClassVar[int] PLAN_FIELD_NUMBER: _ClassVar[int] QUERY_META_FIELD_NUMBER: _ClassVar[int] QUERY_NAME_FIELD_NUMBER: _ClassVar[int] @@ -562,6 +645,7 @@ class Job(_message.Message): expire_at: _timestamp_pb2.Timestamp issue: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] meta: CommonMeta + parameters: _containers.MessageMap[str, _ydb_value_pb2.TypedValue] plan: QueryPlan query_meta: QueryMeta query_name: str @@ -569,7 +653,7 @@ class Job(_message.Message): statistics: QueryStatistics syntax: QueryContent.QuerySyntax text: str - def __init__(self, meta: _Optional[_Union[CommonMeta, _Mapping]] = ..., text: _Optional[str] = ..., query_meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., plan: _Optional[_Union[QueryPlan, _Mapping]] = ..., issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., statistics: _Optional[_Union[QueryStatistics, _Mapping]] = ..., result_set_meta: _Optional[_Iterable[_Union[ResultSetMeta, _Mapping]]] = ..., ast: _Optional[_Union[QueryAst, _Mapping]] = ..., query_name: _Optional[str] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., automatic: bool = ..., expire_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., syntax: _Optional[_Union[QueryContent.QuerySyntax, str]] = ...) -> None: ... + def __init__(self, meta: _Optional[_Union[CommonMeta, _Mapping]] = ..., text: _Optional[str] = ..., query_meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., plan: _Optional[_Union[QueryPlan, _Mapping]] = ..., issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., statistics: _Optional[_Union[QueryStatistics, _Mapping]] = ..., result_set_meta: _Optional[_Iterable[_Union[ResultSetMeta, _Mapping]]] = ..., ast: _Optional[_Union[QueryAst, _Mapping]] = ..., query_name: _Optional[str] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., automatic: bool = ..., expire_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., syntax: _Optional[_Union[QueryContent.QuerySyntax, str]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ...) -> None: ... class Limits(_message.Message): __slots__ = ["execution_deadline", "execution_timeout", "flow_rate_limit", "max_result_rows", "max_result_size", "memory_limit", "result_ttl", "vcpu_rate_limit", "vcpu_time_limit"] @@ -745,6 +829,14 @@ class ListQueriesResult(_message.Message): query: _containers.RepeatedCompositeFieldContainer[BriefQuery] def __init__(self, query: _Optional[_Iterable[_Union[BriefQuery, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ... +class Logging(_message.Message): + __slots__ = ["auth", "folder_id"] + AUTH_FIELD_NUMBER: _ClassVar[int] + FOLDER_ID_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + folder_id: str + def __init__(self, folder_id: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ...) -> None: ... + class ModifyBindingRequest(_message.Message): __slots__ = ["binding_id", "content", "idempotency_key", "operation_params", "previous_revision"] BINDING_ID_FIELD_NUMBER: _ClassVar[int] @@ -833,6 +925,20 @@ class Monitoring(_message.Message): project: str def __init__(self, project: _Optional[str] = ..., cluster: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ...) -> None: ... +class MySQLCluster(_message.Message): + __slots__ = ["auth", "database_id", "database_name", "login", "password"] + AUTH_FIELD_NUMBER: _ClassVar[int] + DATABASE_ID_FIELD_NUMBER: _ClassVar[int] + DATABASE_NAME_FIELD_NUMBER: _ClassVar[int] + LOGIN_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + database_id: str + database_name: str + login: str + password: str + def __init__(self, database_id: _Optional[str] = ..., database_name: _Optional[str] = ..., login: _Optional[str] = ..., password: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ...) -> None: ... + class NoneAuth(_message.Message): __slots__ = [] def __init__(self) -> None: ... @@ -905,7 +1011,7 @@ class PostgreSQLCluster(_message.Message): def __init__(self, database_id: _Optional[str] = ..., database_name: _Optional[str] = ..., login: _Optional[str] = ..., password: _Optional[str] = ..., schema: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ..., host: _Optional[str] = ..., port: _Optional[int] = ..., secure: bool = ...) -> None: ... class Query(_message.Message): - __slots__ = ["ast", "content", "issue", "meta", "plan", "result_set_meta", "statistics", "transient_issue"] + __slots__ = ["ast", "content", "issue", "meta", "plan", "result_set_meta", "statistics", "timeline", "transient_issue"] AST_FIELD_NUMBER: _ClassVar[int] CONTENT_FIELD_NUMBER: _ClassVar[int] ISSUE_FIELD_NUMBER: _ClassVar[int] @@ -913,6 +1019,7 @@ class Query(_message.Message): PLAN_FIELD_NUMBER: _ClassVar[int] RESULT_SET_META_FIELD_NUMBER: _ClassVar[int] STATISTICS_FIELD_NUMBER: _ClassVar[int] + TIMELINE_FIELD_NUMBER: _ClassVar[int] TRANSIENT_ISSUE_FIELD_NUMBER: _ClassVar[int] ast: QueryAst content: QueryContent @@ -921,8 +1028,9 @@ class Query(_message.Message): plan: QueryPlan result_set_meta: _containers.RepeatedCompositeFieldContainer[ResultSetMeta] statistics: QueryStatistics + timeline: QueryTimeline transient_issue: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] - def __init__(self, meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., content: _Optional[_Union[QueryContent, _Mapping]] = ..., plan: _Optional[_Union[QueryPlan, _Mapping]] = ..., issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., transient_issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., statistics: _Optional[_Union[QueryStatistics, _Mapping]] = ..., result_set_meta: _Optional[_Iterable[_Union[ResultSetMeta, _Mapping]]] = ..., ast: _Optional[_Union[QueryAst, _Mapping]] = ...) -> None: ... + def __init__(self, meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., content: _Optional[_Union[QueryContent, _Mapping]] = ..., plan: _Optional[_Union[QueryPlan, _Mapping]] = ..., issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., transient_issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., statistics: _Optional[_Union[QueryStatistics, _Mapping]] = ..., result_set_meta: _Optional[_Iterable[_Union[ResultSetMeta, _Mapping]]] = ..., ast: _Optional[_Union[QueryAst, _Mapping]] = ..., timeline: _Optional[_Union[QueryTimeline, _Mapping]] = ...) -> None: ... class QueryAst(_message.Message): __slots__ = ["data"] @@ -931,7 +1039,7 @@ class QueryAst(_message.Message): def __init__(self, data: _Optional[str] = ...) -> None: ... class QueryContent(_message.Message): - __slots__ = ["acl", "automatic", "description", "execution_settings", "limits", "name", "syntax", "text", "type"] + __slots__ = ["acl", "automatic", "description", "execution_settings", "limits", "name", "parameters", "syntax", "text", "type"] class QuerySyntax(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] class QueryType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): @@ -943,6 +1051,13 @@ class QueryContent(_message.Message): key: str value: str def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + class ParametersEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: _ydb_value_pb2.TypedValue + def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... ACL_FIELD_NUMBER: _ClassVar[int] ANALYTICS: QueryContent.QueryType AUTOMATIC_FIELD_NUMBER: _ClassVar[int] @@ -950,6 +1065,7 @@ class QueryContent(_message.Message): EXECUTION_SETTINGS_FIELD_NUMBER: _ClassVar[int] LIMITS_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] + PARAMETERS_FIELD_NUMBER: _ClassVar[int] PG: QueryContent.QuerySyntax QUERY_SYNTAX_UNSPECIFIED: QueryContent.QuerySyntax QUERY_TYPE_UNSPECIFIED: QueryContent.QueryType @@ -964,10 +1080,11 @@ class QueryContent(_message.Message): execution_settings: _containers.ScalarMap[str, str] limits: Limits name: str + parameters: _containers.MessageMap[str, _ydb_value_pb2.TypedValue] syntax: QueryContent.QuerySyntax text: str type: QueryContent.QueryType - def __init__(self, type: _Optional[_Union[QueryContent.QueryType, str]] = ..., name: _Optional[str] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., limits: _Optional[_Union[Limits, _Mapping]] = ..., text: _Optional[str] = ..., automatic: bool = ..., description: _Optional[str] = ..., execution_settings: _Optional[_Mapping[str, str]] = ..., syntax: _Optional[_Union[QueryContent.QuerySyntax, str]] = ...) -> None: ... + def __init__(self, type: _Optional[_Union[QueryContent.QueryType, str]] = ..., name: _Optional[str] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., limits: _Optional[_Union[Limits, _Mapping]] = ..., text: _Optional[str] = ..., automatic: bool = ..., description: _Optional[str] = ..., execution_settings: _Optional[_Mapping[str, str]] = ..., syntax: _Optional[_Union[QueryContent.QuerySyntax, str]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ...) -> None: ... class QueryMeta(_message.Message): __slots__ = ["aborted_by", "common", "execute_mode", "expire_at", "finished_at", "has_saved_checkpoints", "last_job_id", "last_job_query_revision", "paused_by", "result_expire_at", "started_at", "started_by", "status", "submitted_at"] @@ -1029,6 +1146,12 @@ class QueryStatistics(_message.Message): json: str def __init__(self, json: _Optional[str] = ...) -> None: ... +class QueryTimeline(_message.Message): + __slots__ = ["svg"] + SVG_FIELD_NUMBER: _ClassVar[int] + svg: str + def __init__(self, svg: _Optional[str] = ...) -> None: ... + class ResultSetMeta(_message.Message): __slots__ = ["column", "rows_count", "truncated"] COLUMN_FIELD_NUMBER: _ClassVar[int] @@ -1098,6 +1221,12 @@ class TestConnectionResult(_message.Message): __slots__ = [] def __init__(self) -> None: ... +class TokenAuth(_message.Message): + __slots__ = ["token"] + TOKEN_FIELD_NUMBER: _ClassVar[int] + token: str + def __init__(self, token: _Optional[str] = ...) -> None: ... + class YdbDatabase(_message.Message): __slots__ = ["auth", "database", "database_id", "endpoint", "secure"] AUTH_FIELD_NUMBER: _ClassVar[int] diff --git a/ydb/_grpc/v4/protos/ydb_export_pb2.py b/ydb/_grpc/v4/protos/ydb_export_pb2.py index 8e6e9621..17201c13 100644 --- a/ydb/_grpc/v4/protos/ydb_export_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_export_pb2.py @@ -12,12 +12,13 @@ _sym_db = _symbol_database.Default() +from ydb._grpc.v4.protos.annotations import sensitive_pb2 as protos_dot_annotations_dot_sensitive__pb2 from ydb._grpc.v4.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 from ydb._grpc.v4.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_export.proto\x12\nYdb.Export\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x0e\x45xportProgress\"\x9e\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x11\n\rPROGRESS_DONE\x10\x03\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x04\x12\x16\n\x12PROGRESS_CANCELLED\x10\x05\"\xa0\x01\n\x12\x45xportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x98\x02\n\x12\x45xportToYtSettings\x12\x12\n\x04host\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x13\n\x05token\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x04 \x03(\x0b\x32#.Ydb.Export.ExportToYtSettings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x06 \x01(\r\x12\x13\n\x0buse_type_v3\x18\x07 \x01(\x08\x1a\x41\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\"\x12\n\x10\x45xportToYtResult\"\xb5\x01\n\x12\x45xportToYtMetadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToYtRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToYtResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xe1\x05\n\x12\x45xportToS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x35\n\x06scheme\x18\x02 \x01(\x0e\x32%.Ydb.Export.ExportToS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x06 \x03(\x0b\x32#.Ydb.Export.ExportToS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x42\n\rstorage_class\x18\t \x01(\x0e\x32+.Ydb.Export.ExportToS3Settings.StorageClass\x12\x13\n\x0b\x63ompression\x18\n \x01(\t\x12\x0e\n\x06region\x18\x0b \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\x0c \x01(\x08\x1a\x43\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12 \n\x12\x64\x65stination_prefix\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\xba\x01\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x16\n\x12REDUCED_REDUNDANCY\x10\x02\x12\x0f\n\x0bSTANDARD_IA\x10\x03\x12\x0e\n\nONEZONE_IA\x10\x04\x12\x17\n\x13INTELLIGENT_TIERING\x10\x05\x12\x0b\n\x07GLACIER\x10\x06\x12\x10\n\x0c\x44\x45\x45P_ARCHIVE\x10\x07\x12\x0c\n\x08OUTPOSTS\x10\x08\"\x12\n\x10\x45xportToS3Result\"\xb5\x01\n\x12\x45xportToS3Metadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3SettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBU\n\x15tech.ydb.proto.exportZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_export.proto\x12\nYdb.Export\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x0e\x45xportProgress\"\x9e\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x11\n\rPROGRESS_DONE\x10\x03\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x04\x12\x16\n\x12PROGRESS_CANCELLED\x10\x05\"\xa0\x01\n\x12\x45xportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x98\x02\n\x12\x45xportToYtSettings\x12\x12\n\x04host\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x13\n\x05token\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x04 \x03(\x0b\x32#.Ydb.Export.ExportToYtSettings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x06 \x01(\r\x12\x13\n\x0buse_type_v3\x18\x07 \x01(\x08\x1a\x41\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\"\x12\n\x10\x45xportToYtResult\"\xb5\x01\n\x12\x45xportToYtMetadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToYtRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToYtResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xc1\x06\n\x12\x45xportToS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x35\n\x06scheme\x18\x02 \x01(\x0e\x32%.Ydb.Export.ExportToS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12\x32\n\x05items\x18\x06 \x03(\x0b\x32#.Ydb.Export.ExportToS3Settings.Item\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x42\n\rstorage_class\x18\t \x01(\x0e\x32+.Ydb.Export.ExportToS3Settings.StorageClass\x12\x13\n\x0b\x63ompression\x18\n \x01(\t\x12\x0e\n\x06region\x18\x0b \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\x0c \x01(\x08\x12\x13\n\x0bsource_path\x18\r \x01(\t\x12\x1a\n\x12\x64\x65stination_prefix\x18\x0e \x01(\t\x12;\n\x13\x65ncryption_settings\x18\x0f \x01(\x0b\x32\x1e.Ydb.Export.EncryptionSettings\x1a=\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1a\n\x12\x64\x65stination_prefix\x18\x02 \x01(\t\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\xba\x01\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x16\n\x12REDUCED_REDUNDANCY\x10\x02\x12\x0f\n\x0bSTANDARD_IA\x10\x03\x12\x0e\n\nONEZONE_IA\x10\x04\x12\x17\n\x13INTELLIGENT_TIERING\x10\x05\x12\x0b\n\x07GLACIER\x10\x06\x12\x10\n\x0c\x44\x45\x45P_ARCHIVE\x10\x07\x12\x0c\n\x08OUTPOSTS\x10\x08\"\x12\n\x10\x45xportToS3Result\"\xb5\x01\n\x12\x45xportToS3Metadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3SettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa2\x01\n\x12\x45ncryptionSettings\x12\x1c\n\x14\x65ncryption_algorithm\x18\x01 \x01(\t\x12\x44\n\rsymmetric_key\x18\x02 \x01(\x0b\x32+.Ydb.Export.EncryptionSettings.SymmetricKeyH\x00\x1a!\n\x0cSymmetricKey\x12\x11\n\x03key\x18\x01 \x01(\x0c\x42\x04\xb8\xe6*\x01\x42\x05\n\x03KeyBU\n\x15tech.ydb.proto.exportZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_export_pb2', globals()) @@ -41,8 +42,6 @@ _EXPORTTOYTREQUEST.fields_by_name['settings']._serialized_options = b'\220\346*\001' _EXPORTTOS3SETTINGS_ITEM.fields_by_name['source_path']._options = None _EXPORTTOS3SETTINGS_ITEM.fields_by_name['source_path']._serialized_options = b'\220\346*\001' - _EXPORTTOS3SETTINGS_ITEM.fields_by_name['destination_prefix']._options = None - _EXPORTTOS3SETTINGS_ITEM.fields_by_name['destination_prefix']._serialized_options = b'\220\346*\001' _EXPORTTOS3SETTINGS.fields_by_name['endpoint']._options = None _EXPORTTOS3SETTINGS.fields_by_name['endpoint']._serialized_options = b'\220\346*\001' _EXPORTTOS3SETTINGS.fields_by_name['bucket']._options = None @@ -51,44 +50,48 @@ _EXPORTTOS3SETTINGS.fields_by_name['access_key']._serialized_options = b'\220\346*\001' _EXPORTTOS3SETTINGS.fields_by_name['secret_key']._options = None _EXPORTTOS3SETTINGS.fields_by_name['secret_key']._serialized_options = b'\220\346*\001' - _EXPORTTOS3SETTINGS.fields_by_name['items']._options = None - _EXPORTTOS3SETTINGS.fields_by_name['items']._serialized_options = b'\232\346*\002(\001' _EXPORTTOS3SETTINGS.fields_by_name['description']._options = None _EXPORTTOS3SETTINGS.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200\001' _EXPORTTOS3REQUEST.fields_by_name['settings']._options = None _EXPORTTOS3REQUEST.fields_by_name['settings']._serialized_options = b'\220\346*\001' - _EXPORTPROGRESS._serialized_start=138 - _EXPORTPROGRESS._serialized_end=315 - _EXPORTPROGRESS_PROGRESS._serialized_start=157 - _EXPORTPROGRESS_PROGRESS._serialized_end=315 - _EXPORTITEMPROGRESS._serialized_start=318 - _EXPORTITEMPROGRESS._serialized_end=478 - _EXPORTTOYTSETTINGS._serialized_start=481 - _EXPORTTOYTSETTINGS._serialized_end=761 - _EXPORTTOYTSETTINGS_ITEM._serialized_start=696 - _EXPORTTOYTSETTINGS_ITEM._serialized_end=761 - _EXPORTTOYTRESULT._serialized_start=763 - _EXPORTTOYTRESULT._serialized_end=781 - _EXPORTTOYTMETADATA._serialized_start=784 - _EXPORTTOYTMETADATA._serialized_end=965 - _EXPORTTOYTREQUEST._serialized_start=968 - _EXPORTTOYTREQUEST._serialized_end=1102 - _EXPORTTOYTRESPONSE._serialized_start=1104 - _EXPORTTOYTRESPONSE._serialized_end=1170 - _EXPORTTOS3SETTINGS._serialized_start=1173 - _EXPORTTOS3SETTINGS._serialized_end=1910 - _EXPORTTOS3SETTINGS_ITEM._serialized_start=1606 - _EXPORTTOS3SETTINGS_ITEM._serialized_end=1673 - _EXPORTTOS3SETTINGS_SCHEME._serialized_start=1675 - _EXPORTTOS3SETTINGS_SCHEME._serialized_end=1721 - _EXPORTTOS3SETTINGS_STORAGECLASS._serialized_start=1724 - _EXPORTTOS3SETTINGS_STORAGECLASS._serialized_end=1910 - _EXPORTTOS3RESULT._serialized_start=1912 - _EXPORTTOS3RESULT._serialized_end=1930 - _EXPORTTOS3METADATA._serialized_start=1933 - _EXPORTTOS3METADATA._serialized_end=2114 - _EXPORTTOS3REQUEST._serialized_start=2117 - _EXPORTTOS3REQUEST._serialized_end=2251 - _EXPORTTOS3RESPONSE._serialized_start=2253 - _EXPORTTOS3RESPONSE._serialized_end=2319 + _ENCRYPTIONSETTINGS_SYMMETRICKEY.fields_by_name['key']._options = None + _ENCRYPTIONSETTINGS_SYMMETRICKEY.fields_by_name['key']._serialized_options = b'\270\346*\001' + _EXPORTPROGRESS._serialized_start=174 + _EXPORTPROGRESS._serialized_end=351 + _EXPORTPROGRESS_PROGRESS._serialized_start=193 + _EXPORTPROGRESS_PROGRESS._serialized_end=351 + _EXPORTITEMPROGRESS._serialized_start=354 + _EXPORTITEMPROGRESS._serialized_end=514 + _EXPORTTOYTSETTINGS._serialized_start=517 + _EXPORTTOYTSETTINGS._serialized_end=797 + _EXPORTTOYTSETTINGS_ITEM._serialized_start=732 + _EXPORTTOYTSETTINGS_ITEM._serialized_end=797 + _EXPORTTOYTRESULT._serialized_start=799 + _EXPORTTOYTRESULT._serialized_end=817 + _EXPORTTOYTMETADATA._serialized_start=820 + _EXPORTTOYTMETADATA._serialized_end=1001 + _EXPORTTOYTREQUEST._serialized_start=1004 + _EXPORTTOYTREQUEST._serialized_end=1138 + _EXPORTTOYTRESPONSE._serialized_start=1140 + _EXPORTTOYTRESPONSE._serialized_end=1206 + _EXPORTTOS3SETTINGS._serialized_start=1209 + _EXPORTTOS3SETTINGS._serialized_end=2042 + _EXPORTTOS3SETTINGS_ITEM._serialized_start=1744 + _EXPORTTOS3SETTINGS_ITEM._serialized_end=1805 + _EXPORTTOS3SETTINGS_SCHEME._serialized_start=1807 + _EXPORTTOS3SETTINGS_SCHEME._serialized_end=1853 + _EXPORTTOS3SETTINGS_STORAGECLASS._serialized_start=1856 + _EXPORTTOS3SETTINGS_STORAGECLASS._serialized_end=2042 + _EXPORTTOS3RESULT._serialized_start=2044 + _EXPORTTOS3RESULT._serialized_end=2062 + _EXPORTTOS3METADATA._serialized_start=2065 + _EXPORTTOS3METADATA._serialized_end=2246 + _EXPORTTOS3REQUEST._serialized_start=2249 + _EXPORTTOS3REQUEST._serialized_end=2383 + _EXPORTTOS3RESPONSE._serialized_start=2385 + _EXPORTTOS3RESPONSE._serialized_end=2451 + _ENCRYPTIONSETTINGS._serialized_start=2454 + _ENCRYPTIONSETTINGS._serialized_end=2616 + _ENCRYPTIONSETTINGS_SYMMETRICKEY._serialized_start=2576 + _ENCRYPTIONSETTINGS_SYMMETRICKEY._serialized_end=2609 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_export_pb2.pyi b/ydb/_grpc/v4/protos/ydb_export_pb2.pyi index 14af9169..41827e0e 100644 --- a/ydb/_grpc/v4/protos/ydb_export_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_export_pb2.pyi @@ -1,3 +1,4 @@ +from protos.annotations import sensitive_pb2 as _sensitive_pb2 from protos.annotations import validation_pb2 as _validation_pb2 from protos import ydb_operation_pb2 as _ydb_operation_pb2 from google.protobuf import timestamp_pb2 as _timestamp_pb2 @@ -9,6 +10,19 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor +class EncryptionSettings(_message.Message): + __slots__ = ["encryption_algorithm", "symmetric_key"] + class SymmetricKey(_message.Message): + __slots__ = ["key"] + KEY_FIELD_NUMBER: _ClassVar[int] + key: bytes + def __init__(self, key: _Optional[bytes] = ...) -> None: ... + ENCRYPTION_ALGORITHM_FIELD_NUMBER: _ClassVar[int] + SYMMETRIC_KEY_FIELD_NUMBER: _ClassVar[int] + encryption_algorithm: str + symmetric_key: EncryptionSettings.SymmetricKey + def __init__(self, encryption_algorithm: _Optional[str] = ..., symmetric_key: _Optional[_Union[EncryptionSettings.SymmetricKey, _Mapping]] = ...) -> None: ... + class ExportItemProgress(_message.Message): __slots__ = ["end_time", "parts_completed", "parts_total", "start_time"] END_TIME_FIELD_NUMBER: _ClassVar[int] @@ -62,7 +76,7 @@ class ExportToS3Result(_message.Message): def __init__(self) -> None: ... class ExportToS3Settings(_message.Message): - __slots__ = ["access_key", "bucket", "compression", "description", "disable_virtual_addressing", "endpoint", "items", "number_of_retries", "region", "scheme", "secret_key", "storage_class"] + __slots__ = ["access_key", "bucket", "compression", "description", "destination_prefix", "disable_virtual_addressing", "encryption_settings", "endpoint", "items", "number_of_retries", "region", "scheme", "secret_key", "source_path", "storage_class"] class Scheme(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] class StorageClass(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): @@ -79,7 +93,9 @@ class ExportToS3Settings(_message.Message): COMPRESSION_FIELD_NUMBER: _ClassVar[int] DEEP_ARCHIVE: ExportToS3Settings.StorageClass DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + DESTINATION_PREFIX_FIELD_NUMBER: _ClassVar[int] DISABLE_VIRTUAL_ADDRESSING_FIELD_NUMBER: _ClassVar[int] + ENCRYPTION_SETTINGS_FIELD_NUMBER: _ClassVar[int] ENDPOINT_FIELD_NUMBER: _ClassVar[int] GLACIER: ExportToS3Settings.StorageClass HTTP: ExportToS3Settings.Scheme @@ -93,6 +109,7 @@ class ExportToS3Settings(_message.Message): REGION_FIELD_NUMBER: _ClassVar[int] SCHEME_FIELD_NUMBER: _ClassVar[int] SECRET_KEY_FIELD_NUMBER: _ClassVar[int] + SOURCE_PATH_FIELD_NUMBER: _ClassVar[int] STANDARD: ExportToS3Settings.StorageClass STANDARD_IA: ExportToS3Settings.StorageClass STORAGE_CLASS_FIELD_NUMBER: _ClassVar[int] @@ -102,15 +119,18 @@ class ExportToS3Settings(_message.Message): bucket: str compression: str description: str + destination_prefix: str disable_virtual_addressing: bool + encryption_settings: EncryptionSettings endpoint: str items: _containers.RepeatedCompositeFieldContainer[ExportToS3Settings.Item] number_of_retries: int region: str scheme: ExportToS3Settings.Scheme secret_key: str + source_path: str storage_class: ExportToS3Settings.StorageClass - def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ExportToS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ExportToS3Settings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., storage_class: _Optional[_Union[ExportToS3Settings.StorageClass, str]] = ..., compression: _Optional[str] = ..., region: _Optional[str] = ..., disable_virtual_addressing: bool = ...) -> None: ... + def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ExportToS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ExportToS3Settings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., storage_class: _Optional[_Union[ExportToS3Settings.StorageClass, str]] = ..., compression: _Optional[str] = ..., region: _Optional[str] = ..., disable_virtual_addressing: bool = ..., source_path: _Optional[str] = ..., destination_prefix: _Optional[str] = ..., encryption_settings: _Optional[_Union[EncryptionSettings, _Mapping]] = ...) -> None: ... class ExportToYtMetadata(_message.Message): __slots__ = ["items_progress", "progress", "settings"] diff --git a/ydb/_grpc/v4/protos/ydb_import_pb2.py b/ydb/_grpc/v4/protos/ydb_import_pb2.py index c4da1140..f8fc84ce 100644 --- a/ydb/_grpc/v4/protos/ydb_import_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_import_pb2.py @@ -13,11 +13,12 @@ from ydb._grpc.v4.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 +from ydb._grpc.v4.protos import ydb_export_pb2 as protos_dot_ydb__export__pb2 from ydb._grpc.v4.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_import.proto\x12\nYdb.Import\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcd\x01\n\x0eImportProgress\"\xba\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x1a\n\x16PROGRESS_BUILD_INDEXES\x10\x03\x12\x11\n\rPROGRESS_DONE\x10\x04\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x05\x12\x16\n\x12PROGRESS_CANCELLED\x10\x06\"\xa0\x01\n\x12ImportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd1\x03\n\x14ImportFromS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x37\n\x06scheme\x18\x02 \x01(\x0e\x32\'.Ydb.Import.ImportFromS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12<\n\x05items\x18\x06 \x03(\x0b\x32%.Ydb.Import.ImportFromS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x0e\n\x06region\x18\t \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\n \x01(\x08\x1a\x43\n\x04Item\x12\x1b\n\rsource_prefix\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\x14\n\x12ImportFromS3Result\"\xb9\x01\n\x14ImportFromS3Metadata\x12\x32\n\x08settings\x18\x01 \x01(\x0b\x32 .Ydb.Import.ImportFromS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Import.ImportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Import.ImportItemProgress\"\x8a\x01\n\x13ImportFromS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x38\n\x08settings\x18\x02 \x01(\x0b\x32 .Ydb.Import.ImportFromS3SettingsB\x04\x90\xe6*\x01\"D\n\x14ImportFromS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\" \n\rYdbDumpFormat\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\"\x12\n\x10ImportDataResult\"\xae\x01\n\x11ImportDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x17\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x42\t\xa2\xe6*\x05\x18\x80\x80\x80\x04\x12-\n\x08ydb_dump\x18\x04 \x01(\x0b\x32\x19.Ydb.Import.YdbDumpFormatH\x00\x42\x08\n\x06\x66ormat\"B\n\x12ImportDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBV\n\x16tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_import.proto\x12\nYdb.Import\x1a#protos/annotations/validation.proto\x1a\x17protos/ydb_export.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xee\x01\n\x0eImportProgress\"\xdb\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x1a\n\x16PROGRESS_BUILD_INDEXES\x10\x03\x12\x11\n\rPROGRESS_DONE\x10\x04\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x05\x12\x16\n\x12PROGRESS_CANCELLED\x10\x06\x12\x1f\n\x1bPROGRESS_CREATE_CHANGEFEEDS\x10\x07\"\xa0\x01\n\x12ImportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x80\x05\n\x14ImportFromS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x37\n\x06scheme\x18\x02 \x01(\x0e\x32\'.Ydb.Import.ImportFromS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12\x34\n\x05items\x18\x06 \x03(\x0b\x32%.Ydb.Import.ImportFromS3Settings.Item\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x0e\n\x06region\x18\t \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\n \x01(\x08\x12\x0e\n\x06no_acl\x18\x0b \x01(\x08\x12 \n\x18skip_checksum_validation\x18\x0c \x01(\x08\x12\x15\n\rsource_prefix\x18\r \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x0e \x01(\t\x12;\n\x13\x65ncryption_settings\x18\x0f \x01(\x0b\x32\x1e.Ydb.Export.EncryptionSettings\x1aZ\n\x04Item\x12\x17\n\rsource_prefix\x18\x01 \x01(\tH\x00\x12\x15\n\x0bsource_path\x18\x03 \x01(\tH\x00\x12\x18\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x08\n\x06Source\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\x14\n\x12ImportFromS3Result\"\xb9\x01\n\x14ImportFromS3Metadata\x12\x32\n\x08settings\x18\x01 \x01(\x0b\x32 .Ydb.Import.ImportFromS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Import.ImportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Import.ImportItemProgress\"\x8a\x01\n\x13ImportFromS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x38\n\x08settings\x18\x02 \x01(\x0b\x32 .Ydb.Import.ImportFromS3SettingsB\x04\x90\xe6*\x01\"D\n\x14ImportFromS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xab\x03\n\x1dListObjectsInS3ExportSettings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x37\n\x06scheme\x18\x02 \x01(\x0e\x32\'.Ydb.Import.ImportFromS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12=\n\x05items\x18\x06 \x03(\x0b\x32..Ydb.Import.ListObjectsInS3ExportSettings.Item\x12\x19\n\x11number_of_retries\x18\x07 \x01(\r\x12\x0e\n\x06region\x18\x08 \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\t \x01(\x08\x12\x0e\n\x06prefix\x18\n \x01(\t\x12;\n\x13\x65ncryption_settings\x18\x0b \x01(\x0b\x32\x1e.Ydb.Export.EncryptionSettings\x1a\x14\n\x04Item\x12\x0c\n\x04path\x18\x01 \x01(\t\"\x99\x01\n\x1bListObjectsInS3ExportResult\x12;\n\x05items\x18\x01 \x03(\x0b\x32,.Ydb.Import.ListObjectsInS3ExportResult.Item\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x1a$\n\x04Item\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\"\xd1\x01\n\x1cListObjectsInS3ExportRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x41\n\x08settings\x18\x02 \x01(\x0b\x32).Ydb.Import.ListObjectsInS3ExportSettingsB\x04\x90\xe6*\x01\x12\x1f\n\tpage_size\x18\x03 \x01(\x03\x42\x0c\xb2\xe6*\x08<= 10000\x12\x12\n\npage_token\x18\x04 \x01(\t\"M\n\x1dListObjectsInS3ExportResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\" \n\rYdbDumpFormat\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\"\x12\n\x10ImportDataResult\"\xae\x01\n\x11ImportDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x17\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x42\t\xa2\xe6*\x05\x18\x80\x80\x80\x08\x12-\n\x08ydb_dump\x18\x04 \x01(\x0b\x32\x19.Ydb.Import.YdbDumpFormatH\x00\x42\x08\n\x06\x66ormat\"B\n\x12ImportDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBV\n\x16tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_import_pb2', globals()) @@ -25,10 +26,6 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\026tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\370\001\001' - _IMPORTFROMS3SETTINGS_ITEM.fields_by_name['source_prefix']._options = None - _IMPORTFROMS3SETTINGS_ITEM.fields_by_name['source_prefix']._serialized_options = b'\220\346*\001' - _IMPORTFROMS3SETTINGS_ITEM.fields_by_name['destination_path']._options = None - _IMPORTFROMS3SETTINGS_ITEM.fields_by_name['destination_path']._serialized_options = b'\220\346*\001' _IMPORTFROMS3SETTINGS.fields_by_name['endpoint']._options = None _IMPORTFROMS3SETTINGS.fields_by_name['endpoint']._serialized_options = b'\220\346*\001' _IMPORTFROMS3SETTINGS.fields_by_name['bucket']._options = None @@ -37,40 +34,62 @@ _IMPORTFROMS3SETTINGS.fields_by_name['access_key']._serialized_options = b'\220\346*\001' _IMPORTFROMS3SETTINGS.fields_by_name['secret_key']._options = None _IMPORTFROMS3SETTINGS.fields_by_name['secret_key']._serialized_options = b'\220\346*\001' - _IMPORTFROMS3SETTINGS.fields_by_name['items']._options = None - _IMPORTFROMS3SETTINGS.fields_by_name['items']._serialized_options = b'\232\346*\002(\001' _IMPORTFROMS3SETTINGS.fields_by_name['description']._options = None _IMPORTFROMS3SETTINGS.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200\001' _IMPORTFROMS3REQUEST.fields_by_name['settings']._options = None _IMPORTFROMS3REQUEST.fields_by_name['settings']._serialized_options = b'\220\346*\001' + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['endpoint']._options = None + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['endpoint']._serialized_options = b'\220\346*\001' + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['bucket']._options = None + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['bucket']._serialized_options = b'\220\346*\001' + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['access_key']._options = None + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['access_key']._serialized_options = b'\220\346*\001' + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['secret_key']._options = None + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['secret_key']._serialized_options = b'\220\346*\001' + _LISTOBJECTSINS3EXPORTREQUEST.fields_by_name['settings']._options = None + _LISTOBJECTSINS3EXPORTREQUEST.fields_by_name['settings']._serialized_options = b'\220\346*\001' + _LISTOBJECTSINS3EXPORTREQUEST.fields_by_name['page_size']._options = None + _LISTOBJECTSINS3EXPORTREQUEST.fields_by_name['page_size']._serialized_options = b'\262\346*\010<= 10000' _IMPORTDATAREQUEST.fields_by_name['data']._options = None - _IMPORTDATAREQUEST.fields_by_name['data']._serialized_options = b'\242\346*\005\030\200\200\200\004' - _IMPORTPROGRESS._serialized_start=138 - _IMPORTPROGRESS._serialized_end=343 - _IMPORTPROGRESS_PROGRESS._serialized_start=157 - _IMPORTPROGRESS_PROGRESS._serialized_end=343 - _IMPORTITEMPROGRESS._serialized_start=346 - _IMPORTITEMPROGRESS._serialized_end=506 - _IMPORTFROMS3SETTINGS._serialized_start=509 - _IMPORTFROMS3SETTINGS._serialized_end=974 - _IMPORTFROMS3SETTINGS_ITEM._serialized_start=859 - _IMPORTFROMS3SETTINGS_ITEM._serialized_end=926 - _IMPORTFROMS3SETTINGS_SCHEME._serialized_start=928 - _IMPORTFROMS3SETTINGS_SCHEME._serialized_end=974 - _IMPORTFROMS3RESULT._serialized_start=976 - _IMPORTFROMS3RESULT._serialized_end=996 - _IMPORTFROMS3METADATA._serialized_start=999 - _IMPORTFROMS3METADATA._serialized_end=1184 - _IMPORTFROMS3REQUEST._serialized_start=1187 - _IMPORTFROMS3REQUEST._serialized_end=1325 - _IMPORTFROMS3RESPONSE._serialized_start=1327 - _IMPORTFROMS3RESPONSE._serialized_end=1395 - _YDBDUMPFORMAT._serialized_start=1397 - _YDBDUMPFORMAT._serialized_end=1429 - _IMPORTDATARESULT._serialized_start=1431 - _IMPORTDATARESULT._serialized_end=1449 - _IMPORTDATAREQUEST._serialized_start=1452 - _IMPORTDATAREQUEST._serialized_end=1626 - _IMPORTDATARESPONSE._serialized_start=1628 - _IMPORTDATARESPONSE._serialized_end=1694 + _IMPORTDATAREQUEST.fields_by_name['data']._serialized_options = b'\242\346*\005\030\200\200\200\010' + _IMPORTPROGRESS._serialized_start=163 + _IMPORTPROGRESS._serialized_end=401 + _IMPORTPROGRESS_PROGRESS._serialized_start=182 + _IMPORTPROGRESS_PROGRESS._serialized_end=401 + _IMPORTITEMPROGRESS._serialized_start=404 + _IMPORTITEMPROGRESS._serialized_end=564 + _IMPORTFROMS3SETTINGS._serialized_start=567 + _IMPORTFROMS3SETTINGS._serialized_end=1207 + _IMPORTFROMS3SETTINGS_ITEM._serialized_start=1069 + _IMPORTFROMS3SETTINGS_ITEM._serialized_end=1159 + _IMPORTFROMS3SETTINGS_SCHEME._serialized_start=1161 + _IMPORTFROMS3SETTINGS_SCHEME._serialized_end=1207 + _IMPORTFROMS3RESULT._serialized_start=1209 + _IMPORTFROMS3RESULT._serialized_end=1229 + _IMPORTFROMS3METADATA._serialized_start=1232 + _IMPORTFROMS3METADATA._serialized_end=1417 + _IMPORTFROMS3REQUEST._serialized_start=1420 + _IMPORTFROMS3REQUEST._serialized_end=1558 + _IMPORTFROMS3RESPONSE._serialized_start=1560 + _IMPORTFROMS3RESPONSE._serialized_end=1628 + _LISTOBJECTSINS3EXPORTSETTINGS._serialized_start=1631 + _LISTOBJECTSINS3EXPORTSETTINGS._serialized_end=2058 + _LISTOBJECTSINS3EXPORTSETTINGS_ITEM._serialized_start=2038 + _LISTOBJECTSINS3EXPORTSETTINGS_ITEM._serialized_end=2058 + _LISTOBJECTSINS3EXPORTRESULT._serialized_start=2061 + _LISTOBJECTSINS3EXPORTRESULT._serialized_end=2214 + _LISTOBJECTSINS3EXPORTRESULT_ITEM._serialized_start=2178 + _LISTOBJECTSINS3EXPORTRESULT_ITEM._serialized_end=2214 + _LISTOBJECTSINS3EXPORTREQUEST._serialized_start=2217 + _LISTOBJECTSINS3EXPORTREQUEST._serialized_end=2426 + _LISTOBJECTSINS3EXPORTRESPONSE._serialized_start=2428 + _LISTOBJECTSINS3EXPORTRESPONSE._serialized_end=2505 + _YDBDUMPFORMAT._serialized_start=2507 + _YDBDUMPFORMAT._serialized_end=2539 + _IMPORTDATARESULT._serialized_start=2541 + _IMPORTDATARESULT._serialized_end=2559 + _IMPORTDATAREQUEST._serialized_start=2562 + _IMPORTDATAREQUEST._serialized_end=2736 + _IMPORTDATARESPONSE._serialized_start=2738 + _IMPORTDATARESPONSE._serialized_end=2804 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_import_pb2.pyi b/ydb/_grpc/v4/protos/ydb_import_pb2.pyi index d3b394ab..24e5960d 100644 --- a/ydb/_grpc/v4/protos/ydb_import_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_import_pb2.pyi @@ -1,4 +1,5 @@ from protos.annotations import validation_pb2 as _validation_pb2 +from protos import ydb_export_pb2 as _ydb_export_pb2 from protos import ydb_operation_pb2 as _ydb_operation_pb2 from google.protobuf import timestamp_pb2 as _timestamp_pb2 from google.protobuf.internal import containers as _containers @@ -60,40 +61,52 @@ class ImportFromS3Result(_message.Message): def __init__(self) -> None: ... class ImportFromS3Settings(_message.Message): - __slots__ = ["access_key", "bucket", "description", "disable_virtual_addressing", "endpoint", "items", "number_of_retries", "region", "scheme", "secret_key"] + __slots__ = ["access_key", "bucket", "description", "destination_path", "disable_virtual_addressing", "encryption_settings", "endpoint", "items", "no_acl", "number_of_retries", "region", "scheme", "secret_key", "skip_checksum_validation", "source_prefix"] class Scheme(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] class Item(_message.Message): - __slots__ = ["destination_path", "source_prefix"] + __slots__ = ["destination_path", "source_path", "source_prefix"] DESTINATION_PATH_FIELD_NUMBER: _ClassVar[int] + SOURCE_PATH_FIELD_NUMBER: _ClassVar[int] SOURCE_PREFIX_FIELD_NUMBER: _ClassVar[int] destination_path: str + source_path: str source_prefix: str - def __init__(self, source_prefix: _Optional[str] = ..., destination_path: _Optional[str] = ...) -> None: ... + def __init__(self, source_prefix: _Optional[str] = ..., source_path: _Optional[str] = ..., destination_path: _Optional[str] = ...) -> None: ... ACCESS_KEY_FIELD_NUMBER: _ClassVar[int] BUCKET_FIELD_NUMBER: _ClassVar[int] DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + DESTINATION_PATH_FIELD_NUMBER: _ClassVar[int] DISABLE_VIRTUAL_ADDRESSING_FIELD_NUMBER: _ClassVar[int] + ENCRYPTION_SETTINGS_FIELD_NUMBER: _ClassVar[int] ENDPOINT_FIELD_NUMBER: _ClassVar[int] HTTP: ImportFromS3Settings.Scheme HTTPS: ImportFromS3Settings.Scheme ITEMS_FIELD_NUMBER: _ClassVar[int] + NO_ACL_FIELD_NUMBER: _ClassVar[int] NUMBER_OF_RETRIES_FIELD_NUMBER: _ClassVar[int] REGION_FIELD_NUMBER: _ClassVar[int] SCHEME_FIELD_NUMBER: _ClassVar[int] SECRET_KEY_FIELD_NUMBER: _ClassVar[int] + SKIP_CHECKSUM_VALIDATION_FIELD_NUMBER: _ClassVar[int] + SOURCE_PREFIX_FIELD_NUMBER: _ClassVar[int] UNSPECIFIED: ImportFromS3Settings.Scheme access_key: str bucket: str description: str + destination_path: str disable_virtual_addressing: bool + encryption_settings: _ydb_export_pb2.EncryptionSettings endpoint: str items: _containers.RepeatedCompositeFieldContainer[ImportFromS3Settings.Item] + no_acl: bool number_of_retries: int region: str scheme: ImportFromS3Settings.Scheme secret_key: str - def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ImportFromS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ImportFromS3Settings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., region: _Optional[str] = ..., disable_virtual_addressing: bool = ...) -> None: ... + skip_checksum_validation: bool + source_prefix: str + def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ImportFromS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ImportFromS3Settings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., region: _Optional[str] = ..., disable_virtual_addressing: bool = ..., no_acl: bool = ..., skip_checksum_validation: bool = ..., source_prefix: _Optional[str] = ..., destination_path: _Optional[str] = ..., encryption_settings: _Optional[_Union[_ydb_export_pb2.EncryptionSettings, _Mapping]] = ...) -> None: ... class ImportItemProgress(_message.Message): __slots__ = ["end_time", "parts_completed", "parts_total", "start_time"] @@ -114,12 +127,77 @@ class ImportProgress(_message.Message): PROGRESS_BUILD_INDEXES: ImportProgress.Progress PROGRESS_CANCELLATION: ImportProgress.Progress PROGRESS_CANCELLED: ImportProgress.Progress + PROGRESS_CREATE_CHANGEFEEDS: ImportProgress.Progress PROGRESS_DONE: ImportProgress.Progress PROGRESS_PREPARING: ImportProgress.Progress PROGRESS_TRANSFER_DATA: ImportProgress.Progress PROGRESS_UNSPECIFIED: ImportProgress.Progress def __init__(self) -> None: ... +class ListObjectsInS3ExportRequest(_message.Message): + __slots__ = ["operation_params", "page_size", "page_token", "settings"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PAGE_SIZE_FIELD_NUMBER: _ClassVar[int] + PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + SETTINGS_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + page_size: int + page_token: str + settings: ListObjectsInS3ExportSettings + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., settings: _Optional[_Union[ListObjectsInS3ExportSettings, _Mapping]] = ..., page_size: _Optional[int] = ..., page_token: _Optional[str] = ...) -> None: ... + +class ListObjectsInS3ExportResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListObjectsInS3ExportResult(_message.Message): + __slots__ = ["items", "next_page_token"] + class Item(_message.Message): + __slots__ = ["path", "prefix"] + PATH_FIELD_NUMBER: _ClassVar[int] + PREFIX_FIELD_NUMBER: _ClassVar[int] + path: str + prefix: str + def __init__(self, prefix: _Optional[str] = ..., path: _Optional[str] = ...) -> None: ... + ITEMS_FIELD_NUMBER: _ClassVar[int] + NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + items: _containers.RepeatedCompositeFieldContainer[ListObjectsInS3ExportResult.Item] + next_page_token: str + def __init__(self, items: _Optional[_Iterable[_Union[ListObjectsInS3ExportResult.Item, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ... + +class ListObjectsInS3ExportSettings(_message.Message): + __slots__ = ["access_key", "bucket", "disable_virtual_addressing", "encryption_settings", "endpoint", "items", "number_of_retries", "prefix", "region", "scheme", "secret_key"] + class Item(_message.Message): + __slots__ = ["path"] + PATH_FIELD_NUMBER: _ClassVar[int] + path: str + def __init__(self, path: _Optional[str] = ...) -> None: ... + ACCESS_KEY_FIELD_NUMBER: _ClassVar[int] + BUCKET_FIELD_NUMBER: _ClassVar[int] + DISABLE_VIRTUAL_ADDRESSING_FIELD_NUMBER: _ClassVar[int] + ENCRYPTION_SETTINGS_FIELD_NUMBER: _ClassVar[int] + ENDPOINT_FIELD_NUMBER: _ClassVar[int] + ITEMS_FIELD_NUMBER: _ClassVar[int] + NUMBER_OF_RETRIES_FIELD_NUMBER: _ClassVar[int] + PREFIX_FIELD_NUMBER: _ClassVar[int] + REGION_FIELD_NUMBER: _ClassVar[int] + SCHEME_FIELD_NUMBER: _ClassVar[int] + SECRET_KEY_FIELD_NUMBER: _ClassVar[int] + access_key: str + bucket: str + disable_virtual_addressing: bool + encryption_settings: _ydb_export_pb2.EncryptionSettings + endpoint: str + items: _containers.RepeatedCompositeFieldContainer[ListObjectsInS3ExportSettings.Item] + number_of_retries: int + prefix: str + region: str + scheme: ImportFromS3Settings.Scheme + secret_key: str + def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ImportFromS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ListObjectsInS3ExportSettings.Item, _Mapping]]] = ..., number_of_retries: _Optional[int] = ..., region: _Optional[str] = ..., disable_virtual_addressing: bool = ..., prefix: _Optional[str] = ..., encryption_settings: _Optional[_Union[_ydb_export_pb2.EncryptionSettings, _Mapping]] = ...) -> None: ... + class YdbDumpFormat(_message.Message): __slots__ = ["columns"] COLUMNS_FIELD_NUMBER: _ClassVar[int] diff --git a/ydb/_grpc/v4/protos/ydb_topic_pb2.py b/ydb/_grpc/v4/protos/ydb_topic_pb2.py index 9c1bdd86..02ef2b88 100644 --- a/ydb/_grpc/v4/protos/ydb_topic_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_topic_pb2.py @@ -22,7 +22,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\")\n\x12UpdateTokenRequest\x12\x13\n\x05token\x18\x01 \x01(\tB\x04\xb8\xe6*\x01\"\x15\n\x13UpdateTokenResponse\"C\n\x17PartitionWithGeneration\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x9e\x14\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xfe\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12#\n\x10message_group_id\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x07 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\xe8\x03\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x12/\n\x02tx\x18\x03 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentityH\x00\x88\x01\x01\x1a\xc6\x02\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12#\n\x10message_group_id\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x08 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioningB\x05\n\x03_tx\x1a\xeb\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\xf8\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x12Y\n\rwritten_in_tx\x18\x04 \x01(\x0b\x32@.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenInTxH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x1a\r\n\x0bWrittenInTxB\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x9c#\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xb1\x05\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x45\n\x0f\x64irect_read_ack\x18\x08 \x01(\x0b\x32*.Ydb.Topic.StreamReadMessage.DirectReadAckH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xf0\x06\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x12W\n\x18update_partition_session\x18\n \x01(\x0b\x32\x33.Ydb.Topic.StreamReadMessage.UpdatePartitionSessionH\x00\x12Q\n\x15\x65nd_partition_session\x18\x0b \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.EndPartitionSessionH\x00\x42\x10\n\x0eserver_message\x1a\xdc\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64irect_read\x18\x04 \x01(\x08\x12!\n\x19\x61uto_partitioning_support\x18\x05 \x01(\x08\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\x91\x06\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xda\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12!\n\x10message_group_id\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xcd\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xf0\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x38\n\x12partition_location\x18\x04 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1a\x84\x01\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x04 \x01(\x03\x1aN\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x1ap\n\x16UpdatePartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x38\n\x12partition_location\x18\x02 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x45\n\rDirectReadAck\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x1ap\n\x13\x45ndPartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1e\n\x16\x61\x64jacent_partition_ids\x18\x02 \x03(\x03\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\"\xf7\x0c\n\x17StreamDirectReadMessage\x1a\xa8\x02\n\nFromClient\x12\x46\n\x0cinit_request\x18\x01 \x01(\x0b\x32..Ydb.Topic.StreamDirectReadMessage.InitRequestH\x00\x12\x80\x01\n+start_direct_read_partition_session_request\x18\x02 \x01(\x0b\x32I.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xca\x04\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12H\n\rinit_response\x18\x06 \x01(\x0b\x32/.Ydb.Topic.StreamDirectReadMessage.InitResponseH\x00\x12\x82\x01\n,start_direct_read_partition_session_response\x18\x07 \x01(\x0b\x32J.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionResponseH\x00\x12o\n\"stop_direct_read_partition_session\x18\x03 \x01(\x0b\x32\x41.Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSessionH\x00\x12U\n\x14\x64irect_read_response\x18\x04 \x01(\x0b\x32\x35.Ydb.Topic.StreamDirectReadMessage.DirectReadResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xb6\x01\n\x0bInitRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12^\n\x14topics_read_settings\x18\x02 \x03(\x0b\x32@.Ydb.Topic.StreamDirectReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x1a!\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x1a\x0e\n\x0cInitResponse\x1aw\n&StartDirectReadPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x02 \x01(\x03\x12\x12\n\ngeneration\x18\x03 \x01(\x03\x1a[\n\'StartDirectReadPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\x1a\xa6\x01\n\x1eStopDirectReadPartitionSession\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1c\n\x14partition_session_id\x18\x03 \x01(\x03\x12\x12\n\ngeneration\x18\x04 \x01(\x03\x1a\x9b\x01\n\x12\x44irectReadResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x12O\n\x0epartition_data\x18\x03 \x01(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\"2\n\x13TransactionIdentity\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07session\x18\x02 \x01(\t\"\xc4\x03\n!UpdateOffsetsInTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12*\n\x02tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentity\x12I\n\x06topics\x18\x03 \x03(\x0b\x32\x39.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x1a\xda\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12^\n\npartitions\x18\x02 \x03(\x0b\x32J.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"R\n\"UpdateOffsetsInTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\"\n UpdateOffsetsInTransactionResult\"\x96\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xb3\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf3\x01\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"\xdc\x01\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12)\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0\x12G\n\x1a\x61uto_partitioning_settings\x18\x04 \x01(\x0b\x32#.Ydb.Topic.AutoPartitioningSettings\"\x9f\x01\n\x18\x41utoPartitioningSettings\x12\x35\n\x08strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategy\x12L\n\x15partition_write_speed\x18\x02 \x01(\x0b\x32-.Ydb.Topic.AutoPartitioningWriteSpeedStrategy\"\xb3\x01\n\"AutoPartitioningWriteSpeedStrategy\x12\x37\n\x14stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n\x16up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12*\n\x18\x64own_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\"\x8b\x03\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x32\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12W\n alter_auto_partitioning_settings\x18\x04 \x01(\x0b\x32(.Ydb.Topic.AlterAutoPartitioningSettingsH\x03\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_max_active_partitionsB\x1c\n\x1a_set_partition_count_limitB#\n!_alter_auto_partitioning_settings\"\xea\x01\n\x1d\x41lterAutoPartitioningSettings\x12>\n\x0cset_strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategyH\x00\x88\x01\x01\x12Z\n\x19set_partition_write_speed\x18\x02 \x01(\x0b\x32\x32.Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategyH\x01\x88\x01\x01\x42\x0f\n\r_set_strategyB\x1c\n\x1a_set_partition_write_speed\"\xb0\x02\n\'AlterAutoPartitioningWriteSpeedStrategy\x12@\n\x18set_stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x12\x31\n\x1aset_up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x33\n\x1cset_down_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x42\x1b\n\x19_set_stabilization_windowB\x1d\n\x1b_set_up_utilization_percentB\x1f\n\x1d_set_down_utilization_percent\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"8\n\x11PartitionLocation\x12\x0f\n\x07node_id\x18\x01 \x01(\x05\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"\x90\x01\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\x12\x18\n\x10include_location\x18\x04 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x11PartitionKeyRange\x12\x17\n\nfrom_bound\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x15\n\x08to_bound\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_from_boundB\x0b\n\t_to_bound\"\xfa\t\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12\x33\n+partition_total_read_speed_bytes_per_second\x18\x0e \x01(\x03\x12\x36\n.partition_consumer_read_speed_bytes_per_second\x18\x0f \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x8f\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12\x38\n\x12partition_location\x18\x06 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x12/\n\tkey_range\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionKeyRange\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\xaa\x01\n\x18\x44\x65scribePartitionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"I\n\x19\x44\x65scribePartitionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Z\n\x17\x44\x65scribePartitionResult\x12?\n\tpartition\x18\x01 \x01(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\"\xa5\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x98\x07\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\xba\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x12\x38\n\x12partition_location\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\xb3\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\xa0\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x1d\n\x11partition_node_id\x18\x08 \x01(\x05\x42\x02\x18\x01\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*\xf1\x01\n\x18\x41utoPartitioningStrategy\x12*\n&AUTO_PARTITIONING_STRATEGY_UNSPECIFIED\x10\x00\x12\'\n#AUTO_PARTITIONING_STRATEGY_DISABLED\x10\x01\x12\'\n#AUTO_PARTITIONING_STRATEGY_SCALE_UP\x10\x02\x12\x30\n,AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN\x10\x03\x12%\n!AUTO_PARTITIONING_STRATEGY_PAUSED\x10\x04*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\")\n\x12UpdateTokenRequest\x12\x13\n\x05token\x18\x01 \x01(\tB\x04\xb8\xe6*\x01\"\x15\n\x13UpdateTokenResponse\"C\n\x17PartitionWithGeneration\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x9e\x14\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xfe\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12#\n\x10message_group_id\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x07 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\xe8\x03\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x12/\n\x02tx\x18\x03 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentityH\x00\x88\x01\x01\x1a\xc6\x02\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12#\n\x10message_group_id\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x08 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioningB\x05\n\x03_tx\x1a\xeb\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\xf8\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x12Y\n\rwritten_in_tx\x18\x04 \x01(\x0b\x32@.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenInTxH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x1a\r\n\x0bWrittenInTxB\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x9c#\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xb1\x05\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x45\n\x0f\x64irect_read_ack\x18\x08 \x01(\x0b\x32*.Ydb.Topic.StreamReadMessage.DirectReadAckH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xf0\x06\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x12W\n\x18update_partition_session\x18\n \x01(\x0b\x32\x33.Ydb.Topic.StreamReadMessage.UpdatePartitionSessionH\x00\x12Q\n\x15\x65nd_partition_session\x18\x0b \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.EndPartitionSessionH\x00\x42\x10\n\x0eserver_message\x1a\xdc\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64irect_read\x18\x04 \x01(\x08\x12!\n\x19\x61uto_partitioning_support\x18\x05 \x01(\x08\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\x91\x06\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xda\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12!\n\x10message_group_id\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xcd\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xf0\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x38\n\x12partition_location\x18\x04 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1a\x84\x01\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x04 \x01(\x03\x1aN\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x1ap\n\x16UpdatePartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x38\n\x12partition_location\x18\x02 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x45\n\rDirectReadAck\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x1ap\n\x13\x45ndPartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1e\n\x16\x61\x64jacent_partition_ids\x18\x02 \x03(\x03\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\"\x8b\r\n\x17StreamDirectReadMessage\x1a\xa8\x02\n\nFromClient\x12\x46\n\x0cinit_request\x18\x01 \x01(\x0b\x32..Ydb.Topic.StreamDirectReadMessage.InitRequestH\x00\x12\x80\x01\n+start_direct_read_partition_session_request\x18\x02 \x01(\x0b\x32I.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xca\x04\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12H\n\rinit_response\x18\x06 \x01(\x0b\x32/.Ydb.Topic.StreamDirectReadMessage.InitResponseH\x00\x12\x82\x01\n,start_direct_read_partition_session_response\x18\x07 \x01(\x0b\x32J.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionResponseH\x00\x12o\n\"stop_direct_read_partition_session\x18\x03 \x01(\x0b\x32\x41.Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSessionH\x00\x12U\n\x14\x64irect_read_response\x18\x04 \x01(\x0b\x32\x35.Ydb.Topic.StreamDirectReadMessage.DirectReadResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xb6\x01\n\x0bInitRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12^\n\x14topics_read_settings\x18\x02 \x03(\x0b\x32@.Ydb.Topic.StreamDirectReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x1a!\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x1a\x0e\n\x0cInitResponse\x1aw\n&StartDirectReadPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x02 \x01(\x03\x12\x12\n\ngeneration\x18\x03 \x01(\x03\x1a[\n\'StartDirectReadPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\x1a\xa6\x01\n\x1eStopDirectReadPartitionSession\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1c\n\x14partition_session_id\x18\x03 \x01(\x03\x12\x12\n\ngeneration\x18\x04 \x01(\x03\x1a\xaf\x01\n\x12\x44irectReadResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x12O\n\x0epartition_data\x18\x03 \x01(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x04 \x01(\x03\"2\n\x13TransactionIdentity\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07session\x18\x02 \x01(\t\"\xc4\x03\n!UpdateOffsetsInTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12*\n\x02tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentity\x12I\n\x06topics\x18\x03 \x03(\x0b\x32\x39.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x1a\xda\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12^\n\npartitions\x18\x02 \x03(\x0b\x32J.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"R\n\"UpdateOffsetsInTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\"\n UpdateOffsetsInTransactionResult\"\xaf\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x06 \x01(\t\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xee\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xae\x02\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16max_committed_time_lag\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"\xdc\x01\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12)\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0\x12G\n\x1a\x61uto_partitioning_settings\x18\x04 \x01(\x0b\x32#.Ydb.Topic.AutoPartitioningSettings\"\x9f\x01\n\x18\x41utoPartitioningSettings\x12\x35\n\x08strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategy\x12L\n\x15partition_write_speed\x18\x02 \x01(\x0b\x32-.Ydb.Topic.AutoPartitioningWriteSpeedStrategy\"\xb3\x01\n\"AutoPartitioningWriteSpeedStrategy\x12\x37\n\x14stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n\x16up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12*\n\x18\x64own_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\"\x8b\x03\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x32\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12W\n alter_auto_partitioning_settings\x18\x04 \x01(\x0b\x32(.Ydb.Topic.AlterAutoPartitioningSettingsH\x03\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_max_active_partitionsB\x1c\n\x1a_set_partition_count_limitB#\n!_alter_auto_partitioning_settings\"\xea\x01\n\x1d\x41lterAutoPartitioningSettings\x12>\n\x0cset_strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategyH\x00\x88\x01\x01\x12Z\n\x19set_partition_write_speed\x18\x02 \x01(\x0b\x32\x32.Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategyH\x01\x88\x01\x01\x42\x0f\n\r_set_strategyB\x1c\n\x1a_set_partition_write_speed\"\xb0\x02\n\'AlterAutoPartitioningWriteSpeedStrategy\x12@\n\x18set_stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x12\x31\n\x1aset_up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x33\n\x1cset_down_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x42\x1b\n\x19_set_stabilization_windowB\x1d\n\x1b_set_up_utilization_percentB\x1f\n\x1d_set_down_utilization_percent\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"8\n\x11PartitionLocation\x12\x0f\n\x07node_id\x18\x01 \x01(\x05\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"\x90\x01\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\x12\x18\n\x10include_location\x18\x04 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x11PartitionKeyRange\x12\x17\n\nfrom_bound\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x15\n\x08to_bound\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_from_boundB\x0b\n\t_to_bound\"\xfa\t\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12\x33\n+partition_total_read_speed_bytes_per_second\x18\x0e \x01(\x03\x12\x36\n.partition_consumer_read_speed_bytes_per_second\x18\x0f \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x8f\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12\x38\n\x12partition_location\x18\x06 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x12/\n\tkey_range\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionKeyRange\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\xaa\x01\n\x18\x44\x65scribePartitionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"I\n\x19\x44\x65scribePartitionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Z\n\x17\x44\x65scribePartitionResult\x12?\n\tpartition\x18\x01 \x01(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\"\xa5\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xd3\x07\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\xba\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x12\x38\n\x12partition_location\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\xee\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16max_committed_time_lag\x18\r \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\xa0\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x1d\n\x11partition_node_id\x18\x08 \x01(\x05\x42\x02\x18\x01\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*\xf1\x01\n\x18\x41utoPartitioningStrategy\x12*\n&AUTO_PARTITIONING_STRATEGY_UNSPECIFIED\x10\x00\x12\'\n#AUTO_PARTITIONING_STRATEGY_DISABLED\x10\x01\x12\'\n#AUTO_PARTITIONING_STRATEGY_SCALE_UP\x10\x02\x12\x30\n,AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN\x10\x03\x12%\n!AUTO_PARTITIONING_STRATEGY_PAUSED\x10\x04*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_topic_pb2', globals()) @@ -102,12 +102,12 @@ _ALTERTOPICREQUEST.fields_by_name['drop_consumers']._serialized_options = b'\232\346*\003\030\270\027' _ALTERTOPICREQUEST.fields_by_name['alter_consumers']._options = None _ALTERTOPICREQUEST.fields_by_name['alter_consumers']._serialized_options = b'\232\346*\003\030\270\027' - _CODEC._serialized_start=18023 - _CODEC._serialized_end=18154 - _AUTOPARTITIONINGSTRATEGY._serialized_start=18157 - _AUTOPARTITIONINGSTRATEGY._serialized_end=18398 - _METERINGMODE._serialized_start=18400 - _METERINGMODE._serialized_end=18515 + _CODEC._serialized_start=18186 + _CODEC._serialized_end=18317 + _AUTOPARTITIONINGSTRATEGY._serialized_start=18320 + _AUTOPARTITIONINGSTRATEGY._serialized_end=18561 + _METERINGMODE._serialized_start=18563 + _METERINGMODE._serialized_end=18678 _SUPPORTEDCODECS._serialized_start=291 _SUPPORTEDCODECS._serialized_end=346 _OFFSETSRANGE._serialized_start=348 @@ -203,7 +203,7 @@ _STREAMREADMESSAGE_ENDPARTITIONSESSION._serialized_start=7561 _STREAMREADMESSAGE_ENDPARTITIONSESSION._serialized_end=7673 _STREAMDIRECTREADMESSAGE._serialized_start=7676 - _STREAMDIRECTREADMESSAGE._serialized_end=9331 + _STREAMDIRECTREADMESSAGE._serialized_end=9351 _STREAMDIRECTREADMESSAGE_FROMCLIENT._serialized_start=7704 _STREAMDIRECTREADMESSAGE_FROMCLIENT._serialized_end=8000 _STREAMDIRECTREADMESSAGE_FROMSERVER._serialized_start=8003 @@ -221,103 +221,103 @@ _STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION._serialized_start=9007 _STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION._serialized_end=9173 _STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE._serialized_start=9176 - _STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE._serialized_end=9331 - _TRANSACTIONIDENTITY._serialized_start=9333 - _TRANSACTIONIDENTITY._serialized_end=9383 - _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_start=9386 - _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_end=9838 - _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_start=9620 - _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_end=9838 - _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_start=9746 - _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_end=9838 - _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_start=9840 - _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_end=9922 - _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_start=9924 - _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_end=9958 - _COMMITOFFSETREQUEST._serialized_start=9961 - _COMMITOFFSETREQUEST._serialized_end=10111 - _COMMITOFFSETRESPONSE._serialized_start=10113 - _COMMITOFFSETRESPONSE._serialized_end=10181 - _COMMITOFFSETRESULT._serialized_start=10183 - _COMMITOFFSETRESULT._serialized_end=10203 - _MULTIPLEWINDOWSSTAT._serialized_start=10205 - _MULTIPLEWINDOWSSTAT._serialized_end=10281 - _CONSUMER._serialized_start=10284 - _CONSUMER._serialized_end=10847 - _CONSUMER_ATTRIBUTESENTRY._serialized_start=10546 - _CONSUMER_ATTRIBUTESENTRY._serialized_end=10595 - _CONSUMER_CONSUMERSTATS._serialized_start=10598 - _CONSUMER_CONSUMERSTATS._serialized_end=10841 - _ALTERCONSUMER._serialized_start=10850 - _ALTERCONSUMER._serialized_end=11169 - _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_start=11091 - _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_end=11145 - _PARTITIONINGSETTINGS._serialized_start=11172 - _PARTITIONINGSETTINGS._serialized_end=11392 - _AUTOPARTITIONINGSETTINGS._serialized_start=11395 - _AUTOPARTITIONINGSETTINGS._serialized_end=11554 - _AUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_start=11557 - _AUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_end=11736 - _ALTERPARTITIONINGSETTINGS._serialized_start=11739 - _ALTERPARTITIONINGSETTINGS._serialized_end=12134 - _ALTERAUTOPARTITIONINGSETTINGS._serialized_start=12137 - _ALTERAUTOPARTITIONINGSETTINGS._serialized_end=12371 - _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_start=12374 - _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_end=12678 - _CREATETOPICREQUEST._serialized_start=12681 - _CREATETOPICREQUEST._serialized_end=13311 - _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_start=10546 - _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_end=10595 - _CREATETOPICRESPONSE._serialized_start=13313 - _CREATETOPICRESPONSE._serialized_end=13380 - _CREATETOPICRESULT._serialized_start=13382 - _CREATETOPICRESULT._serialized_end=13401 - _PARTITIONLOCATION._serialized_start=13403 - _PARTITIONLOCATION._serialized_end=13459 - _DESCRIBETOPICREQUEST._serialized_start=13462 - _DESCRIBETOPICREQUEST._serialized_end=13606 - _DESCRIBETOPICRESPONSE._serialized_start=13608 - _DESCRIBETOPICRESPONSE._serialized_end=13677 - _PARTITIONKEYRANGE._serialized_start=13679 - _PARTITIONKEYRANGE._serialized_end=13774 - _DESCRIBETOPICRESULT._serialized_start=13777 - _DESCRIBETOPICRESULT._serialized_end=15051 - _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_start=10546 - _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_end=10595 - _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_start=14566 - _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_end=14837 - _DESCRIBETOPICRESULT_TOPICSTATS._serialized_start=14840 - _DESCRIBETOPICRESULT_TOPICSTATS._serialized_end=15045 - _DESCRIBEPARTITIONREQUEST._serialized_start=15054 - _DESCRIBEPARTITIONREQUEST._serialized_end=15224 - _DESCRIBEPARTITIONRESPONSE._serialized_start=15226 - _DESCRIBEPARTITIONRESPONSE._serialized_end=15299 - _DESCRIBEPARTITIONRESULT._serialized_start=15301 - _DESCRIBEPARTITIONRESULT._serialized_end=15391 - _DESCRIBECONSUMERREQUEST._serialized_start=15394 - _DESCRIBECONSUMERREQUEST._serialized_end=15559 - _DESCRIBECONSUMERRESPONSE._serialized_start=15561 - _DESCRIBECONSUMERRESPONSE._serialized_end=15633 - _DESCRIBECONSUMERRESULT._serialized_start=15636 - _DESCRIBECONSUMERRESULT._serialized_end=16556 - _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_start=15804 - _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_end=16118 - _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_start=16121 - _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_end=16556 - _PARTITIONSTATS._serialized_start=16559 - _PARTITIONSTATS._serialized_end=16847 - _ALTERTOPICREQUEST._serialized_start=16850 - _ALTERTOPICREQUEST._serialized_end=17753 - _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_start=11091 - _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_end=11145 - _ALTERTOPICRESPONSE._serialized_start=17755 - _ALTERTOPICRESPONSE._serialized_end=17821 - _ALTERTOPICRESULT._serialized_start=17823 - _ALTERTOPICRESULT._serialized_end=17841 - _DROPTOPICREQUEST._serialized_start=17843 - _DROPTOPICREQUEST._serialized_end=17934 - _DROPTOPICRESPONSE._serialized_start=17936 - _DROPTOPICRESPONSE._serialized_end=18001 - _DROPTOPICRESULT._serialized_start=18003 - _DROPTOPICRESULT._serialized_end=18020 + _STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE._serialized_end=9351 + _TRANSACTIONIDENTITY._serialized_start=9353 + _TRANSACTIONIDENTITY._serialized_end=9403 + _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_start=9406 + _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_end=9858 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_start=9640 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_end=9858 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_start=9766 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_end=9858 + _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_start=9860 + _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_end=9942 + _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_start=9944 + _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_end=9978 + _COMMITOFFSETREQUEST._serialized_start=9981 + _COMMITOFFSETREQUEST._serialized_end=10156 + _COMMITOFFSETRESPONSE._serialized_start=10158 + _COMMITOFFSETRESPONSE._serialized_end=10226 + _COMMITOFFSETRESULT._serialized_start=10228 + _COMMITOFFSETRESULT._serialized_end=10248 + _MULTIPLEWINDOWSSTAT._serialized_start=10250 + _MULTIPLEWINDOWSSTAT._serialized_end=10326 + _CONSUMER._serialized_start=10329 + _CONSUMER._serialized_end=10951 + _CONSUMER_ATTRIBUTESENTRY._serialized_start=10591 + _CONSUMER_ATTRIBUTESENTRY._serialized_end=10640 + _CONSUMER_CONSUMERSTATS._serialized_start=10643 + _CONSUMER_CONSUMERSTATS._serialized_end=10945 + _ALTERCONSUMER._serialized_start=10954 + _ALTERCONSUMER._serialized_end=11273 + _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_start=11195 + _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_end=11249 + _PARTITIONINGSETTINGS._serialized_start=11276 + _PARTITIONINGSETTINGS._serialized_end=11496 + _AUTOPARTITIONINGSETTINGS._serialized_start=11499 + _AUTOPARTITIONINGSETTINGS._serialized_end=11658 + _AUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_start=11661 + _AUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_end=11840 + _ALTERPARTITIONINGSETTINGS._serialized_start=11843 + _ALTERPARTITIONINGSETTINGS._serialized_end=12238 + _ALTERAUTOPARTITIONINGSETTINGS._serialized_start=12241 + _ALTERAUTOPARTITIONINGSETTINGS._serialized_end=12475 + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_start=12478 + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_end=12782 + _CREATETOPICREQUEST._serialized_start=12785 + _CREATETOPICREQUEST._serialized_end=13415 + _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_start=10591 + _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_end=10640 + _CREATETOPICRESPONSE._serialized_start=13417 + _CREATETOPICRESPONSE._serialized_end=13484 + _CREATETOPICRESULT._serialized_start=13486 + _CREATETOPICRESULT._serialized_end=13505 + _PARTITIONLOCATION._serialized_start=13507 + _PARTITIONLOCATION._serialized_end=13563 + _DESCRIBETOPICREQUEST._serialized_start=13566 + _DESCRIBETOPICREQUEST._serialized_end=13710 + _DESCRIBETOPICRESPONSE._serialized_start=13712 + _DESCRIBETOPICRESPONSE._serialized_end=13781 + _PARTITIONKEYRANGE._serialized_start=13783 + _PARTITIONKEYRANGE._serialized_end=13878 + _DESCRIBETOPICRESULT._serialized_start=13881 + _DESCRIBETOPICRESULT._serialized_end=15155 + _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_start=10591 + _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_end=10640 + _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_start=14670 + _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_end=14941 + _DESCRIBETOPICRESULT_TOPICSTATS._serialized_start=14944 + _DESCRIBETOPICRESULT_TOPICSTATS._serialized_end=15149 + _DESCRIBEPARTITIONREQUEST._serialized_start=15158 + _DESCRIBEPARTITIONREQUEST._serialized_end=15328 + _DESCRIBEPARTITIONRESPONSE._serialized_start=15330 + _DESCRIBEPARTITIONRESPONSE._serialized_end=15403 + _DESCRIBEPARTITIONRESULT._serialized_start=15405 + _DESCRIBEPARTITIONRESULT._serialized_end=15495 + _DESCRIBECONSUMERREQUEST._serialized_start=15498 + _DESCRIBECONSUMERREQUEST._serialized_end=15663 + _DESCRIBECONSUMERRESPONSE._serialized_start=15665 + _DESCRIBECONSUMERRESPONSE._serialized_end=15737 + _DESCRIBECONSUMERRESULT._serialized_start=15740 + _DESCRIBECONSUMERRESULT._serialized_end=16719 + _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_start=15908 + _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_end=16222 + _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_start=16225 + _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_end=16719 + _PARTITIONSTATS._serialized_start=16722 + _PARTITIONSTATS._serialized_end=17010 + _ALTERTOPICREQUEST._serialized_start=17013 + _ALTERTOPICREQUEST._serialized_end=17916 + _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_start=11195 + _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_end=11249 + _ALTERTOPICRESPONSE._serialized_start=17918 + _ALTERTOPICRESPONSE._serialized_end=17984 + _ALTERTOPICRESULT._serialized_start=17986 + _ALTERTOPICRESULT._serialized_end=18004 + _DROPTOPICREQUEST._serialized_start=18006 + _DROPTOPICREQUEST._serialized_end=18097 + _DROPTOPICRESPONSE._serialized_start=18099 + _DROPTOPICRESPONSE._serialized_end=18164 + _DROPTOPICRESULT._serialized_start=18166 + _DROPTOPICRESULT._serialized_end=18183 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_topic_pb2.pyi b/ydb/_grpc/v4/protos/ydb_topic_pb2.pyi index 58e2156e..83fd9d60 100644 --- a/ydb/_grpc/v4/protos/ydb_topic_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_topic_pb2.pyi @@ -145,18 +145,20 @@ class AutoPartitioningWriteSpeedStrategy(_message.Message): def __init__(self, stabilization_window: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., up_utilization_percent: _Optional[int] = ..., down_utilization_percent: _Optional[int] = ...) -> None: ... class CommitOffsetRequest(_message.Message): - __slots__ = ["consumer", "offset", "operation_params", "partition_id", "path"] + __slots__ = ["consumer", "offset", "operation_params", "partition_id", "path", "read_session_id"] CONSUMER_FIELD_NUMBER: _ClassVar[int] OFFSET_FIELD_NUMBER: _ClassVar[int] OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] PARTITION_ID_FIELD_NUMBER: _ClassVar[int] PATH_FIELD_NUMBER: _ClassVar[int] + READ_SESSION_ID_FIELD_NUMBER: _ClassVar[int] consumer: str offset: int operation_params: _ydb_operation_pb2.OperationParams partition_id: int path: str - def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., consumer: _Optional[str] = ..., offset: _Optional[int] = ...) -> None: ... + read_session_id: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., consumer: _Optional[str] = ..., offset: _Optional[int] = ..., read_session_id: _Optional[str] = ...) -> None: ... class CommitOffsetResponse(_message.Message): __slots__ = ["operation"] @@ -178,16 +180,18 @@ class Consumer(_message.Message): value: str def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... class ConsumerStats(_message.Message): - __slots__ = ["bytes_read", "max_read_time_lag", "max_write_time_lag", "min_partitions_last_read_time"] + __slots__ = ["bytes_read", "max_committed_time_lag", "max_read_time_lag", "max_write_time_lag", "min_partitions_last_read_time"] BYTES_READ_FIELD_NUMBER: _ClassVar[int] + MAX_COMMITTED_TIME_LAG_FIELD_NUMBER: _ClassVar[int] MAX_READ_TIME_LAG_FIELD_NUMBER: _ClassVar[int] MAX_WRITE_TIME_LAG_FIELD_NUMBER: _ClassVar[int] MIN_PARTITIONS_LAST_READ_TIME_FIELD_NUMBER: _ClassVar[int] bytes_read: MultipleWindowsStat + max_committed_time_lag: _duration_pb2.Duration max_read_time_lag: _duration_pb2.Duration max_write_time_lag: _duration_pb2.Duration min_partitions_last_read_time: _timestamp_pb2.Timestamp - def __init__(self, min_partitions_last_read_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., max_read_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_write_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., bytes_read: _Optional[_Union[MultipleWindowsStat, _Mapping]] = ...) -> None: ... + def __init__(self, min_partitions_last_read_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., max_read_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_write_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_committed_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., bytes_read: _Optional[_Union[MultipleWindowsStat, _Mapping]] = ...) -> None: ... ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] CONSUMER_STATS_FIELD_NUMBER: _ClassVar[int] IMPORTANT_FIELD_NUMBER: _ClassVar[int] @@ -268,12 +272,13 @@ class DescribeConsumerResponse(_message.Message): class DescribeConsumerResult(_message.Message): __slots__ = ["consumer", "partitions", "self"] class PartitionConsumerStats(_message.Message): - __slots__ = ["bytes_read", "committed_offset", "connection_node_id", "last_read_offset", "last_read_time", "max_read_time_lag", "max_write_time_lag", "partition_read_session_create_time", "read_session_id", "reader_name"] + __slots__ = ["bytes_read", "committed_offset", "connection_node_id", "last_read_offset", "last_read_time", "max_committed_time_lag", "max_read_time_lag", "max_write_time_lag", "partition_read_session_create_time", "read_session_id", "reader_name"] BYTES_READ_FIELD_NUMBER: _ClassVar[int] COMMITTED_OFFSET_FIELD_NUMBER: _ClassVar[int] CONNECTION_NODE_ID_FIELD_NUMBER: _ClassVar[int] LAST_READ_OFFSET_FIELD_NUMBER: _ClassVar[int] LAST_READ_TIME_FIELD_NUMBER: _ClassVar[int] + MAX_COMMITTED_TIME_LAG_FIELD_NUMBER: _ClassVar[int] MAX_READ_TIME_LAG_FIELD_NUMBER: _ClassVar[int] MAX_WRITE_TIME_LAG_FIELD_NUMBER: _ClassVar[int] PARTITION_READ_SESSION_CREATE_TIME_FIELD_NUMBER: _ClassVar[int] @@ -284,12 +289,13 @@ class DescribeConsumerResult(_message.Message): connection_node_id: int last_read_offset: int last_read_time: _timestamp_pb2.Timestamp + max_committed_time_lag: _duration_pb2.Duration max_read_time_lag: _duration_pb2.Duration max_write_time_lag: _duration_pb2.Duration partition_read_session_create_time: _timestamp_pb2.Timestamp read_session_id: str reader_name: str - def __init__(self, last_read_offset: _Optional[int] = ..., committed_offset: _Optional[int] = ..., read_session_id: _Optional[str] = ..., partition_read_session_create_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., last_read_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., max_read_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_write_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., bytes_read: _Optional[_Union[MultipleWindowsStat, _Mapping]] = ..., reader_name: _Optional[str] = ..., connection_node_id: _Optional[int] = ...) -> None: ... + def __init__(self, last_read_offset: _Optional[int] = ..., committed_offset: _Optional[int] = ..., read_session_id: _Optional[str] = ..., partition_read_session_create_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., last_read_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., max_read_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_write_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_committed_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., bytes_read: _Optional[_Union[MultipleWindowsStat, _Mapping]] = ..., reader_name: _Optional[str] = ..., connection_node_id: _Optional[int] = ...) -> None: ... class PartitionInfo(_message.Message): __slots__ = ["active", "child_partition_ids", "parent_partition_ids", "partition_consumer_stats", "partition_id", "partition_location", "partition_stats"] ACTIVE_FIELD_NUMBER: _ClassVar[int] @@ -525,14 +531,16 @@ class PartitioningSettings(_message.Message): class StreamDirectReadMessage(_message.Message): __slots__ = [] class DirectReadResponse(_message.Message): - __slots__ = ["direct_read_id", "partition_data", "partition_session_id"] + __slots__ = ["bytes_size", "direct_read_id", "partition_data", "partition_session_id"] + BYTES_SIZE_FIELD_NUMBER: _ClassVar[int] DIRECT_READ_ID_FIELD_NUMBER: _ClassVar[int] PARTITION_DATA_FIELD_NUMBER: _ClassVar[int] PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + bytes_size: int direct_read_id: int partition_data: StreamReadMessage.ReadResponse.PartitionData partition_session_id: int - def __init__(self, partition_session_id: _Optional[int] = ..., direct_read_id: _Optional[int] = ..., partition_data: _Optional[_Union[StreamReadMessage.ReadResponse.PartitionData, _Mapping]] = ...) -> None: ... + def __init__(self, partition_session_id: _Optional[int] = ..., direct_read_id: _Optional[int] = ..., partition_data: _Optional[_Union[StreamReadMessage.ReadResponse.PartitionData, _Mapping]] = ..., bytes_size: _Optional[int] = ...) -> None: ... class FromClient(_message.Message): __slots__ = ["init_request", "start_direct_read_partition_session_request", "update_token_request"] INIT_REQUEST_FIELD_NUMBER: _ClassVar[int] diff --git a/ydb/_grpc/v4/ydb_import_v1_pb2.py b/ydb/_grpc/v4/ydb_import_v1_pb2.py index 4ef5b612..a84ac450 100644 --- a/ydb/_grpc/v4/ydb_import_v1_pb2.py +++ b/ydb/_grpc/v4/ydb_import_v1_pb2.py @@ -15,7 +15,7 @@ from ydb._grpc.v4.protos import ydb_import_pb2 as protos_dot_ydb__import__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13ydb_import_v1.proto\x12\rYdb.Import.V1\x1a\x17protos/ydb_import.proto2\xaf\x01\n\rImportService\x12Q\n\x0cImportFromS3\x12\x1f.Ydb.Import.ImportFromS3Request\x1a .Ydb.Import.ImportFromS3Response\x12K\n\nImportData\x12\x1d.Ydb.Import.ImportDataRequest\x1a\x1e.Ydb.Import.ImportDataResponseBR\n\x19tech.ydb.proto.import_.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Import_V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13ydb_import_v1.proto\x12\rYdb.Import.V1\x1a\x17protos/ydb_import.proto2\x9d\x02\n\rImportService\x12Q\n\x0cImportFromS3\x12\x1f.Ydb.Import.ImportFromS3Request\x1a .Ydb.Import.ImportFromS3Response\x12l\n\x15ListObjectsInS3Export\x12(.Ydb.Import.ListObjectsInS3ExportRequest\x1a).Ydb.Import.ListObjectsInS3ExportResponse\x12K\n\nImportData\x12\x1d.Ydb.Import.ImportDataRequest\x1a\x1e.Ydb.Import.ImportDataResponseBR\n\x19tech.ydb.proto.import_.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Import_V1b\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_import_v1_pb2', globals()) @@ -24,5 +24,5 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\031tech.ydb.proto.import_.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Import_V1' _IMPORTSERVICE._serialized_start=64 - _IMPORTSERVICE._serialized_end=239 + _IMPORTSERVICE._serialized_end=349 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/ydb_import_v1_pb2_grpc.py b/ydb/_grpc/v4/ydb_import_v1_pb2_grpc.py index 29e02b72..79261bae 100644 --- a/ydb/_grpc/v4/ydb_import_v1_pb2_grpc.py +++ b/ydb/_grpc/v4/ydb_import_v1_pb2_grpc.py @@ -19,6 +19,11 @@ def __init__(self, channel): request_serializer=protos_dot_ydb__import__pb2.ImportFromS3Request.SerializeToString, response_deserializer=protos_dot_ydb__import__pb2.ImportFromS3Response.FromString, ) + self.ListObjectsInS3Export = channel.unary_unary( + '/Ydb.Import.V1.ImportService/ListObjectsInS3Export', + request_serializer=protos_dot_ydb__import__pb2.ListObjectsInS3ExportRequest.SerializeToString, + response_deserializer=protos_dot_ydb__import__pb2.ListObjectsInS3ExportResponse.FromString, + ) self.ImportData = channel.unary_unary( '/Ydb.Import.V1.ImportService/ImportData', request_serializer=protos_dot_ydb__import__pb2.ImportDataRequest.SerializeToString, @@ -37,6 +42,13 @@ def ImportFromS3(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def ListObjectsInS3Export(self, request, context): + """List objects from existing export stored in S3 bucket + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ImportData(self, request, context): """Writes data to a table. Method accepts serialized data in the selected format and writes it non-transactionally. @@ -53,6 +65,11 @@ def add_ImportServiceServicer_to_server(servicer, server): request_deserializer=protos_dot_ydb__import__pb2.ImportFromS3Request.FromString, response_serializer=protos_dot_ydb__import__pb2.ImportFromS3Response.SerializeToString, ), + 'ListObjectsInS3Export': grpc.unary_unary_rpc_method_handler( + servicer.ListObjectsInS3Export, + request_deserializer=protos_dot_ydb__import__pb2.ListObjectsInS3ExportRequest.FromString, + response_serializer=protos_dot_ydb__import__pb2.ListObjectsInS3ExportResponse.SerializeToString, + ), 'ImportData': grpc.unary_unary_rpc_method_handler( servicer.ImportData, request_deserializer=protos_dot_ydb__import__pb2.ImportDataRequest.FromString, @@ -85,6 +102,23 @@ def ImportFromS3(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def ListObjectsInS3Export(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, '/Ydb.Import.V1.ImportService/ListObjectsInS3Export', + protos_dot_ydb__import__pb2.ListObjectsInS3ExportRequest.SerializeToString, + protos_dot_ydb__import__pb2.ListObjectsInS3ExportResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def ImportData(request, target, diff --git a/ydb/_grpc/v4/ydb_query_v1_pb2_grpc.py b/ydb/_grpc/v4/ydb_query_v1_pb2_grpc.py index c4527e62..2db93429 100644 --- a/ydb/_grpc/v4/ydb_query_v1_pb2_grpc.py +++ b/ydb/_grpc/v4/ydb_query_v1_pb2_grpc.py @@ -7,12 +7,7 @@ class QueryServiceStub(object): - """! WARNING: Experimental API - ! This API is currently in experimental state and is a subject for changes. - ! No backward and/or forward compatibility guarantees are provided. - ! DO NOT USE for production workloads. - - """ + """Missing associated documentation comment in .proto file.""" def __init__(self, channel): """Constructor. @@ -68,12 +63,7 @@ def __init__(self, channel): class QueryServiceServicer(object): - """! WARNING: Experimental API - ! This API is currently in experimental state and is a subject for changes. - ! No backward and/or forward compatibility guarantees are provided. - ! DO NOT USE for production workloads. - - """ + """Missing associated documentation comment in .proto file.""" def CreateSession(self, request, context): """Sessions are basic primitives for communicating with YDB Query Service. The are similar to @@ -214,12 +204,7 @@ def add_QueryServiceServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. class QueryService(object): - """! WARNING: Experimental API - ! This API is currently in experimental state and is a subject for changes. - ! No backward and/or forward compatibility guarantees are provided. - ! DO NOT USE for production workloads. - - """ + """Missing associated documentation comment in .proto file.""" @staticmethod def CreateSession(request, diff --git a/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.py b/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.py index bd97faea..49643567 100644 --- a/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.py +++ b/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.py @@ -22,7 +22,7 @@ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&draft/protos/ydb_federated_query.proto\x12\x0e\x46\x65\x64\x65ratedQuery\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x16protos/ydb_value.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"{\n\x03\x41\x63l\x12\x32\n\nvisibility\x18\x01 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"@\n\nVisibility\x12\x1a\n\x16VISIBILITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\t\n\x05SCOPE\x10\x02\"\x83\x03\n\x06Limits\x12!\n\x0fvcpu_rate_limit\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0f\x66low_rate_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fvcpu_time_limit\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_size\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_rows\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1e\n\x0cmemory_limit\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\nresult_ttl\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x11\x65xecution_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x38\n\x12\x65xecution_deadline\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\t\n\x07timeout\"\xef\x03\n\x14StreamingDisposition\x12(\n\x06oldest\x18\x01 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\'\n\x05\x66resh\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x42\n\tfrom_time\x18\x03 \x01(\x0b\x32-.FederatedQuery.StreamingDisposition.FromTimeH\x00\x12@\n\x08time_ago\x18\x04 \x01(\x0b\x32,.FederatedQuery.StreamingDisposition.TimeAgoH\x00\x12W\n\x14\x66rom_last_checkpoint\x18\x05 \x01(\x0b\x32\x37.FederatedQuery.StreamingDisposition.FromLastCheckpointH\x00\x1a\x39\n\x08\x46romTime\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x36\n\x07TimeAgo\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a#\n\x12\x46romLastCheckpoint\x12\r\n\x05\x66orce\x18\x01 \x01(\x08\x42\r\n\x0b\x64isposition\"\xd4\x04\n\x0cQueryContent\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12&\n\x06limits\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Limits\x12\x1a\n\x04text\x18\x05 \x01(\tB\x0c\xa2\xe6*\x08\n\x06\x08\x01\x10\x80\xa0\x06\x12\x11\n\tautomatic\x18\x06 \x01(\x08\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\x12\x64\n\x12\x65xecution_settings\x18\n \x03(\x0b\x32\x33.FederatedQuery.QueryContent.ExecutionSettingsEntryB\x13\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x03\x18\x80 \x12\x38\n\x06syntax\x18\x0b \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\x1a\x38\n\x16\x45xecutionSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"E\n\tQueryType\x12\x1a\n\x16QUERY_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tANALYTICS\x10\x01\x12\r\n\tSTREAMING\x10\x02\"?\n\x0bQuerySyntax\x12\x1c\n\x18QUERY_SYNTAX_UNSPECIFIED\x10\x00\x12\n\n\x06YQL_V1\x10\x01\x12\x06\n\x02PG\x10\x02\"\xe5\x01\n\nCommonMeta\x12\x17\n\x02id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x1f\n\ncreated_by\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12 \n\x0bmodified_by\x18\x03 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12.\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bmodified_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x08revision\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbf\x06\n\tQueryMeta\x12*\n\x06\x63ommon\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x30\n\x0csubmitted_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstarted_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x37\n\x06status\x18\x05 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x1f\n\x17last_job_query_revision\x18\x06 \x01(\x03\x12\x13\n\x0blast_job_id\x18\x07 \x01(\t\x12-\n\texpire_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10result_expire_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nstarted_by\x18\n \x01(\t\x12\x14\n\naborted_by\x18\x0b \x01(\tH\x00\x12\x13\n\tpaused_by\x18\x0c \x01(\tH\x00\x12\x1d\n\x15has_saved_checkpoints\x18\r \x01(\x08\"\x83\x02\n\rComputeStatus\x12\x1e\n\x1a\x43OMPUTE_STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STARTING\x10\x01\x12\x13\n\x0f\x41\x42ORTED_BY_USER\x10\x02\x12\x15\n\x11\x41\x42ORTED_BY_SYSTEM\x10\x03\x12\x14\n\x10\x41\x42ORTING_BY_USER\x10\x04\x12\x16\n\x12\x41\x42ORTING_BY_SYSTEM\x10\x05\x12\x0c\n\x08RESUMING\x10\x06\x12\x0b\n\x07RUNNING\x10\x07\x12\r\n\tCOMPLETED\x10\x08\x12\x0e\n\nCOMPLETING\x10\x0c\x12\n\n\x06\x46\x41ILED\x10\t\x12\x0b\n\x07\x46\x41ILING\x10\r\x12\n\n\x06PAUSED\x10\x0b\x12\x0b\n\x07PAUSING\x10\nB\x08\n\x06\x61\x63tion\"\xc9\x01\n\nBriefQuery\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\'\n\x04meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x05 \x01(\x08\"\x19\n\tQueryPlan\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x18\n\x08QueryAst\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\t\"]\n\rResultSetMeta\x12\x1b\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x1c\n\nrows_count\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x11\n\ttruncated\x18\x03 \x01(\x08\"\xf6\x02\n\x05Query\x12\'\n\x04meta\x18\x01 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\'\n\x04plan\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x04 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x30\n\x0ftransient_issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\"\x1f\n\x0fQueryStatistics\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x8e\x02\n\x12\x43reateQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x04 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x43reateQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\".\n\x11\x43reateQueryResult\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x93\x04\n\x12ListQueriesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x39\n\x06\x66ilter\x18\x04 \x01(\x0b\x32).FederatedQuery.ListQueriesRequest.Filter\x1a\xcc\x02\n\x06\x46ilter\x12:\n\nquery_type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12?\n\x06status\x18\x02 \x03(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatusB\x06\x9a\xe6*\x02\x18\x14\x12\x31\n\x04mode\x18\x03 \x03(\x0e\x32\x1b.FederatedQuery.ExecuteModeB\x06\x9a\xe6*\x02\x18\x14\x12\x15\n\x04name\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x05 \x01(\x08\x12\x32\n\nvisibility\x18\x06 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x30\n\tautomatic\x18\x07 \x01(\x0e\x32\x1d.FederatedQuery.AutomaticType\"C\n\x13ListQueriesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"`\n\x11ListQueriesResult\x12)\n\x05query\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.BriefQuery\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"p\n\x14\x44\x65scribeQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"E\n\x15\x44\x65scribeQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\";\n\x13\x44\x65scribeQueryResult\x12$\n\x05query\x18\x01 \x01(\x0b\x32\x15.FederatedQuery.Query\"q\n\x15GetQueryStatusRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"F\n\x16GetQueryStatusResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"f\n\x14GetQueryStatusResult\x12\x37\n\x06status\x18\x01 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x15\n\rmeta_revision\x18\x02 \x01(\x03\"\xb5\x01\n\x12\x44\x65leteQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x44\x65leteQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x44\x65leteQueryResult\"\x8a\x03\n\x12ModifyQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12-\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x05 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12\x36\n\x0fstate_load_mode\x18\x06 \x01(\x0e\x32\x1d.FederatedQuery.StateLoadMode\x12#\n\x11previous_revision\x18\x07 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13ModifyQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11ModifyQueryResult\"\xe3\x01\n\x13\x43ontrolQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12+\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.QueryAction\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"D\n\x14\x43ontrolQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ontrolQueryResult\"\xed\x01\n\x08\x42riefJob\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x12\n\nquery_name\x18\t \x01(\t\x12\x32\n\nvisibility\x18\n \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x83\x04\n\x03Job\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x0c\n\x04text\x18\x02 \x01(\t\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\'\n\x04plan\x18\x04 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\x12\x12\n\nquery_name\x18\t \x01(\t\x12 \n\x03\x61\x63l\x18\n \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x06syntax\x18\r \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\"\x8c\x02\n\x0fListJobsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x10\n\x08query_id\x18\x05 \x01(\t\x12\x36\n\x06\x66ilter\x18\x04 \x01(\x0b\x32&.FederatedQuery.ListJobsRequest.Filter\x1a:\n\x06\x46ilter\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\"@\n\x10ListJobsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Y\n\x0eListJobsResult\x12%\n\x03job\x18\x01 \x03(\x0b\x32\x18.FederatedQuery.BriefJob\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"l\n\x12\x44\x65scribeJobRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\x06job_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"C\n\x13\x44\x65scribeJobResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"5\n\x11\x44\x65scribeJobResult\x12 \n\x03job\x18\x01 \x01(\x0b\x32\x13.FederatedQuery.Job\"\x15\n\x13\x43urrentIAMTokenAuth\"\n\n\x08NoneAuth\")\n\x12ServiceAccountAuth\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\xba\x01\n\x07IamAuth\x12:\n\x0b\x63urrent_iam\x18\x01 \x01(\x0b\x32#.FederatedQuery.CurrentIAMTokenAuthH\x00\x12=\n\x0fservice_account\x18\x02 \x01(\x0b\x32\".FederatedQuery.ServiceAccountAuthH\x00\x12(\n\x04none\x18\x03 \x01(\x0b\x32\x18.FederatedQuery.NoneAuthH\x00\x42\n\n\x08identity\"\x98\x01\n\x0b\x44\x61taStreams\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"g\n\nMonitoring\x12\x18\n\x07project\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12\x18\n\x07\x63luster\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12%\n\x04\x61uth\x18\x03 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x98\x01\n\x0bYdbDatabase\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"\xf8\x01\n\x11\x43lickHouseCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"Y\n\x17ObjectStorageConnection\x12\x17\n\x06\x62ucket\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x91\x02\n\x11PostgreSQLCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x17\n\x06schema\x18\t \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"\xae\x04\n\x11\x43onnectionSetting\x12\x33\n\x0cydb_database\x18\x01 \x01(\x0b\x32\x1b.FederatedQuery.YdbDatabaseH\x00\x12?\n\x12\x63lickhouse_cluster\x18\x02 \x01(\x0b\x32!.FederatedQuery.ClickHouseClusterH\x00\x12\x33\n\x0c\x64\x61ta_streams\x18\x03 \x01(\x0b\x32\x1b.FederatedQuery.DataStreamsH\x00\x12\x41\n\x0eobject_storage\x18\x04 \x01(\x0b\x32\'.FederatedQuery.ObjectStorageConnectionH\x00\x12\x30\n\nmonitoring\x18\x05 \x01(\x0b\x32\x1a.FederatedQuery.MonitoringH\x00\x12?\n\x12postgresql_cluster\x18\x06 \x01(\x0b\x32!.FederatedQuery.PostgreSQLClusterH\x00\"\xa9\x01\n\x0e\x43onnectionType\x12\x1f\n\x1b\x43ONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cYDB_DATABASE\x10\x01\x12\x16\n\x12\x43LICKHOUSE_CLUSTER\x10\x02\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x03\x12\x12\n\x0eOBJECT_STORAGE\x10\x04\x12\x0e\n\nMONITORING\x10\x05\x12\x16\n\x12POSTGRESQL_CLUSTER\x10\x06\x42\x0c\n\nconnection\"\xa2\x01\n\x11\x43onnectionContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"j\n\nConnection\x12\x32\n\x07\x63ontent\x18\x01 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xaa\x01\n\x17\x43reateConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x43reateConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"<\n\x16\x43reateConnectionResult\x12\"\n\rconnection_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\x84\x03\n\x16ListConnectionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12=\n\x06\x66ilter\x18\x04 \x01(\x0b\x32-.FederatedQuery.ListConnectionsRequest.Filter\x1a\xb5\x01\n\x06\x46ilter\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\x12I\n\x0f\x63onnection_type\x18\x03 \x01(\x0e\x32\x30.FederatedQuery.ConnectionSetting.ConnectionType\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"G\n\x17ListConnectionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"i\n\x15ListConnectionsResult\x12.\n\nconnection\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.Connection\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"z\n\x19\x44\x65scribeConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"J\n\x1a\x44\x65scribeConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"J\n\x18\x44\x65scribeConnectionResult\x12.\n\nconnection\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.Connection\"\xf3\x01\n\x17ModifyConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07\x63ontent\x18\x03 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18ModifyConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16ModifyConnectionResult\"\xbf\x01\n\x17\x44\x65leteConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x44\x65leteConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16\x44\x65leteConnectionResult\"\x86\x01\n\x15TestConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\"F\n\x16TestConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x16\n\x14TestConnectionResult\"\xcc\x01\n\x14GetResultDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\x10result_set_index\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12\x18\n\x06offset\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1c\n\x05limit\x18\x05 \x01(\x03\x42\r\xb2\xe6*\t[1; 1000]\"E\n\x15GetResultDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"9\n\x13GetResultDataResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\".\n\x06Schema\x12$\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.ColumnB\x07\x9a\xe6*\x03\x18\xe8\x07\"\xa2\x02\n\x12\x44\x61taStreamsBinding\x12 \n\x0bstream_name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x0b\x63ompression\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12U\n\x0e\x66ormat_setting\x18\x05 \x03(\x0b\x32\x35.FederatedQuery.DataStreamsBinding.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x92\x04\n\x14ObjectStorageBinding\x12;\n\x06subset\x18\x01 \x03(\x0b\x32+.FederatedQuery.ObjectStorageBinding.Subset\x1a\xbc\x03\n\x06Subset\x12!\n\x0cpath_pattern\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12^\n\x0e\x66ormat_setting\x18\x03 \x03(\x0b\x32>.FederatedQuery.ObjectStorageBinding.Subset.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x12\x1c\n\x0b\x63ompression\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x05 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12O\n\nprojection\x18\x06 \x03(\x0b\x32;.FederatedQuery.ObjectStorageBinding.Subset.ProjectionEntry\x12\x16\n\x0epartitioned_by\x18\x07 \x03(\t\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fProjectionEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xea\x01\n\x0e\x42indingSetting\x12:\n\x0c\x64\x61ta_streams\x18\x01 \x01(\x0b\x32\".FederatedQuery.DataStreamsBindingH\x00\x12>\n\x0eobject_storage\x18\x02 \x01(\x0b\x32$.FederatedQuery.ObjectStorageBindingH\x00\"Q\n\x0b\x42indingType\x12\x1c\n\x18\x42INDING_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x01\x12\x12\n\x0eOBJECT_STORAGE\x10\x02\x42\t\n\x07\x62inding\"\xe5\x01\n\x0c\x42riefBinding\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12(\n\x04meta\x18\x03 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x38\n\x04type\x18\x04 \x01(\x0e\x32*.FederatedQuery.BindingSetting.BindingType\x12\x32\n\nvisibility\x18\x05 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"\xc0\x01\n\x0e\x42indingContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07setting\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingSetting\x12 \n\x03\x61\x63l\x18\x04 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"d\n\x07\x42inding\x12/\n\x07\x63ontent\x18\x01 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xa4\x01\n\x14\x43reateBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12/\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x43reateBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"6\n\x13\x43reateBindingResult\x12\x1f\n\nbinding_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\xd3\x02\n\x13ListBindingsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12:\n\x06\x66ilter\x18\x04 \x01(\x0b\x32*.FederatedQuery.ListBindingsRequest.Filter\x1a\x8a\x01\n\x06\x46ilter\x12\x1e\n\rconnection_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x03 \x01(\x08\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"D\n\x14ListBindingsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"e\n\x12ListBindingsResult\x12-\n\x07\x62inding\x18\x01 \x03(\x0b\x32\x1c.FederatedQuery.BriefBinding\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"t\n\x16\x44\x65scribeBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"G\n\x17\x44\x65scribeBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"A\n\x15\x44\x65scribeBindingResult\x12(\n\x07\x62inding\x18\x01 \x01(\x0b\x32\x17.FederatedQuery.Binding\"\xea\x01\n\x14ModifyBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15ModifyBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13ModifyBindingResult\"\xb9\x01\n\x14\x44\x65leteBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x44\x65leteBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13\x44\x65leteBindingResult*q\n\x0b\x45xecuteMode\x12\x1c\n\x18\x45XECUTE_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04SAVE\x10\x01\x12\t\n\x05PARSE\x10\x02\x12\x0b\n\x07\x43OMPILE\x10\x03\x12\x0c\n\x08VALIDATE\x10\x04\x12\x0b\n\x07\x45XPLAIN\x10\x05\x12\x07\n\x03RUN\x10\x06*y\n\x0bQueryAction\x12\x1c\n\x18QUERY_ACTION_UNSPECIFIED\x10\x00\x12\t\n\x05PAUSE\x10\x01\x12\x14\n\x10PAUSE_GRACEFULLY\x10\x02\x12\t\n\x05\x41\x42ORT\x10\x03\x12\x14\n\x10\x41\x42ORT_GRACEFULLY\x10\x04\x12\n\n\x06RESUME\x10\x05*U\n\rStateLoadMode\x12\x1f\n\x1bSTATE_LOAD_MODE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45MPTY\x10\x01\x12\x18\n\x14\x46ROM_LAST_CHECKPOINT\x10\x02*Q\n\rAutomaticType\x12\x1e\n\x1a\x41UTOMATIC_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\x11\n\rNOT_AUTOMATIC\x10\x02\x42r\n$tech.ydb.proto.draft.federated.queryZGgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_FederatedQuery\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&draft/protos/ydb_federated_query.proto\x12\x0e\x46\x65\x64\x65ratedQuery\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x16protos/ydb_value.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"{\n\x03\x41\x63l\x12\x32\n\nvisibility\x18\x01 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"@\n\nVisibility\x12\x1a\n\x16VISIBILITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\t\n\x05SCOPE\x10\x02\"\x83\x03\n\x06Limits\x12!\n\x0fvcpu_rate_limit\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0f\x66low_rate_limit\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fvcpu_time_limit\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_size\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12!\n\x0fmax_result_rows\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1e\n\x0cmemory_limit\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\nresult_ttl\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x11\x65xecution_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x38\n\x12\x65xecution_deadline\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\t\n\x07timeout\"\xef\x03\n\x14StreamingDisposition\x12(\n\x06oldest\x18\x01 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\'\n\x05\x66resh\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x42\n\tfrom_time\x18\x03 \x01(\x0b\x32-.FederatedQuery.StreamingDisposition.FromTimeH\x00\x12@\n\x08time_ago\x18\x04 \x01(\x0b\x32,.FederatedQuery.StreamingDisposition.TimeAgoH\x00\x12W\n\x14\x66rom_last_checkpoint\x18\x05 \x01(\x0b\x32\x37.FederatedQuery.StreamingDisposition.FromLastCheckpointH\x00\x1a\x39\n\x08\x46romTime\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x36\n\x07TimeAgo\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a#\n\x12\x46romLastCheckpoint\x12\r\n\x05\x66orce\x18\x01 \x01(\x08\x42\r\n\x0b\x64isposition\"\xe8\x05\n\x0cQueryContent\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12&\n\x06limits\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Limits\x12\x1a\n\x04text\x18\x05 \x01(\tB\x0c\xa2\xe6*\x08\n\x06\x08\x01\x10\x80\xa0\x06\x12\x11\n\tautomatic\x18\x06 \x01(\x08\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\x12\x64\n\x12\x65xecution_settings\x18\n \x03(\x0b\x32\x33.FederatedQuery.QueryContent.ExecutionSettingsEntryB\x13\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\xa2\xe6*\x03\x18\x80 \x12\x38\n\x06syntax\x18\x0b \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\x12N\n\nparameters\x18\x0c \x03(\x0b\x32,.FederatedQuery.QueryContent.ParametersEntryB\x0c\xaa\xe6*\x08\n\x06\n\x04\x08\x01\x10\x64\x1a\x38\n\x16\x45xecutionSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"E\n\tQueryType\x12\x1a\n\x16QUERY_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tANALYTICS\x10\x01\x12\r\n\tSTREAMING\x10\x02\"?\n\x0bQuerySyntax\x12\x1c\n\x18QUERY_SYNTAX_UNSPECIFIED\x10\x00\x12\n\n\x06YQL_V1\x10\x01\x12\x06\n\x02PG\x10\x02\"\xe5\x01\n\nCommonMeta\x12\x17\n\x02id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x1f\n\ncreated_by\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12 \n\x0bmodified_by\x18\x03 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12.\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bmodified_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x08revision\x18\x06 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xbf\x06\n\tQueryMeta\x12*\n\x06\x63ommon\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x30\n\x0csubmitted_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstarted_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x37\n\x06status\x18\x05 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x1f\n\x17last_job_query_revision\x18\x06 \x01(\x03\x12\x13\n\x0blast_job_id\x18\x07 \x01(\t\x12-\n\texpire_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10result_expire_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nstarted_by\x18\n \x01(\t\x12\x14\n\naborted_by\x18\x0b \x01(\tH\x00\x12\x13\n\tpaused_by\x18\x0c \x01(\tH\x00\x12\x1d\n\x15has_saved_checkpoints\x18\r \x01(\x08\"\x83\x02\n\rComputeStatus\x12\x1e\n\x1a\x43OMPUTE_STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STARTING\x10\x01\x12\x13\n\x0f\x41\x42ORTED_BY_USER\x10\x02\x12\x15\n\x11\x41\x42ORTED_BY_SYSTEM\x10\x03\x12\x14\n\x10\x41\x42ORTING_BY_USER\x10\x04\x12\x16\n\x12\x41\x42ORTING_BY_SYSTEM\x10\x05\x12\x0c\n\x08RESUMING\x10\x06\x12\x0b\n\x07RUNNING\x10\x07\x12\r\n\tCOMPLETED\x10\x08\x12\x0e\n\nCOMPLETING\x10\x0c\x12\n\n\x06\x46\x41ILED\x10\t\x12\x0b\n\x07\x46\x41ILING\x10\r\x12\n\n\x06PAUSED\x10\x0b\x12\x0b\n\x07PAUSING\x10\nB\x08\n\x06\x61\x63tion\"\xc9\x01\n\nBriefQuery\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\'\n\x04meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x05 \x01(\x08\"\x19\n\tQueryPlan\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x18\n\x08QueryAst\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\t\"]\n\rResultSetMeta\x12\x1b\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x1c\n\nrows_count\x18\x02 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x11\n\ttruncated\x18\x03 \x01(\x08\"\x1c\n\rQueryTimeline\x12\x0b\n\x03svg\x18\x01 \x01(\t\"\xa7\x03\n\x05Query\x12\'\n\x04meta\x18\x01 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\'\n\x04plan\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x04 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x30\n\x0ftransient_issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\x12/\n\x08timeline\x18\t \x01(\x0b\x32\x1d.FederatedQuery.QueryTimeline\"\x1f\n\x0fQueryStatistics\x12\x0c\n\x04json\x18\x01 \x01(\t\"\x8e\x02\n\x12\x43reateQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12-\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x04 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x43reateQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\".\n\x11\x43reateQueryResult\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x93\x04\n\x12ListQueriesRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x39\n\x06\x66ilter\x18\x04 \x01(\x0b\x32).FederatedQuery.ListQueriesRequest.Filter\x1a\xcc\x02\n\x06\x46ilter\x12:\n\nquery_type\x18\x01 \x01(\x0e\x32&.FederatedQuery.QueryContent.QueryType\x12?\n\x06status\x18\x02 \x03(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatusB\x06\x9a\xe6*\x02\x18\x14\x12\x31\n\x04mode\x18\x03 \x03(\x0e\x32\x1b.FederatedQuery.ExecuteModeB\x06\x9a\xe6*\x02\x18\x14\x12\x15\n\x04name\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x05 \x01(\x08\x12\x32\n\nvisibility\x18\x06 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x30\n\tautomatic\x18\x07 \x01(\x0e\x32\x1d.FederatedQuery.AutomaticType\"C\n\x13ListQueriesResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"`\n\x11ListQueriesResult\x12)\n\x05query\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.BriefQuery\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"p\n\x14\x44\x65scribeQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"E\n\x15\x44\x65scribeQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\";\n\x13\x44\x65scribeQueryResult\x12$\n\x05query\x18\x01 \x01(\x0b\x32\x15.FederatedQuery.Query\"q\n\x15GetQueryStatusRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"F\n\x16GetQueryStatusResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"f\n\x14GetQueryStatusResult\x12\x37\n\x06status\x18\x01 \x01(\x0e\x32\'.FederatedQuery.QueryMeta.ComputeStatus\x12\x15\n\rmeta_revision\x18\x02 \x01(\x03\"\xb5\x01\n\x12\x44\x65leteQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13\x44\x65leteQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x44\x65leteQueryResult\"\x8a\x03\n\x12ModifyQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12-\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1c.FederatedQuery.QueryContent\x12\x31\n\x0c\x65xecute_mode\x18\x04 \x01(\x0e\x32\x1b.FederatedQuery.ExecuteMode\x12\x39\n\x0b\x64isposition\x18\x05 \x01(\x0b\x32$.FederatedQuery.StreamingDisposition\x12\x36\n\x0fstate_load_mode\x18\x06 \x01(\x0e\x32\x1d.FederatedQuery.StateLoadMode\x12#\n\x11previous_revision\x18\x07 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"C\n\x13ModifyQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11ModifyQueryResult\"\xe3\x01\n\x13\x43ontrolQueryRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12+\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x1b.FederatedQuery.QueryAction\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"D\n\x14\x43ontrolQueryResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ontrolQueryResult\"\xed\x01\n\x08\x42riefJob\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\x12\n\nquery_name\x18\t \x01(\t\x12\x32\n\nvisibility\x18\n \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x80\x05\n\x03Job\x12(\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x0c\n\x04text\x18\x02 \x01(\t\x12-\n\nquery_meta\x18\x03 \x01(\x0b\x32\x19.FederatedQuery.QueryMeta\x12\'\n\x04plan\x18\x04 \x01(\x0b\x32\x19.FederatedQuery.QueryPlan\x12&\n\x05issue\x18\x05 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x33\n\nstatistics\x18\x06 \x01(\x0b\x32\x1f.FederatedQuery.QueryStatistics\x12\x36\n\x0fresult_set_meta\x18\x07 \x03(\x0b\x32\x1d.FederatedQuery.ResultSetMeta\x12%\n\x03\x61st\x18\x08 \x01(\x0b\x32\x18.FederatedQuery.QueryAst\x12\x12\n\nquery_name\x18\t \x01(\t\x12 \n\x03\x61\x63l\x18\n \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x11\n\tautomatic\x18\x0b \x01(\x08\x12-\n\texpire_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x06syntax\x18\r \x01(\x0e\x32(.FederatedQuery.QueryContent.QuerySyntax\x12\x37\n\nparameters\x18\x0e \x03(\x0b\x32#.FederatedQuery.Job.ParametersEntry\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x8c\x02\n\x0fListJobsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12\x10\n\x08query_id\x18\x05 \x01(\t\x12\x36\n\x06\x66ilter\x18\x04 \x01(\x0b\x32&.FederatedQuery.ListJobsRequest.Filter\x1a:\n\x06\x46ilter\x12\x19\n\x08query_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\"@\n\x10ListJobsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Y\n\x0eListJobsResult\x12%\n\x03job\x18\x01 \x03(\x0b\x32\x18.FederatedQuery.BriefJob\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"l\n\x12\x44\x65scribeJobRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\x06job_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"C\n\x13\x44\x65scribeJobResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"5\n\x11\x44\x65scribeJobResult\x12 \n\x03job\x18\x01 \x01(\x0b\x32\x13.FederatedQuery.Job\"\x15\n\x13\x43urrentIAMTokenAuth\"\n\n\x08NoneAuth\")\n\x12ServiceAccountAuth\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\'\n\tTokenAuth\x12\x1a\n\x05token\x18\x01 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\"\xe6\x01\n\x07IamAuth\x12:\n\x0b\x63urrent_iam\x18\x01 \x01(\x0b\x32#.FederatedQuery.CurrentIAMTokenAuthH\x00\x12=\n\x0fservice_account\x18\x02 \x01(\x0b\x32\".FederatedQuery.ServiceAccountAuthH\x00\x12(\n\x04none\x18\x03 \x01(\x0b\x32\x18.FederatedQuery.NoneAuthH\x00\x12*\n\x05token\x18\x04 \x01(\x0b\x32\x19.FederatedQuery.TokenAuthH\x00\x42\n\n\x08identity\"\xb0\x01\n\x0b\x44\x61taStreams\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\x12\x16\n\x0eshared_reading\x18\x06 \x01(\x08\"g\n\nMonitoring\x12\x18\n\x07project\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12\x18\n\x07\x63luster\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\xc8\x01\x12%\n\x04\x61uth\x18\x03 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x98\x01\n\x0bYdbDatabase\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x19\n\x08\x65ndpoint\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x08\x64\x61tabase\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x0e\n\x06secure\x18\x05 \x01(\x08\"\xf8\x01\n\x11\x43lickHouseCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"Y\n\x17ObjectStorageConnection\x12\x17\n\x06\x62ucket\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\x91\x02\n\x11PostgreSQLCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x08 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x02 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x17\n\x06schema\x18\t \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x04 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x15\n\x04host\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x04port\x18\x06 \x01(\x05\x42\x0e\xb2\xe6*\n[0; 65536]\x12\x0e\n\x06secure\x18\x07 \x01(\x08\"\xcb\x01\n\x10GreenplumCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x04 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x17\n\x06schema\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12%\n\x04\x61uth\x18\x06 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\xae\x01\n\x0cMySQLCluster\x12\x1c\n\x0b\x64\x61tabase_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1e\n\rdatabase_name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1a\n\x05login\x18\x03 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12\x1d\n\x08password\x18\x04 \x01(\tB\x0b\xa2\xe6*\x03\x18\x80\x08\xb8\xe6*\x01\x12%\n\x04\x61uth\x18\x05 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"C\n\x07Logging\x12\x11\n\tfolder_id\x18\x01 \x01(\t\x12%\n\x04\x61uth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\"\xa4\x01\n\x10IcebergWarehouse\x12\x31\n\x02s3\x18\x01 \x01(\x0b\x32#.FederatedQuery.IcebergWarehouse.S3H\x00\x1aR\n\x02S3\x12\x1c\n\x06\x62ucket\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x88\x01\x01\x12\x1a\n\x04path\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x01\x88\x01\x01\x42\t\n\x07_bucketB\x07\n\x05_pathB\t\n\x07payload\"\xc0\x02\n\x0eIcebergCatalog\x12\x37\n\x06hadoop\x18\x01 \x01(\x0b\x32%.FederatedQuery.IcebergCatalog.HadoopH\x00\x12\x46\n\x0ehive_metastore\x18\x02 \x01(\x0b\x32,.FederatedQuery.IcebergCatalog.HiveMetastoreH\x00\x1a\x37\n\x06Hadoop\x12\x1f\n\tdirectory\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x88\x01\x01\x42\x0c\n\n_directory\x1ai\n\rHiveMetastore\x12\x19\n\x03uri\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x88\x01\x01\x12#\n\rdatabase_name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x01\x88\x01\x01\x42\x06\n\x04_uriB\x10\n\x0e_database_nameB\t\n\x07payload\"\xa0\x01\n\x07Iceberg\x12/\n\x0ewarehouse_auth\x18\x02 \x01(\x0b\x32\x17.FederatedQuery.IamAuth\x12\x33\n\twarehouse\x18\x03 \x01(\x0b\x32 .FederatedQuery.IcebergWarehouse\x12/\n\x07\x63\x61talog\x18\x04 \x01(\x0b\x32\x1e.FederatedQuery.IcebergCatalog\"\xc0\x06\n\x11\x43onnectionSetting\x12\x33\n\x0cydb_database\x18\x01 \x01(\x0b\x32\x1b.FederatedQuery.YdbDatabaseH\x00\x12?\n\x12\x63lickhouse_cluster\x18\x02 \x01(\x0b\x32!.FederatedQuery.ClickHouseClusterH\x00\x12\x33\n\x0c\x64\x61ta_streams\x18\x03 \x01(\x0b\x32\x1b.FederatedQuery.DataStreamsH\x00\x12\x41\n\x0eobject_storage\x18\x04 \x01(\x0b\x32\'.FederatedQuery.ObjectStorageConnectionH\x00\x12\x30\n\nmonitoring\x18\x05 \x01(\x0b\x32\x1a.FederatedQuery.MonitoringH\x00\x12?\n\x12postgresql_cluster\x18\x06 \x01(\x0b\x32!.FederatedQuery.PostgreSQLClusterH\x00\x12=\n\x11greenplum_cluster\x18\x07 \x01(\x0b\x32 .FederatedQuery.GreenplumClusterH\x00\x12\x35\n\rmysql_cluster\x18\x08 \x01(\x0b\x32\x1c.FederatedQuery.MySQLClusterH\x00\x12*\n\x07logging\x18\t \x01(\x0b\x32\x17.FederatedQuery.LoggingH\x00\x12*\n\x07iceberg\x18\n \x01(\x0b\x32\x17.FederatedQuery.IcebergH\x00\"\xed\x01\n\x0e\x43onnectionType\x12\x1f\n\x1b\x43ONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cYDB_DATABASE\x10\x01\x12\x16\n\x12\x43LICKHOUSE_CLUSTER\x10\x02\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x03\x12\x12\n\x0eOBJECT_STORAGE\x10\x04\x12\x0e\n\nMONITORING\x10\x05\x12\x16\n\x12POSTGRESQL_CLUSTER\x10\x06\x12\x15\n\x11GREENPLUM_CLUSTER\x10\x07\x12\x11\n\rMYSQL_CLUSTER\x10\x08\x12\x0b\n\x07LOGGING\x10\t\x12\x0b\n\x07ICEBERG\x10\nB\x0c\n\nconnection\"\xa2\x01\n\x11\x43onnectionContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\x12 \n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"j\n\nConnection\x12\x32\n\x07\x63ontent\x18\x01 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xaa\x01\n\x17\x43reateConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x43reateConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"<\n\x16\x43reateConnectionResult\x12\"\n\rconnection_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\x84\x03\n\x16ListConnectionsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12=\n\x06\x66ilter\x18\x04 \x01(\x0b\x32-.FederatedQuery.ListConnectionsRequest.Filter\x1a\xb5\x01\n\x06\x46ilter\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x02 \x01(\x08\x12I\n\x0f\x63onnection_type\x18\x03 \x01(\x0e\x32\x30.FederatedQuery.ConnectionSetting.ConnectionType\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"G\n\x17ListConnectionsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"i\n\x15ListConnectionsResult\x12.\n\nconnection\x18\x01 \x03(\x0b\x32\x1a.FederatedQuery.Connection\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"z\n\x19\x44\x65scribeConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"J\n\x1a\x44\x65scribeConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"J\n\x18\x44\x65scribeConnectionResult\x12.\n\nconnection\x18\x01 \x01(\x0b\x32\x1a.FederatedQuery.Connection\"\xf3\x01\n\x17ModifyConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x32\n\x07\x63ontent\x18\x03 \x01(\x0b\x32!.FederatedQuery.ConnectionContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18ModifyConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16ModifyConnectionResult\"\xbf\x01\n\x17\x44\x65leteConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"H\n\x18\x44\x65leteConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x18\n\x16\x44\x65leteConnectionResult\"\x86\x01\n\x15TestConnectionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x32\n\x07setting\x18\x02 \x01(\x0b\x32!.FederatedQuery.ConnectionSetting\"F\n\x16TestConnectionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x16\n\x14TestConnectionResult\"\xcc\x01\n\x14GetResultDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1d\n\x08query_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\x10result_set_index\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12\x18\n\x06offset\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x1c\n\x05limit\x18\x05 \x01(\x03\x42\r\xb2\xe6*\t[1; 1000]\"E\n\x15GetResultDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"9\n\x13GetResultDataResult\x12\"\n\nresult_set\x18\x01 \x01(\x0b\x32\x0e.Ydb.ResultSet\".\n\x06Schema\x12$\n\x06\x63olumn\x18\x01 \x03(\x0b\x32\x0b.Ydb.ColumnB\x07\x9a\xe6*\x03\x18\xe8\x07\"\xa2\x02\n\x12\x44\x61taStreamsBinding\x12 \n\x0bstream_name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\x0b\x63ompression\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x04 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12U\n\x0e\x66ormat_setting\x18\x05 \x03(\x0b\x32\x35.FederatedQuery.DataStreamsBinding.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x92\x04\n\x14ObjectStorageBinding\x12;\n\x06subset\x18\x01 \x03(\x0b\x32+.FederatedQuery.ObjectStorageBinding.Subset\x1a\xbc\x03\n\x06Subset\x12!\n\x0cpath_pattern\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\x17\n\x06\x66ormat\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12^\n\x0e\x66ormat_setting\x18\x03 \x03(\x0b\x32>.FederatedQuery.ObjectStorageBinding.Subset.FormatSettingEntryB\x06\x9a\xe6*\x02\x18\x64\x12\x1c\n\x0b\x63ompression\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\x06schema\x18\x05 \x01(\x0b\x32\x16.FederatedQuery.Schema\x12O\n\nprojection\x18\x06 \x03(\x0b\x32;.FederatedQuery.ObjectStorageBinding.Subset.ProjectionEntry\x12\x16\n\x0epartitioned_by\x18\x07 \x03(\t\x1a\x34\n\x12\x46ormatSettingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fProjectionEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xea\x01\n\x0e\x42indingSetting\x12:\n\x0c\x64\x61ta_streams\x18\x01 \x01(\x0b\x32\".FederatedQuery.DataStreamsBindingH\x00\x12>\n\x0eobject_storage\x18\x02 \x01(\x0b\x32$.FederatedQuery.ObjectStorageBindingH\x00\"Q\n\x0b\x42indingType\x12\x1c\n\x18\x42INDING_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_STREAMS\x10\x01\x12\x12\n\x0eOBJECT_STORAGE\x10\x02\x42\t\n\x07\x62inding\"\xe5\x01\n\x0c\x42riefBinding\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12(\n\x04meta\x18\x03 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\x12\x38\n\x04type\x18\x04 \x01(\x0e\x32*.FederatedQuery.BindingSetting.BindingType\x12\x32\n\nvisibility\x18\x05 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"\xc0\x01\n\x0e\x42indingContent\x12\x19\n\x04name\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12\"\n\rconnection_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07setting\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingSetting\x12 \n\x03\x61\x63l\x18\x04 \x01(\x0b\x32\x13.FederatedQuery.Acl\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80P\"d\n\x07\x42inding\x12/\n\x07\x63ontent\x18\x01 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12(\n\x04meta\x18\x02 \x01(\x0b\x32\x1a.FederatedQuery.CommonMeta\"\xa4\x01\n\x14\x43reateBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12/\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12 \n\x0fidempotency_key\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x43reateBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"6\n\x13\x43reateBindingResult\x12\x1f\n\nbinding_id\x18\x01 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"\xd3\x02\n\x13ListBindingsRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1b\n\npage_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1b\n\x05limit\x18\x03 \x01(\x05\x42\x0c\xb2\xe6*\x08[1; 100]\x12:\n\x06\x66ilter\x18\x04 \x01(\x0b\x32*.FederatedQuery.ListBindingsRequest.Filter\x1a\x8a\x01\n\x06\x46ilter\x12\x1e\n\rconnection_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\x04name\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x15\n\rcreated_by_me\x18\x03 \x01(\x08\x12\x32\n\nvisibility\x18\x04 \x01(\x0e\x32\x1e.FederatedQuery.Acl.Visibility\"D\n\x14ListBindingsResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"e\n\x12ListBindingsResult\x12-\n\x07\x62inding\x18\x01 \x03(\x0b\x32\x1c.FederatedQuery.BriefBinding\x12 \n\x0fnext_page_token\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"t\n\x16\x44\x65scribeBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\"G\n\x17\x44\x65scribeBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"A\n\x15\x44\x65scribeBindingResult\x12(\n\x07\x62inding\x18\x01 \x01(\x0b\x32\x17.FederatedQuery.Binding\"\xea\x01\n\x14ModifyBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12/\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x1e.FederatedQuery.BindingContent\x12#\n\x11previous_revision\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15ModifyBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13ModifyBindingResult\"\xb9\x01\n\x14\x44\x65leteBindingRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x1f\n\nbinding_id\x18\x02 \x01(\tB\x0b\xa2\xe6*\x07\n\x05\x08\x01\x10\x80\x08\x12#\n\x11previous_revision\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12 \n\x0fidempotency_key\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"E\n\x15\x44\x65leteBindingResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x15\n\x13\x44\x65leteBindingResult*q\n\x0b\x45xecuteMode\x12\x1c\n\x18\x45XECUTE_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04SAVE\x10\x01\x12\t\n\x05PARSE\x10\x02\x12\x0b\n\x07\x43OMPILE\x10\x03\x12\x0c\n\x08VALIDATE\x10\x04\x12\x0b\n\x07\x45XPLAIN\x10\x05\x12\x07\n\x03RUN\x10\x06*y\n\x0bQueryAction\x12\x1c\n\x18QUERY_ACTION_UNSPECIFIED\x10\x00\x12\t\n\x05PAUSE\x10\x01\x12\x14\n\x10PAUSE_GRACEFULLY\x10\x02\x12\t\n\x05\x41\x42ORT\x10\x03\x12\x14\n\x10\x41\x42ORT_GRACEFULLY\x10\x04\x12\n\n\x06RESUME\x10\x05*U\n\rStateLoadMode\x12\x1f\n\x1bSTATE_LOAD_MODE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45MPTY\x10\x01\x12\x18\n\x14\x46ROM_LAST_CHECKPOINT\x10\x02*Q\n\rAutomaticType\x12\x1e\n\x1a\x41UTOMATIC_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\x11\n\rNOT_AUTOMATIC\x10\x02\x42r\n$tech.ydb.proto.draft.federated.queryZGgithub.com/ydb-platform/ydb-go-genproto/draft/protos/Ydb_FederatedQuery\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'draft.protos.ydb_federated_query_pb2', globals()) @@ -44,6 +44,8 @@ _LIMITS.fields_by_name['memory_limit']._serialized_options = b'\262\346*\004>= 0' _QUERYCONTENT_EXECUTIONSETTINGSENTRY._options = None _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_options = b'8\001' + _QUERYCONTENT_PARAMETERSENTRY._options = None + _QUERYCONTENT_PARAMETERSENTRY._serialized_options = b'8\001' _QUERYCONTENT.fields_by_name['name']._options = None _QUERYCONTENT.fields_by_name['name']._serialized_options = b'\242\346*\003\030\200\010' _QUERYCONTENT.fields_by_name['text']._options = None @@ -52,6 +54,8 @@ _QUERYCONTENT.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200P' _QUERYCONTENT.fields_by_name['execution_settings']._options = None _QUERYCONTENT.fields_by_name['execution_settings']._serialized_options = b'\252\346*\010\n\006\n\004\010\001\020d\242\346*\003\030\200 ' + _QUERYCONTENT.fields_by_name['parameters']._options = None + _QUERYCONTENT.fields_by_name['parameters']._serialized_options = b'\252\346*\010\n\006\n\004\010\001\020d' _COMMONMETA.fields_by_name['id']._options = None _COMMONMETA.fields_by_name['id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' _COMMONMETA.fields_by_name['created_by']._options = None @@ -102,6 +106,8 @@ _CONTROLQUERYREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' _CONTROLQUERYREQUEST.fields_by_name['idempotency_key']._options = None _CONTROLQUERYREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' + _JOB_PARAMETERSENTRY._options = None + _JOB_PARAMETERSENTRY._serialized_options = b'8\001' _LISTJOBSREQUEST_FILTER.fields_by_name['query_id']._options = None _LISTJOBSREQUEST_FILTER.fields_by_name['query_id']._serialized_options = b'\242\346*\003\030\200\010' _LISTJOBSREQUEST.fields_by_name['page_token']._options = None @@ -114,6 +120,8 @@ _DESCRIBEJOBREQUEST.fields_by_name['job_id']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' _SERVICEACCOUNTAUTH.fields_by_name['id']._options = None _SERVICEACCOUNTAUTH.fields_by_name['id']._serialized_options = b'\242\346*\003\030\200\010' + _TOKENAUTH.fields_by_name['token']._options = None + _TOKENAUTH.fields_by_name['token']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' _DATASTREAMS.fields_by_name['database_id']._options = None _DATASTREAMS.fields_by_name['database_id']._serialized_options = b'\242\346*\003\030\200\010' _DATASTREAMS.fields_by_name['endpoint']._options = None @@ -158,6 +166,34 @@ _POSTGRESQLCLUSTER.fields_by_name['host']._serialized_options = b'\242\346*\003\030\200\010' _POSTGRESQLCLUSTER.fields_by_name['port']._options = None _POSTGRESQLCLUSTER.fields_by_name['port']._serialized_options = b'\262\346*\n[0; 65536]' + _GREENPLUMCLUSTER.fields_by_name['database_id']._options = None + _GREENPLUMCLUSTER.fields_by_name['database_id']._serialized_options = b'\242\346*\003\030\200\010' + _GREENPLUMCLUSTER.fields_by_name['database_name']._options = None + _GREENPLUMCLUSTER.fields_by_name['database_name']._serialized_options = b'\242\346*\003\030\200\010' + _GREENPLUMCLUSTER.fields_by_name['login']._options = None + _GREENPLUMCLUSTER.fields_by_name['login']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _GREENPLUMCLUSTER.fields_by_name['password']._options = None + _GREENPLUMCLUSTER.fields_by_name['password']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _GREENPLUMCLUSTER.fields_by_name['schema']._options = None + _GREENPLUMCLUSTER.fields_by_name['schema']._serialized_options = b'\242\346*\003\030\200\010' + _MYSQLCLUSTER.fields_by_name['database_id']._options = None + _MYSQLCLUSTER.fields_by_name['database_id']._serialized_options = b'\242\346*\003\030\200\010' + _MYSQLCLUSTER.fields_by_name['database_name']._options = None + _MYSQLCLUSTER.fields_by_name['database_name']._serialized_options = b'\242\346*\003\030\200\010' + _MYSQLCLUSTER.fields_by_name['login']._options = None + _MYSQLCLUSTER.fields_by_name['login']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _MYSQLCLUSTER.fields_by_name['password']._options = None + _MYSQLCLUSTER.fields_by_name['password']._serialized_options = b'\242\346*\003\030\200\010\270\346*\001' + _ICEBERGWAREHOUSE_S3.fields_by_name['bucket']._options = None + _ICEBERGWAREHOUSE_S3.fields_by_name['bucket']._serialized_options = b'\242\346*\003\030\200\010' + _ICEBERGWAREHOUSE_S3.fields_by_name['path']._options = None + _ICEBERGWAREHOUSE_S3.fields_by_name['path']._serialized_options = b'\242\346*\003\030\200\010' + _ICEBERGCATALOG_HADOOP.fields_by_name['directory']._options = None + _ICEBERGCATALOG_HADOOP.fields_by_name['directory']._serialized_options = b'\242\346*\003\030\200\010' + _ICEBERGCATALOG_HIVEMETASTORE.fields_by_name['uri']._options = None + _ICEBERGCATALOG_HIVEMETASTORE.fields_by_name['uri']._serialized_options = b'\242\346*\003\030\200\010' + _ICEBERGCATALOG_HIVEMETASTORE.fields_by_name['database_name']._options = None + _ICEBERGCATALOG_HIVEMETASTORE.fields_by_name['database_name']._serialized_options = b'\242\346*\003\030\200\010' _CONNECTIONCONTENT.fields_by_name['name']._options = None _CONNECTIONCONTENT.fields_by_name['name']._serialized_options = b'\242\346*\007\n\005\010\001\020\200\010' _CONNECTIONCONTENT.fields_by_name['description']._options = None @@ -258,14 +294,14 @@ _DELETEBINDINGREQUEST.fields_by_name['previous_revision']._serialized_options = b'\262\346*\004>= 0' _DELETEBINDINGREQUEST.fields_by_name['idempotency_key']._options = None _DELETEBINDINGREQUEST.fields_by_name['idempotency_key']._serialized_options = b'\242\346*\003\030\200\010' - _EXECUTEMODE._serialized_start=15700 - _EXECUTEMODE._serialized_end=15813 - _QUERYACTION._serialized_start=15815 - _QUERYACTION._serialized_end=15936 - _STATELOADMODE._serialized_start=15938 - _STATELOADMODE._serialized_end=16023 - _AUTOMATICTYPE._serialized_start=16025 - _AUTOMATICTYPE._serialized_end=16106 + _EXECUTEMODE._serialized_start=17540 + _EXECUTEMODE._serialized_end=17653 + _QUERYACTION._serialized_start=17655 + _QUERYACTION._serialized_end=17776 + _STATELOADMODE._serialized_start=17778 + _STATELOADMODE._serialized_end=17863 + _AUTOMATICTYPE._serialized_start=17865 + _AUTOMATICTYPE._serialized_end=17946 _ACL._serialized_start=309 _ACL._serialized_end=432 _ACL_VISIBILITY._serialized_start=368 @@ -281,219 +317,245 @@ _STREAMINGDISPOSITION_FROMLASTCHECKPOINT._serialized_start=1270 _STREAMINGDISPOSITION_FROMLASTCHECKPOINT._serialized_end=1305 _QUERYCONTENT._serialized_start=1323 - _QUERYCONTENT._serialized_end=1919 - _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_start=1727 - _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_end=1783 - _QUERYCONTENT_QUERYTYPE._serialized_start=1785 - _QUERYCONTENT_QUERYTYPE._serialized_end=1854 - _QUERYCONTENT_QUERYSYNTAX._serialized_start=1856 - _QUERYCONTENT_QUERYSYNTAX._serialized_end=1919 - _COMMONMETA._serialized_start=1922 - _COMMONMETA._serialized_end=2151 - _QUERYMETA._serialized_start=2154 - _QUERYMETA._serialized_end=2985 - _QUERYMETA_COMPUTESTATUS._serialized_start=2716 - _QUERYMETA_COMPUTESTATUS._serialized_end=2975 - _BRIEFQUERY._serialized_start=2988 - _BRIEFQUERY._serialized_end=3189 - _QUERYPLAN._serialized_start=3191 - _QUERYPLAN._serialized_end=3216 - _QUERYAST._serialized_start=3218 - _QUERYAST._serialized_end=3242 - _RESULTSETMETA._serialized_start=3244 - _RESULTSETMETA._serialized_end=3337 - _QUERY._serialized_start=3340 - _QUERY._serialized_end=3714 - _QUERYSTATISTICS._serialized_start=3716 - _QUERYSTATISTICS._serialized_end=3747 - _CREATEQUERYREQUEST._serialized_start=3750 - _CREATEQUERYREQUEST._serialized_end=4020 - _CREATEQUERYRESPONSE._serialized_start=4022 - _CREATEQUERYRESPONSE._serialized_end=4089 - _CREATEQUERYRESULT._serialized_start=4091 - _CREATEQUERYRESULT._serialized_end=4137 - _LISTQUERIESREQUEST._serialized_start=4140 - _LISTQUERIESREQUEST._serialized_end=4671 - _LISTQUERIESREQUEST_FILTER._serialized_start=4339 - _LISTQUERIESREQUEST_FILTER._serialized_end=4671 - _LISTQUERIESRESPONSE._serialized_start=4673 - _LISTQUERIESRESPONSE._serialized_end=4740 - _LISTQUERIESRESULT._serialized_start=4742 - _LISTQUERIESRESULT._serialized_end=4838 - _DESCRIBEQUERYREQUEST._serialized_start=4840 - _DESCRIBEQUERYREQUEST._serialized_end=4952 - _DESCRIBEQUERYRESPONSE._serialized_start=4954 - _DESCRIBEQUERYRESPONSE._serialized_end=5023 - _DESCRIBEQUERYRESULT._serialized_start=5025 - _DESCRIBEQUERYRESULT._serialized_end=5084 - _GETQUERYSTATUSREQUEST._serialized_start=5086 - _GETQUERYSTATUSREQUEST._serialized_end=5199 - _GETQUERYSTATUSRESPONSE._serialized_start=5201 - _GETQUERYSTATUSRESPONSE._serialized_end=5271 - _GETQUERYSTATUSRESULT._serialized_start=5273 - _GETQUERYSTATUSRESULT._serialized_end=5375 - _DELETEQUERYREQUEST._serialized_start=5378 - _DELETEQUERYREQUEST._serialized_end=5559 - _DELETEQUERYRESPONSE._serialized_start=5561 - _DELETEQUERYRESPONSE._serialized_end=5628 - _DELETEQUERYRESULT._serialized_start=5630 - _DELETEQUERYRESULT._serialized_end=5649 - _MODIFYQUERYREQUEST._serialized_start=5652 - _MODIFYQUERYREQUEST._serialized_end=6046 - _MODIFYQUERYRESPONSE._serialized_start=6048 - _MODIFYQUERYRESPONSE._serialized_end=6115 - _MODIFYQUERYRESULT._serialized_start=6117 - _MODIFYQUERYRESULT._serialized_end=6136 - _CONTROLQUERYREQUEST._serialized_start=6139 - _CONTROLQUERYREQUEST._serialized_end=6366 - _CONTROLQUERYRESPONSE._serialized_start=6368 - _CONTROLQUERYRESPONSE._serialized_end=6436 - _CONTROLQUERYRESULT._serialized_start=6438 - _CONTROLQUERYRESULT._serialized_end=6458 - _BRIEFJOB._serialized_start=6461 - _BRIEFJOB._serialized_end=6698 - _JOB._serialized_start=6701 - _JOB._serialized_end=7216 - _LISTJOBSREQUEST._serialized_start=7219 - _LISTJOBSREQUEST._serialized_end=7487 - _LISTJOBSREQUEST_FILTER._serialized_start=7429 - _LISTJOBSREQUEST_FILTER._serialized_end=7487 - _LISTJOBSRESPONSE._serialized_start=7489 - _LISTJOBSRESPONSE._serialized_end=7553 - _LISTJOBSRESULT._serialized_start=7555 - _LISTJOBSRESULT._serialized_end=7644 - _DESCRIBEJOBREQUEST._serialized_start=7646 - _DESCRIBEJOBREQUEST._serialized_end=7754 - _DESCRIBEJOBRESPONSE._serialized_start=7756 - _DESCRIBEJOBRESPONSE._serialized_end=7823 - _DESCRIBEJOBRESULT._serialized_start=7825 - _DESCRIBEJOBRESULT._serialized_end=7878 - _CURRENTIAMTOKENAUTH._serialized_start=7880 - _CURRENTIAMTOKENAUTH._serialized_end=7901 - _NONEAUTH._serialized_start=7903 - _NONEAUTH._serialized_end=7913 - _SERVICEACCOUNTAUTH._serialized_start=7915 - _SERVICEACCOUNTAUTH._serialized_end=7956 - _IAMAUTH._serialized_start=7959 - _IAMAUTH._serialized_end=8145 - _DATASTREAMS._serialized_start=8148 - _DATASTREAMS._serialized_end=8300 - _MONITORING._serialized_start=8302 - _MONITORING._serialized_end=8405 - _YDBDATABASE._serialized_start=8408 - _YDBDATABASE._serialized_end=8560 - _CLICKHOUSECLUSTER._serialized_start=8563 - _CLICKHOUSECLUSTER._serialized_end=8811 - _OBJECTSTORAGECONNECTION._serialized_start=8813 - _OBJECTSTORAGECONNECTION._serialized_end=8902 - _POSTGRESQLCLUSTER._serialized_start=8905 - _POSTGRESQLCLUSTER._serialized_end=9178 - _CONNECTIONSETTING._serialized_start=9181 - _CONNECTIONSETTING._serialized_end=9739 - _CONNECTIONSETTING_CONNECTIONTYPE._serialized_start=9556 - _CONNECTIONSETTING_CONNECTIONTYPE._serialized_end=9725 - _CONNECTIONCONTENT._serialized_start=9742 - _CONNECTIONCONTENT._serialized_end=9904 - _CONNECTION._serialized_start=9906 - _CONNECTION._serialized_end=10012 - _CREATECONNECTIONREQUEST._serialized_start=10015 - _CREATECONNECTIONREQUEST._serialized_end=10185 - _CREATECONNECTIONRESPONSE._serialized_start=10187 - _CREATECONNECTIONRESPONSE._serialized_end=10259 - _CREATECONNECTIONRESULT._serialized_start=10261 - _CREATECONNECTIONRESULT._serialized_end=10321 - _LISTCONNECTIONSREQUEST._serialized_start=10324 - _LISTCONNECTIONSREQUEST._serialized_end=10712 - _LISTCONNECTIONSREQUEST_FILTER._serialized_start=10531 - _LISTCONNECTIONSREQUEST_FILTER._serialized_end=10712 - _LISTCONNECTIONSRESPONSE._serialized_start=10714 - _LISTCONNECTIONSRESPONSE._serialized_end=10785 - _LISTCONNECTIONSRESULT._serialized_start=10787 - _LISTCONNECTIONSRESULT._serialized_end=10892 - _DESCRIBECONNECTIONREQUEST._serialized_start=10894 - _DESCRIBECONNECTIONREQUEST._serialized_end=11016 - _DESCRIBECONNECTIONRESPONSE._serialized_start=11018 - _DESCRIBECONNECTIONRESPONSE._serialized_end=11092 - _DESCRIBECONNECTIONRESULT._serialized_start=11094 - _DESCRIBECONNECTIONRESULT._serialized_end=11168 - _MODIFYCONNECTIONREQUEST._serialized_start=11171 - _MODIFYCONNECTIONREQUEST._serialized_end=11414 - _MODIFYCONNECTIONRESPONSE._serialized_start=11416 - _MODIFYCONNECTIONRESPONSE._serialized_end=11488 - _MODIFYCONNECTIONRESULT._serialized_start=11490 - _MODIFYCONNECTIONRESULT._serialized_end=11514 - _DELETECONNECTIONREQUEST._serialized_start=11517 - _DELETECONNECTIONREQUEST._serialized_end=11708 - _DELETECONNECTIONRESPONSE._serialized_start=11710 - _DELETECONNECTIONRESPONSE._serialized_end=11782 - _DELETECONNECTIONRESULT._serialized_start=11784 - _DELETECONNECTIONRESULT._serialized_end=11808 - _TESTCONNECTIONREQUEST._serialized_start=11811 - _TESTCONNECTIONREQUEST._serialized_end=11945 - _TESTCONNECTIONRESPONSE._serialized_start=11947 - _TESTCONNECTIONRESPONSE._serialized_end=12017 - _TESTCONNECTIONRESULT._serialized_start=12019 - _TESTCONNECTIONRESULT._serialized_end=12041 - _GETRESULTDATAREQUEST._serialized_start=12044 - _GETRESULTDATAREQUEST._serialized_end=12248 - _GETRESULTDATARESPONSE._serialized_start=12250 - _GETRESULTDATARESPONSE._serialized_end=12319 - _GETRESULTDATARESULT._serialized_start=12321 - _GETRESULTDATARESULT._serialized_end=12378 - _SCHEMA._serialized_start=12380 - _SCHEMA._serialized_end=12426 - _DATASTREAMSBINDING._serialized_start=12429 - _DATASTREAMSBINDING._serialized_end=12719 - _DATASTREAMSBINDING_FORMATSETTINGENTRY._serialized_start=12667 - _DATASTREAMSBINDING_FORMATSETTINGENTRY._serialized_end=12719 - _OBJECTSTORAGEBINDING._serialized_start=12722 - _OBJECTSTORAGEBINDING._serialized_end=13252 - _OBJECTSTORAGEBINDING_SUBSET._serialized_start=12808 - _OBJECTSTORAGEBINDING_SUBSET._serialized_end=13252 - _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._serialized_start=12667 - _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._serialized_end=12719 - _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._serialized_start=13203 - _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._serialized_end=13252 - _BINDINGSETTING._serialized_start=13255 - _BINDINGSETTING._serialized_end=13489 - _BINDINGSETTING_BINDINGTYPE._serialized_start=13397 - _BINDINGSETTING_BINDINGTYPE._serialized_end=13478 - _BRIEFBINDING._serialized_start=13492 - _BRIEFBINDING._serialized_end=13721 - _BINDINGCONTENT._serialized_start=13724 - _BINDINGCONTENT._serialized_end=13916 - _BINDING._serialized_start=13918 - _BINDING._serialized_end=14018 - _CREATEBINDINGREQUEST._serialized_start=14021 - _CREATEBINDINGREQUEST._serialized_end=14185 - _CREATEBINDINGRESPONSE._serialized_start=14187 - _CREATEBINDINGRESPONSE._serialized_end=14256 - _CREATEBINDINGRESULT._serialized_start=14258 - _CREATEBINDINGRESULT._serialized_end=14312 - _LISTBINDINGSREQUEST._serialized_start=14315 - _LISTBINDINGSREQUEST._serialized_end=14654 - _LISTBINDINGSREQUEST_FILTER._serialized_start=14516 - _LISTBINDINGSREQUEST_FILTER._serialized_end=14654 - _LISTBINDINGSRESPONSE._serialized_start=14656 - _LISTBINDINGSRESPONSE._serialized_end=14724 - _LISTBINDINGSRESULT._serialized_start=14726 - _LISTBINDINGSRESULT._serialized_end=14827 - _DESCRIBEBINDINGREQUEST._serialized_start=14829 - _DESCRIBEBINDINGREQUEST._serialized_end=14945 - _DESCRIBEBINDINGRESPONSE._serialized_start=14947 - _DESCRIBEBINDINGRESPONSE._serialized_end=15018 - _DESCRIBEBINDINGRESULT._serialized_start=15020 - _DESCRIBEBINDINGRESULT._serialized_end=15085 - _MODIFYBINDINGREQUEST._serialized_start=15088 - _MODIFYBINDINGREQUEST._serialized_end=15322 - _MODIFYBINDINGRESPONSE._serialized_start=15324 - _MODIFYBINDINGRESPONSE._serialized_end=15393 - _MODIFYBINDINGRESULT._serialized_start=15395 - _MODIFYBINDINGRESULT._serialized_end=15416 - _DELETEBINDINGREQUEST._serialized_start=15419 - _DELETEBINDINGREQUEST._serialized_end=15604 - _DELETEBINDINGRESPONSE._serialized_start=15606 - _DELETEBINDINGRESPONSE._serialized_end=15675 - _DELETEBINDINGRESULT._serialized_start=15677 - _DELETEBINDINGRESULT._serialized_end=15698 + _QUERYCONTENT._serialized_end=2067 + _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_start=1807 + _QUERYCONTENT_EXECUTIONSETTINGSENTRY._serialized_end=1863 + _QUERYCONTENT_PARAMETERSENTRY._serialized_start=1865 + _QUERYCONTENT_PARAMETERSENTRY._serialized_end=1931 + _QUERYCONTENT_QUERYTYPE._serialized_start=1933 + _QUERYCONTENT_QUERYTYPE._serialized_end=2002 + _QUERYCONTENT_QUERYSYNTAX._serialized_start=2004 + _QUERYCONTENT_QUERYSYNTAX._serialized_end=2067 + _COMMONMETA._serialized_start=2070 + _COMMONMETA._serialized_end=2299 + _QUERYMETA._serialized_start=2302 + _QUERYMETA._serialized_end=3133 + _QUERYMETA_COMPUTESTATUS._serialized_start=2864 + _QUERYMETA_COMPUTESTATUS._serialized_end=3123 + _BRIEFQUERY._serialized_start=3136 + _BRIEFQUERY._serialized_end=3337 + _QUERYPLAN._serialized_start=3339 + _QUERYPLAN._serialized_end=3364 + _QUERYAST._serialized_start=3366 + _QUERYAST._serialized_end=3390 + _RESULTSETMETA._serialized_start=3392 + _RESULTSETMETA._serialized_end=3485 + _QUERYTIMELINE._serialized_start=3487 + _QUERYTIMELINE._serialized_end=3515 + _QUERY._serialized_start=3518 + _QUERY._serialized_end=3941 + _QUERYSTATISTICS._serialized_start=3943 + _QUERYSTATISTICS._serialized_end=3974 + _CREATEQUERYREQUEST._serialized_start=3977 + _CREATEQUERYREQUEST._serialized_end=4247 + _CREATEQUERYRESPONSE._serialized_start=4249 + _CREATEQUERYRESPONSE._serialized_end=4316 + _CREATEQUERYRESULT._serialized_start=4318 + _CREATEQUERYRESULT._serialized_end=4364 + _LISTQUERIESREQUEST._serialized_start=4367 + _LISTQUERIESREQUEST._serialized_end=4898 + _LISTQUERIESREQUEST_FILTER._serialized_start=4566 + _LISTQUERIESREQUEST_FILTER._serialized_end=4898 + _LISTQUERIESRESPONSE._serialized_start=4900 + _LISTQUERIESRESPONSE._serialized_end=4967 + _LISTQUERIESRESULT._serialized_start=4969 + _LISTQUERIESRESULT._serialized_end=5065 + _DESCRIBEQUERYREQUEST._serialized_start=5067 + _DESCRIBEQUERYREQUEST._serialized_end=5179 + _DESCRIBEQUERYRESPONSE._serialized_start=5181 + _DESCRIBEQUERYRESPONSE._serialized_end=5250 + _DESCRIBEQUERYRESULT._serialized_start=5252 + _DESCRIBEQUERYRESULT._serialized_end=5311 + _GETQUERYSTATUSREQUEST._serialized_start=5313 + _GETQUERYSTATUSREQUEST._serialized_end=5426 + _GETQUERYSTATUSRESPONSE._serialized_start=5428 + _GETQUERYSTATUSRESPONSE._serialized_end=5498 + _GETQUERYSTATUSRESULT._serialized_start=5500 + _GETQUERYSTATUSRESULT._serialized_end=5602 + _DELETEQUERYREQUEST._serialized_start=5605 + _DELETEQUERYREQUEST._serialized_end=5786 + _DELETEQUERYRESPONSE._serialized_start=5788 + _DELETEQUERYRESPONSE._serialized_end=5855 + _DELETEQUERYRESULT._serialized_start=5857 + _DELETEQUERYRESULT._serialized_end=5876 + _MODIFYQUERYREQUEST._serialized_start=5879 + _MODIFYQUERYREQUEST._serialized_end=6273 + _MODIFYQUERYRESPONSE._serialized_start=6275 + _MODIFYQUERYRESPONSE._serialized_end=6342 + _MODIFYQUERYRESULT._serialized_start=6344 + _MODIFYQUERYRESULT._serialized_end=6363 + _CONTROLQUERYREQUEST._serialized_start=6366 + _CONTROLQUERYREQUEST._serialized_end=6593 + _CONTROLQUERYRESPONSE._serialized_start=6595 + _CONTROLQUERYRESPONSE._serialized_end=6663 + _CONTROLQUERYRESULT._serialized_start=6665 + _CONTROLQUERYRESULT._serialized_end=6685 + _BRIEFJOB._serialized_start=6688 + _BRIEFJOB._serialized_end=6925 + _JOB._serialized_start=6928 + _JOB._serialized_end=7568 + _JOB_PARAMETERSENTRY._serialized_start=1865 + _JOB_PARAMETERSENTRY._serialized_end=1931 + _LISTJOBSREQUEST._serialized_start=7571 + _LISTJOBSREQUEST._serialized_end=7839 + _LISTJOBSREQUEST_FILTER._serialized_start=7781 + _LISTJOBSREQUEST_FILTER._serialized_end=7839 + _LISTJOBSRESPONSE._serialized_start=7841 + _LISTJOBSRESPONSE._serialized_end=7905 + _LISTJOBSRESULT._serialized_start=7907 + _LISTJOBSRESULT._serialized_end=7996 + _DESCRIBEJOBREQUEST._serialized_start=7998 + _DESCRIBEJOBREQUEST._serialized_end=8106 + _DESCRIBEJOBRESPONSE._serialized_start=8108 + _DESCRIBEJOBRESPONSE._serialized_end=8175 + _DESCRIBEJOBRESULT._serialized_start=8177 + _DESCRIBEJOBRESULT._serialized_end=8230 + _CURRENTIAMTOKENAUTH._serialized_start=8232 + _CURRENTIAMTOKENAUTH._serialized_end=8253 + _NONEAUTH._serialized_start=8255 + _NONEAUTH._serialized_end=8265 + _SERVICEACCOUNTAUTH._serialized_start=8267 + _SERVICEACCOUNTAUTH._serialized_end=8308 + _TOKENAUTH._serialized_start=8310 + _TOKENAUTH._serialized_end=8349 + _IAMAUTH._serialized_start=8352 + _IAMAUTH._serialized_end=8582 + _DATASTREAMS._serialized_start=8585 + _DATASTREAMS._serialized_end=8761 + _MONITORING._serialized_start=8763 + _MONITORING._serialized_end=8866 + _YDBDATABASE._serialized_start=8869 + _YDBDATABASE._serialized_end=9021 + _CLICKHOUSECLUSTER._serialized_start=9024 + _CLICKHOUSECLUSTER._serialized_end=9272 + _OBJECTSTORAGECONNECTION._serialized_start=9274 + _OBJECTSTORAGECONNECTION._serialized_end=9363 + _POSTGRESQLCLUSTER._serialized_start=9366 + _POSTGRESQLCLUSTER._serialized_end=9639 + _GREENPLUMCLUSTER._serialized_start=9642 + _GREENPLUMCLUSTER._serialized_end=9845 + _MYSQLCLUSTER._serialized_start=9848 + _MYSQLCLUSTER._serialized_end=10022 + _LOGGING._serialized_start=10024 + _LOGGING._serialized_end=10091 + _ICEBERGWAREHOUSE._serialized_start=10094 + _ICEBERGWAREHOUSE._serialized_end=10258 + _ICEBERGWAREHOUSE_S3._serialized_start=10165 + _ICEBERGWAREHOUSE_S3._serialized_end=10247 + _ICEBERGCATALOG._serialized_start=10261 + _ICEBERGCATALOG._serialized_end=10581 + _ICEBERGCATALOG_HADOOP._serialized_start=10408 + _ICEBERGCATALOG_HADOOP._serialized_end=10463 + _ICEBERGCATALOG_HIVEMETASTORE._serialized_start=10465 + _ICEBERGCATALOG_HIVEMETASTORE._serialized_end=10570 + _ICEBERG._serialized_start=10584 + _ICEBERG._serialized_end=10744 + _CONNECTIONSETTING._serialized_start=10747 + _CONNECTIONSETTING._serialized_end=11579 + _CONNECTIONSETTING_CONNECTIONTYPE._serialized_start=11328 + _CONNECTIONSETTING_CONNECTIONTYPE._serialized_end=11565 + _CONNECTIONCONTENT._serialized_start=11582 + _CONNECTIONCONTENT._serialized_end=11744 + _CONNECTION._serialized_start=11746 + _CONNECTION._serialized_end=11852 + _CREATECONNECTIONREQUEST._serialized_start=11855 + _CREATECONNECTIONREQUEST._serialized_end=12025 + _CREATECONNECTIONRESPONSE._serialized_start=12027 + _CREATECONNECTIONRESPONSE._serialized_end=12099 + _CREATECONNECTIONRESULT._serialized_start=12101 + _CREATECONNECTIONRESULT._serialized_end=12161 + _LISTCONNECTIONSREQUEST._serialized_start=12164 + _LISTCONNECTIONSREQUEST._serialized_end=12552 + _LISTCONNECTIONSREQUEST_FILTER._serialized_start=12371 + _LISTCONNECTIONSREQUEST_FILTER._serialized_end=12552 + _LISTCONNECTIONSRESPONSE._serialized_start=12554 + _LISTCONNECTIONSRESPONSE._serialized_end=12625 + _LISTCONNECTIONSRESULT._serialized_start=12627 + _LISTCONNECTIONSRESULT._serialized_end=12732 + _DESCRIBECONNECTIONREQUEST._serialized_start=12734 + _DESCRIBECONNECTIONREQUEST._serialized_end=12856 + _DESCRIBECONNECTIONRESPONSE._serialized_start=12858 + _DESCRIBECONNECTIONRESPONSE._serialized_end=12932 + _DESCRIBECONNECTIONRESULT._serialized_start=12934 + _DESCRIBECONNECTIONRESULT._serialized_end=13008 + _MODIFYCONNECTIONREQUEST._serialized_start=13011 + _MODIFYCONNECTIONREQUEST._serialized_end=13254 + _MODIFYCONNECTIONRESPONSE._serialized_start=13256 + _MODIFYCONNECTIONRESPONSE._serialized_end=13328 + _MODIFYCONNECTIONRESULT._serialized_start=13330 + _MODIFYCONNECTIONRESULT._serialized_end=13354 + _DELETECONNECTIONREQUEST._serialized_start=13357 + _DELETECONNECTIONREQUEST._serialized_end=13548 + _DELETECONNECTIONRESPONSE._serialized_start=13550 + _DELETECONNECTIONRESPONSE._serialized_end=13622 + _DELETECONNECTIONRESULT._serialized_start=13624 + _DELETECONNECTIONRESULT._serialized_end=13648 + _TESTCONNECTIONREQUEST._serialized_start=13651 + _TESTCONNECTIONREQUEST._serialized_end=13785 + _TESTCONNECTIONRESPONSE._serialized_start=13787 + _TESTCONNECTIONRESPONSE._serialized_end=13857 + _TESTCONNECTIONRESULT._serialized_start=13859 + _TESTCONNECTIONRESULT._serialized_end=13881 + _GETRESULTDATAREQUEST._serialized_start=13884 + _GETRESULTDATAREQUEST._serialized_end=14088 + _GETRESULTDATARESPONSE._serialized_start=14090 + _GETRESULTDATARESPONSE._serialized_end=14159 + _GETRESULTDATARESULT._serialized_start=14161 + _GETRESULTDATARESULT._serialized_end=14218 + _SCHEMA._serialized_start=14220 + _SCHEMA._serialized_end=14266 + _DATASTREAMSBINDING._serialized_start=14269 + _DATASTREAMSBINDING._serialized_end=14559 + _DATASTREAMSBINDING_FORMATSETTINGENTRY._serialized_start=14507 + _DATASTREAMSBINDING_FORMATSETTINGENTRY._serialized_end=14559 + _OBJECTSTORAGEBINDING._serialized_start=14562 + _OBJECTSTORAGEBINDING._serialized_end=15092 + _OBJECTSTORAGEBINDING_SUBSET._serialized_start=14648 + _OBJECTSTORAGEBINDING_SUBSET._serialized_end=15092 + _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._serialized_start=14507 + _OBJECTSTORAGEBINDING_SUBSET_FORMATSETTINGENTRY._serialized_end=14559 + _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._serialized_start=15043 + _OBJECTSTORAGEBINDING_SUBSET_PROJECTIONENTRY._serialized_end=15092 + _BINDINGSETTING._serialized_start=15095 + _BINDINGSETTING._serialized_end=15329 + _BINDINGSETTING_BINDINGTYPE._serialized_start=15237 + _BINDINGSETTING_BINDINGTYPE._serialized_end=15318 + _BRIEFBINDING._serialized_start=15332 + _BRIEFBINDING._serialized_end=15561 + _BINDINGCONTENT._serialized_start=15564 + _BINDINGCONTENT._serialized_end=15756 + _BINDING._serialized_start=15758 + _BINDING._serialized_end=15858 + _CREATEBINDINGREQUEST._serialized_start=15861 + _CREATEBINDINGREQUEST._serialized_end=16025 + _CREATEBINDINGRESPONSE._serialized_start=16027 + _CREATEBINDINGRESPONSE._serialized_end=16096 + _CREATEBINDINGRESULT._serialized_start=16098 + _CREATEBINDINGRESULT._serialized_end=16152 + _LISTBINDINGSREQUEST._serialized_start=16155 + _LISTBINDINGSREQUEST._serialized_end=16494 + _LISTBINDINGSREQUEST_FILTER._serialized_start=16356 + _LISTBINDINGSREQUEST_FILTER._serialized_end=16494 + _LISTBINDINGSRESPONSE._serialized_start=16496 + _LISTBINDINGSRESPONSE._serialized_end=16564 + _LISTBINDINGSRESULT._serialized_start=16566 + _LISTBINDINGSRESULT._serialized_end=16667 + _DESCRIBEBINDINGREQUEST._serialized_start=16669 + _DESCRIBEBINDINGREQUEST._serialized_end=16785 + _DESCRIBEBINDINGRESPONSE._serialized_start=16787 + _DESCRIBEBINDINGRESPONSE._serialized_end=16858 + _DESCRIBEBINDINGRESULT._serialized_start=16860 + _DESCRIBEBINDINGRESULT._serialized_end=16925 + _MODIFYBINDINGREQUEST._serialized_start=16928 + _MODIFYBINDINGREQUEST._serialized_end=17162 + _MODIFYBINDINGRESPONSE._serialized_start=17164 + _MODIFYBINDINGRESPONSE._serialized_end=17233 + _MODIFYBINDINGRESULT._serialized_start=17235 + _MODIFYBINDINGRESULT._serialized_end=17256 + _DELETEBINDINGREQUEST._serialized_start=17259 + _DELETEBINDINGREQUEST._serialized_end=17444 + _DELETEBINDINGRESPONSE._serialized_start=17446 + _DELETEBINDINGRESPONSE._serialized_end=17515 + _DELETEBINDINGRESULT._serialized_start=17517 + _DELETEBINDINGRESULT._serialized_end=17538 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.pyi b/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.pyi index bc950b0a..008977fc 100644 --- a/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.pyi +++ b/ydb/_grpc/v5/draft/protos/ydb_federated_query_pb2.pyi @@ -180,7 +180,7 @@ class ConnectionContent(_message.Message): def __init__(self, name: _Optional[str] = ..., setting: _Optional[_Union[ConnectionSetting, _Mapping]] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., description: _Optional[str] = ...) -> None: ... class ConnectionSetting(_message.Message): - __slots__ = ["clickhouse_cluster", "data_streams", "monitoring", "object_storage", "postgresql_cluster", "ydb_database"] + __slots__ = ["clickhouse_cluster", "data_streams", "greenplum_cluster", "iceberg", "logging", "monitoring", "mysql_cluster", "object_storage", "postgresql_cluster", "ydb_database"] class ConnectionType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] CLICKHOUSE_CLUSTER: ConnectionSetting.ConnectionType @@ -188,8 +188,16 @@ class ConnectionSetting(_message.Message): CONNECTION_TYPE_UNSPECIFIED: ConnectionSetting.ConnectionType DATA_STREAMS: ConnectionSetting.ConnectionType DATA_STREAMS_FIELD_NUMBER: _ClassVar[int] + GREENPLUM_CLUSTER: ConnectionSetting.ConnectionType + GREENPLUM_CLUSTER_FIELD_NUMBER: _ClassVar[int] + ICEBERG: ConnectionSetting.ConnectionType + ICEBERG_FIELD_NUMBER: _ClassVar[int] + LOGGING: ConnectionSetting.ConnectionType + LOGGING_FIELD_NUMBER: _ClassVar[int] MONITORING: ConnectionSetting.ConnectionType MONITORING_FIELD_NUMBER: _ClassVar[int] + MYSQL_CLUSTER: ConnectionSetting.ConnectionType + MYSQL_CLUSTER_FIELD_NUMBER: _ClassVar[int] OBJECT_STORAGE: ConnectionSetting.ConnectionType OBJECT_STORAGE_FIELD_NUMBER: _ClassVar[int] POSTGRESQL_CLUSTER: ConnectionSetting.ConnectionType @@ -198,11 +206,15 @@ class ConnectionSetting(_message.Message): YDB_DATABASE_FIELD_NUMBER: _ClassVar[int] clickhouse_cluster: ClickHouseCluster data_streams: DataStreams + greenplum_cluster: GreenplumCluster + iceberg: Iceberg + logging: Logging monitoring: Monitoring + mysql_cluster: MySQLCluster object_storage: ObjectStorageConnection postgresql_cluster: PostgreSQLCluster ydb_database: YdbDatabase - def __init__(self, ydb_database: _Optional[_Union[YdbDatabase, _Mapping]] = ..., clickhouse_cluster: _Optional[_Union[ClickHouseCluster, _Mapping]] = ..., data_streams: _Optional[_Union[DataStreams, _Mapping]] = ..., object_storage: _Optional[_Union[ObjectStorageConnection, _Mapping]] = ..., monitoring: _Optional[_Union[Monitoring, _Mapping]] = ..., postgresql_cluster: _Optional[_Union[PostgreSQLCluster, _Mapping]] = ...) -> None: ... + def __init__(self, ydb_database: _Optional[_Union[YdbDatabase, _Mapping]] = ..., clickhouse_cluster: _Optional[_Union[ClickHouseCluster, _Mapping]] = ..., data_streams: _Optional[_Union[DataStreams, _Mapping]] = ..., object_storage: _Optional[_Union[ObjectStorageConnection, _Mapping]] = ..., monitoring: _Optional[_Union[Monitoring, _Mapping]] = ..., postgresql_cluster: _Optional[_Union[PostgreSQLCluster, _Mapping]] = ..., greenplum_cluster: _Optional[_Union[GreenplumCluster, _Mapping]] = ..., mysql_cluster: _Optional[_Union[MySQLCluster, _Mapping]] = ..., logging: _Optional[_Union[Logging, _Mapping]] = ..., iceberg: _Optional[_Union[Iceberg, _Mapping]] = ...) -> None: ... class ControlQueryRequest(_message.Message): __slots__ = ["action", "idempotency_key", "operation_params", "previous_revision", "query_id"] @@ -303,18 +315,20 @@ class CurrentIAMTokenAuth(_message.Message): def __init__(self) -> None: ... class DataStreams(_message.Message): - __slots__ = ["auth", "database", "database_id", "endpoint", "secure"] + __slots__ = ["auth", "database", "database_id", "endpoint", "secure", "shared_reading"] AUTH_FIELD_NUMBER: _ClassVar[int] DATABASE_FIELD_NUMBER: _ClassVar[int] DATABASE_ID_FIELD_NUMBER: _ClassVar[int] ENDPOINT_FIELD_NUMBER: _ClassVar[int] SECURE_FIELD_NUMBER: _ClassVar[int] + SHARED_READING_FIELD_NUMBER: _ClassVar[int] auth: IamAuth database: str database_id: str endpoint: str secure: bool - def __init__(self, database_id: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ..., endpoint: _Optional[str] = ..., database: _Optional[str] = ..., secure: bool = ...) -> None: ... + shared_reading: bool + def __init__(self, database_id: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ..., endpoint: _Optional[str] = ..., database: _Optional[str] = ..., secure: bool = ..., shared_reading: bool = ...) -> None: ... class DataStreamsBinding(_message.Message): __slots__ = ["compression", "format", "format_setting", "schema", "stream_name"] @@ -531,24 +545,93 @@ class GetResultDataResult(_message.Message): result_set: _ydb_value_pb2.ResultSet def __init__(self, result_set: _Optional[_Union[_ydb_value_pb2.ResultSet, _Mapping]] = ...) -> None: ... +class GreenplumCluster(_message.Message): + __slots__ = ["auth", "database_id", "database_name", "login", "password", "schema"] + AUTH_FIELD_NUMBER: _ClassVar[int] + DATABASE_ID_FIELD_NUMBER: _ClassVar[int] + DATABASE_NAME_FIELD_NUMBER: _ClassVar[int] + LOGIN_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + SCHEMA_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + database_id: str + database_name: str + login: str + password: str + schema: str + def __init__(self, database_id: _Optional[str] = ..., database_name: _Optional[str] = ..., login: _Optional[str] = ..., password: _Optional[str] = ..., schema: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ...) -> None: ... + class IamAuth(_message.Message): - __slots__ = ["current_iam", "none", "service_account"] + __slots__ = ["current_iam", "none", "service_account", "token"] CURRENT_IAM_FIELD_NUMBER: _ClassVar[int] NONE_FIELD_NUMBER: _ClassVar[int] SERVICE_ACCOUNT_FIELD_NUMBER: _ClassVar[int] + TOKEN_FIELD_NUMBER: _ClassVar[int] current_iam: CurrentIAMTokenAuth none: NoneAuth service_account: ServiceAccountAuth - def __init__(self, current_iam: _Optional[_Union[CurrentIAMTokenAuth, _Mapping]] = ..., service_account: _Optional[_Union[ServiceAccountAuth, _Mapping]] = ..., none: _Optional[_Union[NoneAuth, _Mapping]] = ...) -> None: ... + token: TokenAuth + def __init__(self, current_iam: _Optional[_Union[CurrentIAMTokenAuth, _Mapping]] = ..., service_account: _Optional[_Union[ServiceAccountAuth, _Mapping]] = ..., none: _Optional[_Union[NoneAuth, _Mapping]] = ..., token: _Optional[_Union[TokenAuth, _Mapping]] = ...) -> None: ... + +class Iceberg(_message.Message): + __slots__ = ["catalog", "warehouse", "warehouse_auth"] + CATALOG_FIELD_NUMBER: _ClassVar[int] + WAREHOUSE_AUTH_FIELD_NUMBER: _ClassVar[int] + WAREHOUSE_FIELD_NUMBER: _ClassVar[int] + catalog: IcebergCatalog + warehouse: IcebergWarehouse + warehouse_auth: IamAuth + def __init__(self, warehouse_auth: _Optional[_Union[IamAuth, _Mapping]] = ..., warehouse: _Optional[_Union[IcebergWarehouse, _Mapping]] = ..., catalog: _Optional[_Union[IcebergCatalog, _Mapping]] = ...) -> None: ... + +class IcebergCatalog(_message.Message): + __slots__ = ["hadoop", "hive_metastore"] + class Hadoop(_message.Message): + __slots__ = ["directory"] + DIRECTORY_FIELD_NUMBER: _ClassVar[int] + directory: str + def __init__(self, directory: _Optional[str] = ...) -> None: ... + class HiveMetastore(_message.Message): + __slots__ = ["database_name", "uri"] + DATABASE_NAME_FIELD_NUMBER: _ClassVar[int] + URI_FIELD_NUMBER: _ClassVar[int] + database_name: str + uri: str + def __init__(self, uri: _Optional[str] = ..., database_name: _Optional[str] = ...) -> None: ... + HADOOP_FIELD_NUMBER: _ClassVar[int] + HIVE_METASTORE_FIELD_NUMBER: _ClassVar[int] + hadoop: IcebergCatalog.Hadoop + hive_metastore: IcebergCatalog.HiveMetastore + def __init__(self, hadoop: _Optional[_Union[IcebergCatalog.Hadoop, _Mapping]] = ..., hive_metastore: _Optional[_Union[IcebergCatalog.HiveMetastore, _Mapping]] = ...) -> None: ... + +class IcebergWarehouse(_message.Message): + __slots__ = ["s3"] + class S3(_message.Message): + __slots__ = ["bucket", "path"] + BUCKET_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + bucket: str + path: str + def __init__(self, bucket: _Optional[str] = ..., path: _Optional[str] = ...) -> None: ... + S3_FIELD_NUMBER: _ClassVar[int] + s3: IcebergWarehouse.S3 + def __init__(self, s3: _Optional[_Union[IcebergWarehouse.S3, _Mapping]] = ...) -> None: ... class Job(_message.Message): - __slots__ = ["acl", "ast", "automatic", "expire_at", "issue", "meta", "plan", "query_meta", "query_name", "result_set_meta", "statistics", "syntax", "text"] + __slots__ = ["acl", "ast", "automatic", "expire_at", "issue", "meta", "parameters", "plan", "query_meta", "query_name", "result_set_meta", "statistics", "syntax", "text"] + class ParametersEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: _ydb_value_pb2.TypedValue + def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... ACL_FIELD_NUMBER: _ClassVar[int] AST_FIELD_NUMBER: _ClassVar[int] AUTOMATIC_FIELD_NUMBER: _ClassVar[int] EXPIRE_AT_FIELD_NUMBER: _ClassVar[int] ISSUE_FIELD_NUMBER: _ClassVar[int] META_FIELD_NUMBER: _ClassVar[int] + PARAMETERS_FIELD_NUMBER: _ClassVar[int] PLAN_FIELD_NUMBER: _ClassVar[int] QUERY_META_FIELD_NUMBER: _ClassVar[int] QUERY_NAME_FIELD_NUMBER: _ClassVar[int] @@ -562,6 +645,7 @@ class Job(_message.Message): expire_at: _timestamp_pb2.Timestamp issue: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] meta: CommonMeta + parameters: _containers.MessageMap[str, _ydb_value_pb2.TypedValue] plan: QueryPlan query_meta: QueryMeta query_name: str @@ -569,7 +653,7 @@ class Job(_message.Message): statistics: QueryStatistics syntax: QueryContent.QuerySyntax text: str - def __init__(self, meta: _Optional[_Union[CommonMeta, _Mapping]] = ..., text: _Optional[str] = ..., query_meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., plan: _Optional[_Union[QueryPlan, _Mapping]] = ..., issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., statistics: _Optional[_Union[QueryStatistics, _Mapping]] = ..., result_set_meta: _Optional[_Iterable[_Union[ResultSetMeta, _Mapping]]] = ..., ast: _Optional[_Union[QueryAst, _Mapping]] = ..., query_name: _Optional[str] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., automatic: bool = ..., expire_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., syntax: _Optional[_Union[QueryContent.QuerySyntax, str]] = ...) -> None: ... + def __init__(self, meta: _Optional[_Union[CommonMeta, _Mapping]] = ..., text: _Optional[str] = ..., query_meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., plan: _Optional[_Union[QueryPlan, _Mapping]] = ..., issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., statistics: _Optional[_Union[QueryStatistics, _Mapping]] = ..., result_set_meta: _Optional[_Iterable[_Union[ResultSetMeta, _Mapping]]] = ..., ast: _Optional[_Union[QueryAst, _Mapping]] = ..., query_name: _Optional[str] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., automatic: bool = ..., expire_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., syntax: _Optional[_Union[QueryContent.QuerySyntax, str]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ...) -> None: ... class Limits(_message.Message): __slots__ = ["execution_deadline", "execution_timeout", "flow_rate_limit", "max_result_rows", "max_result_size", "memory_limit", "result_ttl", "vcpu_rate_limit", "vcpu_time_limit"] @@ -745,6 +829,14 @@ class ListQueriesResult(_message.Message): query: _containers.RepeatedCompositeFieldContainer[BriefQuery] def __init__(self, query: _Optional[_Iterable[_Union[BriefQuery, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ... +class Logging(_message.Message): + __slots__ = ["auth", "folder_id"] + AUTH_FIELD_NUMBER: _ClassVar[int] + FOLDER_ID_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + folder_id: str + def __init__(self, folder_id: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ...) -> None: ... + class ModifyBindingRequest(_message.Message): __slots__ = ["binding_id", "content", "idempotency_key", "operation_params", "previous_revision"] BINDING_ID_FIELD_NUMBER: _ClassVar[int] @@ -833,6 +925,20 @@ class Monitoring(_message.Message): project: str def __init__(self, project: _Optional[str] = ..., cluster: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ...) -> None: ... +class MySQLCluster(_message.Message): + __slots__ = ["auth", "database_id", "database_name", "login", "password"] + AUTH_FIELD_NUMBER: _ClassVar[int] + DATABASE_ID_FIELD_NUMBER: _ClassVar[int] + DATABASE_NAME_FIELD_NUMBER: _ClassVar[int] + LOGIN_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + auth: IamAuth + database_id: str + database_name: str + login: str + password: str + def __init__(self, database_id: _Optional[str] = ..., database_name: _Optional[str] = ..., login: _Optional[str] = ..., password: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ...) -> None: ... + class NoneAuth(_message.Message): __slots__ = [] def __init__(self) -> None: ... @@ -905,7 +1011,7 @@ class PostgreSQLCluster(_message.Message): def __init__(self, database_id: _Optional[str] = ..., database_name: _Optional[str] = ..., login: _Optional[str] = ..., password: _Optional[str] = ..., schema: _Optional[str] = ..., auth: _Optional[_Union[IamAuth, _Mapping]] = ..., host: _Optional[str] = ..., port: _Optional[int] = ..., secure: bool = ...) -> None: ... class Query(_message.Message): - __slots__ = ["ast", "content", "issue", "meta", "plan", "result_set_meta", "statistics", "transient_issue"] + __slots__ = ["ast", "content", "issue", "meta", "plan", "result_set_meta", "statistics", "timeline", "transient_issue"] AST_FIELD_NUMBER: _ClassVar[int] CONTENT_FIELD_NUMBER: _ClassVar[int] ISSUE_FIELD_NUMBER: _ClassVar[int] @@ -913,6 +1019,7 @@ class Query(_message.Message): PLAN_FIELD_NUMBER: _ClassVar[int] RESULT_SET_META_FIELD_NUMBER: _ClassVar[int] STATISTICS_FIELD_NUMBER: _ClassVar[int] + TIMELINE_FIELD_NUMBER: _ClassVar[int] TRANSIENT_ISSUE_FIELD_NUMBER: _ClassVar[int] ast: QueryAst content: QueryContent @@ -921,8 +1028,9 @@ class Query(_message.Message): plan: QueryPlan result_set_meta: _containers.RepeatedCompositeFieldContainer[ResultSetMeta] statistics: QueryStatistics + timeline: QueryTimeline transient_issue: _containers.RepeatedCompositeFieldContainer[_ydb_issue_message_pb2.IssueMessage] - def __init__(self, meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., content: _Optional[_Union[QueryContent, _Mapping]] = ..., plan: _Optional[_Union[QueryPlan, _Mapping]] = ..., issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., transient_issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., statistics: _Optional[_Union[QueryStatistics, _Mapping]] = ..., result_set_meta: _Optional[_Iterable[_Union[ResultSetMeta, _Mapping]]] = ..., ast: _Optional[_Union[QueryAst, _Mapping]] = ...) -> None: ... + def __init__(self, meta: _Optional[_Union[QueryMeta, _Mapping]] = ..., content: _Optional[_Union[QueryContent, _Mapping]] = ..., plan: _Optional[_Union[QueryPlan, _Mapping]] = ..., issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., transient_issue: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ..., statistics: _Optional[_Union[QueryStatistics, _Mapping]] = ..., result_set_meta: _Optional[_Iterable[_Union[ResultSetMeta, _Mapping]]] = ..., ast: _Optional[_Union[QueryAst, _Mapping]] = ..., timeline: _Optional[_Union[QueryTimeline, _Mapping]] = ...) -> None: ... class QueryAst(_message.Message): __slots__ = ["data"] @@ -931,7 +1039,7 @@ class QueryAst(_message.Message): def __init__(self, data: _Optional[str] = ...) -> None: ... class QueryContent(_message.Message): - __slots__ = ["acl", "automatic", "description", "execution_settings", "limits", "name", "syntax", "text", "type"] + __slots__ = ["acl", "automatic", "description", "execution_settings", "limits", "name", "parameters", "syntax", "text", "type"] class QuerySyntax(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] class QueryType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): @@ -943,6 +1051,13 @@ class QueryContent(_message.Message): key: str value: str def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + class ParametersEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: _ydb_value_pb2.TypedValue + def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... ACL_FIELD_NUMBER: _ClassVar[int] ANALYTICS: QueryContent.QueryType AUTOMATIC_FIELD_NUMBER: _ClassVar[int] @@ -950,6 +1065,7 @@ class QueryContent(_message.Message): EXECUTION_SETTINGS_FIELD_NUMBER: _ClassVar[int] LIMITS_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] + PARAMETERS_FIELD_NUMBER: _ClassVar[int] PG: QueryContent.QuerySyntax QUERY_SYNTAX_UNSPECIFIED: QueryContent.QuerySyntax QUERY_TYPE_UNSPECIFIED: QueryContent.QueryType @@ -964,10 +1080,11 @@ class QueryContent(_message.Message): execution_settings: _containers.ScalarMap[str, str] limits: Limits name: str + parameters: _containers.MessageMap[str, _ydb_value_pb2.TypedValue] syntax: QueryContent.QuerySyntax text: str type: QueryContent.QueryType - def __init__(self, type: _Optional[_Union[QueryContent.QueryType, str]] = ..., name: _Optional[str] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., limits: _Optional[_Union[Limits, _Mapping]] = ..., text: _Optional[str] = ..., automatic: bool = ..., description: _Optional[str] = ..., execution_settings: _Optional[_Mapping[str, str]] = ..., syntax: _Optional[_Union[QueryContent.QuerySyntax, str]] = ...) -> None: ... + def __init__(self, type: _Optional[_Union[QueryContent.QueryType, str]] = ..., name: _Optional[str] = ..., acl: _Optional[_Union[Acl, _Mapping]] = ..., limits: _Optional[_Union[Limits, _Mapping]] = ..., text: _Optional[str] = ..., automatic: bool = ..., description: _Optional[str] = ..., execution_settings: _Optional[_Mapping[str, str]] = ..., syntax: _Optional[_Union[QueryContent.QuerySyntax, str]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ...) -> None: ... class QueryMeta(_message.Message): __slots__ = ["aborted_by", "common", "execute_mode", "expire_at", "finished_at", "has_saved_checkpoints", "last_job_id", "last_job_query_revision", "paused_by", "result_expire_at", "started_at", "started_by", "status", "submitted_at"] @@ -1029,6 +1146,12 @@ class QueryStatistics(_message.Message): json: str def __init__(self, json: _Optional[str] = ...) -> None: ... +class QueryTimeline(_message.Message): + __slots__ = ["svg"] + SVG_FIELD_NUMBER: _ClassVar[int] + svg: str + def __init__(self, svg: _Optional[str] = ...) -> None: ... + class ResultSetMeta(_message.Message): __slots__ = ["column", "rows_count", "truncated"] COLUMN_FIELD_NUMBER: _ClassVar[int] @@ -1098,6 +1221,12 @@ class TestConnectionResult(_message.Message): __slots__ = [] def __init__(self) -> None: ... +class TokenAuth(_message.Message): + __slots__ = ["token"] + TOKEN_FIELD_NUMBER: _ClassVar[int] + token: str + def __init__(self, token: _Optional[str] = ...) -> None: ... + class YdbDatabase(_message.Message): __slots__ = ["auth", "database", "database_id", "endpoint", "secure"] AUTH_FIELD_NUMBER: _ClassVar[int] diff --git a/ydb/_grpc/v5/protos/ydb_export_pb2.py b/ydb/_grpc/v5/protos/ydb_export_pb2.py index 8fe3163f..9b0fdef5 100644 --- a/ydb/_grpc/v5/protos/ydb_export_pb2.py +++ b/ydb/_grpc/v5/protos/ydb_export_pb2.py @@ -12,12 +12,13 @@ _sym_db = _symbol_database.Default() +from ydb._grpc.v5.protos.annotations import sensitive_pb2 as protos_dot_annotations_dot_sensitive__pb2 from ydb._grpc.v5.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_export.proto\x12\nYdb.Export\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x0e\x45xportProgress\"\x9e\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x11\n\rPROGRESS_DONE\x10\x03\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x04\x12\x16\n\x12PROGRESS_CANCELLED\x10\x05\"\xa0\x01\n\x12\x45xportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x98\x02\n\x12\x45xportToYtSettings\x12\x12\n\x04host\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x13\n\x05token\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x04 \x03(\x0b\x32#.Ydb.Export.ExportToYtSettings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x06 \x01(\r\x12\x13\n\x0buse_type_v3\x18\x07 \x01(\x08\x1a\x41\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\"\x12\n\x10\x45xportToYtResult\"\xb5\x01\n\x12\x45xportToYtMetadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToYtRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToYtResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xe1\x05\n\x12\x45xportToS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x35\n\x06scheme\x18\x02 \x01(\x0e\x32%.Ydb.Export.ExportToS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x06 \x03(\x0b\x32#.Ydb.Export.ExportToS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x42\n\rstorage_class\x18\t \x01(\x0e\x32+.Ydb.Export.ExportToS3Settings.StorageClass\x12\x13\n\x0b\x63ompression\x18\n \x01(\t\x12\x0e\n\x06region\x18\x0b \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\x0c \x01(\x08\x1a\x43\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12 \n\x12\x64\x65stination_prefix\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\xba\x01\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x16\n\x12REDUCED_REDUNDANCY\x10\x02\x12\x0f\n\x0bSTANDARD_IA\x10\x03\x12\x0e\n\nONEZONE_IA\x10\x04\x12\x17\n\x13INTELLIGENT_TIERING\x10\x05\x12\x0b\n\x07GLACIER\x10\x06\x12\x10\n\x0c\x44\x45\x45P_ARCHIVE\x10\x07\x12\x0c\n\x08OUTPOSTS\x10\x08\"\x12\n\x10\x45xportToS3Result\"\xb5\x01\n\x12\x45xportToS3Metadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3SettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBU\n\x15tech.ydb.proto.exportZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_export.proto\x12\nYdb.Export\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x0e\x45xportProgress\"\x9e\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x11\n\rPROGRESS_DONE\x10\x03\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x04\x12\x16\n\x12PROGRESS_CANCELLED\x10\x05\"\xa0\x01\n\x12\x45xportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x98\x02\n\x12\x45xportToYtSettings\x12\x12\n\x04host\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x13\n\x05token\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12:\n\x05items\x18\x04 \x03(\x0b\x32#.Ydb.Export.ExportToYtSettings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x06 \x01(\r\x12\x13\n\x0buse_type_v3\x18\x07 \x01(\x08\x1a\x41\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\"\x12\n\x10\x45xportToYtResult\"\xb5\x01\n\x12\x45xportToYtMetadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToYtRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToYtSettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToYtResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xc1\x06\n\x12\x45xportToS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x35\n\x06scheme\x18\x02 \x01(\x0e\x32%.Ydb.Export.ExportToS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12\x32\n\x05items\x18\x06 \x03(\x0b\x32#.Ydb.Export.ExportToS3Settings.Item\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x42\n\rstorage_class\x18\t \x01(\x0e\x32+.Ydb.Export.ExportToS3Settings.StorageClass\x12\x13\n\x0b\x63ompression\x18\n \x01(\t\x12\x0e\n\x06region\x18\x0b \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\x0c \x01(\x08\x12\x13\n\x0bsource_path\x18\r \x01(\t\x12\x1a\n\x12\x64\x65stination_prefix\x18\x0e \x01(\t\x12;\n\x13\x65ncryption_settings\x18\x0f \x01(\x0b\x32\x1e.Ydb.Export.EncryptionSettings\x1a=\n\x04Item\x12\x19\n\x0bsource_path\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1a\n\x12\x64\x65stination_prefix\x18\x02 \x01(\t\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\xba\x01\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x16\n\x12REDUCED_REDUNDANCY\x10\x02\x12\x0f\n\x0bSTANDARD_IA\x10\x03\x12\x0e\n\nONEZONE_IA\x10\x04\x12\x17\n\x13INTELLIGENT_TIERING\x10\x05\x12\x0b\n\x07GLACIER\x10\x06\x12\x10\n\x0c\x44\x45\x45P_ARCHIVE\x10\x07\x12\x0c\n\x08OUTPOSTS\x10\x08\"\x12\n\x10\x45xportToS3Result\"\xb5\x01\n\x12\x45xportToS3Metadata\x12\x30\n\x08settings\x18\x01 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Export.ExportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Export.ExportItemProgress\"\x86\x01\n\x11\x45xportToS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x36\n\x08settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Export.ExportToS3SettingsB\x04\x90\xe6*\x01\"B\n\x12\x45xportToS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xa2\x01\n\x12\x45ncryptionSettings\x12\x1c\n\x14\x65ncryption_algorithm\x18\x01 \x01(\t\x12\x44\n\rsymmetric_key\x18\x02 \x01(\x0b\x32+.Ydb.Export.EncryptionSettings.SymmetricKeyH\x00\x1a!\n\x0cSymmetricKey\x12\x11\n\x03key\x18\x01 \x01(\x0c\x42\x04\xb8\xe6*\x01\x42\x05\n\x03KeyBU\n\x15tech.ydb.proto.exportZ9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_export_pb2', globals()) @@ -41,8 +42,6 @@ _EXPORTTOYTREQUEST.fields_by_name['settings']._serialized_options = b'\220\346*\001' _EXPORTTOS3SETTINGS_ITEM.fields_by_name['source_path']._options = None _EXPORTTOS3SETTINGS_ITEM.fields_by_name['source_path']._serialized_options = b'\220\346*\001' - _EXPORTTOS3SETTINGS_ITEM.fields_by_name['destination_prefix']._options = None - _EXPORTTOS3SETTINGS_ITEM.fields_by_name['destination_prefix']._serialized_options = b'\220\346*\001' _EXPORTTOS3SETTINGS.fields_by_name['endpoint']._options = None _EXPORTTOS3SETTINGS.fields_by_name['endpoint']._serialized_options = b'\220\346*\001' _EXPORTTOS3SETTINGS.fields_by_name['bucket']._options = None @@ -51,44 +50,48 @@ _EXPORTTOS3SETTINGS.fields_by_name['access_key']._serialized_options = b'\220\346*\001' _EXPORTTOS3SETTINGS.fields_by_name['secret_key']._options = None _EXPORTTOS3SETTINGS.fields_by_name['secret_key']._serialized_options = b'\220\346*\001' - _EXPORTTOS3SETTINGS.fields_by_name['items']._options = None - _EXPORTTOS3SETTINGS.fields_by_name['items']._serialized_options = b'\232\346*\002(\001' _EXPORTTOS3SETTINGS.fields_by_name['description']._options = None _EXPORTTOS3SETTINGS.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200\001' _EXPORTTOS3REQUEST.fields_by_name['settings']._options = None _EXPORTTOS3REQUEST.fields_by_name['settings']._serialized_options = b'\220\346*\001' - _EXPORTPROGRESS._serialized_start=138 - _EXPORTPROGRESS._serialized_end=315 - _EXPORTPROGRESS_PROGRESS._serialized_start=157 - _EXPORTPROGRESS_PROGRESS._serialized_end=315 - _EXPORTITEMPROGRESS._serialized_start=318 - _EXPORTITEMPROGRESS._serialized_end=478 - _EXPORTTOYTSETTINGS._serialized_start=481 - _EXPORTTOYTSETTINGS._serialized_end=761 - _EXPORTTOYTSETTINGS_ITEM._serialized_start=696 - _EXPORTTOYTSETTINGS_ITEM._serialized_end=761 - _EXPORTTOYTRESULT._serialized_start=763 - _EXPORTTOYTRESULT._serialized_end=781 - _EXPORTTOYTMETADATA._serialized_start=784 - _EXPORTTOYTMETADATA._serialized_end=965 - _EXPORTTOYTREQUEST._serialized_start=968 - _EXPORTTOYTREQUEST._serialized_end=1102 - _EXPORTTOYTRESPONSE._serialized_start=1104 - _EXPORTTOYTRESPONSE._serialized_end=1170 - _EXPORTTOS3SETTINGS._serialized_start=1173 - _EXPORTTOS3SETTINGS._serialized_end=1910 - _EXPORTTOS3SETTINGS_ITEM._serialized_start=1606 - _EXPORTTOS3SETTINGS_ITEM._serialized_end=1673 - _EXPORTTOS3SETTINGS_SCHEME._serialized_start=1675 - _EXPORTTOS3SETTINGS_SCHEME._serialized_end=1721 - _EXPORTTOS3SETTINGS_STORAGECLASS._serialized_start=1724 - _EXPORTTOS3SETTINGS_STORAGECLASS._serialized_end=1910 - _EXPORTTOS3RESULT._serialized_start=1912 - _EXPORTTOS3RESULT._serialized_end=1930 - _EXPORTTOS3METADATA._serialized_start=1933 - _EXPORTTOS3METADATA._serialized_end=2114 - _EXPORTTOS3REQUEST._serialized_start=2117 - _EXPORTTOS3REQUEST._serialized_end=2251 - _EXPORTTOS3RESPONSE._serialized_start=2253 - _EXPORTTOS3RESPONSE._serialized_end=2319 + _ENCRYPTIONSETTINGS_SYMMETRICKEY.fields_by_name['key']._options = None + _ENCRYPTIONSETTINGS_SYMMETRICKEY.fields_by_name['key']._serialized_options = b'\270\346*\001' + _EXPORTPROGRESS._serialized_start=174 + _EXPORTPROGRESS._serialized_end=351 + _EXPORTPROGRESS_PROGRESS._serialized_start=193 + _EXPORTPROGRESS_PROGRESS._serialized_end=351 + _EXPORTITEMPROGRESS._serialized_start=354 + _EXPORTITEMPROGRESS._serialized_end=514 + _EXPORTTOYTSETTINGS._serialized_start=517 + _EXPORTTOYTSETTINGS._serialized_end=797 + _EXPORTTOYTSETTINGS_ITEM._serialized_start=732 + _EXPORTTOYTSETTINGS_ITEM._serialized_end=797 + _EXPORTTOYTRESULT._serialized_start=799 + _EXPORTTOYTRESULT._serialized_end=817 + _EXPORTTOYTMETADATA._serialized_start=820 + _EXPORTTOYTMETADATA._serialized_end=1001 + _EXPORTTOYTREQUEST._serialized_start=1004 + _EXPORTTOYTREQUEST._serialized_end=1138 + _EXPORTTOYTRESPONSE._serialized_start=1140 + _EXPORTTOYTRESPONSE._serialized_end=1206 + _EXPORTTOS3SETTINGS._serialized_start=1209 + _EXPORTTOS3SETTINGS._serialized_end=2042 + _EXPORTTOS3SETTINGS_ITEM._serialized_start=1744 + _EXPORTTOS3SETTINGS_ITEM._serialized_end=1805 + _EXPORTTOS3SETTINGS_SCHEME._serialized_start=1807 + _EXPORTTOS3SETTINGS_SCHEME._serialized_end=1853 + _EXPORTTOS3SETTINGS_STORAGECLASS._serialized_start=1856 + _EXPORTTOS3SETTINGS_STORAGECLASS._serialized_end=2042 + _EXPORTTOS3RESULT._serialized_start=2044 + _EXPORTTOS3RESULT._serialized_end=2062 + _EXPORTTOS3METADATA._serialized_start=2065 + _EXPORTTOS3METADATA._serialized_end=2246 + _EXPORTTOS3REQUEST._serialized_start=2249 + _EXPORTTOS3REQUEST._serialized_end=2383 + _EXPORTTOS3RESPONSE._serialized_start=2385 + _EXPORTTOS3RESPONSE._serialized_end=2451 + _ENCRYPTIONSETTINGS._serialized_start=2454 + _ENCRYPTIONSETTINGS._serialized_end=2616 + _ENCRYPTIONSETTINGS_SYMMETRICKEY._serialized_start=2576 + _ENCRYPTIONSETTINGS_SYMMETRICKEY._serialized_end=2609 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_export_pb2.pyi b/ydb/_grpc/v5/protos/ydb_export_pb2.pyi index 14af9169..41827e0e 100644 --- a/ydb/_grpc/v5/protos/ydb_export_pb2.pyi +++ b/ydb/_grpc/v5/protos/ydb_export_pb2.pyi @@ -1,3 +1,4 @@ +from protos.annotations import sensitive_pb2 as _sensitive_pb2 from protos.annotations import validation_pb2 as _validation_pb2 from protos import ydb_operation_pb2 as _ydb_operation_pb2 from google.protobuf import timestamp_pb2 as _timestamp_pb2 @@ -9,6 +10,19 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor +class EncryptionSettings(_message.Message): + __slots__ = ["encryption_algorithm", "symmetric_key"] + class SymmetricKey(_message.Message): + __slots__ = ["key"] + KEY_FIELD_NUMBER: _ClassVar[int] + key: bytes + def __init__(self, key: _Optional[bytes] = ...) -> None: ... + ENCRYPTION_ALGORITHM_FIELD_NUMBER: _ClassVar[int] + SYMMETRIC_KEY_FIELD_NUMBER: _ClassVar[int] + encryption_algorithm: str + symmetric_key: EncryptionSettings.SymmetricKey + def __init__(self, encryption_algorithm: _Optional[str] = ..., symmetric_key: _Optional[_Union[EncryptionSettings.SymmetricKey, _Mapping]] = ...) -> None: ... + class ExportItemProgress(_message.Message): __slots__ = ["end_time", "parts_completed", "parts_total", "start_time"] END_TIME_FIELD_NUMBER: _ClassVar[int] @@ -62,7 +76,7 @@ class ExportToS3Result(_message.Message): def __init__(self) -> None: ... class ExportToS3Settings(_message.Message): - __slots__ = ["access_key", "bucket", "compression", "description", "disable_virtual_addressing", "endpoint", "items", "number_of_retries", "region", "scheme", "secret_key", "storage_class"] + __slots__ = ["access_key", "bucket", "compression", "description", "destination_prefix", "disable_virtual_addressing", "encryption_settings", "endpoint", "items", "number_of_retries", "region", "scheme", "secret_key", "source_path", "storage_class"] class Scheme(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] class StorageClass(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): @@ -79,7 +93,9 @@ class ExportToS3Settings(_message.Message): COMPRESSION_FIELD_NUMBER: _ClassVar[int] DEEP_ARCHIVE: ExportToS3Settings.StorageClass DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + DESTINATION_PREFIX_FIELD_NUMBER: _ClassVar[int] DISABLE_VIRTUAL_ADDRESSING_FIELD_NUMBER: _ClassVar[int] + ENCRYPTION_SETTINGS_FIELD_NUMBER: _ClassVar[int] ENDPOINT_FIELD_NUMBER: _ClassVar[int] GLACIER: ExportToS3Settings.StorageClass HTTP: ExportToS3Settings.Scheme @@ -93,6 +109,7 @@ class ExportToS3Settings(_message.Message): REGION_FIELD_NUMBER: _ClassVar[int] SCHEME_FIELD_NUMBER: _ClassVar[int] SECRET_KEY_FIELD_NUMBER: _ClassVar[int] + SOURCE_PATH_FIELD_NUMBER: _ClassVar[int] STANDARD: ExportToS3Settings.StorageClass STANDARD_IA: ExportToS3Settings.StorageClass STORAGE_CLASS_FIELD_NUMBER: _ClassVar[int] @@ -102,15 +119,18 @@ class ExportToS3Settings(_message.Message): bucket: str compression: str description: str + destination_prefix: str disable_virtual_addressing: bool + encryption_settings: EncryptionSettings endpoint: str items: _containers.RepeatedCompositeFieldContainer[ExportToS3Settings.Item] number_of_retries: int region: str scheme: ExportToS3Settings.Scheme secret_key: str + source_path: str storage_class: ExportToS3Settings.StorageClass - def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ExportToS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ExportToS3Settings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., storage_class: _Optional[_Union[ExportToS3Settings.StorageClass, str]] = ..., compression: _Optional[str] = ..., region: _Optional[str] = ..., disable_virtual_addressing: bool = ...) -> None: ... + def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ExportToS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ExportToS3Settings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., storage_class: _Optional[_Union[ExportToS3Settings.StorageClass, str]] = ..., compression: _Optional[str] = ..., region: _Optional[str] = ..., disable_virtual_addressing: bool = ..., source_path: _Optional[str] = ..., destination_prefix: _Optional[str] = ..., encryption_settings: _Optional[_Union[EncryptionSettings, _Mapping]] = ...) -> None: ... class ExportToYtMetadata(_message.Message): __slots__ = ["items_progress", "progress", "settings"] diff --git a/ydb/_grpc/v5/protos/ydb_import_pb2.py b/ydb/_grpc/v5/protos/ydb_import_pb2.py index 736e7ef5..777a4e0a 100644 --- a/ydb/_grpc/v5/protos/ydb_import_pb2.py +++ b/ydb/_grpc/v5/protos/ydb_import_pb2.py @@ -13,11 +13,12 @@ from ydb._grpc.v5.protos.annotations import validation_pb2 as protos_dot_annotations_dot_validation__pb2 +from ydb._grpc.v5.protos import ydb_export_pb2 as protos_dot_ydb__export__pb2 from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_import.proto\x12\nYdb.Import\x1a#protos/annotations/validation.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcd\x01\n\x0eImportProgress\"\xba\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x1a\n\x16PROGRESS_BUILD_INDEXES\x10\x03\x12\x11\n\rPROGRESS_DONE\x10\x04\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x05\x12\x16\n\x12PROGRESS_CANCELLED\x10\x06\"\xa0\x01\n\x12ImportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd1\x03\n\x14ImportFromS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x37\n\x06scheme\x18\x02 \x01(\x0e\x32\'.Ydb.Import.ImportFromS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12<\n\x05items\x18\x06 \x03(\x0b\x32%.Ydb.Import.ImportFromS3Settings.ItemB\x06\x9a\xe6*\x02(\x01\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x0e\n\x06region\x18\t \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\n \x01(\x08\x1a\x43\n\x04Item\x12\x1b\n\rsource_prefix\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x1e\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x04\x90\xe6*\x01\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\x14\n\x12ImportFromS3Result\"\xb9\x01\n\x14ImportFromS3Metadata\x12\x32\n\x08settings\x18\x01 \x01(\x0b\x32 .Ydb.Import.ImportFromS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Import.ImportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Import.ImportItemProgress\"\x8a\x01\n\x13ImportFromS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x38\n\x08settings\x18\x02 \x01(\x0b\x32 .Ydb.Import.ImportFromS3SettingsB\x04\x90\xe6*\x01\"D\n\x14ImportFromS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\" \n\rYdbDumpFormat\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\"\x12\n\x10ImportDataResult\"\xae\x01\n\x11ImportDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x17\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x42\t\xa2\xe6*\x05\x18\x80\x80\x80\x04\x12-\n\x08ydb_dump\x18\x04 \x01(\x0b\x32\x19.Ydb.Import.YdbDumpFormatH\x00\x42\x08\n\x06\x66ormat\"B\n\x12ImportDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBV\n\x16tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17protos/ydb_import.proto\x12\nYdb.Import\x1a#protos/annotations/validation.proto\x1a\x17protos/ydb_export.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xee\x01\n\x0eImportProgress\"\xdb\x01\n\x08Progress\x12\x18\n\x14PROGRESS_UNSPECIFIED\x10\x00\x12\x16\n\x12PROGRESS_PREPARING\x10\x01\x12\x1a\n\x16PROGRESS_TRANSFER_DATA\x10\x02\x12\x1a\n\x16PROGRESS_BUILD_INDEXES\x10\x03\x12\x11\n\rPROGRESS_DONE\x10\x04\x12\x19\n\x15PROGRESS_CANCELLATION\x10\x05\x12\x16\n\x12PROGRESS_CANCELLED\x10\x06\x12\x1f\n\x1bPROGRESS_CREATE_CHANGEFEEDS\x10\x07\"\xa0\x01\n\x12ImportItemProgress\x12\x13\n\x0bparts_total\x18\x01 \x01(\r\x12\x17\n\x0fparts_completed\x18\x02 \x01(\r\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x80\x05\n\x14ImportFromS3Settings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x37\n\x06scheme\x18\x02 \x01(\x0e\x32\'.Ydb.Import.ImportFromS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12\x34\n\x05items\x18\x06 \x03(\x0b\x32%.Ydb.Import.ImportFromS3Settings.Item\x12\x1c\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x01\x12\x19\n\x11number_of_retries\x18\x08 \x01(\r\x12\x0e\n\x06region\x18\t \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\n \x01(\x08\x12\x0e\n\x06no_acl\x18\x0b \x01(\x08\x12 \n\x18skip_checksum_validation\x18\x0c \x01(\x08\x12\x15\n\rsource_prefix\x18\r \x01(\t\x12\x18\n\x10\x64\x65stination_path\x18\x0e \x01(\t\x12;\n\x13\x65ncryption_settings\x18\x0f \x01(\x0b\x32\x1e.Ydb.Export.EncryptionSettings\x1aZ\n\x04Item\x12\x17\n\rsource_prefix\x18\x01 \x01(\tH\x00\x12\x15\n\x0bsource_path\x18\x03 \x01(\tH\x00\x12\x18\n\x10\x64\x65stination_path\x18\x02 \x01(\tB\x08\n\x06Source\".\n\x06Scheme\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"\x14\n\x12ImportFromS3Result\"\xb9\x01\n\x14ImportFromS3Metadata\x12\x32\n\x08settings\x18\x01 \x01(\x0b\x32 .Ydb.Import.ImportFromS3Settings\x12\x35\n\x08progress\x18\x02 \x01(\x0e\x32#.Ydb.Import.ImportProgress.Progress\x12\x36\n\x0eitems_progress\x18\x03 \x03(\x0b\x32\x1e.Ydb.Import.ImportItemProgress\"\x8a\x01\n\x13ImportFromS3Request\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x38\n\x08settings\x18\x02 \x01(\x0b\x32 .Ydb.Import.ImportFromS3SettingsB\x04\x90\xe6*\x01\"D\n\x14ImportFromS3Response\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xab\x03\n\x1dListObjectsInS3ExportSettings\x12\x16\n\x08\x65ndpoint\x18\x01 \x01(\tB\x04\x90\xe6*\x01\x12\x37\n\x06scheme\x18\x02 \x01(\x0e\x32\'.Ydb.Import.ImportFromS3Settings.Scheme\x12\x14\n\x06\x62ucket\x18\x03 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\naccess_key\x18\x04 \x01(\tB\x04\x90\xe6*\x01\x12\x18\n\nsecret_key\x18\x05 \x01(\tB\x04\x90\xe6*\x01\x12=\n\x05items\x18\x06 \x03(\x0b\x32..Ydb.Import.ListObjectsInS3ExportSettings.Item\x12\x19\n\x11number_of_retries\x18\x07 \x01(\r\x12\x0e\n\x06region\x18\x08 \x01(\t\x12\"\n\x1a\x64isable_virtual_addressing\x18\t \x01(\x08\x12\x0e\n\x06prefix\x18\n \x01(\t\x12;\n\x13\x65ncryption_settings\x18\x0b \x01(\x0b\x32\x1e.Ydb.Export.EncryptionSettings\x1a\x14\n\x04Item\x12\x0c\n\x04path\x18\x01 \x01(\t\"\x99\x01\n\x1bListObjectsInS3ExportResult\x12;\n\x05items\x18\x01 \x03(\x0b\x32,.Ydb.Import.ListObjectsInS3ExportResult.Item\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x1a$\n\x04Item\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\"\xd1\x01\n\x1cListObjectsInS3ExportRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x41\n\x08settings\x18\x02 \x01(\x0b\x32).Ydb.Import.ListObjectsInS3ExportSettingsB\x04\x90\xe6*\x01\x12\x1f\n\tpage_size\x18\x03 \x01(\x03\x42\x0c\xb2\xe6*\x08<= 10000\x12\x12\n\npage_token\x18\x04 \x01(\t\"M\n\x1dListObjectsInS3ExportResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\" \n\rYdbDumpFormat\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\"\x12\n\x10ImportDataResult\"\xae\x01\n\x11ImportDataRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x17\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x42\t\xa2\xe6*\x05\x18\x80\x80\x80\x08\x12-\n\x08ydb_dump\x18\x04 \x01(\x0b\x32\x19.Ydb.Import.YdbDumpFormatH\x00\x42\x08\n\x06\x66ormat\"B\n\x12ImportDataResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.OperationBV\n\x16tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_import_pb2', globals()) @@ -25,10 +26,6 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\026tech.ydb.proto.import_Z9github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Import\370\001\001' - _IMPORTFROMS3SETTINGS_ITEM.fields_by_name['source_prefix']._options = None - _IMPORTFROMS3SETTINGS_ITEM.fields_by_name['source_prefix']._serialized_options = b'\220\346*\001' - _IMPORTFROMS3SETTINGS_ITEM.fields_by_name['destination_path']._options = None - _IMPORTFROMS3SETTINGS_ITEM.fields_by_name['destination_path']._serialized_options = b'\220\346*\001' _IMPORTFROMS3SETTINGS.fields_by_name['endpoint']._options = None _IMPORTFROMS3SETTINGS.fields_by_name['endpoint']._serialized_options = b'\220\346*\001' _IMPORTFROMS3SETTINGS.fields_by_name['bucket']._options = None @@ -37,40 +34,62 @@ _IMPORTFROMS3SETTINGS.fields_by_name['access_key']._serialized_options = b'\220\346*\001' _IMPORTFROMS3SETTINGS.fields_by_name['secret_key']._options = None _IMPORTFROMS3SETTINGS.fields_by_name['secret_key']._serialized_options = b'\220\346*\001' - _IMPORTFROMS3SETTINGS.fields_by_name['items']._options = None - _IMPORTFROMS3SETTINGS.fields_by_name['items']._serialized_options = b'\232\346*\002(\001' _IMPORTFROMS3SETTINGS.fields_by_name['description']._options = None _IMPORTFROMS3SETTINGS.fields_by_name['description']._serialized_options = b'\242\346*\003\030\200\001' _IMPORTFROMS3REQUEST.fields_by_name['settings']._options = None _IMPORTFROMS3REQUEST.fields_by_name['settings']._serialized_options = b'\220\346*\001' + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['endpoint']._options = None + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['endpoint']._serialized_options = b'\220\346*\001' + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['bucket']._options = None + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['bucket']._serialized_options = b'\220\346*\001' + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['access_key']._options = None + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['access_key']._serialized_options = b'\220\346*\001' + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['secret_key']._options = None + _LISTOBJECTSINS3EXPORTSETTINGS.fields_by_name['secret_key']._serialized_options = b'\220\346*\001' + _LISTOBJECTSINS3EXPORTREQUEST.fields_by_name['settings']._options = None + _LISTOBJECTSINS3EXPORTREQUEST.fields_by_name['settings']._serialized_options = b'\220\346*\001' + _LISTOBJECTSINS3EXPORTREQUEST.fields_by_name['page_size']._options = None + _LISTOBJECTSINS3EXPORTREQUEST.fields_by_name['page_size']._serialized_options = b'\262\346*\010<= 10000' _IMPORTDATAREQUEST.fields_by_name['data']._options = None - _IMPORTDATAREQUEST.fields_by_name['data']._serialized_options = b'\242\346*\005\030\200\200\200\004' - _IMPORTPROGRESS._serialized_start=138 - _IMPORTPROGRESS._serialized_end=343 - _IMPORTPROGRESS_PROGRESS._serialized_start=157 - _IMPORTPROGRESS_PROGRESS._serialized_end=343 - _IMPORTITEMPROGRESS._serialized_start=346 - _IMPORTITEMPROGRESS._serialized_end=506 - _IMPORTFROMS3SETTINGS._serialized_start=509 - _IMPORTFROMS3SETTINGS._serialized_end=974 - _IMPORTFROMS3SETTINGS_ITEM._serialized_start=859 - _IMPORTFROMS3SETTINGS_ITEM._serialized_end=926 - _IMPORTFROMS3SETTINGS_SCHEME._serialized_start=928 - _IMPORTFROMS3SETTINGS_SCHEME._serialized_end=974 - _IMPORTFROMS3RESULT._serialized_start=976 - _IMPORTFROMS3RESULT._serialized_end=996 - _IMPORTFROMS3METADATA._serialized_start=999 - _IMPORTFROMS3METADATA._serialized_end=1184 - _IMPORTFROMS3REQUEST._serialized_start=1187 - _IMPORTFROMS3REQUEST._serialized_end=1325 - _IMPORTFROMS3RESPONSE._serialized_start=1327 - _IMPORTFROMS3RESPONSE._serialized_end=1395 - _YDBDUMPFORMAT._serialized_start=1397 - _YDBDUMPFORMAT._serialized_end=1429 - _IMPORTDATARESULT._serialized_start=1431 - _IMPORTDATARESULT._serialized_end=1449 - _IMPORTDATAREQUEST._serialized_start=1452 - _IMPORTDATAREQUEST._serialized_end=1626 - _IMPORTDATARESPONSE._serialized_start=1628 - _IMPORTDATARESPONSE._serialized_end=1694 + _IMPORTDATAREQUEST.fields_by_name['data']._serialized_options = b'\242\346*\005\030\200\200\200\010' + _IMPORTPROGRESS._serialized_start=163 + _IMPORTPROGRESS._serialized_end=401 + _IMPORTPROGRESS_PROGRESS._serialized_start=182 + _IMPORTPROGRESS_PROGRESS._serialized_end=401 + _IMPORTITEMPROGRESS._serialized_start=404 + _IMPORTITEMPROGRESS._serialized_end=564 + _IMPORTFROMS3SETTINGS._serialized_start=567 + _IMPORTFROMS3SETTINGS._serialized_end=1207 + _IMPORTFROMS3SETTINGS_ITEM._serialized_start=1069 + _IMPORTFROMS3SETTINGS_ITEM._serialized_end=1159 + _IMPORTFROMS3SETTINGS_SCHEME._serialized_start=1161 + _IMPORTFROMS3SETTINGS_SCHEME._serialized_end=1207 + _IMPORTFROMS3RESULT._serialized_start=1209 + _IMPORTFROMS3RESULT._serialized_end=1229 + _IMPORTFROMS3METADATA._serialized_start=1232 + _IMPORTFROMS3METADATA._serialized_end=1417 + _IMPORTFROMS3REQUEST._serialized_start=1420 + _IMPORTFROMS3REQUEST._serialized_end=1558 + _IMPORTFROMS3RESPONSE._serialized_start=1560 + _IMPORTFROMS3RESPONSE._serialized_end=1628 + _LISTOBJECTSINS3EXPORTSETTINGS._serialized_start=1631 + _LISTOBJECTSINS3EXPORTSETTINGS._serialized_end=2058 + _LISTOBJECTSINS3EXPORTSETTINGS_ITEM._serialized_start=2038 + _LISTOBJECTSINS3EXPORTSETTINGS_ITEM._serialized_end=2058 + _LISTOBJECTSINS3EXPORTRESULT._serialized_start=2061 + _LISTOBJECTSINS3EXPORTRESULT._serialized_end=2214 + _LISTOBJECTSINS3EXPORTRESULT_ITEM._serialized_start=2178 + _LISTOBJECTSINS3EXPORTRESULT_ITEM._serialized_end=2214 + _LISTOBJECTSINS3EXPORTREQUEST._serialized_start=2217 + _LISTOBJECTSINS3EXPORTREQUEST._serialized_end=2426 + _LISTOBJECTSINS3EXPORTRESPONSE._serialized_start=2428 + _LISTOBJECTSINS3EXPORTRESPONSE._serialized_end=2505 + _YDBDUMPFORMAT._serialized_start=2507 + _YDBDUMPFORMAT._serialized_end=2539 + _IMPORTDATARESULT._serialized_start=2541 + _IMPORTDATARESULT._serialized_end=2559 + _IMPORTDATAREQUEST._serialized_start=2562 + _IMPORTDATAREQUEST._serialized_end=2736 + _IMPORTDATARESPONSE._serialized_start=2738 + _IMPORTDATARESPONSE._serialized_end=2804 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_import_pb2.pyi b/ydb/_grpc/v5/protos/ydb_import_pb2.pyi index d3b394ab..24e5960d 100644 --- a/ydb/_grpc/v5/protos/ydb_import_pb2.pyi +++ b/ydb/_grpc/v5/protos/ydb_import_pb2.pyi @@ -1,4 +1,5 @@ from protos.annotations import validation_pb2 as _validation_pb2 +from protos import ydb_export_pb2 as _ydb_export_pb2 from protos import ydb_operation_pb2 as _ydb_operation_pb2 from google.protobuf import timestamp_pb2 as _timestamp_pb2 from google.protobuf.internal import containers as _containers @@ -60,40 +61,52 @@ class ImportFromS3Result(_message.Message): def __init__(self) -> None: ... class ImportFromS3Settings(_message.Message): - __slots__ = ["access_key", "bucket", "description", "disable_virtual_addressing", "endpoint", "items", "number_of_retries", "region", "scheme", "secret_key"] + __slots__ = ["access_key", "bucket", "description", "destination_path", "disable_virtual_addressing", "encryption_settings", "endpoint", "items", "no_acl", "number_of_retries", "region", "scheme", "secret_key", "skip_checksum_validation", "source_prefix"] class Scheme(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] class Item(_message.Message): - __slots__ = ["destination_path", "source_prefix"] + __slots__ = ["destination_path", "source_path", "source_prefix"] DESTINATION_PATH_FIELD_NUMBER: _ClassVar[int] + SOURCE_PATH_FIELD_NUMBER: _ClassVar[int] SOURCE_PREFIX_FIELD_NUMBER: _ClassVar[int] destination_path: str + source_path: str source_prefix: str - def __init__(self, source_prefix: _Optional[str] = ..., destination_path: _Optional[str] = ...) -> None: ... + def __init__(self, source_prefix: _Optional[str] = ..., source_path: _Optional[str] = ..., destination_path: _Optional[str] = ...) -> None: ... ACCESS_KEY_FIELD_NUMBER: _ClassVar[int] BUCKET_FIELD_NUMBER: _ClassVar[int] DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + DESTINATION_PATH_FIELD_NUMBER: _ClassVar[int] DISABLE_VIRTUAL_ADDRESSING_FIELD_NUMBER: _ClassVar[int] + ENCRYPTION_SETTINGS_FIELD_NUMBER: _ClassVar[int] ENDPOINT_FIELD_NUMBER: _ClassVar[int] HTTP: ImportFromS3Settings.Scheme HTTPS: ImportFromS3Settings.Scheme ITEMS_FIELD_NUMBER: _ClassVar[int] + NO_ACL_FIELD_NUMBER: _ClassVar[int] NUMBER_OF_RETRIES_FIELD_NUMBER: _ClassVar[int] REGION_FIELD_NUMBER: _ClassVar[int] SCHEME_FIELD_NUMBER: _ClassVar[int] SECRET_KEY_FIELD_NUMBER: _ClassVar[int] + SKIP_CHECKSUM_VALIDATION_FIELD_NUMBER: _ClassVar[int] + SOURCE_PREFIX_FIELD_NUMBER: _ClassVar[int] UNSPECIFIED: ImportFromS3Settings.Scheme access_key: str bucket: str description: str + destination_path: str disable_virtual_addressing: bool + encryption_settings: _ydb_export_pb2.EncryptionSettings endpoint: str items: _containers.RepeatedCompositeFieldContainer[ImportFromS3Settings.Item] + no_acl: bool number_of_retries: int region: str scheme: ImportFromS3Settings.Scheme secret_key: str - def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ImportFromS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ImportFromS3Settings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., region: _Optional[str] = ..., disable_virtual_addressing: bool = ...) -> None: ... + skip_checksum_validation: bool + source_prefix: str + def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ImportFromS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ImportFromS3Settings.Item, _Mapping]]] = ..., description: _Optional[str] = ..., number_of_retries: _Optional[int] = ..., region: _Optional[str] = ..., disable_virtual_addressing: bool = ..., no_acl: bool = ..., skip_checksum_validation: bool = ..., source_prefix: _Optional[str] = ..., destination_path: _Optional[str] = ..., encryption_settings: _Optional[_Union[_ydb_export_pb2.EncryptionSettings, _Mapping]] = ...) -> None: ... class ImportItemProgress(_message.Message): __slots__ = ["end_time", "parts_completed", "parts_total", "start_time"] @@ -114,12 +127,77 @@ class ImportProgress(_message.Message): PROGRESS_BUILD_INDEXES: ImportProgress.Progress PROGRESS_CANCELLATION: ImportProgress.Progress PROGRESS_CANCELLED: ImportProgress.Progress + PROGRESS_CREATE_CHANGEFEEDS: ImportProgress.Progress PROGRESS_DONE: ImportProgress.Progress PROGRESS_PREPARING: ImportProgress.Progress PROGRESS_TRANSFER_DATA: ImportProgress.Progress PROGRESS_UNSPECIFIED: ImportProgress.Progress def __init__(self) -> None: ... +class ListObjectsInS3ExportRequest(_message.Message): + __slots__ = ["operation_params", "page_size", "page_token", "settings"] + OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] + PAGE_SIZE_FIELD_NUMBER: _ClassVar[int] + PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + SETTINGS_FIELD_NUMBER: _ClassVar[int] + operation_params: _ydb_operation_pb2.OperationParams + page_size: int + page_token: str + settings: ListObjectsInS3ExportSettings + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., settings: _Optional[_Union[ListObjectsInS3ExportSettings, _Mapping]] = ..., page_size: _Optional[int] = ..., page_token: _Optional[str] = ...) -> None: ... + +class ListObjectsInS3ExportResponse(_message.Message): + __slots__ = ["operation"] + OPERATION_FIELD_NUMBER: _ClassVar[int] + operation: _ydb_operation_pb2.Operation + def __init__(self, operation: _Optional[_Union[_ydb_operation_pb2.Operation, _Mapping]] = ...) -> None: ... + +class ListObjectsInS3ExportResult(_message.Message): + __slots__ = ["items", "next_page_token"] + class Item(_message.Message): + __slots__ = ["path", "prefix"] + PATH_FIELD_NUMBER: _ClassVar[int] + PREFIX_FIELD_NUMBER: _ClassVar[int] + path: str + prefix: str + def __init__(self, prefix: _Optional[str] = ..., path: _Optional[str] = ...) -> None: ... + ITEMS_FIELD_NUMBER: _ClassVar[int] + NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + items: _containers.RepeatedCompositeFieldContainer[ListObjectsInS3ExportResult.Item] + next_page_token: str + def __init__(self, items: _Optional[_Iterable[_Union[ListObjectsInS3ExportResult.Item, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ... + +class ListObjectsInS3ExportSettings(_message.Message): + __slots__ = ["access_key", "bucket", "disable_virtual_addressing", "encryption_settings", "endpoint", "items", "number_of_retries", "prefix", "region", "scheme", "secret_key"] + class Item(_message.Message): + __slots__ = ["path"] + PATH_FIELD_NUMBER: _ClassVar[int] + path: str + def __init__(self, path: _Optional[str] = ...) -> None: ... + ACCESS_KEY_FIELD_NUMBER: _ClassVar[int] + BUCKET_FIELD_NUMBER: _ClassVar[int] + DISABLE_VIRTUAL_ADDRESSING_FIELD_NUMBER: _ClassVar[int] + ENCRYPTION_SETTINGS_FIELD_NUMBER: _ClassVar[int] + ENDPOINT_FIELD_NUMBER: _ClassVar[int] + ITEMS_FIELD_NUMBER: _ClassVar[int] + NUMBER_OF_RETRIES_FIELD_NUMBER: _ClassVar[int] + PREFIX_FIELD_NUMBER: _ClassVar[int] + REGION_FIELD_NUMBER: _ClassVar[int] + SCHEME_FIELD_NUMBER: _ClassVar[int] + SECRET_KEY_FIELD_NUMBER: _ClassVar[int] + access_key: str + bucket: str + disable_virtual_addressing: bool + encryption_settings: _ydb_export_pb2.EncryptionSettings + endpoint: str + items: _containers.RepeatedCompositeFieldContainer[ListObjectsInS3ExportSettings.Item] + number_of_retries: int + prefix: str + region: str + scheme: ImportFromS3Settings.Scheme + secret_key: str + def __init__(self, endpoint: _Optional[str] = ..., scheme: _Optional[_Union[ImportFromS3Settings.Scheme, str]] = ..., bucket: _Optional[str] = ..., access_key: _Optional[str] = ..., secret_key: _Optional[str] = ..., items: _Optional[_Iterable[_Union[ListObjectsInS3ExportSettings.Item, _Mapping]]] = ..., number_of_retries: _Optional[int] = ..., region: _Optional[str] = ..., disable_virtual_addressing: bool = ..., prefix: _Optional[str] = ..., encryption_settings: _Optional[_Union[_ydb_export_pb2.EncryptionSettings, _Mapping]] = ...) -> None: ... + class YdbDumpFormat(_message.Message): __slots__ = ["columns"] COLUMNS_FIELD_NUMBER: _ClassVar[int] diff --git a/ydb/_grpc/v5/protos/ydb_topic_pb2.py b/ydb/_grpc/v5/protos/ydb_topic_pb2.py index 4a79b510..a065ee56 100644 --- a/ydb/_grpc/v5/protos/ydb_topic_pb2.py +++ b/ydb/_grpc/v5/protos/ydb_topic_pb2.py @@ -22,7 +22,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\")\n\x12UpdateTokenRequest\x12\x13\n\x05token\x18\x01 \x01(\tB\x04\xb8\xe6*\x01\"\x15\n\x13UpdateTokenResponse\"C\n\x17PartitionWithGeneration\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x9e\x14\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xfe\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12#\n\x10message_group_id\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x07 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\xe8\x03\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x12/\n\x02tx\x18\x03 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentityH\x00\x88\x01\x01\x1a\xc6\x02\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12#\n\x10message_group_id\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x08 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioningB\x05\n\x03_tx\x1a\xeb\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\xf8\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x12Y\n\rwritten_in_tx\x18\x04 \x01(\x0b\x32@.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenInTxH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x1a\r\n\x0bWrittenInTxB\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x9c#\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xb1\x05\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x45\n\x0f\x64irect_read_ack\x18\x08 \x01(\x0b\x32*.Ydb.Topic.StreamReadMessage.DirectReadAckH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xf0\x06\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x12W\n\x18update_partition_session\x18\n \x01(\x0b\x32\x33.Ydb.Topic.StreamReadMessage.UpdatePartitionSessionH\x00\x12Q\n\x15\x65nd_partition_session\x18\x0b \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.EndPartitionSessionH\x00\x42\x10\n\x0eserver_message\x1a\xdc\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64irect_read\x18\x04 \x01(\x08\x12!\n\x19\x61uto_partitioning_support\x18\x05 \x01(\x08\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\x91\x06\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xda\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12!\n\x10message_group_id\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xcd\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xf0\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x38\n\x12partition_location\x18\x04 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1a\x84\x01\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x04 \x01(\x03\x1aN\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x1ap\n\x16UpdatePartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x38\n\x12partition_location\x18\x02 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x45\n\rDirectReadAck\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x1ap\n\x13\x45ndPartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1e\n\x16\x61\x64jacent_partition_ids\x18\x02 \x03(\x03\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\"\xf7\x0c\n\x17StreamDirectReadMessage\x1a\xa8\x02\n\nFromClient\x12\x46\n\x0cinit_request\x18\x01 \x01(\x0b\x32..Ydb.Topic.StreamDirectReadMessage.InitRequestH\x00\x12\x80\x01\n+start_direct_read_partition_session_request\x18\x02 \x01(\x0b\x32I.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xca\x04\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12H\n\rinit_response\x18\x06 \x01(\x0b\x32/.Ydb.Topic.StreamDirectReadMessage.InitResponseH\x00\x12\x82\x01\n,start_direct_read_partition_session_response\x18\x07 \x01(\x0b\x32J.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionResponseH\x00\x12o\n\"stop_direct_read_partition_session\x18\x03 \x01(\x0b\x32\x41.Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSessionH\x00\x12U\n\x14\x64irect_read_response\x18\x04 \x01(\x0b\x32\x35.Ydb.Topic.StreamDirectReadMessage.DirectReadResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xb6\x01\n\x0bInitRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12^\n\x14topics_read_settings\x18\x02 \x03(\x0b\x32@.Ydb.Topic.StreamDirectReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x1a!\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x1a\x0e\n\x0cInitResponse\x1aw\n&StartDirectReadPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x02 \x01(\x03\x12\x12\n\ngeneration\x18\x03 \x01(\x03\x1a[\n\'StartDirectReadPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\x1a\xa6\x01\n\x1eStopDirectReadPartitionSession\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1c\n\x14partition_session_id\x18\x03 \x01(\x03\x12\x12\n\ngeneration\x18\x04 \x01(\x03\x1a\x9b\x01\n\x12\x44irectReadResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x12O\n\x0epartition_data\x18\x03 \x01(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\"2\n\x13TransactionIdentity\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07session\x18\x02 \x01(\t\"\xc4\x03\n!UpdateOffsetsInTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12*\n\x02tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentity\x12I\n\x06topics\x18\x03 \x03(\x0b\x32\x39.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x1a\xda\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12^\n\npartitions\x18\x02 \x03(\x0b\x32J.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"R\n\"UpdateOffsetsInTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\"\n UpdateOffsetsInTransactionResult\"\x96\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xb3\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf3\x01\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"\xdc\x01\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12)\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0\x12G\n\x1a\x61uto_partitioning_settings\x18\x04 \x01(\x0b\x32#.Ydb.Topic.AutoPartitioningSettings\"\x9f\x01\n\x18\x41utoPartitioningSettings\x12\x35\n\x08strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategy\x12L\n\x15partition_write_speed\x18\x02 \x01(\x0b\x32-.Ydb.Topic.AutoPartitioningWriteSpeedStrategy\"\xb3\x01\n\"AutoPartitioningWriteSpeedStrategy\x12\x37\n\x14stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n\x16up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12*\n\x18\x64own_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\"\x8b\x03\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x32\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12W\n alter_auto_partitioning_settings\x18\x04 \x01(\x0b\x32(.Ydb.Topic.AlterAutoPartitioningSettingsH\x03\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_max_active_partitionsB\x1c\n\x1a_set_partition_count_limitB#\n!_alter_auto_partitioning_settings\"\xea\x01\n\x1d\x41lterAutoPartitioningSettings\x12>\n\x0cset_strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategyH\x00\x88\x01\x01\x12Z\n\x19set_partition_write_speed\x18\x02 \x01(\x0b\x32\x32.Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategyH\x01\x88\x01\x01\x42\x0f\n\r_set_strategyB\x1c\n\x1a_set_partition_write_speed\"\xb0\x02\n\'AlterAutoPartitioningWriteSpeedStrategy\x12@\n\x18set_stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x12\x31\n\x1aset_up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x33\n\x1cset_down_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x42\x1b\n\x19_set_stabilization_windowB\x1d\n\x1b_set_up_utilization_percentB\x1f\n\x1d_set_down_utilization_percent\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"8\n\x11PartitionLocation\x12\x0f\n\x07node_id\x18\x01 \x01(\x05\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"\x90\x01\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\x12\x18\n\x10include_location\x18\x04 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x11PartitionKeyRange\x12\x17\n\nfrom_bound\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x15\n\x08to_bound\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_from_boundB\x0b\n\t_to_bound\"\xfa\t\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12\x33\n+partition_total_read_speed_bytes_per_second\x18\x0e \x01(\x03\x12\x36\n.partition_consumer_read_speed_bytes_per_second\x18\x0f \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x8f\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12\x38\n\x12partition_location\x18\x06 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x12/\n\tkey_range\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionKeyRange\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\xaa\x01\n\x18\x44\x65scribePartitionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"I\n\x19\x44\x65scribePartitionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Z\n\x17\x44\x65scribePartitionResult\x12?\n\tpartition\x18\x01 \x01(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\"\xa5\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x98\x07\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\xba\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x12\x38\n\x12partition_location\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\xb3\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\xa0\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x1d\n\x11partition_node_id\x18\x08 \x01(\x05\x42\x02\x18\x01\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*\xf1\x01\n\x18\x41utoPartitioningStrategy\x12*\n&AUTO_PARTITIONING_STRATEGY_UNSPECIFIED\x10\x00\x12\'\n#AUTO_PARTITIONING_STRATEGY_DISABLED\x10\x01\x12\'\n#AUTO_PARTITIONING_STRATEGY_SCALE_UP\x10\x02\x12\x30\n,AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN\x10\x03\x12%\n!AUTO_PARTITIONING_STRATEGY_PAUSED\x10\x04*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_topic.proto\x12\tYdb.Topic\x1a\x1aprotos/ydb_operation.proto\x1a\x17protos/ydb_scheme.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\"protos/annotations/sensitive.proto\x1a#protos/annotations/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x0fSupportedCodecs\x12$\n\x06\x63odecs\x18\x01 \x03(\x05\x42\x14\xb2\xe6*\n[1; 19999]\x9a\xe6*\x02\x18\x64\"*\n\x0cOffsetsRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\")\n\x12UpdateTokenRequest\x12\x13\n\x05token\x18\x01 \x01(\tB\x04\xb8\xe6*\x01\"\x15\n\x13UpdateTokenResponse\"C\n\x17PartitionWithGeneration\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"*\n\x0cMetadataItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x9e\x14\n\x12StreamWriteMessage\x1a\xe5\x01\n\nFromClient\x12\x41\n\x0cinit_request\x18\x01 \x01(\x0b\x32).Ydb.Topic.StreamWriteMessage.InitRequestH\x00\x12\x43\n\rwrite_request\x18\x02 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.WriteRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xbf\x02\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x43\n\rinit_response\x18\x03 \x01(\x0b\x32*.Ydb.Topic.StreamWriteMessage.InitResponseH\x00\x12\x45\n\x0ewrite_response\x18\x04 \x01(\x0b\x32+.Ydb.Topic.StreamWriteMessage.WriteResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xfe\x02\n\x0bInitRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12[\n\x12write_session_meta\x18\x03 \x03(\x0b\x32?.Ydb.Topic.StreamWriteMessage.InitRequest.WriteSessionMetaEntry\x12#\n\x10message_group_id\x18\x04 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x05 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x07 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x17\n\x0fget_last_seq_no\x18\x06 \x01(\x08\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cpartitioning\x1a\x83\x01\n\x0cInitResponse\x12\x13\n\x0blast_seq_no\x18\x01 \x01(\x03\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x04 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x1a\xe8\x03\n\x0cWriteRequest\x12H\n\x08messages\x18\x01 \x03(\x0b\x32\x36.Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData\x12\r\n\x05\x63odec\x18\x02 \x01(\x05\x12/\n\x02tx\x18\x03 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentityH\x00\x88\x01\x01\x1a\xc6\x02\n\x0bMessageData\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x04 \x01(\x03\x12#\n\x10message_group_id\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10H\x00\x12\x16\n\x0cpartition_id\x18\x06 \x01(\x03H\x00\x12G\n\x19partition_with_generation\x18\x08 \x01(\x0b\x32\".Ydb.Topic.PartitionWithGenerationH\x00\x12\x38\n\x0emetadata_items\x18\x07 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItemB\x07\x9a\xe6*\x03\x18\xe8\x07\x42\x0e\n\x0cpartitioningB\x05\n\x03_tx\x1a\xeb\x07\n\rWriteResponse\x12\x42\n\x04\x61\x63ks\x18\x01 \x03(\x0b\x32\x34.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck\x12\x14\n\x0cpartition_id\x18\x02 \x01(\x03\x12U\n\x10write_statistics\x18\x03 \x01(\x0b\x32;.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics\x1a\xf8\x03\n\x08WriteAck\x12\x0e\n\x06seq_no\x18\x01 \x01(\x03\x12O\n\x07written\x18\x02 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenH\x00\x12O\n\x07skipped\x18\x03 \x01(\x0b\x32<.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.SkippedH\x00\x12Y\n\rwritten_in_tx\x18\x04 \x01(\x0b\x32@.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.WrittenInTxH\x00\x1a\x19\n\x07Written\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x1a\x9c\x01\n\x07Skipped\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped.Reason\"<\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16REASON_ALREADY_WRITTEN\x10\x01\x1a\r\n\x0bWrittenInTxB\x16\n\x14message_write_status\x1a\xad\x02\n\x0fWriteStatistics\x12\x32\n\x0fpersisting_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13min_queue_wait_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x13max_queue_wait_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19partition_quota_wait_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15topic_quota_wait_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x9c#\n\x11StreamReadMessage\x1aT\n\x10PartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x1a\xb1\x05\n\nFromClient\x12@\n\x0cinit_request\x18\x01 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.InitRequestH\x00\x12@\n\x0cread_request\x18\x02 \x01(\x0b\x32(.Ydb.Topic.StreamReadMessage.ReadRequestH\x00\x12Q\n\x15\x63ommit_offset_request\x18\x03 \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.CommitOffsetRequestH\x00\x12\x66\n partition_session_status_request\x18\x04 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequestH\x00\x12=\n\x14update_token_request\x18\x05 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x12\x45\n\x0f\x64irect_read_ack\x18\x08 \x01(\x0b\x32*.Ydb.Topic.StreamReadMessage.DirectReadAckH\x00\x12\x66\n start_partition_session_response\x18\x06 \x01(\x0b\x32:.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponseH\x00\x12\x64\n\x1fstop_partition_session_response\x18\x07 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponseH\x00\x42\x10\n\x0e\x63lient_message\x1a\xf0\x06\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x42\n\rinit_response\x18\x03 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.InitResponseH\x00\x12\x42\n\rread_response\x18\x04 \x01(\x0b\x32).Ydb.Topic.StreamReadMessage.ReadResponseH\x00\x12S\n\x16\x63ommit_offset_response\x18\x05 \x01(\x0b\x32\x31.Ydb.Topic.StreamReadMessage.CommitOffsetResponseH\x00\x12h\n!partition_session_status_response\x18\x06 \x01(\x0b\x32;.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponseH\x00\x12?\n\x15update_token_response\x18\x07 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x12\x64\n\x1fstart_partition_session_request\x18\x08 \x01(\x0b\x32\x39.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequestH\x00\x12\x62\n\x1estop_partition_session_request\x18\t \x01(\x0b\x32\x38.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequestH\x00\x12W\n\x18update_partition_session\x18\n \x01(\x0b\x32\x33.Ydb.Topic.StreamReadMessage.UpdatePartitionSessionH\x00\x12Q\n\x15\x65nd_partition_session\x18\x0b \x01(\x0b\x32\x30.Ydb.Topic.StreamReadMessage.EndPartitionSessionH\x00\x42\x10\n\x0eserver_message\x1a\xdc\x02\n\x0bInitRequest\x12X\n\x14topics_read_settings\x18\x01 \x03(\x0b\x32:.Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x02 \x01(\t\x12\x13\n\x0breader_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64irect_read\x18\x04 \x01(\x08\x12!\n\x19\x61uto_partitioning_support\x18\x05 \x01(\x08\x1a\x93\x01\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x15\n\rpartition_ids\x18\x02 \x03(\x03\x12*\n\x07max_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\"\n\x0cInitResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x1a!\n\x0bReadRequest\x12\x12\n\nbytes_size\x18\x01 \x01(\x03\x1a\x91\x06\n\x0cReadResponse\x12O\n\x0epartition_data\x18\x01 \x03(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x02 \x01(\x03\x1a\xda\x01\n\x0bMessageData\x12\x0e\n\x06offset\x18\x01 \x01(\x03\x12\x0e\n\x06seq_no\x18\x02 \x01(\x03\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x12\x19\n\x11uncompressed_size\x18\x06 \x01(\x03\x12!\n\x10message_group_id\x18\x07 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12/\n\x0emetadata_items\x18\x08 \x03(\x0b\x32\x17.Ydb.Topic.MetadataItem\x1a\xcd\x02\n\x05\x42\x61tch\x12K\n\x0cmessage_data\x18\x01 \x03(\x0b\x32\x35.Ydb.Topic.StreamReadMessage.ReadResponse.MessageData\x12\x1c\n\x0bproducer_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x10\x12\x61\n\x12write_session_meta\x18\x03 \x03(\x0b\x32\x45.Ydb.Topic.StreamReadMessage.ReadResponse.Batch.WriteSessionMetaEntry\x12\r\n\x05\x63odec\x18\x04 \x01(\x05\x12.\n\nwritten_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x37\n\x15WriteSessionMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ao\n\rPartitionData\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12@\n\x07\x62\x61tches\x18\x02 \x03(\x0b\x32/.Ydb.Topic.StreamReadMessage.ReadResponse.Batch\x1a\xd6\x01\n\x13\x43ommitOffsetRequest\x12^\n\x0e\x63ommit_offsets\x18\x01 \x03(\x0b\x32\x46.Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset\x1a_\n\x15PartitionCommitOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12(\n\x07offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x1a\xdc\x01\n\x14\x43ommitOffsetResponse\x12p\n\x1cpartitions_committed_offsets\x18\x01 \x03(\x0b\x32J.Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset\x1aR\n\x18PartitionCommittedOffset\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x1a=\n\x1dPartitionSessionStatusRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x1a\xcb\x01\n\x1ePartitionSessionStatusResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12=\n\x19write_time_high_watermark\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xf0\x01\n\x1cStartPartitionSessionRequest\x12H\n\x11partition_session\x18\x01 \x01(\x0b\x32-.Ydb.Topic.StreamReadMessage.PartitionSession\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x03 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x38\n\x12partition_location\x18\x04 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x95\x01\n\x1dStartPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x18\n\x0bread_offset\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\rcommit_offset\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_read_offsetB\x10\n\x0e_commit_offset\x1a\x84\x01\n\x1bStopPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x12\x18\n\x10\x63ommitted_offset\x18\x03 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x04 \x01(\x03\x1aN\n\x1cStopPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x10\n\x08graceful\x18\x02 \x01(\x08\x1ap\n\x16UpdatePartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x38\n\x12partition_location\x18\x02 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\x45\n\rDirectReadAck\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x1ap\n\x13\x45ndPartitionSession\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1e\n\x16\x61\x64jacent_partition_ids\x18\x02 \x03(\x03\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\"\x8b\r\n\x17StreamDirectReadMessage\x1a\xa8\x02\n\nFromClient\x12\x46\n\x0cinit_request\x18\x01 \x01(\x0b\x32..Ydb.Topic.StreamDirectReadMessage.InitRequestH\x00\x12\x80\x01\n+start_direct_read_partition_session_request\x18\x02 \x01(\x0b\x32I.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionRequestH\x00\x12=\n\x14update_token_request\x18\x03 \x01(\x0b\x32\x1d.Ydb.Topic.UpdateTokenRequestH\x00\x42\x10\n\x0e\x63lient_message\x1a\xca\x04\n\nFromServer\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12H\n\rinit_response\x18\x06 \x01(\x0b\x32/.Ydb.Topic.StreamDirectReadMessage.InitResponseH\x00\x12\x82\x01\n,start_direct_read_partition_session_response\x18\x07 \x01(\x0b\x32J.Ydb.Topic.StreamDirectReadMessage.StartDirectReadPartitionSessionResponseH\x00\x12o\n\"stop_direct_read_partition_session\x18\x03 \x01(\x0b\x32\x41.Ydb.Topic.StreamDirectReadMessage.StopDirectReadPartitionSessionH\x00\x12U\n\x14\x64irect_read_response\x18\x04 \x01(\x0b\x32\x35.Ydb.Topic.StreamDirectReadMessage.DirectReadResponseH\x00\x12?\n\x15update_token_response\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.UpdateTokenResponseH\x00\x42\x10\n\x0eserver_message\x1a\xb6\x01\n\x0bInitRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12^\n\x14topics_read_settings\x18\x02 \x03(\x0b\x32@.Ydb.Topic.StreamDirectReadMessage.InitRequest.TopicReadSettings\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x1a!\n\x11TopicReadSettings\x12\x0c\n\x04path\x18\x01 \x01(\t\x1a\x0e\n\x0cInitResponse\x1aw\n&StartDirectReadPartitionSessionRequest\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x1b\n\x13last_direct_read_id\x18\x02 \x01(\x03\x12\x12\n\ngeneration\x18\x03 \x01(\x03\x1a[\n\'StartDirectReadPartitionSessionResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x12\n\ngeneration\x18\x02 \x01(\x03\x1a\xa6\x01\n\x1eStopDirectReadPartitionSession\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1c\n\x14partition_session_id\x18\x03 \x01(\x03\x12\x12\n\ngeneration\x18\x04 \x01(\x03\x1a\xaf\x01\n\x12\x44irectReadResponse\x12\x1c\n\x14partition_session_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x64irect_read_id\x18\x02 \x01(\x03\x12O\n\x0epartition_data\x18\x03 \x01(\x0b\x32\x37.Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData\x12\x12\n\nbytes_size\x18\x04 \x01(\x03\"2\n\x13TransactionIdentity\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07session\x18\x02 \x01(\t\"\xc4\x03\n!UpdateOffsetsInTransactionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12*\n\x02tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Topic.TransactionIdentity\x12I\n\x06topics\x18\x03 \x03(\x0b\x32\x39.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x1a\xda\x01\n\x0cTopicOffsets\x12\x0c\n\x04path\x18\x01 \x01(\t\x12^\n\npartitions\x18\x02 \x03(\x0b\x32J.Ydb.Topic.UpdateOffsetsInTransactionRequest.TopicOffsets.PartitionOffsets\x1a\\\n\x10PartitionOffsets\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x32\n\x11partition_offsets\x18\x02 \x03(\x0b\x32\x17.Ydb.Topic.OffsetsRange\"R\n\"UpdateOffsetsInTransactionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\"\n UpdateOffsetsInTransactionResult\"\xaf\x01\n\x13\x43ommitOffsetRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x10\n\x08\x63onsumer\x18\x04 \x01(\t\x12\x0e\n\x06offset\x18\x05 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x06 \x01(\t\"D\n\x14\x43ommitOffsetResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x14\n\x12\x43ommitOffsetResult\"L\n\x13MultipleWindowsStat\x12\x12\n\nper_minute\x18\x01 \x01(\x03\x12\x10\n\x08per_hour\x18\x02 \x01(\x03\x12\x0f\n\x07per_day\x18\x03 \x01(\x03\"\xee\x04\n\x08\x43onsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\timportant\x18\x02 \x01(\x08\x12-\n\tread_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x37\n\nattributes\x18\x06 \x03(\x0b\x32#.Ydb.Topic.Consumer.AttributesEntry\x12\x39\n\x0e\x63onsumer_stats\x18\x07 \x01(\x0b\x32!.Ydb.Topic.Consumer.ConsumerStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xae\x02\n\rConsumerStats\x12\x41\n\x1dmin_partitions_last_read_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16max_committed_time_lag\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x04\x10\x05\"\xbf\x02\n\rAlterConsumer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\rset_important\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\rset_read_from\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14set_supported_codecs\x18\x05 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12G\n\x10\x61lter_attributes\x18\x06 \x03(\x0b\x32-.Ydb.Topic.AlterConsumer.AlterAttributesEntry\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_set_importantJ\x04\x08\x04\x10\x05\"\xdc\x01\n\x14PartitioningSettings\x12\'\n\x15min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\'\n\x15max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12)\n\x15partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0\x12G\n\x1a\x61uto_partitioning_settings\x18\x04 \x01(\x0b\x32#.Ydb.Topic.AutoPartitioningSettings\"\x9f\x01\n\x18\x41utoPartitioningSettings\x12\x35\n\x08strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategy\x12L\n\x15partition_write_speed\x18\x02 \x01(\x0b\x32-.Ydb.Topic.AutoPartitioningWriteSpeedStrategy\"\xb3\x01\n\"AutoPartitioningWriteSpeedStrategy\x12\x37\n\x14stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n\x16up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\x12*\n\x18\x64own_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0\"\x8b\x03\n\x19\x41lterPartitioningSettings\x12\x30\n\x19set_min_active_partitions\x18\x01 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x30\n\x19set_max_active_partitions\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x32\n\x19set_partition_count_limit\x18\x02 \x01(\x03\x42\n\x18\x01\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12W\n alter_auto_partitioning_settings\x18\x04 \x01(\x0b\x32(.Ydb.Topic.AlterAutoPartitioningSettingsH\x03\x88\x01\x01\x42\x1c\n\x1a_set_min_active_partitionsB\x1c\n\x1a_set_max_active_partitionsB\x1c\n\x1a_set_partition_count_limitB#\n!_alter_auto_partitioning_settings\"\xea\x01\n\x1d\x41lterAutoPartitioningSettings\x12>\n\x0cset_strategy\x18\x01 \x01(\x0e\x32#.Ydb.Topic.AutoPartitioningStrategyH\x00\x88\x01\x01\x12Z\n\x19set_partition_write_speed\x18\x02 \x01(\x0b\x32\x32.Ydb.Topic.AlterAutoPartitioningWriteSpeedStrategyH\x01\x88\x01\x01\x42\x0f\n\r_set_strategyB\x1c\n\x1a_set_partition_write_speed\"\xb0\x02\n\'AlterAutoPartitioningWriteSpeedStrategy\x12@\n\x18set_stabilization_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x12\x31\n\x1aset_up_utilization_percent\x18\x02 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x33\n\x1cset_down_utilization_percent\x18\x03 \x01(\x05\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x42\x1b\n\x19_set_stabilization_windowB\x1d\n\x1b_set_up_utilization_percentB\x1f\n\x1d_set_down_utilization_percent\"\xf6\x04\n\x12\x43reateTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12>\n\x15partitioning_settings\x18\x03 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x14retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x38\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12-\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\x41\n\nattributes\x18\n \x03(\x0b\x32-.Ydb.Topic.CreateTopicRequest.AttributesEntry\x12/\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x06\x10\x07\"C\n\x13\x43reateTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x13\n\x11\x43reateTopicResult\"8\n\x11PartitionLocation\x12\x0f\n\x07node_id\x18\x01 \x01(\x05\x12\x12\n\ngeneration\x18\x02 \x01(\x03\"\x90\x01\n\x14\x44\x65scribeTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\rinclude_stats\x18\x03 \x01(\x08\x12\x18\n\x10include_location\x18\x04 \x01(\x08\"E\n\x15\x44\x65scribeTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"_\n\x11PartitionKeyRange\x12\x17\n\nfrom_bound\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x15\n\x08to_bound\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_from_boundB\x0b\n\t_to_bound\"\xfa\t\n\x13\x44\x65scribeTopicResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12>\n\x15partitioning_settings\x18\x02 \x01(\x0b\x32\x1f.Ydb.Topic.PartitioningSettings\x12@\n\npartitions\x18\x03 \x03(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\x12\x33\n\x10retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14retention_storage_mb\x18\x05 \x01(\x03\x12\x34\n\x10supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12.\n&partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x12\x33\n+partition_total_read_speed_bytes_per_second\x18\x0e \x01(\x03\x12\x36\n.partition_consumer_read_speed_bytes_per_second\x18\x0f \x01(\x03\x12#\n\x1bpartition_write_burst_bytes\x18\t \x01(\x03\x12\x42\n\nattributes\x18\n \x03(\x0b\x32..Ydb.Topic.DescribeTopicResult.AttributesEntry\x12&\n\tconsumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.Consumer\x12.\n\rmetering_mode\x18\x0c \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x12>\n\x0btopic_stats\x18\r \x01(\x0b\x32).Ydb.Topic.DescribeTopicResult.TopicStats\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x8f\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12\x38\n\x12partition_location\x18\x06 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x12/\n\tkey_range\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionKeyRange\x1a\xcd\x01\n\nTopicStats\x12\x18\n\x10store_size_bytes\x18\x01 \x01(\x03\x12\x37\n\x13min_last_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x04 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStatJ\x04\x08\x06\x10\x07\"\xaa\x01\n\x18\x44\x65scribePartitionRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x14\n\x0cpartition_id\x18\x03 \x01(\x03\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"I\n\x19\x44\x65scribePartitionResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"Z\n\x17\x44\x65scribePartitionResult\x12?\n\tpartition\x18\x01 \x01(\x0b\x32,.Ydb.Topic.DescribeTopicResult.PartitionInfo\"\xa5\x01\n\x17\x44\x65scribeConsumerRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x10\n\x08\x63onsumer\x18\x03 \x01(\t\x12\x15\n\rinclude_stats\x18\x04 \x01(\x08\x12\x18\n\x10include_location\x18\x05 \x01(\x08\"H\n\x18\x44\x65scribeConsumerResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\xd3\x07\n\x16\x44\x65scribeConsumerResult\x12\x1f\n\x04self\x18\x01 \x01(\x0b\x32\x11.Ydb.Scheme.Entry\x12%\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x13.Ydb.Topic.Consumer\x12\x43\n\npartitions\x18\x03 \x03(\x0b\x32/.Ydb.Topic.DescribeConsumerResult.PartitionInfo\x1a\xba\x02\n\rPartitionInfo\x12\x14\n\x0cpartition_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tive\x18\x02 \x01(\x08\x12\x1b\n\x13\x63hild_partition_ids\x18\x03 \x03(\x03\x12\x1c\n\x14parent_partition_ids\x18\x04 \x03(\x03\x12\x32\n\x0fpartition_stats\x18\x05 \x01(\x0b\x32\x19.Ydb.Topic.PartitionStats\x12Z\n\x18partition_consumer_stats\x18\x06 \x01(\x0b\x32\x38.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats\x12\x38\n\x12partition_location\x18\x07 \x01(\x0b\x32\x1c.Ydb.Topic.PartitionLocation\x1a\xee\x03\n\x16PartitionConsumerStats\x12\x18\n\x10last_read_offset\x18\x01 \x01(\x03\x12\x18\n\x10\x63ommitted_offset\x18\x02 \x01(\x03\x12\x17\n\x0fread_session_id\x18\x03 \x01(\t\x12\x46\n\"partition_read_session_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_read_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11max_read_time_lag\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12max_write_time_lag\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16max_committed_time_lag\x18\r \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\nbytes_read\x18\x08 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x13\n\x0breader_name\x18\x0b \x01(\t\x12\x1a\n\x12\x63onnection_node_id\x18\x0c \x01(\x05\"\xa0\x02\n\x0ePartitionStats\x12\x32\n\x11partition_offsets\x18\x01 \x01(\x0b\x32\x17.Ydb.Topic.OffsetsRange\x12\x18\n\x10store_size_bytes\x18\x02 \x01(\x03\x12\x33\n\x0flast_write_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12max_write_time_lag\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\rbytes_written\x18\x05 \x01(\x0b\x32\x1e.Ydb.Topic.MultipleWindowsStat\x12\x1d\n\x11partition_node_id\x18\x08 \x01(\x05\x42\x02\x18\x01\"\x87\x07\n\x11\x41lterTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\x12I\n\x1b\x61lter_partitioning_settings\x18\x03 \x01(\x0b\x32$.Ydb.Topic.AlterPartitioningSettings\x12\x37\n\x14set_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x18set_retention_storage_mb\x18\x05 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x00\x88\x01\x01\x12\x38\n\x14set_supported_codecs\x18\x07 \x01(\x0b\x32\x1a.Ydb.Topic.SupportedCodecs\x12\x41\n*set_partition_write_speed_bytes_per_second\x18\x08 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x01\x88\x01\x01\x12\x36\n\x1fset_partition_write_burst_bytes\x18\t \x01(\x03\x42\x08\xb2\xe6*\x04>= 0H\x02\x88\x01\x01\x12K\n\x10\x61lter_attributes\x18\n \x03(\x0b\x32\x31.Ydb.Topic.AlterTopicRequest.AlterAttributesEntry\x12\x33\n\radd_consumers\x18\x0b \x03(\x0b\x32\x13.Ydb.Topic.ConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x1f\n\x0e\x64rop_consumers\x18\x0c \x03(\tB\x07\x9a\xe6*\x03\x18\xb8\x17\x12:\n\x0f\x61lter_consumers\x18\r \x03(\x0b\x32\x18.Ydb.Topic.AlterConsumerB\x07\x9a\xe6*\x03\x18\xb8\x17\x12\x32\n\x11set_metering_mode\x18\x0e \x01(\x0e\x32\x17.Ydb.Topic.MeteringMode\x1a\x36\n\x14\x41lterAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1b\n\x19_set_retention_storage_mbB-\n+_set_partition_write_speed_bytes_per_secondB\"\n _set_partition_write_burst_bytesJ\x04\x08\x06\x10\x07\"B\n\x12\x41lterTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x12\n\x10\x41lterTopicResult\"[\n\x10\x44ropTopicRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12\x0c\n\x04path\x18\x02 \x01(\t\"A\n\x11\x44ropTopicResponse\x12,\n\toperation\x18\x01 \x01(\x0b\x32\x19.Ydb.Operations.Operation\"\x11\n\x0f\x44ropTopicResult*\x83\x01\n\x05\x43odec\x12\x15\n\x11\x43ODEC_UNSPECIFIED\x10\x00\x12\r\n\tCODEC_RAW\x10\x01\x12\x0e\n\nCODEC_GZIP\x10\x02\x12\x0e\n\nCODEC_LZOP\x10\x03\x12\x0e\n\nCODEC_ZSTD\x10\x04\x12\x11\n\x0c\x43ODEC_CUSTOM\x10\x90N\"\x05\x08\x05\x10\x8fN\"\n\x08\xa0\x9c\x01\x10\xff\xff\xff\xff\x07*\xf1\x01\n\x18\x41utoPartitioningStrategy\x12*\n&AUTO_PARTITIONING_STRATEGY_UNSPECIFIED\x10\x00\x12\'\n#AUTO_PARTITIONING_STRATEGY_DISABLED\x10\x01\x12\'\n#AUTO_PARTITIONING_STRATEGY_SCALE_UP\x10\x02\x12\x30\n,AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN\x10\x03\x12%\n!AUTO_PARTITIONING_STRATEGY_PAUSED\x10\x04*s\n\x0cMeteringMode\x12\x1d\n\x19METERING_MODE_UNSPECIFIED\x10\x00\x12#\n\x1fMETERING_MODE_RESERVED_CAPACITY\x10\x01\x12\x1f\n\x1bMETERING_MODE_REQUEST_UNITS\x10\x02\x42S\n\x14tech.ydb.proto.topicZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Topic\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_topic_pb2', globals()) @@ -102,12 +102,12 @@ _ALTERTOPICREQUEST.fields_by_name['drop_consumers']._serialized_options = b'\232\346*\003\030\270\027' _ALTERTOPICREQUEST.fields_by_name['alter_consumers']._options = None _ALTERTOPICREQUEST.fields_by_name['alter_consumers']._serialized_options = b'\232\346*\003\030\270\027' - _CODEC._serialized_start=18023 - _CODEC._serialized_end=18154 - _AUTOPARTITIONINGSTRATEGY._serialized_start=18157 - _AUTOPARTITIONINGSTRATEGY._serialized_end=18398 - _METERINGMODE._serialized_start=18400 - _METERINGMODE._serialized_end=18515 + _CODEC._serialized_start=18186 + _CODEC._serialized_end=18317 + _AUTOPARTITIONINGSTRATEGY._serialized_start=18320 + _AUTOPARTITIONINGSTRATEGY._serialized_end=18561 + _METERINGMODE._serialized_start=18563 + _METERINGMODE._serialized_end=18678 _SUPPORTEDCODECS._serialized_start=291 _SUPPORTEDCODECS._serialized_end=346 _OFFSETSRANGE._serialized_start=348 @@ -203,7 +203,7 @@ _STREAMREADMESSAGE_ENDPARTITIONSESSION._serialized_start=7561 _STREAMREADMESSAGE_ENDPARTITIONSESSION._serialized_end=7673 _STREAMDIRECTREADMESSAGE._serialized_start=7676 - _STREAMDIRECTREADMESSAGE._serialized_end=9331 + _STREAMDIRECTREADMESSAGE._serialized_end=9351 _STREAMDIRECTREADMESSAGE_FROMCLIENT._serialized_start=7704 _STREAMDIRECTREADMESSAGE_FROMCLIENT._serialized_end=8000 _STREAMDIRECTREADMESSAGE_FROMSERVER._serialized_start=8003 @@ -221,103 +221,103 @@ _STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION._serialized_start=9007 _STREAMDIRECTREADMESSAGE_STOPDIRECTREADPARTITIONSESSION._serialized_end=9173 _STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE._serialized_start=9176 - _STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE._serialized_end=9331 - _TRANSACTIONIDENTITY._serialized_start=9333 - _TRANSACTIONIDENTITY._serialized_end=9383 - _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_start=9386 - _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_end=9838 - _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_start=9620 - _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_end=9838 - _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_start=9746 - _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_end=9838 - _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_start=9840 - _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_end=9922 - _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_start=9924 - _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_end=9958 - _COMMITOFFSETREQUEST._serialized_start=9961 - _COMMITOFFSETREQUEST._serialized_end=10111 - _COMMITOFFSETRESPONSE._serialized_start=10113 - _COMMITOFFSETRESPONSE._serialized_end=10181 - _COMMITOFFSETRESULT._serialized_start=10183 - _COMMITOFFSETRESULT._serialized_end=10203 - _MULTIPLEWINDOWSSTAT._serialized_start=10205 - _MULTIPLEWINDOWSSTAT._serialized_end=10281 - _CONSUMER._serialized_start=10284 - _CONSUMER._serialized_end=10847 - _CONSUMER_ATTRIBUTESENTRY._serialized_start=10546 - _CONSUMER_ATTRIBUTESENTRY._serialized_end=10595 - _CONSUMER_CONSUMERSTATS._serialized_start=10598 - _CONSUMER_CONSUMERSTATS._serialized_end=10841 - _ALTERCONSUMER._serialized_start=10850 - _ALTERCONSUMER._serialized_end=11169 - _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_start=11091 - _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_end=11145 - _PARTITIONINGSETTINGS._serialized_start=11172 - _PARTITIONINGSETTINGS._serialized_end=11392 - _AUTOPARTITIONINGSETTINGS._serialized_start=11395 - _AUTOPARTITIONINGSETTINGS._serialized_end=11554 - _AUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_start=11557 - _AUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_end=11736 - _ALTERPARTITIONINGSETTINGS._serialized_start=11739 - _ALTERPARTITIONINGSETTINGS._serialized_end=12134 - _ALTERAUTOPARTITIONINGSETTINGS._serialized_start=12137 - _ALTERAUTOPARTITIONINGSETTINGS._serialized_end=12371 - _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_start=12374 - _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_end=12678 - _CREATETOPICREQUEST._serialized_start=12681 - _CREATETOPICREQUEST._serialized_end=13311 - _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_start=10546 - _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_end=10595 - _CREATETOPICRESPONSE._serialized_start=13313 - _CREATETOPICRESPONSE._serialized_end=13380 - _CREATETOPICRESULT._serialized_start=13382 - _CREATETOPICRESULT._serialized_end=13401 - _PARTITIONLOCATION._serialized_start=13403 - _PARTITIONLOCATION._serialized_end=13459 - _DESCRIBETOPICREQUEST._serialized_start=13462 - _DESCRIBETOPICREQUEST._serialized_end=13606 - _DESCRIBETOPICRESPONSE._serialized_start=13608 - _DESCRIBETOPICRESPONSE._serialized_end=13677 - _PARTITIONKEYRANGE._serialized_start=13679 - _PARTITIONKEYRANGE._serialized_end=13774 - _DESCRIBETOPICRESULT._serialized_start=13777 - _DESCRIBETOPICRESULT._serialized_end=15051 - _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_start=10546 - _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_end=10595 - _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_start=14566 - _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_end=14837 - _DESCRIBETOPICRESULT_TOPICSTATS._serialized_start=14840 - _DESCRIBETOPICRESULT_TOPICSTATS._serialized_end=15045 - _DESCRIBEPARTITIONREQUEST._serialized_start=15054 - _DESCRIBEPARTITIONREQUEST._serialized_end=15224 - _DESCRIBEPARTITIONRESPONSE._serialized_start=15226 - _DESCRIBEPARTITIONRESPONSE._serialized_end=15299 - _DESCRIBEPARTITIONRESULT._serialized_start=15301 - _DESCRIBEPARTITIONRESULT._serialized_end=15391 - _DESCRIBECONSUMERREQUEST._serialized_start=15394 - _DESCRIBECONSUMERREQUEST._serialized_end=15559 - _DESCRIBECONSUMERRESPONSE._serialized_start=15561 - _DESCRIBECONSUMERRESPONSE._serialized_end=15633 - _DESCRIBECONSUMERRESULT._serialized_start=15636 - _DESCRIBECONSUMERRESULT._serialized_end=16556 - _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_start=15804 - _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_end=16118 - _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_start=16121 - _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_end=16556 - _PARTITIONSTATS._serialized_start=16559 - _PARTITIONSTATS._serialized_end=16847 - _ALTERTOPICREQUEST._serialized_start=16850 - _ALTERTOPICREQUEST._serialized_end=17753 - _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_start=11091 - _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_end=11145 - _ALTERTOPICRESPONSE._serialized_start=17755 - _ALTERTOPICRESPONSE._serialized_end=17821 - _ALTERTOPICRESULT._serialized_start=17823 - _ALTERTOPICRESULT._serialized_end=17841 - _DROPTOPICREQUEST._serialized_start=17843 - _DROPTOPICREQUEST._serialized_end=17934 - _DROPTOPICRESPONSE._serialized_start=17936 - _DROPTOPICRESPONSE._serialized_end=18001 - _DROPTOPICRESULT._serialized_start=18003 - _DROPTOPICRESULT._serialized_end=18020 + _STREAMDIRECTREADMESSAGE_DIRECTREADRESPONSE._serialized_end=9351 + _TRANSACTIONIDENTITY._serialized_start=9353 + _TRANSACTIONIDENTITY._serialized_end=9403 + _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_start=9406 + _UPDATEOFFSETSINTRANSACTIONREQUEST._serialized_end=9858 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_start=9640 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS._serialized_end=9858 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_start=9766 + _UPDATEOFFSETSINTRANSACTIONREQUEST_TOPICOFFSETS_PARTITIONOFFSETS._serialized_end=9858 + _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_start=9860 + _UPDATEOFFSETSINTRANSACTIONRESPONSE._serialized_end=9942 + _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_start=9944 + _UPDATEOFFSETSINTRANSACTIONRESULT._serialized_end=9978 + _COMMITOFFSETREQUEST._serialized_start=9981 + _COMMITOFFSETREQUEST._serialized_end=10156 + _COMMITOFFSETRESPONSE._serialized_start=10158 + _COMMITOFFSETRESPONSE._serialized_end=10226 + _COMMITOFFSETRESULT._serialized_start=10228 + _COMMITOFFSETRESULT._serialized_end=10248 + _MULTIPLEWINDOWSSTAT._serialized_start=10250 + _MULTIPLEWINDOWSSTAT._serialized_end=10326 + _CONSUMER._serialized_start=10329 + _CONSUMER._serialized_end=10951 + _CONSUMER_ATTRIBUTESENTRY._serialized_start=10591 + _CONSUMER_ATTRIBUTESENTRY._serialized_end=10640 + _CONSUMER_CONSUMERSTATS._serialized_start=10643 + _CONSUMER_CONSUMERSTATS._serialized_end=10945 + _ALTERCONSUMER._serialized_start=10954 + _ALTERCONSUMER._serialized_end=11273 + _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_start=11195 + _ALTERCONSUMER_ALTERATTRIBUTESENTRY._serialized_end=11249 + _PARTITIONINGSETTINGS._serialized_start=11276 + _PARTITIONINGSETTINGS._serialized_end=11496 + _AUTOPARTITIONINGSETTINGS._serialized_start=11499 + _AUTOPARTITIONINGSETTINGS._serialized_end=11658 + _AUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_start=11661 + _AUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_end=11840 + _ALTERPARTITIONINGSETTINGS._serialized_start=11843 + _ALTERPARTITIONINGSETTINGS._serialized_end=12238 + _ALTERAUTOPARTITIONINGSETTINGS._serialized_start=12241 + _ALTERAUTOPARTITIONINGSETTINGS._serialized_end=12475 + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_start=12478 + _ALTERAUTOPARTITIONINGWRITESPEEDSTRATEGY._serialized_end=12782 + _CREATETOPICREQUEST._serialized_start=12785 + _CREATETOPICREQUEST._serialized_end=13415 + _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_start=10591 + _CREATETOPICREQUEST_ATTRIBUTESENTRY._serialized_end=10640 + _CREATETOPICRESPONSE._serialized_start=13417 + _CREATETOPICRESPONSE._serialized_end=13484 + _CREATETOPICRESULT._serialized_start=13486 + _CREATETOPICRESULT._serialized_end=13505 + _PARTITIONLOCATION._serialized_start=13507 + _PARTITIONLOCATION._serialized_end=13563 + _DESCRIBETOPICREQUEST._serialized_start=13566 + _DESCRIBETOPICREQUEST._serialized_end=13710 + _DESCRIBETOPICRESPONSE._serialized_start=13712 + _DESCRIBETOPICRESPONSE._serialized_end=13781 + _PARTITIONKEYRANGE._serialized_start=13783 + _PARTITIONKEYRANGE._serialized_end=13878 + _DESCRIBETOPICRESULT._serialized_start=13881 + _DESCRIBETOPICRESULT._serialized_end=15155 + _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_start=10591 + _DESCRIBETOPICRESULT_ATTRIBUTESENTRY._serialized_end=10640 + _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_start=14670 + _DESCRIBETOPICRESULT_PARTITIONINFO._serialized_end=14941 + _DESCRIBETOPICRESULT_TOPICSTATS._serialized_start=14944 + _DESCRIBETOPICRESULT_TOPICSTATS._serialized_end=15149 + _DESCRIBEPARTITIONREQUEST._serialized_start=15158 + _DESCRIBEPARTITIONREQUEST._serialized_end=15328 + _DESCRIBEPARTITIONRESPONSE._serialized_start=15330 + _DESCRIBEPARTITIONRESPONSE._serialized_end=15403 + _DESCRIBEPARTITIONRESULT._serialized_start=15405 + _DESCRIBEPARTITIONRESULT._serialized_end=15495 + _DESCRIBECONSUMERREQUEST._serialized_start=15498 + _DESCRIBECONSUMERREQUEST._serialized_end=15663 + _DESCRIBECONSUMERRESPONSE._serialized_start=15665 + _DESCRIBECONSUMERRESPONSE._serialized_end=15737 + _DESCRIBECONSUMERRESULT._serialized_start=15740 + _DESCRIBECONSUMERRESULT._serialized_end=16719 + _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_start=15908 + _DESCRIBECONSUMERRESULT_PARTITIONINFO._serialized_end=16222 + _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_start=16225 + _DESCRIBECONSUMERRESULT_PARTITIONCONSUMERSTATS._serialized_end=16719 + _PARTITIONSTATS._serialized_start=16722 + _PARTITIONSTATS._serialized_end=17010 + _ALTERTOPICREQUEST._serialized_start=17013 + _ALTERTOPICREQUEST._serialized_end=17916 + _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_start=11195 + _ALTERTOPICREQUEST_ALTERATTRIBUTESENTRY._serialized_end=11249 + _ALTERTOPICRESPONSE._serialized_start=17918 + _ALTERTOPICRESPONSE._serialized_end=17984 + _ALTERTOPICRESULT._serialized_start=17986 + _ALTERTOPICRESULT._serialized_end=18004 + _DROPTOPICREQUEST._serialized_start=18006 + _DROPTOPICREQUEST._serialized_end=18097 + _DROPTOPICRESPONSE._serialized_start=18099 + _DROPTOPICRESPONSE._serialized_end=18164 + _DROPTOPICRESULT._serialized_start=18166 + _DROPTOPICRESULT._serialized_end=18183 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_topic_pb2.pyi b/ydb/_grpc/v5/protos/ydb_topic_pb2.pyi index 58e2156e..83fd9d60 100644 --- a/ydb/_grpc/v5/protos/ydb_topic_pb2.pyi +++ b/ydb/_grpc/v5/protos/ydb_topic_pb2.pyi @@ -145,18 +145,20 @@ class AutoPartitioningWriteSpeedStrategy(_message.Message): def __init__(self, stabilization_window: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., up_utilization_percent: _Optional[int] = ..., down_utilization_percent: _Optional[int] = ...) -> None: ... class CommitOffsetRequest(_message.Message): - __slots__ = ["consumer", "offset", "operation_params", "partition_id", "path"] + __slots__ = ["consumer", "offset", "operation_params", "partition_id", "path", "read_session_id"] CONSUMER_FIELD_NUMBER: _ClassVar[int] OFFSET_FIELD_NUMBER: _ClassVar[int] OPERATION_PARAMS_FIELD_NUMBER: _ClassVar[int] PARTITION_ID_FIELD_NUMBER: _ClassVar[int] PATH_FIELD_NUMBER: _ClassVar[int] + READ_SESSION_ID_FIELD_NUMBER: _ClassVar[int] consumer: str offset: int operation_params: _ydb_operation_pb2.OperationParams partition_id: int path: str - def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., consumer: _Optional[str] = ..., offset: _Optional[int] = ...) -> None: ... + read_session_id: str + def __init__(self, operation_params: _Optional[_Union[_ydb_operation_pb2.OperationParams, _Mapping]] = ..., path: _Optional[str] = ..., partition_id: _Optional[int] = ..., consumer: _Optional[str] = ..., offset: _Optional[int] = ..., read_session_id: _Optional[str] = ...) -> None: ... class CommitOffsetResponse(_message.Message): __slots__ = ["operation"] @@ -178,16 +180,18 @@ class Consumer(_message.Message): value: str def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... class ConsumerStats(_message.Message): - __slots__ = ["bytes_read", "max_read_time_lag", "max_write_time_lag", "min_partitions_last_read_time"] + __slots__ = ["bytes_read", "max_committed_time_lag", "max_read_time_lag", "max_write_time_lag", "min_partitions_last_read_time"] BYTES_READ_FIELD_NUMBER: _ClassVar[int] + MAX_COMMITTED_TIME_LAG_FIELD_NUMBER: _ClassVar[int] MAX_READ_TIME_LAG_FIELD_NUMBER: _ClassVar[int] MAX_WRITE_TIME_LAG_FIELD_NUMBER: _ClassVar[int] MIN_PARTITIONS_LAST_READ_TIME_FIELD_NUMBER: _ClassVar[int] bytes_read: MultipleWindowsStat + max_committed_time_lag: _duration_pb2.Duration max_read_time_lag: _duration_pb2.Duration max_write_time_lag: _duration_pb2.Duration min_partitions_last_read_time: _timestamp_pb2.Timestamp - def __init__(self, min_partitions_last_read_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., max_read_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_write_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., bytes_read: _Optional[_Union[MultipleWindowsStat, _Mapping]] = ...) -> None: ... + def __init__(self, min_partitions_last_read_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., max_read_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_write_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_committed_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., bytes_read: _Optional[_Union[MultipleWindowsStat, _Mapping]] = ...) -> None: ... ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] CONSUMER_STATS_FIELD_NUMBER: _ClassVar[int] IMPORTANT_FIELD_NUMBER: _ClassVar[int] @@ -268,12 +272,13 @@ class DescribeConsumerResponse(_message.Message): class DescribeConsumerResult(_message.Message): __slots__ = ["consumer", "partitions", "self"] class PartitionConsumerStats(_message.Message): - __slots__ = ["bytes_read", "committed_offset", "connection_node_id", "last_read_offset", "last_read_time", "max_read_time_lag", "max_write_time_lag", "partition_read_session_create_time", "read_session_id", "reader_name"] + __slots__ = ["bytes_read", "committed_offset", "connection_node_id", "last_read_offset", "last_read_time", "max_committed_time_lag", "max_read_time_lag", "max_write_time_lag", "partition_read_session_create_time", "read_session_id", "reader_name"] BYTES_READ_FIELD_NUMBER: _ClassVar[int] COMMITTED_OFFSET_FIELD_NUMBER: _ClassVar[int] CONNECTION_NODE_ID_FIELD_NUMBER: _ClassVar[int] LAST_READ_OFFSET_FIELD_NUMBER: _ClassVar[int] LAST_READ_TIME_FIELD_NUMBER: _ClassVar[int] + MAX_COMMITTED_TIME_LAG_FIELD_NUMBER: _ClassVar[int] MAX_READ_TIME_LAG_FIELD_NUMBER: _ClassVar[int] MAX_WRITE_TIME_LAG_FIELD_NUMBER: _ClassVar[int] PARTITION_READ_SESSION_CREATE_TIME_FIELD_NUMBER: _ClassVar[int] @@ -284,12 +289,13 @@ class DescribeConsumerResult(_message.Message): connection_node_id: int last_read_offset: int last_read_time: _timestamp_pb2.Timestamp + max_committed_time_lag: _duration_pb2.Duration max_read_time_lag: _duration_pb2.Duration max_write_time_lag: _duration_pb2.Duration partition_read_session_create_time: _timestamp_pb2.Timestamp read_session_id: str reader_name: str - def __init__(self, last_read_offset: _Optional[int] = ..., committed_offset: _Optional[int] = ..., read_session_id: _Optional[str] = ..., partition_read_session_create_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., last_read_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., max_read_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_write_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., bytes_read: _Optional[_Union[MultipleWindowsStat, _Mapping]] = ..., reader_name: _Optional[str] = ..., connection_node_id: _Optional[int] = ...) -> None: ... + def __init__(self, last_read_offset: _Optional[int] = ..., committed_offset: _Optional[int] = ..., read_session_id: _Optional[str] = ..., partition_read_session_create_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., last_read_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., max_read_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_write_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., max_committed_time_lag: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., bytes_read: _Optional[_Union[MultipleWindowsStat, _Mapping]] = ..., reader_name: _Optional[str] = ..., connection_node_id: _Optional[int] = ...) -> None: ... class PartitionInfo(_message.Message): __slots__ = ["active", "child_partition_ids", "parent_partition_ids", "partition_consumer_stats", "partition_id", "partition_location", "partition_stats"] ACTIVE_FIELD_NUMBER: _ClassVar[int] @@ -525,14 +531,16 @@ class PartitioningSettings(_message.Message): class StreamDirectReadMessage(_message.Message): __slots__ = [] class DirectReadResponse(_message.Message): - __slots__ = ["direct_read_id", "partition_data", "partition_session_id"] + __slots__ = ["bytes_size", "direct_read_id", "partition_data", "partition_session_id"] + BYTES_SIZE_FIELD_NUMBER: _ClassVar[int] DIRECT_READ_ID_FIELD_NUMBER: _ClassVar[int] PARTITION_DATA_FIELD_NUMBER: _ClassVar[int] PARTITION_SESSION_ID_FIELD_NUMBER: _ClassVar[int] + bytes_size: int direct_read_id: int partition_data: StreamReadMessage.ReadResponse.PartitionData partition_session_id: int - def __init__(self, partition_session_id: _Optional[int] = ..., direct_read_id: _Optional[int] = ..., partition_data: _Optional[_Union[StreamReadMessage.ReadResponse.PartitionData, _Mapping]] = ...) -> None: ... + def __init__(self, partition_session_id: _Optional[int] = ..., direct_read_id: _Optional[int] = ..., partition_data: _Optional[_Union[StreamReadMessage.ReadResponse.PartitionData, _Mapping]] = ..., bytes_size: _Optional[int] = ...) -> None: ... class FromClient(_message.Message): __slots__ = ["init_request", "start_direct_read_partition_session_request", "update_token_request"] INIT_REQUEST_FIELD_NUMBER: _ClassVar[int] diff --git a/ydb/_grpc/v5/ydb_import_v1_pb2.py b/ydb/_grpc/v5/ydb_import_v1_pb2.py index 78bef56e..4e8d5dc8 100644 --- a/ydb/_grpc/v5/ydb_import_v1_pb2.py +++ b/ydb/_grpc/v5/ydb_import_v1_pb2.py @@ -15,7 +15,7 @@ from ydb._grpc.v5.protos import ydb_import_pb2 as protos_dot_ydb__import__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13ydb_import_v1.proto\x12\rYdb.Import.V1\x1a\x17protos/ydb_import.proto2\xaf\x01\n\rImportService\x12Q\n\x0cImportFromS3\x12\x1f.Ydb.Import.ImportFromS3Request\x1a .Ydb.Import.ImportFromS3Response\x12K\n\nImportData\x12\x1d.Ydb.Import.ImportDataRequest\x1a\x1e.Ydb.Import.ImportDataResponseBR\n\x19tech.ydb.proto.import_.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Import_V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13ydb_import_v1.proto\x12\rYdb.Import.V1\x1a\x17protos/ydb_import.proto2\x9d\x02\n\rImportService\x12Q\n\x0cImportFromS3\x12\x1f.Ydb.Import.ImportFromS3Request\x1a .Ydb.Import.ImportFromS3Response\x12l\n\x15ListObjectsInS3Export\x12(.Ydb.Import.ListObjectsInS3ExportRequest\x1a).Ydb.Import.ListObjectsInS3ExportResponse\x12K\n\nImportData\x12\x1d.Ydb.Import.ImportDataRequest\x1a\x1e.Ydb.Import.ImportDataResponseBR\n\x19tech.ydb.proto.import_.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Import_V1b\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ydb_import_v1_pb2', globals()) @@ -24,5 +24,5 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\031tech.ydb.proto.import_.v1Z5github.com/ydb-platform/ydb-go-genproto/Ydb_Import_V1' _IMPORTSERVICE._serialized_start=64 - _IMPORTSERVICE._serialized_end=239 + _IMPORTSERVICE._serialized_end=349 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/ydb_import_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_import_v1_pb2_grpc.py index 0c3c1503..3f54a5d4 100644 --- a/ydb/_grpc/v5/ydb_import_v1_pb2_grpc.py +++ b/ydb/_grpc/v5/ydb_import_v1_pb2_grpc.py @@ -19,6 +19,11 @@ def __init__(self, channel): request_serializer=protos_dot_ydb__import__pb2.ImportFromS3Request.SerializeToString, response_deserializer=protos_dot_ydb__import__pb2.ImportFromS3Response.FromString, ) + self.ListObjectsInS3Export = channel.unary_unary( + '/Ydb.Import.V1.ImportService/ListObjectsInS3Export', + request_serializer=protos_dot_ydb__import__pb2.ListObjectsInS3ExportRequest.SerializeToString, + response_deserializer=protos_dot_ydb__import__pb2.ListObjectsInS3ExportResponse.FromString, + ) self.ImportData = channel.unary_unary( '/Ydb.Import.V1.ImportService/ImportData', request_serializer=protos_dot_ydb__import__pb2.ImportDataRequest.SerializeToString, @@ -37,6 +42,13 @@ def ImportFromS3(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def ListObjectsInS3Export(self, request, context): + """List objects from existing export stored in S3 bucket + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ImportData(self, request, context): """Writes data to a table. Method accepts serialized data in the selected format and writes it non-transactionally. @@ -53,6 +65,11 @@ def add_ImportServiceServicer_to_server(servicer, server): request_deserializer=protos_dot_ydb__import__pb2.ImportFromS3Request.FromString, response_serializer=protos_dot_ydb__import__pb2.ImportFromS3Response.SerializeToString, ), + 'ListObjectsInS3Export': grpc.unary_unary_rpc_method_handler( + servicer.ListObjectsInS3Export, + request_deserializer=protos_dot_ydb__import__pb2.ListObjectsInS3ExportRequest.FromString, + response_serializer=protos_dot_ydb__import__pb2.ListObjectsInS3ExportResponse.SerializeToString, + ), 'ImportData': grpc.unary_unary_rpc_method_handler( servicer.ImportData, request_deserializer=protos_dot_ydb__import__pb2.ImportDataRequest.FromString, @@ -85,6 +102,23 @@ def ImportFromS3(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def ListObjectsInS3Export(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, '/Ydb.Import.V1.ImportService/ListObjectsInS3Export', + protos_dot_ydb__import__pb2.ListObjectsInS3ExportRequest.SerializeToString, + protos_dot_ydb__import__pb2.ListObjectsInS3ExportResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def ImportData(request, target, diff --git a/ydb/_grpc/v5/ydb_query_v1_pb2_grpc.py b/ydb/_grpc/v5/ydb_query_v1_pb2_grpc.py index 2ef0d12d..25749aa4 100644 --- a/ydb/_grpc/v5/ydb_query_v1_pb2_grpc.py +++ b/ydb/_grpc/v5/ydb_query_v1_pb2_grpc.py @@ -7,12 +7,7 @@ class QueryServiceStub(object): - """! WARNING: Experimental API - ! This API is currently in experimental state and is a subject for changes. - ! No backward and/or forward compatibility guarantees are provided. - ! DO NOT USE for production workloads. - - """ + """Missing associated documentation comment in .proto file.""" def __init__(self, channel): """Constructor. @@ -68,12 +63,7 @@ def __init__(self, channel): class QueryServiceServicer(object): - """! WARNING: Experimental API - ! This API is currently in experimental state and is a subject for changes. - ! No backward and/or forward compatibility guarantees are provided. - ! DO NOT USE for production workloads. - - """ + """Missing associated documentation comment in .proto file.""" def CreateSession(self, request, context): """Sessions are basic primitives for communicating with YDB Query Service. The are similar to @@ -214,12 +204,7 @@ def add_QueryServiceServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. class QueryService(object): - """! WARNING: Experimental API - ! This API is currently in experimental state and is a subject for changes. - ! No backward and/or forward compatibility guarantees are provided. - ! DO NOT USE for production workloads. - - """ + """Missing associated documentation comment in .proto file.""" @staticmethod def CreateSession(request, From 58b0a703e58d10b1c19fcdad5f3a4885471f3d0f Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 9 Jun 2025 11:57:55 +0300 Subject: [PATCH 413/429] CommitOffset with readsessionid --- tests/topics/test_topic_reader.py | 44 +++++++++++++++++++++++ ydb/_grpc/grpcwrapper/ydb_topic.py | 2 ++ ydb/_topic_reader/topic_reader_asyncio.py | 10 ++++++ ydb/_topic_reader/topic_reader_sync.py | 4 +++ ydb/topic.py | 10 ++++-- 5 files changed, 68 insertions(+), 2 deletions(-) diff --git a/tests/topics/test_topic_reader.py b/tests/topics/test_topic_reader.py index 107ce980..c59deca3 100644 --- a/tests/topics/test_topic_reader.py +++ b/tests/topics/test_topic_reader.py @@ -74,6 +74,28 @@ async def test_commit_offset_works(self, driver, topic_with_messages, topic_cons topic_with_messages, topic_consumer, message.partition_id, message.offset + 1 ) + async def test_commit_offset_with_session_id_works(self, driver, topic_with_messages, topic_consumer): + async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: + msg1 = await reader.receive_message() + assert msg1.seqno == 1 + msg2 = await reader.receive_message() + assert msg2.seqno == 2 + + await driver.topic_client.commit_offset( + topic_with_messages, + topic_consumer, + msg1.partition_id, + msg1.offset + 1, + reader.read_session_id, + ) + + msg3 = await reader.receive_message() + assert msg3.seqno == 3 + + async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: + msg2 = await reader.receive_message() + assert msg2.seqno == 2 + async def test_reader_reconnect_after_commit_offset(self, driver, topic_with_messages, topic_consumer): async with driver.topic_client.reader(topic_with_messages, topic_consumer) as reader: for out in ["123", "456", "789", "0"]: @@ -213,6 +235,28 @@ def test_commit_offset_works(self, driver_sync, topic_with_messages, topic_consu topic_with_messages, topic_consumer, message.partition_id, message.offset + 1 ) + def test_commit_offset_with_session_id_works(self, driver_sync, topic_with_messages, topic_consumer): + with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: + msg1 = reader.receive_message() + assert msg1.seqno == 1 + msg2 = reader.receive_message() + assert msg2.seqno == 2 + + driver_sync.topic_client.commit_offset( + topic_with_messages, + topic_consumer, + msg1.partition_id, + msg1.offset + 1, + reader.read_session_id, + ) + + msg3 = reader.receive_message() + assert msg3.seqno == 3 + + with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: + msg2 = reader.receive_message() + assert msg2.seqno == 2 + def test_reader_reconnect_after_commit_offset(self, driver_sync, topic_with_messages, topic_consumer): with driver_sync.topic_client.reader(topic_with_messages, topic_consumer) as reader: for out in ["123", "456", "789", "0"]: diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index e70de150..7744b12f 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -143,6 +143,7 @@ class CommitOffsetRequest(IToProto): consumer: str partition_id: int offset: int + read_session_id: Optional[str] def to_proto(self) -> ydb_topic_pb2.CommitOffsetRequest: return ydb_topic_pb2.CommitOffsetRequest( @@ -150,6 +151,7 @@ def to_proto(self) -> ydb_topic_pb2.CommitOffsetRequest: consumer=self.consumer, partition_id=self.partition_id, offset=self.offset, + read_session_id=self.read_session_id, ) diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 34c52108..24e8fa9e 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -190,6 +190,10 @@ async def close(self, flush: bool = True): self._closed = True await self._reconnector.close(flush) + @property + def read_session_id(self) -> Optional[str]: + return self._reconnector.read_session_id + class ReaderReconnector: _static_reader_reconnector_counter = AtomicCounter() @@ -373,6 +377,12 @@ def _set_first_error(self, err: issues.Error): # skip if already has result pass + @property + def read_session_id(self) -> Optional[str]: + if not self._stream_reader: + return None + return self._stream_reader._session_id + class ReaderStream: _static_id_counter = AtomicCounter() diff --git a/ydb/_topic_reader/topic_reader_sync.py b/ydb/_topic_reader/topic_reader_sync.py index bb2fc2a3..f7590a21 100644 --- a/ydb/_topic_reader/topic_reader_sync.py +++ b/ydb/_topic_reader/topic_reader_sync.py @@ -204,3 +204,7 @@ def close(self, *, flush: bool = True, timeout: TimeoutType = None): def _check_closed(self): if self._closed: raise TopicReaderClosedError() + + @property + def read_session_id(self) -> Optional[str]: + return self._async_reader.read_session_id diff --git a/ydb/topic.py b/ydb/topic.py index ceb82efb..aa6c7eb4 100644 --- a/ydb/topic.py +++ b/ydb/topic.py @@ -340,12 +340,15 @@ def tx_writer( return TopicTxWriterAsyncIO(tx=tx, driver=self._driver, settings=settings, _client=self) - async def commit_offset(self, path: str, consumer: str, partition_id: int, offset: int) -> None: + async def commit_offset( + self, path: str, consumer: str, partition_id: int, offset: int, read_session_id: Optional[str] = None + ) -> None: req = _ydb_topic.CommitOffsetRequest( path=path, consumer=consumer, partition_id=partition_id, offset=offset, + read_session_id=read_session_id, ) await self._driver( @@ -618,12 +621,15 @@ def tx_writer( return TopicTxWriter(tx, self._driver, settings, _parent=self) - def commit_offset(self, path: str, consumer: str, partition_id: int, offset: int) -> None: + def commit_offset( + self, path: str, consumer: str, partition_id: int, offset: int, read_session_id: Optional[str] = None + ) -> None: req = _ydb_topic.CommitOffsetRequest( path=path, consumer=consumer, partition_id=partition_id, offset=offset, + read_session_id=read_session_id, ) self._driver( From f948e45530f0107422cbc317a92776b8d1e47fc1 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Sat, 14 Jun 2025 20:20:02 +0300 Subject: [PATCH 414/429] Add index to resultsets --- tests/query/test_query_session_pool.py | 6 ++++++ ydb/convert.py | 9 +++++---- ydb/query/base.py | 6 +++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/tests/query/test_query_session_pool.py b/tests/query/test_query_session_pool.py index 4c88ae77..6b5a7bf4 100644 --- a/tests/query/test_query_session_pool.py +++ b/tests/query/test_query_session_pool.py @@ -17,6 +17,12 @@ def test_oneshot_query_normal(self, pool: QuerySessionPool): res = pool.execute_with_retries("select 1;") assert len(res) == 1 + def test_oneshot_query_result_set_index(self, pool: QuerySessionPool): + res = pool.execute_with_retries("select 1; select 2; select 3") + assert len(res) == 3 + indexes = [result_set.index for result_set in res] + assert indexes == [0, 1, 2] + def test_oneshot_ddl_query(self, pool: QuerySessionPool): pool.execute_with_retries("create table Queen(key UInt64, PRIMARY KEY (key));") pool.execute_with_retries("drop table Queen;") diff --git a/ydb/convert.py b/ydb/convert.py index f48e024a..485b5897 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -352,16 +352,17 @@ def _unwrap_optionality(column): class _ResultSet(object): - __slots__ = ("columns", "rows", "truncated", "snapshot") + __slots__ = ("columns", "rows", "truncated", "snapshot", "index") - def __init__(self, columns, rows, truncated, snapshot=None): + def __init__(self, columns, rows, truncated, snapshot=None, index=None): self.columns = columns self.rows = rows self.truncated = truncated self.snapshot = snapshot + self.index = index @classmethod - def from_message(cls, message, table_client_settings=None, snapshot=None): + def from_message(cls, message, table_client_settings=None, snapshot=None, index=None): rows = [] # prepare column parsers before actuall parsing column_parsers = [] @@ -384,7 +385,7 @@ def from_message(cls, message, table_client_settings=None, snapshot=None): column_parser, unwrapped_type = column_info row[column.name] = column_parser(unwrapped_type, value, table_client_settings) rows.append(row) - return cls(message.columns, rows, message.truncated, snapshot) + return cls(message.columns, rows, message.truncated, snapshot, index) @classmethod def lazy_from_message(cls, message, table_client_settings=None, snapshot=None): diff --git a/ydb/query/base.py b/ydb/query/base.py index 52a6312e..2c16716c 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -208,7 +208,11 @@ def wrap_execute_query_response( session._last_query_stats = response_pb.exec_stats if response_pb.HasField("result_set"): - return convert.ResultSet.from_message(response_pb.result_set, settings) + return convert.ResultSet.from_message( + response_pb.result_set, + settings, + index=response_pb.result_set_index, + ) return None From ec04669c9c9723490bb1ed0482081d16e3b88fb1 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 16 Jun 2025 11:35:59 +0300 Subject: [PATCH 415/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d2af2b1..476ecc6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Add index to resultsets + ## 3.21.3 ## * Rename indexes feature From 25825978a4c761962e713be9c55fc13d7e4dfe1e Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 16 Jun 2025 08:36:46 +0000 Subject: [PATCH 416/429] Release: 3.21.4 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 476ecc6a..6b6ee619 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.21.4 ## * Add index to resultsets ## 3.21.3 ## diff --git a/setup.py b/setup.py index 3c11ec7f..777e334a 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.21.3", # AUTOVERSION + version="3.21.4", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 13f62552..f3776ea6 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.21.3" +VERSION = "3.21.4" From afa366d84081bf2133594a89cd2432b632cd286a Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 18 Jun 2025 19:01:01 +0300 Subject: [PATCH 417/429] Ability to create Date type from datetime --- test-requirements.txt | 2 +- ydb/types.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index 012697ec..3cbcd696 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -46,6 +46,6 @@ sqlalchemy==1.4.26 pylint-protobuf cython freezegun==1.2.2 -pytest-cov +# pytest-cov yandexcloud -e . diff --git a/ydb/types.py b/ydb/types.py index 2d4eecc3..887008c4 100644 --- a/ydb/types.py +++ b/ydb/types.py @@ -33,8 +33,10 @@ def _from_date(x: ydb_value_pb2.Value, table_client_settings: table.TableClientS return x.uint32_value -def _to_date(pb: ydb_value_pb2.Value, value: typing.Union[date, int]) -> None: - if isinstance(value, date): +def _to_date(pb: ydb_value_pb2.Value, value: typing.Union[date, datetime, int]) -> None: + if isinstance(value, datetime): + pb.uint32_value = (value.date() - _EPOCH.date()).days + elif isinstance(value, date): pb.uint32_value = (value - _EPOCH.date()).days else: pb.uint32_value = value From b539cb3228305d0eea51cdf8762eae409618de40 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 18 Jun 2025 19:14:03 +0300 Subject: [PATCH 418/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b6ee619..9eabdc90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Ability to create Date type from datetime + ## 3.21.4 ## * Add index to resultsets From 2ca4de8e9e017eb8295c5a23e32f605b08bbb239 Mon Sep 17 00:00:00 2001 From: robot Date: Wed, 18 Jun 2025 16:15:10 +0000 Subject: [PATCH 419/429] Release: 3.21.5 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eabdc90..da9e9f70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.21.5 ## * Ability to create Date type from datetime ## 3.21.4 ## diff --git a/setup.py b/setup.py index 777e334a..32e59926 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.21.4", # AUTOVERSION + version="3.21.5", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index f3776ea6..c4d013eb 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.21.4" +VERSION = "3.21.5" From 52cbefbf6a0607ae724b15df21d172d640749e2f Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 30 Jun 2025 09:30:18 +0300 Subject: [PATCH 420/429] Fix typo in topic writer --- ydb/_topic_writer/topic_writer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ydb/_topic_writer/topic_writer.py b/ydb/_topic_writer/topic_writer.py index a3e407ed..16feded7 100644 --- a/ydb/_topic_writer/topic_writer.py +++ b/ydb/_topic_writer/topic_writer.py @@ -213,10 +213,10 @@ def messages_to_proto_requests( tx_identity: Optional[TransactionIdentity], ) -> List[StreamWriteMessage.FromClient]: - gropus = _slit_messages_for_send(messages) + groups = _split_messages_for_send(messages) res = [] # type: List[StreamWriteMessage.FromClient] - for group in gropus: + for group in groups: req = StreamWriteMessage.FromClient( StreamWriteMessage.WriteRequest( messages=list(map(InternalMessage.to_message_data, group)), @@ -254,7 +254,7 @@ def messages_to_proto_requests( ) -def _slit_messages_for_send( +def _split_messages_for_send( messages: List[InternalMessage], ) -> List[List[InternalMessage]]: codec_groups = [] # type: List[List[InternalMessage]] From 92643a9cb267a728d9f33a8cda8bacd28951dfb0 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 30 Jun 2025 15:12:58 +0300 Subject: [PATCH 421/429] Add detailed debug logs to topic instances --- examples/topic/basic_example.py | 4 +- test-requirements.txt | 2 +- ydb/_topic_reader/topic_reader_asyncio.py | 55 +++++++++++- .../topic_reader_asyncio_test.py | 2 + ydb/_topic_reader/topic_reader_sync.py | 2 +- ydb/_topic_writer/topic_writer_asyncio.py | 85 ++++++++++++++++++- .../topic_writer_asyncio_test.py | 1 + ydb/_topic_writer/topic_writer_sync.py | 19 ++++- ydb/topic.py | 35 +++++++- 9 files changed, 195 insertions(+), 10 deletions(-) diff --git a/examples/topic/basic_example.py b/examples/topic/basic_example.py index 18e9626f..4726ed79 100644 --- a/examples/topic/basic_example.py +++ b/examples/topic/basic_example.py @@ -66,7 +66,7 @@ async def main(): args = parser.parse_args() if args.verbose: - logger = logging.getLogger("topicexample") + logger = logging.getLogger("ydb") logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler()) @@ -79,6 +79,8 @@ async def main(): read_messages(driver, args.path, args.consumer), ) + await driver.stop() + if __name__ == "__main__": asyncio.run(main()) diff --git a/test-requirements.txt b/test-requirements.txt index 012697ec..3cbcd696 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -46,6 +46,6 @@ sqlalchemy==1.4.26 pylint-protobuf cython freezegun==1.2.2 -pytest-cov +# pytest-cov yandexcloud -e . diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 24e8fa9e..7baadacb 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -99,7 +99,7 @@ async def __aexit__(self, exc_type, exc_val, exc_tb): def __del__(self): if not self._closed: try: - logger.warning("Topic reader was not closed properly. Consider using method close().") + logger.debug("Topic reader was not closed properly. Consider using method close().") task = self._loop.create_task(self.close(flush=False)) topic_common.wrap_set_name_for_asyncio_task(task, task_name="close reader") except BaseException: @@ -121,6 +121,7 @@ async def receive_batch( use asyncio.wait_for for wait with timeout. """ + logger.debug("receive_batch max_messages=%s", max_messages) await self._reconnector.wait_message() return self._reconnector.receive_batch_nowait( max_messages=max_messages, @@ -137,6 +138,7 @@ async def receive_batch_with_tx( use asyncio.wait_for for wait with timeout. """ + logger.debug("receive_batch_with_tx tx=%s max_messages=%s", tx, max_messages) await self._reconnector.wait_message() return self._reconnector.receive_batch_with_tx_nowait( tx=tx, @@ -149,6 +151,7 @@ async def receive_message(self) -> typing.Optional[datatypes.PublicMessage]: use asyncio.wait_for for wait with timeout. """ + logger.debug("receive_message") await self._reconnector.wait_message() return self._reconnector.receive_message_nowait() @@ -159,6 +162,7 @@ def commit(self, batch: typing.Union[datatypes.PublicMessage, datatypes.PublicBa For the method no way check the commit result (for example if lost connection - commits will not re-send and committed messages will receive again). """ + logger.debug("commit message or batch") if self._settings.consumer is None: raise issues.Error("Commit operations are not supported for topic reader without consumer.") @@ -177,6 +181,7 @@ async def commit_with_ack(self, batch: typing.Union[datatypes.PublicMessage, dat before receive commit ack. Message may be acked or not (if not - it will send in other read session, to this or other reader). """ + logger.debug("commit_with_ack message or batch") if self._settings.consumer is None: raise issues.Error("Commit operations are not supported for topic reader without consumer.") @@ -187,8 +192,10 @@ async def close(self, flush: bool = True): if self._closed: raise TopicReaderClosedError() + logger.debug("Close topic reader") self._closed = True await self._reconnector.close(flush) + logger.debug("Topic reader was closed") @property def read_session_id(self) -> Optional[str]: @@ -214,11 +221,12 @@ def __init__( settings: topic_reader.PublicReaderSettings, loop: Optional[asyncio.AbstractEventLoop] = None, ): - self._id = self._static_reader_reconnector_counter.inc_and_get() + self._id = ReaderReconnector._static_reader_reconnector_counter.inc_and_get() self._settings = settings self._driver = driver self._loop = loop if loop is not None else asyncio.get_running_loop() self._background_tasks = set() + logger.debug("init reader reconnector id=%s", self._id) self._state_changed = asyncio.Event() self._stream_reader = None @@ -231,13 +239,16 @@ async def _connection_loop(self): attempt = 0 while True: try: + logger.debug("reader %s connect attempt %s", self._id, attempt) self._stream_reader = await ReaderStream.create(self._id, self._driver, self._settings) + logger.debug("reader %s connected stream %s", self._id, self._stream_reader._id) attempt = 0 self._state_changed.set() await self._stream_reader.wait_error() except BaseException as err: retry_info = check_retriable_error(err, self._settings._retry_settings(), attempt) if not retry_info.is_retriable: + logger.debug("reader %s stop connection loop due to %s", self._id, err) self._set_first_error(err) return @@ -358,6 +369,7 @@ def commit(self, batch: datatypes.ICommittable) -> datatypes.PartitionSession.Co return self._stream_reader.commit(batch) async def close(self, flush: bool): + logger.debug("reader reconnector %s close", self._id) if self._stream_reader: await self._stream_reader.close(flush) for task in self._background_tasks: @@ -447,6 +459,8 @@ def __init__( self._settings = settings + logger.debug("created ReaderStream id=%s reconnector=%s", self._id, self._reader_reconnector_id) + @staticmethod async def create( reader_reconnector_id: int, @@ -464,6 +478,7 @@ async def create( get_token_function=creds.get_auth_token if creds else None, ) await reader._start(stream, settings._init_message()) + logger.debug("reader stream %s started session=%s", reader._id, reader._session_id) return reader async def _start(self, stream: IGrpcWrapperAsyncIO, init_message: StreamReadMessage.InitRequest): @@ -472,11 +487,13 @@ async def _start(self, stream: IGrpcWrapperAsyncIO, init_message: StreamReadMess self._started = True self._stream = stream + logger.debug("reader stream %s send init request", self._id) stream.write(StreamReadMessage.FromClient(client_message=init_message)) init_response = await stream.receive() # type: StreamReadMessage.FromServer if isinstance(init_response.server_message, StreamReadMessage.InitResponse): self._session_id = init_response.server_message.session_id + logger.debug("reader stream %s initialized session=%s", self._id, self._session_id) else: raise TopicReaderError("Unexpected message after InitRequest: %s", init_response) @@ -615,6 +632,7 @@ async def _handle_background_errors(self): async def _read_messages_loop(self): try: + logger.debug("reader stream %s start read loop", self._id) self._stream.write( StreamReadMessage.FromClient( client_message=StreamReadMessage.ReadRequest( @@ -628,6 +646,7 @@ async def _read_messages_loop(self): _process_response(message.server_status) if isinstance(message.server_message, StreamReadMessage.ReadResponse): + logger.debug("reader stream %s read %s bytes", self._id, message.server_message.bytes_size) self._on_read_response(message.server_message) elif isinstance(message.server_message, StreamReadMessage.CommitOffsetResponse): @@ -637,18 +656,33 @@ async def _read_messages_loop(self): message.server_message, StreamReadMessage.StartPartitionSessionRequest, ): + logger.debug( + "reader stream %s start partition %s", + self._id, + message.server_message.partition_session.partition_session_id, + ) await self._on_start_partition_session(message.server_message) elif isinstance( message.server_message, StreamReadMessage.StopPartitionSessionRequest, ): + logger.debug( + "reader stream %s stop partition %s", + self._id, + message.server_message.partition_session_id, + ) self._on_partition_session_stop(message.server_message) elif isinstance( message.server_message, StreamReadMessage.EndPartitionSession, ): + logger.debug( + "reader stream %s end partition %s", + self._id, + message.server_message.partition_session_id, + ) self._on_end_partition_session(message.server_message) elif isinstance(message.server_message, UpdateTokenResponse): @@ -663,6 +697,7 @@ async def _read_messages_loop(self): self._state_changed.set() except Exception as e: + logger.debug("reader stream %s error: %s", self._id, e) self._set_first_error(e) return @@ -825,6 +860,7 @@ def _read_response_to_batches(self, message: StreamReadMessage.ReadResponse) -> async def _decode_batches_loop(self): while True: batch = await self._batches_to_decode.get() + logger.debug("reader stream %s decode batch %s messages", self._id, len(batch.messages)) await self._decode_batch_inplace(batch) self._add_batch_to_queue(batch) self._state_changed.set() @@ -833,9 +869,21 @@ def _add_batch_to_queue(self, batch: datatypes.PublicBatch): part_sess_id = batch._partition_session.id if part_sess_id in self._message_batches: self._message_batches[part_sess_id]._extend(batch) + logger.debug( + "reader stream %s extend batch partition=%s size=%s", + self._id, + part_sess_id, + len(batch.messages), + ) return self._message_batches[part_sess_id] = batch + logger.debug( + "reader stream %s new batch partition=%s size=%s", + self._id, + part_sess_id, + len(batch.messages), + ) async def _decode_batch_inplace(self, batch): if batch._codec == Codec.CODEC_RAW: @@ -882,6 +930,7 @@ async def close(self, flush: bool): return self._closed = True + logger.debug("reader stream %s close", self._id) if flush: await self.flush() @@ -899,3 +948,5 @@ async def close(self, flush: bool): if self._background_tasks: await asyncio.wait(self._background_tasks) + + logger.debug("reader stream %s was closed", self._id) diff --git a/ydb/_topic_reader/topic_reader_asyncio_test.py b/ydb/_topic_reader/topic_reader_asyncio_test.py index 7ad5077c..36f86177 100644 --- a/ydb/_topic_reader/topic_reader_asyncio_test.py +++ b/ydb/_topic_reader/topic_reader_asyncio_test.py @@ -1485,6 +1485,7 @@ async def wait_error(): raise test_error reader_stream_mock_with_error = mock.Mock(ReaderStream) + reader_stream_mock_with_error._id = 0 reader_stream_mock_with_error.wait_error = mock.AsyncMock(side_effect=wait_error) async def wait_messages_with_error(): @@ -1497,6 +1498,7 @@ async def wait_forever(): await f reader_stream_with_messages = mock.Mock(ReaderStream) + reader_stream_with_messages._id = 0 reader_stream_with_messages.wait_error = mock.AsyncMock(side_effect=wait_forever) reader_stream_with_messages.wait_messages.return_value = None diff --git a/ydb/_topic_reader/topic_reader_sync.py b/ydb/_topic_reader/topic_reader_sync.py index f7590a21..3eea0390 100644 --- a/ydb/_topic_reader/topic_reader_sync.py +++ b/ydb/_topic_reader/topic_reader_sync.py @@ -64,7 +64,7 @@ async def create_reader(): def __del__(self): if not self._closed: try: - logger.warning("Topic reader was not closed properly. Consider using method close().") + logger.debug("Topic reader was not closed properly. Consider using method close().") self.close(flush=False) except BaseException: logger.warning("Something went wrong during reader close in __del__") diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index ec5b2166..eeecbfd2 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -26,6 +26,7 @@ _apis, issues, ) +from .._utilities import AtomicCounter from .._errors import check_retriable_error from .._topic_common import common as topic_common from ..retries import RetrySettings @@ -82,7 +83,7 @@ def __del__(self): if self._closed or self._loop.is_closed(): return try: - logger.warning("Topic writer was not closed properly. Consider using method close().") + logger.debug("Topic writer was not closed properly. Consider using method close().") task = self._loop.create_task(self.close(flush=False)) topic_common.wrap_set_name_for_asyncio_task(task, task_name="close writer") except BaseException: @@ -92,9 +93,11 @@ async def close(self, *, flush: bool = True): if self._closed: return + logger.debug("Close topic writer") self._closed = True await self._reconnector.close(flush) + logger.debug("Topic writer was closed") async def write_with_ack( self, @@ -108,6 +111,10 @@ async def write_with_ack( For wait with timeout use asyncio.wait_for. """ + logger.debug( + "write_with_ack %s messages", + len(messages) if isinstance(messages, list) else 1, + ) futures = await self.write_with_ack_future(messages) if not isinstance(futures, list): futures = [futures] @@ -129,6 +136,10 @@ async def write_with_ack_future( For wait with timeout use asyncio.wait_for. """ + logger.debug( + "write_with_ack_future %s messages", + len(messages) if isinstance(messages, list) else 1, + ) input_single_message = not isinstance(messages, list) converted_messages = [] if isinstance(messages, list): @@ -153,6 +164,10 @@ async def write( For wait with timeout use asyncio.wait_for. """ + logger.debug( + "write %s messages", + len(messages) if isinstance(messages, list) else 1, + ) await self.write_with_ack_future(messages) async def flush(self): @@ -162,6 +177,7 @@ async def flush(self): For wait with timeout use asyncio.wait_for. """ + logger.debug("flush writer") return await self._reconnector.flush() async def wait_init(self) -> PublicWriterInitInfo: @@ -170,6 +186,7 @@ async def wait_init(self) -> PublicWriterInitInfo: For wait with timeout use asyncio.wait_for() """ + logger.debug("wait writer init") return await self._reconnector.wait_init() @@ -225,6 +242,8 @@ async def _on_before_rollback(self, tx: "BaseQueryTxContext"): class WriterAsyncIOReconnector: + _static_id_counter = AtomicCounter() + _closed: bool _loop: asyncio.AbstractEventLoop _credentials: Union[ydb.credentials.Credentials, None] @@ -260,6 +279,7 @@ def __init__( self, driver: SupportedDriverType, settings: WriterSettings, tx: Optional["BaseQueryTxContext"] = None ): self._closed = False + self._id = WriterAsyncIOReconnector._static_id_counter.inc_and_get() self._loop = asyncio.get_running_loop() self._driver = driver self._credentials = driver._credentials @@ -307,12 +327,13 @@ def __init__( ] self._state_changed = asyncio.Event() + logger.debug("init writer reconnector id=%s", self._id) async def close(self, flush: bool): if self._closed: return self._closed = True - logger.debug("Close writer reconnector") + logger.debug("Close writer reconnector id=%s", self._id) if flush: await self.flush() @@ -329,6 +350,8 @@ async def close(self, flush: bool): except TopicWriterStopped: pass + logger.debug("Writer reconnector id=%s was closed", self._id) + async def wait_init(self) -> PublicWriterInitInfo: while True: if self._stop_reason.done(): @@ -418,6 +441,7 @@ async def _connection_loop(self): # noinspection PyBroadException stream_writer = None try: + logger.debug("writer reconnector %s connect attempt %s", self._id, attempt) tx_identity = None if self._tx is None else self._tx._tx_identity() stream_writer = await WriterAsyncIOStream.create( self._driver, @@ -425,6 +449,11 @@ async def _connection_loop(self): self._settings.update_token_interval, tx_identity=tx_identity, ) + logger.debug( + "writer reconnector %s connected stream %s", + self._id, + stream_writer._id, + ) try: if self._init_info is None: self._last_known_seq_no = stream_writer.last_seqno @@ -458,6 +487,11 @@ async def _connection_loop(self): return await asyncio.sleep(err_info.sleep_timeout_seconds) + logger.debug( + "writer reconnector %s retry in %s seconds", + self._id, + err_info.sleep_timeout_seconds, + ) except (asyncio.CancelledError, Exception) as err: self._stop(err) @@ -477,6 +511,12 @@ async def _encode_loop(self): while not self._messages_for_encode.empty(): messages.extend(self._messages_for_encode.get_nowait()) + logger.debug( + "writer reconnector %s encode %s messages", + self._id, + len(messages), + ) + batch_codec = await self._codec_selector(messages) await self._encode_data_inplace(batch_codec, messages) self._add_messages_to_send_queue(messages) @@ -582,6 +622,8 @@ async def _read_loop(self, writer: "WriterAsyncIOStream"): while True: resp = await writer.receive() + logger.debug("writer reconnector %s received %s acks", self._id, len(resp.acks)) + for ack in resp.acks: self._handle_receive_ack(ack) @@ -604,20 +646,37 @@ def _handle_receive_ack(self, ack): else: raise TopicWriterError("internal error - receive unexpected ack message.") message_future.set_result(result) + logger.debug( + "writer reconnector %s ack seqno=%s result=%s", + self._id, + ack.seq_no, + type(result).__name__, + ) async def _send_loop(self, writer: "WriterAsyncIOStream"): try: + logger.debug("writer reconnector %s send loop start", self._id) messages = list(self._messages) last_seq_no = 0 for m in messages: writer.write([m]) + logger.debug( + "writer reconnector %s sent buffered message seqno=%s", + self._id, + m.seq_no, + ) last_seq_no = m.seq_no while True: m = await self._new_messages.get() # type: InternalMessage if m.seq_no > last_seq_no: writer.write([m]) + logger.debug( + "writer reconnector %s sent message seqno=%s", + self._id, + m.seq_no, + ) except asyncio.CancelledError: # the loop task cancelled be parent code, for example for reconnection # no need to stop all work. @@ -639,7 +698,7 @@ def _stop(self, reason: BaseException): f.set_exception(reason) self._state_changed.set() - logger.info("Stop topic writer: %s" % reason) + logger.info("Stop topic writer %s: %s" % (self._id, reason)) async def flush(self): if not self._messages_future: @@ -650,6 +709,8 @@ async def flush(self): class WriterAsyncIOStream: + _static_id_counter = AtomicCounter() + # todo slots _closed: bool @@ -674,6 +735,7 @@ def __init__( tx_identity: Optional[TransactionIdentity] = None, ): self._closed = False + self._id = WriterAsyncIOStream._static_id_counter.inc_and_get() self._update_token_interval = update_token_interval self._get_token_function = get_token_function @@ -686,12 +748,14 @@ async def close(self): if self._closed: return self._closed = True + logger.debug("writer stream %s close", self._id) if self._update_token_task: self._update_token_task.cancel() await asyncio.wait([self._update_token_task]) self._stream.close() + logger.debug("writer stream %s was closed", self._id) @staticmethod async def create( @@ -711,6 +775,11 @@ async def create( tx_identity=tx_identity, ) await writer._start(stream, init_request) + logger.debug( + "writer stream %s started seqno=%s", + writer._id, + writer.last_seqno, + ) return writer async def receive(self) -> StreamWriteMessage.WriteResponse: @@ -727,6 +796,7 @@ async def receive(self) -> StreamWriteMessage.WriteResponse: raise Exception("Unknown message while read writer answers: %s" % item) async def _start(self, stream: IGrpcWrapperAsyncIO, init_message: StreamWriteMessage.InitRequest): + logger.debug("writer stream %s send init request", self._id) stream.write(StreamWriteMessage.FromClient(init_message)) resp = await stream.receive() @@ -736,6 +806,11 @@ async def _start(self, stream: IGrpcWrapperAsyncIO, init_message: StreamWriteMes self.last_seqno = resp.last_seq_no self.supported_codecs = [PublicCodec(codec) for codec in resp.supported_codecs] + logger.debug( + "writer stream %s init done last_seqno=%s", + self._id, + self.last_seqno, + ) self._stream = stream @@ -755,6 +830,8 @@ def write(self, messages: List[InternalMessage]): if self._closed: raise RuntimeError("Can not write on closed stream.") + logger.debug("writer stream %s send %s messages", self._id, len(messages)) + for request in messages_to_proto_requests(messages, self._tx_identity): self._stream.write(request) @@ -764,6 +841,7 @@ async def _update_token_loop(self): token = self._get_token_function() if asyncio.iscoroutine(token): token = await token + logger.debug("writer stream %s update token", self._id) await self._update_token(token=token) async def _update_token(self, token: str): @@ -771,5 +849,6 @@ async def _update_token(self, token: str): try: msg = StreamWriteMessage.FromClient(UpdateTokenRequest(token)) self._stream.write(msg) + logger.debug("writer stream %s token sent", self._id) finally: self._update_token_event.clear() diff --git a/ydb/_topic_writer/topic_writer_asyncio_test.py b/ydb/_topic_writer/topic_writer_asyncio_test.py index cf88f797..3b67ba08 100644 --- a/ydb/_topic_writer/topic_writer_asyncio_test.py +++ b/ydb/_topic_writer/topic_writer_asyncio_test.py @@ -251,6 +251,7 @@ def __init__( update_token_interval: Optional[int, float] = None, get_token_function: Optional[Callable[[], str]] = None, ): + self._id = 0 self.last_seqno = 0 self.from_server = asyncio.Queue() self.from_client = asyncio.Queue() diff --git a/ydb/_topic_writer/topic_writer_sync.py b/ydb/_topic_writer/topic_writer_sync.py index 954864c9..7806d7fa 100644 --- a/ydb/_topic_writer/topic_writer_sync.py +++ b/ydb/_topic_writer/topic_writer_sync.py @@ -76,7 +76,7 @@ def __exit__(self, exc_type, exc_val, exc_tb): def __del__(self): if not self._closed: try: - logger.warning("Topic writer was not closed properly. Consider using method close().") + logger.debug("Topic writer was not closed properly. Consider using method close().") self.close(flush=False) except BaseException: logger.warning("Something went wrong during writer close in __del__") @@ -85,6 +85,7 @@ def close(self, *, flush: bool = True, timeout: TimeoutType = None): if self._closed: return + logger.debug("Close topic writer") self._closed = True self._caller.safe_call_with_result(self._async_writer.close(flush=flush), timeout) @@ -101,16 +102,22 @@ def async_flush(self) -> Future: def flush(self, *, timeout=None): self._check_closed() + logger.debug("flush writer") + return self._caller.unsafe_call_with_result(self._async_writer.flush(), timeout) def async_wait_init(self) -> Future[PublicWriterInitInfo]: self._check_closed() + logger.debug("wait writer init") + return self._caller.unsafe_call_with_future(self._async_writer.wait_init()) def wait_init(self, *, timeout: TimeoutType = None) -> PublicWriterInitInfo: self._check_closed() + logger.debug("wait writer init") + return self._caller.unsafe_call_with_result(self._async_writer.wait_init(), timeout) def write( @@ -120,6 +127,11 @@ def write( ): self._check_closed() + logger.debug( + "write %s messages", + len(messages) if isinstance(messages, list) else 1, + ) + self._caller.safe_call_with_result(self._async_writer.write(messages), timeout) def async_write_with_ack( @@ -137,6 +149,11 @@ def write_with_ack( ) -> Union[PublicWriteResult, List[PublicWriteResult]]: self._check_closed() + logger.debug( + "write_with_ack %s messages", + len(messages) if isinstance(messages, list) else 1, + ) + return self._caller.unsafe_call_with_result(self._async_writer.write_with_ack(messages), timeout=timeout) diff --git a/ydb/topic.py b/ydb/topic.py index aa6c7eb4..5e86be68 100644 --- a/ydb/topic.py +++ b/ydb/topic.py @@ -122,7 +122,7 @@ def __init__(self, driver: aio.Driver, settings: Optional[TopicClientSettings] = def __del__(self): if not self._closed: try: - logger.warning("Topic client was not closed properly. Consider using method close().") + logger.debug("Topic client was not closed properly. Consider using method close().") self.close() except BaseException: logger.warning("Something went wrong during topic client close in __del__") @@ -161,6 +161,7 @@ async def create_topic( :param consumers: List of consumers for this topic :param metering_mode: Metering mode for the topic in a serverless database """ + logger.debug("Create topic request: path=%s", path) args = locals().copy() del args["self"] req = _ydb_topic_public_types.CreateTopicRequestParams(**args) @@ -210,6 +211,7 @@ async def alter_topic( :param set_supported_codecs: List of allowed codecs for writers. Writes with codec not from this list are forbidden. Empty list mean disable codec compatibility checks for the topic. """ + logger.debug("Alter topic request: path=%s", path) args = locals().copy() del args["self"] req = _ydb_topic_public_types.AlterTopicRequestParams(**args) @@ -222,6 +224,7 @@ async def alter_topic( ) async def describe_topic(self, path: str, include_stats: bool = False) -> TopicDescription: + logger.debug("Describe topic request: path=%s", path) args = locals().copy() del args["self"] req = _ydb_topic_public_types.DescribeTopicRequestParams(**args) @@ -234,6 +237,7 @@ async def describe_topic(self, path: str, include_stats: bool = False) -> TopicD return res.to_public() async def drop_topic(self, path: str): + logger.debug("Drop topic request: path=%s", path) req = _ydb_topic_public_types.DropTopicRequestParams(path=path) await self._driver( req.to_proto(), @@ -257,6 +261,8 @@ def reader( event_handler: Optional[TopicReaderEvents.EventHandler] = None, ) -> TopicReaderAsyncIO: + logger.debug("Create reader for topic=%s consumer=%s", topic, consumer) + if not decoder_executor: decoder_executor = self._executor @@ -301,6 +307,7 @@ def writer( # If max_worker in the executor is 1 - then encoders will be called from the thread without parallel. encoder_executor: Optional[concurrent.futures.Executor] = None, ) -> TopicWriterAsyncIO: + logger.debug("Create writer for topic=%s producer_id=%s", topic, producer_id) args = locals().copy() del args["self"] @@ -329,6 +336,7 @@ def tx_writer( # If max_worker in the executor is 1 - then encoders will be called from the thread without parallel. encoder_executor: Optional[concurrent.futures.Executor] = None, ) -> TopicTxWriterAsyncIO: + logger.debug("Create tx writer for topic=%s tx=%s", topic, tx) args = locals().copy() del args["self"] del args["tx"] @@ -343,6 +351,13 @@ def tx_writer( async def commit_offset( self, path: str, consumer: str, partition_id: int, offset: int, read_session_id: Optional[str] = None ) -> None: + logger.debug( + "Commit offset: path=%s partition_id=%s offset=%s consumer=%s", + path, + partition_id, + offset, + consumer, + ) req = _ydb_topic.CommitOffsetRequest( path=path, consumer=consumer, @@ -362,6 +377,7 @@ def close(self): if self._closed: return + logger.debug("Close topic client") self._closed = True self._executor.shutdown(wait=False) @@ -433,6 +449,7 @@ def create_topic( :param consumers: List of consumers for this topic :param metering_mode: Metering mode for the topic in a serverless database """ + logger.debug("Create topic request: path=%s", path) args = locals().copy() del args["self"] self._check_closed() @@ -484,6 +501,7 @@ def alter_topic( :param set_supported_codecs: List of allowed codecs for writers. Writes with codec not from this list are forbidden. Empty list mean disable codec compatibility checks for the topic. """ + logger.debug("Alter topic request: path=%s", path) args = locals().copy() del args["self"] self._check_closed() @@ -498,6 +516,7 @@ def alter_topic( ) def describe_topic(self, path: str, include_stats: bool = False) -> TopicDescription: + logger.debug("Describe topic request: path=%s", path) args = locals().copy() del args["self"] self._check_closed() @@ -514,6 +533,8 @@ def describe_topic(self, path: str, include_stats: bool = False) -> TopicDescrip def drop_topic(self, path: str): self._check_closed() + logger.debug("Drop topic request: path=%s", path) + req = _ydb_topic_public_types.DropTopicRequestParams(path=path) self._driver( req.to_proto(), @@ -536,6 +557,7 @@ def reader( auto_partitioning_support: Optional[bool] = True, # Auto partitioning feature flag. Default - True. event_handler: Optional[TopicReaderEvents.EventHandler] = None, ) -> TopicReader: + logger.debug("Create reader for topic=%s consumer=%s", topic, consumer) if not decoder_executor: decoder_executor = self._executor @@ -580,6 +602,7 @@ def writer( # If max_worker in the executor is 1 - then encoders will be called from the thread without parallel. encoder_executor: Optional[concurrent.futures.Executor] = None, # default shared client executor pool ) -> TopicWriter: + logger.debug("Create writer for topic=%s producer_id=%s", topic, producer_id) args = locals().copy() del args["self"] self._check_closed() @@ -609,6 +632,7 @@ def tx_writer( # If max_worker in the executor is 1 - then encoders will be called from the thread without parallel. encoder_executor: Optional[concurrent.futures.Executor] = None, # default shared client executor pool ) -> TopicWriter: + logger.debug("Create tx writer for topic=%s tx=%s", topic, tx) args = locals().copy() del args["self"] del args["tx"] @@ -624,6 +648,13 @@ def tx_writer( def commit_offset( self, path: str, consumer: str, partition_id: int, offset: int, read_session_id: Optional[str] = None ) -> None: + logger.debug( + "Commit offset: path=%s partition_id=%s offset=%s consumer=%s", + path, + partition_id, + offset, + consumer, + ) req = _ydb_topic.CommitOffsetRequest( path=path, consumer=consumer, @@ -643,8 +674,10 @@ def close(self): if self._closed: return + logger.debug("Close topic client") self._closed = True self._executor.shutdown(wait=False) + logger.debug("Topic client was closed") def _check_closed(self): if not self._closed: From 67a565136988cdb4093aee1b932ccf9121e1cb63 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 1 Jul 2025 11:44:10 +0300 Subject: [PATCH 422/429] Add default grpc keepalive value --- ydb/connection.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/ydb/connection.py b/ydb/connection.py index 8e65cd3b..d5b6ed50 100644 --- a/ydb/connection.py +++ b/ydb/connection.py @@ -26,6 +26,7 @@ YDB_REQUEST_TYPE_HEADER = "x-ydb-request-type" _DEFAULT_MAX_GRPC_MESSAGE_SIZE = 64 * 10**6 +_DEFAULT_KEEPALIVE_TIMEOUT = 10000 def _message_to_string(message): @@ -185,15 +186,18 @@ def _construct_channel_options(driver_config, endpoint_options=None): getattr(driver_config, "grpc_lb_policy_name", "round_robin"), ), ] - if driver_config.grpc_keep_alive_timeout is not None: - _default_connect_options.extend( - [ - ("grpc.keepalive_time_ms", driver_config.grpc_keep_alive_timeout >> 3), - ("grpc.keepalive_timeout_ms", driver_config.grpc_keep_alive_timeout), - ("grpc.http2.max_pings_without_data", 0), - ("grpc.keepalive_permit_without_calls", 0), - ] - ) + if driver_config.grpc_keep_alive_timeout is None: + driver_config.grpc_keep_alive_timeout = _DEFAULT_KEEPALIVE_TIMEOUT + + _default_connect_options.extend( + [ + ("grpc.keepalive_time_ms", driver_config.grpc_keep_alive_timeout >> 3), + ("grpc.keepalive_timeout_ms", driver_config.grpc_keep_alive_timeout), + ("grpc.http2.max_pings_without_data", 0), + ("grpc.keepalive_permit_without_calls", 0), + ] + ) + if endpoint_options is not None: if endpoint_options.ssl_target_name_override: _default_connect_options.append( From 84015ee0d691405765923751fc4a664e41130430 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 1 Jul 2025 14:43:30 +0300 Subject: [PATCH 423/429] Add async methods to QuerySessionPool --- tests/query/test_query_session_pool.py | 56 ++++++++++++++++++++- ydb/issues.py | 8 +++ ydb/query/pool.py | 70 +++++++++++++++++++++++++- 3 files changed, 132 insertions(+), 2 deletions(-) diff --git a/tests/query/test_query_session_pool.py b/tests/query/test_query_session_pool.py index 6b5a7bf4..5901c8c8 100644 --- a/tests/query/test_query_session_pool.py +++ b/tests/query/test_query_session_pool.py @@ -1,5 +1,7 @@ import pytest import ydb +import time +from concurrent import futures from typing import Optional @@ -132,7 +134,7 @@ def test_pool_recreates_bad_sessions(self, pool: QuerySessionPool): def test_acquire_from_closed_pool_raises(self, pool: QuerySessionPool): pool.stop() - with pytest.raises(RuntimeError): + with pytest.raises(ydb.SessionPoolClosed): pool.acquire(1) def test_no_session_leak(self, driver_sync, docker_project): @@ -146,3 +148,55 @@ def test_no_session_leak(self, driver_sync, docker_project): docker_project.start() pool.stop() + + def test_execute_with_retries_async(self, pool: QuerySessionPool): + fut = pool.execute_with_retries_async("select 1;") + res = fut.result() + assert len(res) == 1 + + def test_retry_operation_async(self, pool: QuerySessionPool): + def callee(session: QuerySession): + with session.transaction() as tx: + iterator = tx.execute("select 1;", commit_tx=True) + return [result_set for result_set in iterator] + + fut = pool.retry_operation_async(callee) + res = fut.result() + assert len(res) == 1 + + def test_retry_tx_async(self, pool: QuerySessionPool): + retry_no = 0 + + def callee(tx: QueryTxContext): + nonlocal retry_no + if retry_no < 2: + retry_no += 1 + raise ydb.Unavailable("Fake fast backoff error") + result_stream = tx.execute("SELECT 1") + return [result_set for result_set in result_stream] + + result = pool.retry_tx_async(callee=callee).result() + assert len(result) == 1 + assert retry_no == 2 + + def test_execute_with_retries_async_many_calls(self, pool: QuerySessionPool): + futs = [pool.execute_with_retries_async("select 1;") for _ in range(10)] + results = [f.result() for f in futures.as_completed(futs)] + assert all(len(r) == 1 for r in results) + + def test_future_waits_on_stop(self, pool: QuerySessionPool): + def callee(session: QuerySession): + time.sleep(0.1) + with session.transaction() as tx: + it = tx.execute("select 1;", commit_tx=True) + return [rs for rs in it] + + fut = pool.retry_operation_async(callee) + pool.stop() + assert fut.done() + assert len(fut.result()) == 1 + + def test_async_methods_after_stop_raise(self, pool: QuerySessionPool): + pool.stop() + with pytest.raises(ydb.SessionPoolClosed): + pool.execute_with_retries_async("select 1;") diff --git a/ydb/issues.py b/ydb/issues.py index 8b098667..7337c428 100644 --- a/ydb/issues.py +++ b/ydb/issues.py @@ -51,6 +51,7 @@ class StatusCode(enum.IntEnum): UNAUTHENTICATED = _CLIENT_STATUSES_FIRST + 30 SESSION_POOL_EMPTY = _CLIENT_STATUSES_FIRST + 40 + SESSION_POOL_CLOSED = _CLIENT_STATUSES_FIRST + 50 # TODO: convert from proto IssueMessage @@ -179,6 +180,13 @@ class SessionPoolEmpty(Error, queue.Empty): status = StatusCode.SESSION_POOL_EMPTY +class SessionPoolClosed(Error): + status = StatusCode.SESSION_POOL_CLOSED + + def __init__(self): + super().__init__("Session pool is closed.") + + class ClientInternalError(Error): status = StatusCode.CLIENT_INTERNAL_ERROR diff --git a/ydb/query/pool.py b/ydb/query/pool.py index 1cf95ac0..fc05950c 100644 --- a/ydb/query/pool.py +++ b/ydb/query/pool.py @@ -1,4 +1,5 @@ import logging +from concurrent import futures from typing import ( Callable, Optional, @@ -36,14 +37,17 @@ def __init__( size: int = 100, *, query_client_settings: Optional[QueryClientSettings] = None, + workers_threads_count: int = 4, ): """ :param driver: A driver instance. :param size: Max size of Session Pool. :param query_client_settings: ydb.QueryClientSettings object to configure QueryService behavior + :param workers_threads_count: A number of threads in executor used for *_async methods """ self._driver = driver + self._tp = futures.ThreadPoolExecutor(workers_threads_count) self._queue = queue.Queue() self._current_size = 0 self._size = size @@ -72,7 +76,7 @@ def acquire(self, timeout: Optional[float] = None) -> QuerySession: try: if self._should_stop.is_set(): logger.error("An attempt to take session from closed session pool.") - raise RuntimeError("An attempt to take session from closed session pool.") + raise issues.SessionPoolClosed() session = None try: @@ -132,6 +136,9 @@ def retry_operation_sync(self, callee: Callable, retry_settings: Optional[RetryS :return: Result sets or exception in case of execution errors. """ + if self._should_stop.is_set(): + raise issues.SessionPoolClosed() + retry_settings = RetrySettings() if retry_settings is None else retry_settings def wrapped_callee(): @@ -140,6 +147,38 @@ def wrapped_callee(): return retry_operation_sync(wrapped_callee, retry_settings) + def retry_tx_async( + self, + callee: Callable, + tx_mode: Optional[BaseQueryTxMode] = None, + retry_settings: Optional[RetrySettings] = None, + *args, + **kwargs, + ) -> futures.Future: + """Asynchronously execute a transaction in a retriable way.""" + + if self._should_stop.is_set(): + raise issues.SessionPoolClosed() + + return self._tp.submit( + self.retry_tx_sync, + callee, + tx_mode, + retry_settings, + *args, + **kwargs, + ) + + def retry_operation_async( + self, callee: Callable, retry_settings: Optional[RetrySettings] = None, *args, **kwargs + ) -> futures.Future: + """Asynchronously execute a retryable operation.""" + + if self._should_stop.is_set(): + raise issues.SessionPoolClosed() + + return self._tp.submit(self.retry_operation_sync, callee, retry_settings, *args, **kwargs) + def retry_tx_sync( self, callee: Callable, @@ -161,6 +200,9 @@ def retry_tx_sync( :return: Result sets or exception in case of execution errors. """ + if self._should_stop.is_set(): + raise issues.SessionPoolClosed() + tx_mode = tx_mode if tx_mode else _ydb_query_public.QuerySerializableReadWrite() retry_settings = RetrySettings() if retry_settings is None else retry_settings @@ -194,6 +236,9 @@ def execute_with_retries( :return: Result sets or exception in case of execution errors. """ + if self._should_stop.is_set(): + raise issues.SessionPoolClosed() + retry_settings = RetrySettings() if retry_settings is None else retry_settings def wrapped_callee(): @@ -203,11 +248,34 @@ def wrapped_callee(): return retry_operation_sync(wrapped_callee, retry_settings) + def execute_with_retries_async( + self, + query: str, + parameters: Optional[dict] = None, + retry_settings: Optional[RetrySettings] = None, + *args, + **kwargs, + ) -> futures.Future: + """Asynchronously execute a query with retries.""" + + if self._should_stop.is_set(): + raise issues.SessionPoolClosed() + + return self._tp.submit( + self.execute_with_retries, + query, + parameters, + retry_settings, + *args, + **kwargs, + ) + def stop(self, timeout=None): acquire_timeout = timeout if timeout is not None else -1 acquired = self._lock.acquire(timeout=acquire_timeout) try: self._should_stop.set() + self._tp.shutdown(wait=True) while True: try: session = self._queue.get_nowait() From 7f916bf65b17429ae059ccf06fb9e419baec7d33 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 1 Jul 2025 15:36:37 +0300 Subject: [PATCH 424/429] Wrap prepare execute request exceptions to ydb.Error --- ydb/query/base.py | 63 +++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/ydb/query/base.py b/ydb/query/base.py index 2c16716c..4007e72d 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -137,40 +137,43 @@ def create_execute_query_request( parameters: Optional[dict], concurrent_result_sets: Optional[bool], ) -> ydb_query.ExecuteQueryRequest: - syntax = QuerySyntax.YQL_V1 if not syntax else syntax - exec_mode = QueryExecMode.EXECUTE if not exec_mode else exec_mode - stats_mode = QueryStatsMode.NONE if stats_mode is None else stats_mode + try: + syntax = QuerySyntax.YQL_V1 if not syntax else syntax + exec_mode = QueryExecMode.EXECUTE if not exec_mode else exec_mode + stats_mode = QueryStatsMode.NONE if stats_mode is None else stats_mode - tx_control = None - if not tx_id and not tx_mode: tx_control = None - elif tx_id: - tx_control = ydb_query.TransactionControl( - tx_id=tx_id, - commit_tx=commit_tx, - begin_tx=None, - ) - else: - tx_control = ydb_query.TransactionControl( - begin_tx=ydb_query.TransactionSettings( - tx_mode=tx_mode, + if not tx_id and not tx_mode: + tx_control = None + elif tx_id: + tx_control = ydb_query.TransactionControl( + tx_id=tx_id, + commit_tx=commit_tx, + begin_tx=None, + ) + else: + tx_control = ydb_query.TransactionControl( + begin_tx=ydb_query.TransactionSettings( + tx_mode=tx_mode, + ), + commit_tx=commit_tx, + tx_id=None, + ) + + return ydb_query.ExecuteQueryRequest( + session_id=session_id, + query_content=ydb_query.QueryContent.from_public( + query=query, + syntax=syntax, ), - commit_tx=commit_tx, - tx_id=None, + tx_control=tx_control, + exec_mode=exec_mode, + parameters=parameters, + concurrent_result_sets=concurrent_result_sets, + stats_mode=stats_mode, ) - - return ydb_query.ExecuteQueryRequest( - session_id=session_id, - query_content=ydb_query.QueryContent.from_public( - query=query, - syntax=syntax, - ), - tx_control=tx_control, - exec_mode=exec_mode, - parameters=parameters, - concurrent_result_sets=concurrent_result_sets, - stats_mode=stats_mode, - ) + except BaseException as e: + raise issues.ClientInternalError("Unable to prepare execute request") from e def bad_session_handler(func): From a6fe9471796b9bd7e4cd72f6caebeb3336af241a Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 1 Jul 2025 19:15:05 +0300 Subject: [PATCH 425/429] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da9e9f70..d2d0a2b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +* Wrap prepare execute request exceptions to ydb.Error +* Add async methods to QuerySessionPool +* Add default grpc keepalive value +* Add detailed debug logs to topic instances + ## 3.21.5 ## * Ability to create Date type from datetime From 3706262144883530b9e54ac068fff689766bd944 Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 1 Jul 2025 16:16:36 +0000 Subject: [PATCH 426/429] Release: 3.21.6 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2d0a2b6..82601c93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.21.6 ## * Wrap prepare execute request exceptions to ydb.Error * Add async methods to QuerySessionPool * Add default grpc keepalive value diff --git a/setup.py b/setup.py index 32e59926..6610c0d4 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.21.5", # AUTOVERSION + version="3.21.6", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index c4d013eb..9062621a 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.21.5" +VERSION = "3.21.6" From be5055feb2d31ce3fc84e9de413754a9ff321310 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Wed, 30 Jul 2025 16:27:47 +0300 Subject: [PATCH 427/429] Remove 10min timeout from topic stream --- ydb/_constants.py | 2 + ydb/_grpc/grpcwrapper/common_utils.py | 33 ++++++++++-- ydb/_topic_common/test_helpers.py | 2 +- ydb/_topic_reader/topic_reader_asyncio.py | 10 +++- .../topic_reader_asyncio_test.py | 44 +++++++++++++++- ydb/_topic_writer/topic_writer_asyncio.py | 8 ++- .../topic_writer_asyncio_test.py | 51 +++++++++++++++++++ ydb/aio/query/session.py | 5 +- ydb/query/session.py | 14 +++-- 9 files changed, 151 insertions(+), 18 deletions(-) create mode 100644 ydb/_constants.py diff --git a/ydb/_constants.py b/ydb/_constants.py new file mode 100644 index 00000000..af52c4e3 --- /dev/null +++ b/ydb/_constants.py @@ -0,0 +1,2 @@ +DEFAULT_INITIAL_RESPONSE_TIMEOUT = 600 +DEFAULT_LONG_STREAM_TIMEOUT = 31536000 # year diff --git a/ydb/_grpc/grpcwrapper/common_utils.py b/ydb/_grpc/grpcwrapper/common_utils.py index 7fb5b684..9b4529de 100644 --- a/ydb/_grpc/grpcwrapper/common_utils.py +++ b/ydb/_grpc/grpcwrapper/common_utils.py @@ -34,6 +34,8 @@ from ..common.protos import ydb_topic_pb2, ydb_issue_message_pb2 from ... import issues, connection +from ...settings import BaseRequestSettings +from ..._constants import DEFAULT_LONG_STREAM_TIMEOUT class IFromProto(abc.ABC): @@ -131,7 +133,7 @@ async def __anext__(self): class IGrpcWrapperAsyncIO(abc.ABC): @abc.abstractmethod - async def receive(self) -> Any: + async def receive(self, timeout: Optional[int] = None) -> Any: ... @abc.abstractmethod @@ -161,6 +163,13 @@ def __init__(self, convert_server_grpc_to_wrapper): self._stream_call = None self._wait_executor = None + self._stream_settings: BaseRequestSettings = ( + BaseRequestSettings() + .with_operation_timeout(DEFAULT_LONG_STREAM_TIMEOUT) + .with_cancel_after(DEFAULT_LONG_STREAM_TIMEOUT) + .with_timeout(DEFAULT_LONG_STREAM_TIMEOUT) + ) + def __del__(self): self._clean_executor(wait=False) @@ -188,6 +197,7 @@ async def _start_asyncio_driver(self, driver: DriverIO, stub, method): requests_iterator, stub, method, + settings=self._stream_settings, ) self._stream_call = stream_call self.from_server_grpc = stream_call.__aiter__() @@ -196,14 +206,29 @@ async def _start_sync_driver(self, driver: Driver, stub, method): requests_iterator = AsyncQueueToSyncIteratorAsyncIO(self.from_client_grpc) self._wait_executor = concurrent.futures.ThreadPoolExecutor(max_workers=1) - stream_call = await to_thread(driver, requests_iterator, stub, method, executor=self._wait_executor) + stream_call = await to_thread( + driver, + requests_iterator, + stub, + method, + executor=self._wait_executor, + settings=self._stream_settings, + ) self._stream_call = stream_call self.from_server_grpc = SyncToAsyncIterator(stream_call.__iter__(), self._wait_executor) - async def receive(self) -> Any: + async def receive(self, timeout: Optional[int] = None) -> Any: # todo handle grpc exceptions and convert it to internal exceptions try: - grpc_message = await self.from_server_grpc.__anext__() + if timeout is None: + grpc_message = await self.from_server_grpc.__anext__() + else: + + async def get_response(): + return await self.from_server_grpc.__anext__() + + grpc_message = await asyncio.wait_for(get_response(), timeout) + except (grpc.RpcError, grpc.aio.AioRpcError) as e: raise connection._rpc_error_handler(self._connection_state, e) diff --git a/ydb/_topic_common/test_helpers.py b/ydb/_topic_common/test_helpers.py index 084146f8..1f50ccaf 100644 --- a/ydb/_topic_common/test_helpers.py +++ b/ydb/_topic_common/test_helpers.py @@ -15,7 +15,7 @@ def __init__(self): self.from_client = asyncio.Queue() self._closed = False - async def receive(self) -> typing.Any: + async def receive(self, timeout: typing.Optional[int] = None) -> typing.Any: if self._closed: raise Exception("read from closed StreamMock") diff --git a/ydb/_topic_reader/topic_reader_asyncio.py b/ydb/_topic_reader/topic_reader_asyncio.py index 7baadacb..b855a80b 100644 --- a/ydb/_topic_reader/topic_reader_asyncio.py +++ b/ydb/_topic_reader/topic_reader_asyncio.py @@ -38,6 +38,8 @@ if typing.TYPE_CHECKING: from ..query.transaction import BaseQueryTxContext +from .._constants import DEFAULT_INITIAL_RESPONSE_TIMEOUT + logger = logging.getLogger(__name__) @@ -490,7 +492,13 @@ async def _start(self, stream: IGrpcWrapperAsyncIO, init_message: StreamReadMess logger.debug("reader stream %s send init request", self._id) stream.write(StreamReadMessage.FromClient(client_message=init_message)) - init_response = await stream.receive() # type: StreamReadMessage.FromServer + try: + init_response = await stream.receive( + timeout=DEFAULT_INITIAL_RESPONSE_TIMEOUT + ) # type: StreamReadMessage.FromServer + except asyncio.TimeoutError: + raise TopicReaderError("Timeout waiting for init response") + if isinstance(init_response.server_message, StreamReadMessage.InitResponse): self._session_id = init_response.server_message.session_id logger.debug("reader stream %s initialized session=%s", self._id, self._session_id) diff --git a/ydb/_topic_reader/topic_reader_asyncio_test.py b/ydb/_topic_reader/topic_reader_asyncio_test.py index 36f86177..371aee50 100644 --- a/ydb/_topic_reader/topic_reader_asyncio_test.py +++ b/ydb/_topic_reader/topic_reader_asyncio_test.py @@ -14,7 +14,7 @@ from . import datatypes, topic_reader_asyncio from .datatypes import PublicBatch, PublicMessage from .topic_reader import PublicReaderSettings -from .topic_reader_asyncio import ReaderStream, ReaderReconnector +from .topic_reader_asyncio import ReaderStream, ReaderReconnector, TopicReaderError from .._grpc.grpcwrapper.common_utils import SupportedDriverType, ServerStatus from .._grpc.grpcwrapper.ydb_topic import ( StreamReadMessage, @@ -36,6 +36,8 @@ else: from .._grpc.common.protos import ydb_status_codes_pb2 +from .._constants import DEFAULT_INITIAL_RESPONSE_TIMEOUT + @pytest.fixture(autouse=True) def handle_exceptions(event_loop): @@ -1475,6 +1477,46 @@ def logged(): await wait_condition(logged) + async def test_init_timeout_parameter(self, stream, default_reader_settings): + """Test that ReaderStream._start calls stream.receive with timeout=10""" + reader = ReaderStream(self.default_reader_reconnector_id, default_reader_settings) + init_message = default_reader_settings._init_message() + + # Mock stream.receive to check if timeout is passed + with mock.patch.object(stream, "receive") as mock_receive: + mock_receive.return_value = StreamReadMessage.FromServer( + server_status=ServerStatus(ydb_status_codes_pb2.StatusIds.SUCCESS, []), + server_message=StreamReadMessage.InitResponse(session_id="test_session"), + ) + + await reader._start(stream, init_message) + + # Verify that receive was called with timeout + mock_receive.assert_called_with(timeout=DEFAULT_INITIAL_RESPONSE_TIMEOUT) + + await reader.close(False) + + async def test_init_timeout_behavior(self, stream, default_reader_settings): + """Test that ReaderStream._start raises TopicReaderError when receive times out""" + reader = ReaderStream(self.default_reader_reconnector_id, default_reader_settings) + init_message = default_reader_settings._init_message() + + # Mock stream.receive to directly raise TimeoutError when called with timeout + async def timeout_receive(timeout=None): + if timeout == DEFAULT_INITIAL_RESPONSE_TIMEOUT: + raise asyncio.TimeoutError("Simulated timeout") + return StreamReadMessage.FromServer( + server_status=ServerStatus(ydb_status_codes_pb2.StatusIds.SUCCESS, []), + server_message=StreamReadMessage.InitResponse(session_id="test_session"), + ) + + with mock.patch.object(stream, "receive", side_effect=timeout_receive): + # Should raise TopicReaderError with timeout message + with pytest.raises(TopicReaderError, match="Timeout waiting for init response"): + await reader._start(stream, init_message) + + await reader.close(False) + @pytest.mark.asyncio class TestReaderReconnector: diff --git a/ydb/_topic_writer/topic_writer_asyncio.py b/ydb/_topic_writer/topic_writer_asyncio.py index eeecbfd2..d39606d1 100644 --- a/ydb/_topic_writer/topic_writer_asyncio.py +++ b/ydb/_topic_writer/topic_writer_asyncio.py @@ -49,6 +49,8 @@ if typing.TYPE_CHECKING: from ..query.transaction import BaseQueryTxContext +from .._constants import DEFAULT_INITIAL_RESPONSE_TIMEOUT + logger = logging.getLogger(__name__) @@ -799,7 +801,11 @@ async def _start(self, stream: IGrpcWrapperAsyncIO, init_message: StreamWriteMes logger.debug("writer stream %s send init request", self._id) stream.write(StreamWriteMessage.FromClient(init_message)) - resp = await stream.receive() + try: + resp = await stream.receive(timeout=DEFAULT_INITIAL_RESPONSE_TIMEOUT) + except asyncio.TimeoutError: + raise TopicWriterError("Timeout waiting for init response") + self._ensure_ok(resp) if not isinstance(resp, StreamWriteMessage.InitResponse): raise TopicWriterError("Unexpected answer for init request: %s" % resp) diff --git a/ydb/_topic_writer/topic_writer_asyncio_test.py b/ydb/_topic_writer/topic_writer_asyncio_test.py index 3b67ba08..a616b0b6 100644 --- a/ydb/_topic_writer/topic_writer_asyncio_test.py +++ b/ydb/_topic_writer/topic_writer_asyncio_test.py @@ -43,6 +43,8 @@ from ..credentials import AnonymousCredentials +from .._constants import DEFAULT_INITIAL_RESPONSE_TIMEOUT + FAKE_TRANSACTION_IDENTITY = TransactionIdentity( tx_id="transaction_id", @@ -231,6 +233,55 @@ async def test_update_token(self, stream: StreamMock): await writer.close() + async def test_init_timeout_parameter(self, stream): + """Test that WriterAsyncIOStream._start calls stream.receive with timeout=10""" + writer_id = 1 + settings = WriterSettings(PublicWriterSettings("test-topic", "test-producer")) + + # Mock stream.receive to check if timeout is passed + with mock.patch.object(stream, "receive") as mock_receive: + mock_receive.return_value = StreamWriteMessage.InitResponse( + last_seq_no=0, + session_id="test_session", + partition_id=1, + supported_codecs=[Codec.CODEC_RAW], + status=ServerStatus(StatusCode.SUCCESS, []), + ) + + writer = WriterAsyncIOStream(writer_id, settings) + await writer._start(stream, settings.create_init_request()) + + # Verify that receive was called with timeout + mock_receive.assert_called_with(timeout=DEFAULT_INITIAL_RESPONSE_TIMEOUT) + + await writer.close() + + async def test_init_timeout_behavior(self, stream): + """Test that WriterAsyncIOStream._start raises TopicWriterError when receive times out""" + writer_id = 1 + settings = WriterSettings(PublicWriterSettings("test-topic", "test-producer")) + + # Mock stream.receive to directly raise TimeoutError when called with timeout + async def timeout_receive(timeout=None): + if timeout == DEFAULT_INITIAL_RESPONSE_TIMEOUT: + raise asyncio.TimeoutError("Simulated timeout") + return StreamWriteMessage.InitResponse( + last_seq_no=0, + session_id="test_session", + partition_id=1, + supported_codecs=[Codec.CODEC_RAW], + status=ServerStatus(StatusCode.SUCCESS, []), + ) + + with mock.patch.object(stream, "receive", side_effect=timeout_receive): + writer = WriterAsyncIOStream(writer_id, settings) + + # Should raise TopicWriterError with timeout message + with pytest.raises(TopicWriterError, match="Timeout waiting for init response"): + await writer._start(stream, settings.create_init_request()) + + # Don't close writer since _start failed and _stream was never set + @pytest.mark.asyncio class TestWriterAsyncIOReconnector: diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index fe857878..7a7ba5ba 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -15,10 +15,11 @@ from ...query import base from ...query.session import ( BaseQuerySession, - DEFAULT_ATTACH_FIRST_RESP_TIMEOUT, QuerySessionStateEnum, ) +from ..._constants import DEFAULT_INITIAL_RESPONSE_TIMEOUT + class QuerySession(BaseQuerySession): """Session object for Query Service. It is not recommended to control @@ -47,7 +48,7 @@ async def _attach(self) -> None: try: first_response = await _utilities.get_first_message_with_timeout( self._status_stream, - DEFAULT_ATTACH_FIRST_RESP_TIMEOUT, + DEFAULT_INITIAL_RESPONSE_TIMEOUT, ) if first_response.status != issues.StatusCode.SUCCESS: raise RuntimeError("Failed to attach session") diff --git a/ydb/query/session.py b/ydb/query/session.py index 3cc6c13d..5cfbdc6c 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -18,12 +18,10 @@ from .transaction import QueryTxContext - -logger = logging.getLogger(__name__) +from .._constants import DEFAULT_INITIAL_RESPONSE_TIMEOUT, DEFAULT_LONG_STREAM_TIMEOUT -DEFAULT_ATTACH_FIRST_RESP_TIMEOUT = 600 -DEFAULT_ATTACH_LONG_TIMEOUT = 31536000 # year +logger = logging.getLogger(__name__) class QuerySessionStateEnum(enum.Enum): @@ -142,9 +140,9 @@ def __init__(self, driver: common_utils.SupportedDriverType, settings: Optional[ self._state = QuerySessionState(settings) self._attach_settings: BaseRequestSettings = ( BaseRequestSettings() - .with_operation_timeout(DEFAULT_ATTACH_LONG_TIMEOUT) - .with_cancel_after(DEFAULT_ATTACH_LONG_TIMEOUT) - .with_timeout(DEFAULT_ATTACH_LONG_TIMEOUT) + .with_operation_timeout(DEFAULT_LONG_STREAM_TIMEOUT) + .with_cancel_after(DEFAULT_LONG_STREAM_TIMEOUT) + .with_timeout(DEFAULT_LONG_STREAM_TIMEOUT) ) self._last_query_stats = None @@ -233,7 +231,7 @@ class QuerySession(BaseQuerySession): _stream = None - def _attach(self, first_resp_timeout: int = DEFAULT_ATTACH_FIRST_RESP_TIMEOUT) -> None: + def _attach(self, first_resp_timeout: int = DEFAULT_INITIAL_RESPONSE_TIMEOUT) -> None: self._stream = self._attach_call() status_stream = _utilities.SyncResponseIterator( self._stream, From 65d32d2a652322c3683813ec7fb69141b2d61058 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 4 Aug 2025 16:15:49 +0300 Subject: [PATCH 428/429] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82601c93..731b8eaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Remove default timeout from topic stream + ## 3.21.6 ## * Wrap prepare execute request exceptions to ydb.Error * Add async methods to QuerySessionPool From dd9e1c9418fa390b4af74e0c3e708e31979d4f63 Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 4 Aug 2025 13:17:54 +0000 Subject: [PATCH 429/429] Release: 3.21.7 --- CHANGELOG.md | 1 + setup.py | 2 +- ydb/ydb_version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 731b8eaf..f85def64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 3.21.7 ## * Remove default timeout from topic stream ## 3.21.6 ## diff --git a/setup.py b/setup.py index 6610c0d4..db65a434 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="ydb", - version="3.21.6", # AUTOVERSION + version="3.21.7", # AUTOVERSION description="YDB Python SDK", author="Yandex LLC", author_email="ydb@yandex-team.ru", diff --git a/ydb/ydb_version.py b/ydb/ydb_version.py index 9062621a..d953c2eb 100644 --- a/ydb/ydb_version.py +++ b/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.21.6" +VERSION = "3.21.7"